Samba < 3.0.28 send_mailslot Function Remote Buffer Overflow - Nessus

High   Plugin ID: 29253

This page contains detailed information about the Samba < 3.0.28 send_mailslot Function Remote Buffer Overflow Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 29253
Name: Samba < 3.0.28 send_mailslot Function Remote Buffer Overflow
Filename: samba_3_0_28.nasl
Vulnerability Published: N/A
This Plugin Published: 2007-12-10
Last Modification Time: 2018-11-15
Plugin Version: 1.16
Plugin Type: remote
Plugin Family: Misc.
Dependencies: smb_nativelanman.nasl
Required KB Items [?]: Settings/ParanoidReport, SMB/NativeLanManager

Vulnerability Information


Severity: High
Vulnerability Published: N/A
Patch Published: N/A
CVE [?]: CVE-2007-6015
CPE [?]: cpe:/a:samba:samba

Synopsis

The remote Samba server may be affected by a buffer overflow vulnerability.

Description

According to its banner, the version of the Samba server on the remote host is reportedly affected by a boundary error in 'nmbd' within the 'send_mailslot' function. Provided the 'domain logons' option is enabled in 'smb.conf', an attacker can leverage this issue to produce a stack-based buffer overflow using a 'SAMLOGON' domain logon packet in which the username string is placed at an odd offset and is followed by a long 'GETDC' string.

Note that Nessus has not actually tried to exploit this issue nor verify whether the 'domain logons' option has been enabled on the remote host.

Solution

Upgrade to Samba version 3.0.28 or later.

Public Exploits


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

Here's the list of publicly known exploits and PoCs for verifying the Samba < 3.0.28 send_mailslot Function Remote Buffer Overflow vulnerability:

  1. GitHub: https://github.com/mudongliang/LinuxFlaw/tree/master/CVE-2007-6015
    [CVE-2007-6015]

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:C/I:C/A:C/E:POC/RL:OF/RC:C
CVSS Base Score:9.3 (High)
Impact Subscore:10.0
Exploitability Subscore:8.6
CVSS Temporal Score:7.3 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.3 (High)

Go back to menu.

Plugin Source


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

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

include("compat.inc");

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

  script_cve_id("CVE-2007-6015");
  script_bugtraq_id(26791);

  script_name(english:"Samba < 3.0.28 send_mailslot Function Remote Buffer Overflow");
  script_summary(english:"Checks version of Samba");

  script_set_attribute(attribute:"synopsis", value:
"The remote Samba server may be affected by a buffer overflow
vulnerability.");
  script_set_attribute(attribute:"description", value:
"According to its banner, the version of the Samba server on the remote
host is reportedly affected by a boundary error in 'nmbd' within the
'send_mailslot' function. Provided the 'domain logons' option is
enabled in 'smb.conf', an attacker can leverage this issue to produce
a stack-based buffer overflow using a 'SAMLOGON' domain logon packet
in which the username string is placed at an odd offset and is
followed by a long 'GETDC' string.

Note that Nessus has not actually tried to exploit this issue nor
verify whether the 'domain logons' option has been enabled on the
remote host.");
  script_set_attribute(attribute:"see_also", value:"https://secuniaresearch.flexerasoftware.com/secunia_research/2007-99/advisory/");
  script_set_attribute(attribute:"see_also", value:"https://www.securityfocus.com/archive/1/484818/30/0/threaded");
  script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/security/CVE-2007-6015.html");
  script_set_attribute(attribute:"solution", value:"Upgrade to Samba version 3.0.28 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");
  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_cwe_id(119);

  script_set_attribute(attribute:"plugin_publication_date", value:"2007/12/10");

  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) 2007-2018 Tenable Network Security, Inc.");

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

  exit(0);
}


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


if (report_paranoia < 2) audit(AUDIT_PARANOID);


lanman = get_kb_item("SMB/NativeLanManager");
if("Samba" >< lanman)
{
  if (ereg(pattern:"Samba 3\.0\.([0-9]|1[0-9]|2[0-7])[^0-9]*$", string:lanman, icase:TRUE))
    security_hole(get_kb_item("SMB/transport"));
}

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_0_28.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\samba_3_0_28.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/samba_3_0_28.nasl

Go back to menu.

How to Run


Here is how to run the Samba < 3.0.28 send_mailslot Function Remote Buffer Overflow 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.0.28 send_mailslot Function Remote Buffer Overflow plugin ID 29253.
  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_0_28.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a samba_3_0_28.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_0_28.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_0_28.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: CWE | Common Weakness Enumeration:
  • CWE-119 (Weakness) Improper Restriction of Operations within the Bounds of a Memory Buffer
See also: Similar and related Nessus plugins:
  • 29256 - CentOS 3 / 4 / 5 : samba (CESA-2007:1114)
  • 29262 - Debian DSA-1427-1 : samba - buffer overflow
  • 29279 - Fedora 7 : samba-3.0.28-0.fc7 (2007-4269)
  • 29280 - Fedora 8 : samba-3.0.28-0.fc8 (2007-4275)
  • 29691 - FreeBSD : samba -- buffer overflow vulnerability (ffcbd42d-a8c5-11dc-bec2-02e0185f8d72)
  • 29297 - GLSA-200712-10 : Samba: Execution of arbitrary code
  • 30255 - Mac OS X 10.5.x < 10.5.2 Multiple Vulnerabilities
  • 30254 - Mac OS X Multiple Vulnerabilities (Security Update 2008-001)
  • 29342 - Mandrake Linux Security Advisory : samba (MDKSA-2007:244)
  • 67620 - Oracle Linux 3 / 4 / 5 : samba (ELSA-2007-1114)
  • 29303 - RHEL 2.1 / 3 / 4 / 5 : samba (RHSA-2007:1114)
  • 63847 - RHEL 4 : samba (RHSA-2007:1117)
  • 60328 - Scientific Linux Security Update : samba on SL5.x, SL4.x, SL3.x i386/x86_64
  • 29254 - Slackware 10.0 / 10.1 / 10.2 / 11.0 / 12.0 / current : samba (SSA:2007-344-01)
  • 13559 - Solaris 9 (sparc) : 114684-17
  • 13609 - Solaris 9 (x86) : 114685-17
  • 41171 - SuSE9 Security Update : Samba (YOU Patch Number 12002)
  • 29343 - openSUSE 10 Security Update : cifs-mount (cifs-mount-4777)
  • 29392 - SuSE 10 Security Update : Samba (ZYPP Patch Number 4780)
  • 29738 - Ubuntu 6.06 LTS / 6.10 / 7.04 / 7.10 : samba vulnerability (USN-556-1)
  • 40374 - VMSA-2008-0003 : Moderate: Updated aacraid driver and samba and python Service Console updates
  • 73498 - A10 Networks Remote Buffer Overflow
  • 83763 - Citrix XenServer QEMU FDC Buffer Overflow RCE (CTX201078) (VENOM)
  • 76348 - HylaFAX+ 5.2.4 < 5.5.4 Remote Buffer Overflow
  • 151882 - Libgcrypt < 1.9.1 Heap Buffer Overflow Vulnerability
  • 70103 - IBM Lotus Sametime Multiplexer Buffer Overflow
  • 69319 - Mac OS X Directory Service Buffer Overflow
  • 108521 - MikroTik RouterOS < 6.40.7 or 6.41.x < 6.41.3 SMB Buffer Overflow
  • 17720 - Samba SWAT 3.0.2 - 3.0.4 HTTP Basic Auth base64 Buffer Overflow
  • 25216 - Samba NDR MS-RPC Request Heap-Based Remote Buffer Overflow
  • 58662 - Samba 3.x < 3.6.4 / 3.5.14 / 3.4.16 RPC Multiple Buffer Overflows
  • 142712 - Oracle Solaris PAM parse_user_name() buffer overflow (CVE-2020-14871)
  • 25929 - SurgeMail IMAP Server SEARCH Command Remote Buffer Overflow
  • 146102 - VLC < 3.0.12 Buffer Overflow
  • 105614 - ESXi 6.5 < Build 6765664 Heap Buffer Overflow (VMSA-2017-0021) (remote check)

Version


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

Go back to menu.