Weak DH Key Exchange Supported (PCI DSS) - Nessus

Low   Plugin ID: 106459

This page contains detailed information about the Weak DH Key Exchange Supported (PCI DSS) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 106459
Name: Weak DH Key Exchange Supported (PCI DSS)
Filename: pci_weak_dh_under_2048.nasl
Vulnerability Published: N/A
This Plugin Published: 2018-01-29
Last Modification Time: 2020-04-27
Plugin Version: 1.6
Plugin Type: remote
Plugin Family: General
Dependencies: ssh_logjam.nasl, ssl_logjam.nasl
Required KB Items [?]: Settings/PCI_DSS
Excluded KB Items: Settings/PCI_DSS_local_checks

Vulnerability Information


Severity: Low
Vulnerability Published: N/A
Patch Published: N/A
CVE [?]: CVE-2015-4000
CPE [?]: N/A

Synopsis

A service on the remote host supports a weak key exchange mechanism

Description

At least one of the services on the remote host supports a Diffie-Hellman key exchange using a public modulus smaller than 2048 bits.

Diffie-Hellman key exchanges with keys smaller than 2048 bits do not meet the PCI definition of strong cryptography as specified by NIST Special Publication 800-57 Part 1.

Diffie-Hellman moduli of up to 1024 bits are considered practically breakable by an attacker with very significant resources.

Solution

Consult the software's manual and reconfigure the service to use at least 2048-bit DH parameters. Alternatively, disable DH and use only Elliptic-curve Diffie-Hellman (ECDH) instead.

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 Weak DH Key Exchange Supported (PCI DSS) vulnerability:

  1. GitHub: https://github.com/84KaliPleXon3/a2sv
    [CVE-2015-4000]
  2. GitHub: https://github.com/Artem-Salnikov/devops-netology
    [CVE-2015-4000]
  3. GitHub: https://github.com/F4RM0X/script_a2sv
    [CVE-2015-4000]
  4. GitHub: https://github.com/H4CK3RT3CH/a2sv
    [CVE-2015-4000]
  5. GitHub: https://github.com/Mre11i0t/a2sv
    [CVE-2015-4000]
  6. GitHub: https://github.com/Vladislav-Pugachev/netology-DevOps-dz_-14
    [CVE-2015-4000]
  7. GitHub: https://github.com/WiktorMysz/devops-netology
    [CVE-2015-4000]
  8. GitHub: https://github.com/alexandrburyakov/Rep2
    [CVE-2015-4000]
  9. GitHub: https://github.com/bysart/devops-netology
    [CVE-2015-4000]
  10. GitHub: https://github.com/fatlan/HAProxy-Keepalived-Sec-HighLoads
    [CVE-2015-4000: ✨ HAProxy ve Keepalived konusunu load balancer ve cluster'a ek olarak ...]
  11. GitHub: https://github.com/fireorb/sslscanner
    [CVE-2015-4000]
  12. GitHub: https://github.com/giusepperuggiero96/Network-Security-2021
    [CVE-2015-4000]
  13. GitHub: https://github.com/ilya-starchikov/devops-netology
    [CVE-2015-4000]
  14. GitHub: https://github.com/javirodriguezzz/Shodan-Browser
    [CVE-2015-4000]
  15. GitHub: https://github.com/nyc-tophile/A2SV--SSL-VUL-Scan
    [CVE-2015-4000: A2SV = Auto Scanning to SSL Vulnerability HeartBleed, CCS Injection, SSLv3 POODLE, ...]
  16. GitHub: https://github.com/pashicop/3.9_1
    [CVE-2015-4000]
  17. GitHub: https://github.com/thekondrashov/stuff
    [CVE-2015-4000]
  18. GitHub: https://github.com/yellownine/netology-DevOps
    [CVE-2015-4000]

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-2015-4000
CVSS V2 Vector: AV:N/AC:M/Au:N/C:N/I:P/A:N/E:U/RL:ND/RC:C
CVSS Base Score:4.3 (Medium)
Impact Subscore:2.9
Exploitability Subscore:8.6
CVSS Temporal Score:3.7 (Low)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:3.7 (Low)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N/E:U/RL:X/RC:C
CVSS Base Score:3.7 (Low)
Impact Subscore:1.4
Exploitability Subscore:2.2
CVSS Temporal Score:3.4 (Low)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:3.4 (Low)

Go back to menu.

Plugin Source


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

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

include("compat.inc");

if (description)
{
  script_id(106459);
  script_version("1.6");
  script_set_attribute(attribute:"plugin_modification_date", value:"2020/04/27");

  script_cve_id("CVE-2015-4000");
  script_bugtraq_id(74733);

  script_name(english:"Weak DH Key Exchange Supported (PCI DSS)");
  script_summary(english:"Checks that no services support weak key exchange");

  script_set_attribute(attribute:"synopsis", value:
"A service on the remote host supports a weak key exchange mechanism");
  script_set_attribute(attribute:"description", value:
"At least one of the services on the remote host supports a
Diffie-Hellman key exchange using a public modulus smaller than 2048
bits.

Diffie-Hellman key exchanges with keys smaller than 2048 bits do not
meet the PCI definition of strong cryptography as specified by
NIST Special Publication 800-57 Part 1.

Diffie-Hellman moduli of up to 1024 bits are considered practically
breakable by an attacker with very significant resources.");
  script_set_attribute(attribute:"see_also", value:"https://weakdh.org/");
  script_set_attribute(attribute:"solution", value:
"Consult the software's manual and reconfigure the service to use at
least 2048-bit DH parameters. Alternatively, disable DH and use only
Elliptic-curve Diffie-Hellman (ECDH) instead.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N");
  script_set_cvss_temporal_vector("CVSS2#E:U/RL:ND/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:X/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2015-4000");
  script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"false");

  script_set_attribute(attribute:"plugin_publication_date", value:"2018/01/29");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"General");

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

  script_dependencies("ssl_logjam.nasl", "ssh_logjam.nasl");
  script_require_keys("Settings/PCI_DSS");
  script_exclude_keys("Settings/PCI_DSS_local_checks");

  exit(0);
}

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

if (!get_kb_item("Settings/PCI_DSS"))
  audit(AUDIT_PCI);

if (get_kb_item("Settings/PCI_DSS_local_checks"))
  exit(1, "This plugin only runs for PCI External scans.");

ssl_ports = get_kb_list("PCI/weak_dh_ssl");
ssh_ports = get_kb_list("PCI/weak_dh_ssh");

if (isnull(ssl_ports) && isnull(ssh_ports))
  exit(0, "No affected SSH or SSL services were detected.");

if (isnull(ssl_ports))
  ssl_ports = [];
if (isnull(ssh_ports))
  ssh_ports = [];

foreach port (list_uniq(ssl_ports))
{
  length = get_kb_item("PCI/weak_dh_ssl/modlen/" + port);
  if (length >= 2048)
    continue;
  security_report_v4(
    severity:SECURITY_WARNING,
    port:port,
    extra:"The SSL/TLS service on port " + port + " uses a " + length + "-bit DH modulus."
  );
}

# ssh_logjam.nasl does not check for moduli smaller than 2048 bits,
# rather it checks that a 1024-bit modulus is supported.
# Operators *could* create a weird, barely-big-enough modulus like
# 1028-bit and this check wouldn't flag them.
foreach port (ssh_ports)
{
  supported = get_kb_item("PCI/weak_dh_ssh/moduli/" + port);
  # A little confusing; ssh_logjam.nasl sets a KB for either "group1",
  # "gex1024", or "both" if both gex1024 and group1 are supported.
  report = 'The SSH service on port ' + port + ' supports a weak DH modulus :\n';
  if (supported == "group1" || supported == "both")
    # It's called Oakley Group 2, but SSH protocol calls it group1. See RFC 4253 8.1.
    report += '  - The very common 1024-bit Oakley Group 2 DH modulus\n';
  if (supported == "gex1024" || supported == "both")
    report += '  - DH group exchange is enabled and 1024-bit parameters are allowed\n';

  security_report_v4(
    severity:SECURITY_WARNING,
    port:port,
    extra:report
  );
}

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

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

Go back to menu.

How to Run


Here is how to run the Weak DH Key Exchange Supported (PCI DSS) 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 General plugin family.
  6. On the right side table select Weak DH Key Exchange Supported (PCI DSS) plugin ID 106459.
  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 pci_weak_dh_under_2048.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 106458 - SSL/TLS Services Support RC4 (PCI DSS)
  • 32320 - Weak Debian OpenSSH Keys in ~/.ssh/authorized_keys
  • 154728 - DNN (DotNetNuke) 9.2 <= 9.2.2 Weak Encryption Algorithm Vulnerability
  • 139270 - GLSA-202007-62 : PyCrypto: Weak key generation
  • 66272 - Google Apps Directory Sync < 3.1.6 Weak Stored Credential Local Disclosure
  • 20728 - Lyris ListManager MSDE Weak sa Password
  • 93112 - OpenSSL < 1.0.2i Default Weak 64-bit Block Cipher (SWEET32)
  • 125226 - OpenVPN < 2.3.15 Weak Cryptographic Cipher Vulnerability (Windows)
  • 106755 - ProFTPD < 1.3.5b / 1.3.6x < 1.3.6rc2 weak Diffie-Hellman key
  • 10454 - Sawmill Weak Password Encryption Scheme Information Disclosure
  • 32314 - Debian OpenSSH/OpenSSL Package Random Number Generator Weakness
  • 32321 - Debian OpenSSH/OpenSSL Package Random Number Generator Weakness (SSL check)
  • 103864 - SSL Certificate Contains Weak RSA Key (Infineon TPM / ROCA)
  • 64589 - Microsoft ASP.NET MS-DOS Device Name DoS (PCI-DSS check)
  • 108808 - Microsoft IIS 7.0 Vulnerabilities (uncredentialed) (PCI/DSS)
  • 159492 - OpenSSH PCI Disputed Vulnerabilities.
  • 57619 - Oracle Application Server Multiple Vulnerabilities
  • 108811 - Windows Server 2008 Critical RCE Vulnerabilities (uncredentialed) (PCI/DSS)

Version


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

Go back to menu.