Samba 4.x < 4.9.18 / 4.10.x < 4.10.12 / 4.11.x < 4.11.5 Multiple Vulnerabilities - Nessus

Medium   Plugin ID: 133210

This page contains detailed information about the Samba 4.x < 4.9.18 / 4.10.x < 4.10.12 / 4.11.x < 4.11.5 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: 133210
Name: Samba 4.x < 4.9.18 / 4.10.x < 4.10.12 / 4.11.x < 4.11.5 Multiple Vulnerabilities
Filename: samba_4_11_5.nasl
Vulnerability Published: 2020-01-21
This Plugin Published: 2020-01-24
Last Modification Time: 2020-09-25
Plugin Version: 1.4
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: 2020-01-21
Patch Published: 2020-01-21
CVE [?]: CVE-2019-14902, CVE-2019-14907, CVE-2019-19344
CPE [?]: cpe:/a:samba:samba

Synopsis

The remote Samba server is potentially affected by multiple vulnerabilities.

Description

The version of Samba running on the remote host is 4.x prior to 4.9.18, 4.10.x prior to 4.10.12, or 4.11.x prior to 4.11.5. It is, therefore, affected by multiple vulnerabilities:

- An issue exists with ACL inheritance due to added or removed delegated rights not being inherited across domain controllers. An authenticated, remote attacker can exploit this to create or remove a subtree when the permission should have been removed from the user. (CVE-2019-14902)

- A denial of service (DoS) vulnerability exists due to Samba incorrectly converting characters printed during the NTLMSSP exchange when the log level is set to 3. An authenticated, remote attacker can exploit this issue, to cause some long-lived processes like the RPC server to stop responding. (CVE-2019-14907)

- A use-after-free error exists in the code used to 'tombstone' dynamically created DNS records that have reached their expiry time, due to an improper realloc() call. An authenticated, remote attacker may be able to exploit this to cause read memory to be written to the DB. (CVE-2019-19344)

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Upgrade to Samba version 4.9.18 / 4.10.12 / 4.11.5 or later.

Public Exploits


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

Here's the list of publicly known exploits and PoCs for verifying the Samba 4.x < 4.9.18 / 4.10.x < 4.10.12 / 4.11.x < 4.11.5 Multiple Vulnerabilities vulnerability:

  1. GitHub: https://github.com/JamesGeee/CVE-2019-14902
    [CVE-2019-14902: PoC for exploiting CVE-2019-14902]
  2. GitHub: https://github.com/JamesGeee/CVE-2019-14907
    [CVE-2019-14907: PoC for exploiting CVE-2019-14907]
  3. GitHub: https://github.com/google/honggfuzz
    [CVE-2019-14907]

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-2019-14902
CVSS V2 Vector: AV:N/AC:L/Au:S/C:P/I:P/A:N/E:U/RL:OF/RC:C
CVSS Base Score:5.5 (Medium)
Impact Subscore:4.9
Exploitability Subscore:8.0
CVSS Temporal Score:4.1 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:4.1 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N/E:U/RL:O/RC:C
CVSS Base Score:5.4 (Medium)
Impact Subscore:2.5
Exploitability Subscore:2.8
CVSS Temporal Score:4.7 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:4.7 (Medium)
STIG Severity [?]: I
STIG Risk Rating: High

Go back to menu.

Plugin Source


This is the samba_4_11_5.nasl nessus plugin source code. This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.

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

include('compat.inc');

if (description)
{
  script_id(133210);
  script_version("1.4");
  script_set_attribute(attribute:"plugin_modification_date", value:"2020/09/25");

  script_cve_id("CVE-2019-14902", "CVE-2019-14907", "CVE-2019-19344");
  script_xref(name:"IAVA", value:"2020-A-0035-S");

  script_name(english:"Samba 4.x < 4.9.18 / 4.10.x < 4.10.12 / 4.11.x < 4.11.5 Multiple Vulnerabilities");

  script_set_attribute(attribute:"synopsis", value:
"The remote Samba server is potentially affected by multiple vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"The version of Samba running on the remote host is 4.x prior to 4.9.18, 4.10.x prior to 4.10.12, or 4.11.x prior to
4.11.5.  It is, therefore, affected by multiple vulnerabilities:

  - An issue exists with ACL inheritance due to added or removed delegated rights not being inherited across
    domain controllers. An authenticated, remote attacker can exploit this to create or remove a subtree when
    the permission should have been removed from the user. (CVE-2019-14902)

  - A denial of service (DoS) vulnerability exists due to Samba incorrectly converting characters printed
    during the NTLMSSP exchange when the log level is set to 3. An authenticated, remote attacker can exploit
    this issue, to cause some long-lived processes like the RPC server to stop responding. (CVE-2019-14907)

  - A use-after-free error exists in the code used to 'tombstone' dynamically created DNS records that have
    reached their expiry time, due to an improper realloc() call. An authenticated, remote attacker may be
    able to exploit this to cause read memory to be written to the DB. (CVE-2019-19344)

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version
number.");
  script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/security/CVE-2019-14902.html");
  script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/security/CVE-2019-14907.html");
  script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/security/CVE-2019-19344.html");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Samba version 4.9.18 / 4.10.12 / 4.11.5 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/C:P/I:P/A:N");
  script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2019-14902");

  script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");

  script_set_attribute(attribute:"vuln_publication_date", value:"2020/01/21");
  script_set_attribute(attribute:"patch_publication_date", value:"2020/01/21");
  script_set_attribute(attribute:"plugin_publication_date", value:"2020/01/24");

  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_set_attribute(attribute:"stig_severity", value:"I");
  script_end_attributes();

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

  script_copyright(english:"This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.");

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

  exit(0);
}

include('vcf.inc');
include('vcf_extras.inc');

if (report_paranoia < 2) audit(AUDIT_PARANOID);

app = vcf::samba::get_app_info();
vcf::check_granularity(app_info:app, sig_segments:3);

constraints = [
  {'min_version':'4.0.0', 'fixed_version':'4.9.18'},
  {'min_version':'4.10.0', 'fixed_version':'4.10.12'},
  {'min_version':'4.11.0', 'fixed_version':'4.11.5'}
];

vcf::check_version_and_report(app_info:app, constraints:constraints, severity:SECURITY_WARNING, strict:FALSE);

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

Go back to menu.

How to Run


Here is how to run the Samba 4.x < 4.9.18 / 4.10.x < 4.10.12 / 4.11.x < 4.11.5 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 4.x < 4.9.18 / 4.10.x < 4.10.12 / 4.11.x < 4.11.5 Multiple Vulnerabilities plugin ID 133210.
  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_11_5.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

Go back to menu.

References


IAVA | Information Assurance Vulnerability Alert:
  • 2020-A-0035-S
See also: Similar and related Nessus plugins:
  • 141968 - Amazon Linux 2 : ctdb (ALAS-2020-1544)
  • 142993 - Amazon Linux AMI : ctdb (ALAS-2020-1452)
  • 145876 - CentOS 8 : samba (CESA-2020:1878)
  • 141629 - CentOS 7 : samba (CESA-2020:3981)
  • 150107 - Debian DLA-2668-1 : samba security update
  • 133932 - EulerOS 2.0 SP5 : samba (EulerOS-SA-2020-1131)
  • 134013 - EulerOS 2.0 SP8 : samba (EulerOS-SA-2020-1179)
  • 134816 - EulerOS 2.0 SP5 : samba (EulerOS-SA-2020-1325)
  • 135128 - EulerOS Virtualization for ARM 64 3.0.6.0 : samba (EulerOS-SA-2020-1341)
  • 136229 - EulerOS Virtualization for ARM 64 3.0.2.0 : samba (EulerOS-SA-2020-1526)
  • 137965 - EulerOS Virtualization 3.0.6.0 : samba (EulerOS-SA-2020-1746)
  • 140877 - EulerOS 2.0 SP3 : samba (EulerOS-SA-2020-2110)
  • 141682 - EulerOS Virtualization 3.0.2.2 : samba (EulerOS-SA-2020-2199)
  • 142333 - EulerOS 2.0 SP2 : samba (EulerOS-SA-2020-2396)
  • 133425 - Fedora 31 : 2:samba (2020-6bd386c7eb)
  • 133586 - Fedora 30 : 2:samba (2020-f92cd0e72b)
  • 133244 - FreeBSD : samba -- multiple vulnerabilities (5f0dd349-40a2-11ea-8d8c-005056a311d1)
  • 134927 - GLSA-202003-52 : Samba: Multiple vulnerabilities
  • 147360 - NewStart CGSL CORE 5.04 / MAIN 5.04 : samba Multiple Vulnerabilities (NS-SA-2021-0024)
  • 154485 - NewStart CGSL CORE 5.05 / MAIN 5.05 : samba Multiple Vulnerabilities (NS-SA-2021-0167)
  • 133343 - openSUSE Security Update : samba (openSUSE-2020-122)
  • 134860 - RHEL 7 : samba (RHSA-2020:0943)
  • 143012 - RHEL 8 : samba (RHSA-2020:1878)
  • 141037 - RHEL 7 : samba (RHSA-2020:3981)
  • 141648 - Scientific Linux Security Update : samba on SL7.x x86_64 (20201001)
  • 133177 - SUSE SLES12 Security Update : samba (SUSE-SU-2020:0152-1)
  • 133254 - SUSE SLED15 / SLES15 Security Update : samba (SUSE-SU-2020:0223-1)
  • 133255 - SUSE SLED15 / SLES15 Security Update : samba (SUSE-SU-2020:0224-1)
  • 133258 - SUSE SLED12 / SLES12 Security Update : samba (SUSE-SU-2020:0233-1)
  • 133178 - Ubuntu 16.04 LTS / 18.04 LTS / 19.04 / 19.10 : Samba vulnerabilities (USN-4244-1)

Version


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

Go back to menu.