Samba 4.x < 4.9.17 / 4.10.x < 4.10.11 / 4.11.x < 4.11.3 Multiple Vulnerabilities - Nessus

Medium   Plugin ID: 132023

This page contains detailed information about the Samba 4.x < 4.9.17 / 4.10.x < 4.10.11 / 4.11.x < 4.11.3 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: 132023
Name: Samba 4.x < 4.9.17 / 4.10.x < 4.10.11 / 4.11.x < 4.11.3 Multiple Vulnerabilities
Filename: samba_4_11_3.nasl
Vulnerability Published: 2019-12-10
This Plugin Published: 2019-12-13
Last Modification Time: 2020-01-23
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: 2019-12-10
Patch Published: 2019-12-10
CVE [?]: CVE-2019-14861, CVE-2019-14870
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.17, 4.10.x prior to 4.10.11, or 4.11.x prior to 4.11.3. It is, therefore, affected by multiple vulnerabilities:

- A denial of service (DoS) vulnerability exists in the ldb_qsort() and dns_name_compare() routines due to how the routines handle case sensitivity of DNS records. An authenticated, remote attacker can exploit this issue, by registering a DNS record matching the name of the DNS zone, to cause the process to stop responding. (CVE-2019-14861)

- An issue exists where the S4U (MS-SFU) Kerberos delegation model includes a feature allowing for a subset of clients to be opted out of constrained delegation in any way, either S4U2Self or regular Kerberos authentication, by forcing all tickets for these clients to be non-forwardable. In AD this is implemented by a user attribute delegation_not_allowed (aka not-delegated), which translates to disallow-forwardable. However the Samba AD DC does not do that for S4U2Self and does set the forwardable flag even if the impersonated client has the not-delegated flag set. (CVE-2019-14870)

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.17 / 4.10.11 / 4.11.3 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.17 / 4.10.x < 4.10.11 / 4.11.x < 4.11.3 Multiple Vulnerabilities vulnerability:

  1. GitHub: https://github.com/JamesGeee/CVE-2019-14861
    [CVE-2019-14861: PoC for exploiting CVE-2019-14861]
  2. GitHub: https://github.com/JamesGeee/CVE-2019-14870
    [CVE-2019-14870: PoC for exploiting CVE-2019-14870]

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-14870
CVSS V2 Vector: AV:N/AC:L/Au:N/C:P/I:P/A:N/E:U/RL:OF/RC:C
CVSS Base Score:6.4 (Medium)
Impact Subscore:4.9
Exploitability Subscore:10.0
CVSS Temporal Score:4.7 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:4.7 (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)

Go back to menu.

Plugin Source


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

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

include('compat.inc');

if (description)
{
  script_id(132023);
  script_version("1.4");
  script_cvs_date("Date: 2020/01/23");

  script_cve_id("CVE-2019-14861", "CVE-2019-14870");

  script_name(english:"Samba 4.x < 4.9.17 / 4.10.x < 4.10.11 / 4.11.x < 4.11.3 Multiple Vulnerabilities");
  script_summary(english:"Checks the version of Samba.");

  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.17, 4.10.x prior to 4.10.11, or 4.11.x prior to
4.11.3.  It is, therefore, affected by multiple vulnerabilities:

  - A denial of service (DoS) vulnerability exists in the ldb_qsort() and dns_name_compare() routines due to
    how the routines handle case sensitivity of DNS records. An authenticated, remote attacker can exploit
    this issue, by registering a DNS record matching the name of the DNS zone, to cause the process to stop
    responding. (CVE-2019-14861)

  - An issue exists where the S4U (MS-SFU) Kerberos delegation model includes a feature allowing for a subset
    of clients to be opted out of constrained delegation in any way, either S4U2Self or regular Kerberos
    authentication, by forcing all tickets for these clients to be non-forwardable. In AD this is implemented
    by a user attribute delegation_not_allowed (aka not-delegated), which translates to disallow-forwardable.
    However the Samba AD DC does not do that for S4U2Self and does set the forwardable flag even if the
    impersonated client has the not-delegated flag set. (CVE-2019-14870)

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-14861.html");
  script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/security/CVE-2019-14870.html");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Samba version 4.9.17 / 4.10.11 / 4.11.3 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/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-14870");

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

  script_set_attribute(attribute:"vuln_publication_date", value:"2019/12/10");
  script_set_attribute(attribute:"patch_publication_date", value:"2019/12/10");
  script_set_attribute(attribute:"plugin_publication_date", value:"2019/12/13");

  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) 2019-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('audit.inc');
include('global_settings.inc');
include('misc_func.inc');
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.17'},
  {'min_version':'4.10.0', 'fixed_version':'4.10.11'},
  {'min_version':'4.11.0', 'fixed_version':'4.11.3'}
];

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

Go back to menu.

How to Run


Here is how to run the Samba 4.x < 4.9.17 / 4.10.x < 4.10.11 / 4.11.x < 4.11.3 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.17 / 4.10.x < 4.10.11 / 4.11.x < 4.11.3 Multiple Vulnerabilities plugin ID 132023.
  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_3.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 150107 - Debian DLA-2668-1 : samba security update
  • 132625 - EulerOS 2.0 SP8 : samba (EulerOS-SA-2020-1032)
  • 132794 - EulerOS Virtualization for ARM 64 3.0.5.0 : samba (EulerOS-SA-2020-1040)
  • 133932 - EulerOS 2.0 SP5 : samba (EulerOS-SA-2020-1131)
  • 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)
  • 132638 - Fedora 30 : 2:samba (2019-11dddb785b)
  • 131968 - Fedora 31 : 2:samba (2019-be98a08835)
  • 132064 - FreeBSD : samba -- multiple vulnerabilities (1edae47e-1cdd-11ea-8c2a-08002743b791)
  • 134927 - GLSA-202003-52 : Samba: Multiple vulnerabilities
  • 132386 - openSUSE Security Update : samba (openSUSE-2019-2700)
  • 132238 - SUSE SLED15 / SLES15 Security Update : samba (SUSE-SU-2019:3318-1)
  • 132239 - SUSE SLED15 / SLES15 Security Update : samba (SUSE-SU-2019:3319-1)
  • 132013 - Ubuntu 16.04 LTS / 18.04 LTS / 19.04 / 19.10 : Samba vulnerabilities (USN-4217-1)

Version


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

Go back to menu.