Samba 3.x < 3.5.22 / 3.6.x < 3.6.17 / 4.0.x < 4.0.8 read_nttrans_ea_lis DoS - Nessus

Medium   Plugin ID: 69276

This page contains detailed information about the Samba 3.x < 3.5.22 / 3.6.x < 3.6.17 / 4.0.x < 4.0.8 read_nttrans_ea_lis DoS Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 69276
Name: Samba 3.x < 3.5.22 / 3.6.x < 3.6.17 / 4.0.x < 4.0.8 read_nttrans_ea_lis DoS
Filename: samba_4_0_8.nasl
Vulnerability Published: 2013-08-05
This Plugin Published: 2013-08-08
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, SMB/samba

Vulnerability Information


Severity: Medium
Vulnerability Published: 2013-08-05
Patch Published: 2013-08-05
CVE [?]: CVE-2013-4124
CPE [?]: cpe:/a:samba:samba

Synopsis

The remote Samba server is affected by a denial of service vulnerability.

Description

According to its banner, the version of Samba running on the remote host is 3.x prior to 3.5.22, 3.6.x prior to 3.6.17 or 4.0.x prior to 4.0.8. It is, therefore, potentially affected by a denial of service vulnerability.

An integer overflow error exists in the function 'read_nttrans_ea_lis' in the file 'nttrans.c' that could allow denial of service attacks to be carried out via specially crafted network traffic.

Note if 'guest' connections are allowed, this issue can be exploited by a remote, unauthenticated attacker.

Further note that Nessus has relied only on the self-reported version number and has not actually tried to exploit this issue or determine if the associated patch has been applied.

Solution

Either install the patch referenced in the project's advisory, or upgrade to version 3.5.22 / 3.6.17 / 4.0.8 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.5.22 / 3.6.x < 3.6.17 / 4.0.x < 4.0.8 read_nttrans_ea_lis DoS vulnerability:

  1. Exploit-DB: exploits/linux/dos/27778.txt
    [EDB-27778: Samba 3.5.22/3.6.17/4.0.8 - nttrans Reply Integer Overflow]

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 Score Source [?]: CVE-2013-4124
CVSS V2 Vector: AV:N/AC:L/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C
CVSS Base Score:5.0 (Medium)
Impact Subscore:2.9
Exploitability Subscore:10.0
CVSS Temporal Score:3.9 (Low)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:3.9 (Low)

Go back to menu.

Plugin Source


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

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


include("compat.inc");


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

  script_cve_id("CVE-2013-4124");
  script_bugtraq_id(61597);
  script_xref(name:"EDB-ID", value:"27778");

  script_name(english:"Samba 3.x < 3.5.22 / 3.6.x < 3.6.17 / 4.0.x < 4.0.8 read_nttrans_ea_lis DoS");
  script_summary(english:"Checks version of Samba");

  script_set_attribute(attribute:"synopsis", value:
"The remote Samba server is affected by a denial of service
vulnerability.");
  script_set_attribute(attribute:"description", value:
"According to its banner, the version of Samba running on the remote
host is 3.x prior to 3.5.22, 3.6.x prior to 3.6.17 or 4.0.x prior to
4.0.8.  It is, therefore, potentially affected by a denial of service
vulnerability. 

An integer overflow error exists in the function 'read_nttrans_ea_lis'
in the file 'nttrans.c' that could allow denial of service attacks to be
carried out via specially crafted network traffic. 

Note if 'guest' connections are allowed, this issue can be exploited by
a remote, unauthenticated attacker. 

Further note that Nessus has relied only on the self-reported version
number and has not actually tried to exploit this issue or determine if
the associated patch has been applied.");
  script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/security/CVE-2013-4124.html");
  script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/history/samba-3.5.22.html");
  script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/history/samba-3.6.17.html");
  script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/history/samba-4.0.8.html");
  # https://download.samba.org/pub/samba/patches/security/samba-4.0.7-CVE-2013-4124.patch
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?a31cffce");
  script_set_attribute(attribute:"solution", value:
"Either install the patch referenced in the project's advisory, or
upgrade to version 3.5.22 / 3.6.17 / 4.0.8 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2013-4124");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
script_set_attribute(attribute:"vuln_publication_date", value:"2013/08/05");
  script_set_attribute(attribute:"patch_publication_date", value:"2013/08/05");
  script_set_attribute(attribute:"plugin_publication_date", value:"2013/08/08");

  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) 2013-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");


port = get_kb_item("SMB/transport");
lanman = get_kb_item_or_exit("SMB/NativeLanManager");

if ("Samba " >!< lanman) audit(AUDIT_NOT_LISTEN, "Samba", port);

if (report_paranoia < 2) audit(AUDIT_PARANOID);

if (
  lanman =~ '^Samba 3(\\.[56])?$' ||
  lanman =~ '^Samba 4(\\.0)?$'
) exit(1, "The version, "+lanman+", of the SMB service listening on port "+port+" is not granular enough to make a determination.");

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

# Affected :
# 3.x   < 3.5.22
# 3.6.x < 3.6.17
# 4.0.x   < 4.0.8
if (
  (ver[0] == 3 && ver[1] < 5) ||
  (ver[0] == 3 && ver[1] == 5 && ver[2] < 22) ||
  (ver[0] == 3 && ver[1] == 6 && ver[2] < 17) ||
  (ver[0] == 4 && ver[1] == 0 && ver[2] < 8)
)
{
  if (report_verbosity > 0)
  {
    report = '\n  Installed version : ' + version +
             '\n  Fixed version     : 3.5.22 / 3.6.17 / 4.0.8\n';
    security_warning(port:port, extra:report);
  }
  else security_warning(port);
  exit(0);
}
else audit(AUDIT_LISTEN_NOT_VULN, "Samba", port, version);

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

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

Go back to menu.

How to Run


Here is how to run the Samba 3.x < 3.5.22 / 3.6.x < 3.6.17 / 4.0.x < 4.0.8 read_nttrans_ea_lis DoS 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.5.22 / 3.6.x < 3.6.17 / 4.0.x < 4.0.8 read_nttrans_ea_lis DoS plugin ID 69276.
  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_4_0_8.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

/opt/nessus/bin/nasl -T - samba_4_0_8.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_4_0_8.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 79150 - CentOS 5 : samba3x (CESA-2013:1310)
  • 79159 - CentOS 6 : samba (CESA-2013:1542)
  • 79160 - CentOS 6 : samba4 (CESA-2013:1543)
  • 73063 - CentOS 5 : samba (CESA-2014:0305)
  • 69291 - Fedora 19 : samba-4.0.8-1.fc19 (2013-14312)
  • 69362 - Fedora 18 : samba-4.0.8-1.fc18 (2013-14355)
  • 77268 - Fedora 19 : samba-4.0.21-1.fc19 (2014-9132)
  • 69293 - FreeBSD : samba -- denial of service vulnerability (e21c7c7a-0116-11e3-9e83-3c970e169bc2)
  • 81536 - GLSA-201502-15 : Samba: Multiple vulnerabilities
  • 69230 - Mandriva Linux Security Advisory : samba (MDVSA-2013:207)
  • 75116 - openSUSE Security Update : samba (openSUSE-SU-2013:1339-1)
  • 75121 - openSUSE Security Update : samba (openSUSE-SU-2013:1349-1)
  • 70346 - Oracle Linux 5 : samba3x (ELSA-2013-1310)
  • 71103 - Oracle Linux 6 : samba (ELSA-2013-1542)
  • 71104 - Oracle Linux 6 : samba4 (ELSA-2013-1543)
  • 73070 - Oracle Linux 5 : samba (ELSA-2014-0305)
  • 70245 - RHEL 5 : samba3x (RHSA-2013:1310)
  • 71002 - RHEL 6 : samba (RHSA-2013:1542)
  • 71003 - RHEL 6 : samba4 (RHSA-2013:1543)
  • 73072 - RHEL 5 : samba (RHSA-2014:0305)
  • 70390 - Scientific Linux Security Update : samba3x on SL5.x i386/x86_64 (20130930)
  • 71200 - Scientific Linux Security Update : samba4 on SL6.x i386/x86_64 (20131121)
  • 71201 - Scientific Linux Security Update : samba on SL6.x i386/x86_64 (20131121)
  • 73074 - Scientific Linux Security Update : samba on SL5.x i386/x86_64 (20140317)
  • 69226 - Slackware 13.1 / 13.37 / 14.0 / current : samba (SSA:2013-218-03)
  • 80764 - Oracle Solaris Third-Party Patch Update : samba (cve_2013_4124_denial_of)
  • 70018 - SuSE 11.2 Security Update : Samba (SAT Patch Number 8170)
  • 70019 - SuSE 11.3 Security Update : Samba (SAT Patch Number 8171)
  • 83623 - SUSE SLES11 Security Update : Samba (SUSE-SU-2014:0723-1)
  • 70116 - Ubuntu 10.04 LTS / 12.04 LTS / 12.10 / 13.04 : samba vulnerability (USN-1966-1)

Version


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

Go back to menu.