Samba 3.x < 3.3.16 / 3.4.14 / 3.5.10 Multiple Vulnerabilities - Nessus

Medium   Plugin ID: 55733

This page contains detailed information about the Samba 3.x < 3.3.16 / 3.4.14 / 3.5.10 Multiple Vulnerabilities Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 55733
Name: Samba 3.x < 3.3.16 / 3.4.14 / 3.5.10 Multiple Vulnerabilities
Filename: samba_3_5_10.nasl
Vulnerability Published: 2011-07-27
This Plugin Published: 2011-07-29
Last Modification Time: 2018-11-15
Plugin Version: 1.10
Plugin Type: remote
Plugin Family: Misc.
Dependencies: smb_nativelanman.nasl
Required KB Items [?]: Settings/ParanoidReport, SMB/NativeLanManager, SMB/samba

Vulnerability Information


Severity: Medium
Vulnerability Published: 2011-07-27
Patch Published: 2011-07-26
CVE [?]: CVE-2011-2522, CVE-2011-2694
CPE [?]: cpe:/a:samba:samba

Synopsis

The remote Samba server is affected by multiple vulnerabilities.

Description

According to its banner, the version of Samba 3.x running on the remote host is earlier than 3.3.16 / 3.4.14 / 3.5.10. As such, it is potentially affected by several vulnerabilities in the Samba Web Administration Tool (SWAT) :

- A cross-site scripting vulnerability exists because of a failure to sanitize input to the username parameter of the 'passwd' program. (Issue #8289)

- A cross-site request forgery (CSRF) vulnerability can allow SWAT to be manipulated when a user who is logged in as root is tricked into clicking specially crafted URLs sent by an attacker. (Issue #8290)

Note that these issues are only exploitable when SWAT it enabled, and it is not enabled by default.

Also note that Nessus has relied only on the self-reported version number and has not actually determined whether SWAT is enabled, tried to exploit these issues, or determine if the associated patches have been applied.

Solution

Either apply one of the patches referenced in the project's advisory or upgrade to 3.3.16 / 3.4.14 / 3.5.10 or later.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Exploit-DB)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Samba 3.x < 3.3.16 / 3.4.14 / 3.5.10 Multiple Vulnerabilities vulnerability:

  1. Exploit-DB: exploits/cgi/webapps/17577.txt
    [EDB-17577: SWAT Samba Web Administration Tool - Cross-Site Request Forgery]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:M/Au:N/C:P/I:P/A:P/E:POC/RL:OF/RC:C
CVSS Base Score:6.8 (Medium)
Impact Subscore:6.4
Exploitability Subscore:8.6
CVSS Temporal Score:5.3 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:5.3 (Medium)

Go back to menu.

Plugin Source


This is the samba_3_5_10.nasl nessus plugin source code. This script is Copyright (C) 2011-2018 Tenable Network Security, Inc.

#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(55733);
  script_version("1.10");
  script_cvs_date("Date: 2018/11/15 20:50:23");

  script_cve_id("CVE-2011-2522", "CVE-2011-2694");
  script_bugtraq_id(48899, 48901);
  script_xref(name:"EDB-ID", value:"17577");
  script_xref(name:"Secunia", value:"45393");

  script_name(english:"Samba 3.x < 3.3.16 / 3.4.14 / 3.5.10 Multiple Vulnerabilities");
  script_summary(english:"Checks version of Samba");

  script_set_attribute(attribute:"synopsis", value:"The remote Samba server is affected by multiple vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"According to its banner, the version of Samba 3.x running on the
remote host is earlier than 3.3.16 / 3.4.14 / 3.5.10. As such, it is
potentially affected by several vulnerabilities in the Samba Web
Administration Tool (SWAT) :

  - A cross-site scripting vulnerability exists because of a
    failure to sanitize input to the username parameter of
    the 'passwd' program. (Issue #8289)

  - A cross-site request forgery (CSRF) vulnerability can
    allow SWAT to be manipulated when a user who is logged
    in as root is tricked into clicking specially crafted
    URLs sent by an attacker. (Issue #8290)

Note that these issues are only exploitable when SWAT it enabled, and
it is not enabled by default.

Also note that Nessus has relied only on the self-reported version
number and has not actually determined whether SWAT is enabled, tried
to exploit these issues, or determine if the associated patches have
been applied.");
  script_set_attribute(attribute:"solution", value:
"Either apply one of the patches referenced in the project's advisory
or upgrade to 3.3.16 / 3.4.14 / 3.5.10 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"see_also", value:"https://bugzilla.samba.org/show_bug.cgi?id=8289");
  script_set_attribute(attribute:"see_also", value:"https://bugzilla.samba.org/show_bug.cgi?id=8290");
  script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/security/CVE-2011-2522");
  script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/security/CVE-2011-2694");
  script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/history/samba-3.3.16.html");
  script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/history/samba-3.4.14.html");
  script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/history/samba-3.5.10.html");

  script_set_attribute(attribute:"vuln_publication_date", value:"2011/07/27");
  script_set_attribute(attribute:"patch_publication_date", value:"2011/07/26");
  script_set_attribute(attribute:"plugin_publication_date", value:"2011/07/29");

  script_set_attribute(attribute:"potential_vulnerability", value:"true");
  script_set_attribute(attribute:"plugin_type", value:"remote");

  script_set_attribute(attribute:"cpe", value:"cpe:/a:samba:samba");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Misc.");

  script_copyright(english:"This script is Copyright (C) 2011-2018 Tenable Network Security, Inc.");

  script_dependencies("smb_nativelanman.nasl");
  script_require_keys("SMB/NativeLanManager", "SMB/samba", "Settings/ParanoidReport");

  exit(0);
}


include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");

if (report_paranoia < 2) audit(AUDIT_PARANOID);

port = get_kb_item("SMB/transport");

lanman = get_kb_item_or_exit("SMB/NativeLanManager");
if ("Samba" >!< lanman) exit(0, "The SMB service listening on port "+port+" is not running Samba.");
if ("Samba 3" >!< lanman) exit(0, "The SMB service listening on port "+port+" is not running Samba 3.x.");

version = lanman - 'Samba ';
if (version =~ "^3(\.[345])?$")
  exit(1, "The Samba version, "+version+" is not granular enough to make a determination.");

ver = split(version, sep:'.', keep:FALSE);
for (i=0; i<max_index(ver); i++)
  ver[i] = int(ver[i]);

if (
  (ver[0] == 3 && ver[1] < 3) ||
  (ver[0] == 3 && ver[1] == 3 && ver[2] < 16) ||
  (ver[0] == 3 && ver[1] == 4 && ver[2] < 14) ||
  (ver[0] == 3 && ver[1] == 5 && ver[2] < 10)
)
{
  if (report_verbosity > 0)
  {
    report = '\n  Installed version  : ' + version +
             '\n  Fixed version      : 3.3.16 / 3.4.14 / 3.5.10\n';
    security_warning(port:port, extra:report);
  }
  else security_warning(port);
  exit(0);
}
else exit(0, 'Samba version '+version+' is listening on port '+port+' and not affected.');

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/samba_3_5_10.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\samba_3_5_10.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/samba_3_5_10.nasl

Go back to menu.

How to Run


Here is how to run the Samba 3.x < 3.3.16 / 3.4.14 / 3.5.10 Multiple Vulnerabilities as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Misc. plugin family.
  6. On the right side table select Samba 3.x < 3.3.16 / 3.4.14 / 3.5.10 Multiple Vulnerabilities plugin ID 55733.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl samba_3_5_10.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a samba_3_5_10.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - samba_3_5_10.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state samba_3_5_10.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: Secunia Advisory: See also: Similar and related Nessus plugins:
  • 55997 - CentOS 4 / 5 : samba (CESA-2011:1219)
  • 56272 - CentOS 5 : samba3x (CESA-2011:1220)
  • 55770 - Debian DSA-2290-1 : samba - XSS
  • 55867 - Fedora 15 : samba-3.5.11-71.fc15.1 (2011-10341)
  • 55868 - Fedora 14 : samba-3.5.11-79.fc14 (2011-10367)
  • 55877 - FreeBSD : Samba -- XSS and request forgery vulnerabilities (56f4b3a6-c82c-11e0-a498-00215c6a37bb)
  • 55709 - Mandriva Linux Security Advisory : samba (MDVSA-2011:121)
  • 68335 - Oracle Linux 4 / 5 : samba (ELSA-2011-1219)
  • 68336 - Oracle Linux 5 : samba3x (ELSA-2011-1220)
  • 68337 - Oracle Linux 6 : cifs-utils / samba (ELSA-2011-1221)
  • 55999 - RHEL 4 / 5 : samba (RHSA-2011:1219)
  • 56000 - RHEL 5 : samba3x (RHSA-2011:1220)
  • 56001 - RHEL 6 : samba and cifs-utils (RHSA-2011:1221)
  • 61121 - Scientific Linux Security Update : samba3x on SL5.x i386/x86_64
  • 61122 - Scientific Linux Security Update : samba and cifs-utils on SL6.x i386/x86_64
  • 61123 - Scientific Linux Security Update : samba on SL4.x, SL5.x i386/x86_64
  • 55737 - Slackware 13.1 / 13.37 / current : samba (SSA:2011-210-03)
  • 75569 - openSUSE Security Update : ldapsmb (openSUSE-SU-2011:0998-1)
  • 75890 - openSUSE Security Update : ldapsmb (openSUSE-SU-2011:0998-1)
  • 57092 - SuSE 11.1 Security Update : Samba (SAT Patch Number 5000)
  • 56033 - SuSE9 Security Update : Samba (YOU Patch Number 12812)
  • 56601 - SuSE 10 Security Update : Samba (ZYPP Patch Number 7656)
  • 57166 - SuSE 10 Security Update : Samba (ZYPP Patch Number 7671)
  • 55758 - Ubuntu 8.04 LTS / 10.04 LTS / 10.10 / 11.04 : samba vulnerabilities (USN-1182-1)
  • 57749 - VMSA-2012-0001 : VMware ESXi and ESX updates to third-party library and ESX Service Console
  • 89105 - VMware ESX / ESXi Service Console and Third-Party Libraries Multiple Vulnerabilities (VMSA-2012-0001) (remote check)
  • 68484 - Oracle Linux 5 : samba (ELSA-2012-0313)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file samba_3_5_10.nasl version 1.10. For more plugins, visit the Nessus Plugin Library.

Go back to menu.