Debian DSA-3142-1 : eglibc - security update - Nessus

High   Plugin ID: 81029

This page contains detailed information about the Debian DSA-3142-1 : eglibc - security update Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 81029
Name: Debian DSA-3142-1 : eglibc - security update
Filename: debian_DSA-3142.nasl
Vulnerability Published: N/A
This Plugin Published: 2015-01-28
Last Modification Time: 2021-01-11
Plugin Version: 1.19
Plugin Type: local
Plugin Family: Debian Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/Debian/dpkg-l, Host/Debian/release, Host/local_checks_enabled

Vulnerability Information


Severity: High
Vulnerability Published: N/A
Patch Published: 2015-01-27
CVE [?]: CVE-2012-6656, CVE-2014-6040, CVE-2014-7817, CVE-2015-0235
CPE [?]: cpe:/o:debian:debian_linux:7.0, p-cpe:/a:debian:debian_linux:eglibc
Exploited by Malware: True

Synopsis

The remote Debian host is missing a security-related update.

Description

Several vulnerabilities have been fixed in eglibc, Debian's version of the GNU C library :

- CVE-2015-0235 Qualys discovered that the gethostbyname and gethostbyname2 functions were subject to a buffer overflow if provided with a crafted IP address argument. This could be used by an attacker to execute arbitrary code in processes which called the affected functions.

The original glibc bug was reported by Peter Klotz.

- CVE-2014-7817 Tim Waugh of Red Hat discovered that the WRDE_NOCMD option of the wordexp function did not suppress command execution in all cases. This allows a context-dependent attacker to execute shell commands.

- CVE-2012-6656 CVE-2014-6040 The charset conversion code for certain IBM multi-byte code pages could perform an out-of-bounds array access, causing the process to crash. In some scenarios, this allows a remote attacker to cause a persistent denial of service.

Solution

Upgrade the eglibc packages.

For the stable distribution (wheezy), these problems have been fixed in version 2.13-38+deb7u7.

For the upcoming stable distribution (jessie) and the unstable distribution (sid), the CVE-2015-0235 issue has been fixed in version 2.18-1 of the glibc package.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Debian DSA-3142-1 : eglibc - security update vulnerability:

  1. Metasploit: exploit/linux/smtp/exim_gethostbyname_bof
    [Exim GHOST (glibc gethostbyname) Buffer Overflow]
  2. Metasploit: auxiliary/scanner/http/wordpress_ghost_scanner
    [WordPress XMLRPC GHOST Vulnerability Scanner]
  3. Exploit-DB: exploits/linux/dos/35951.py
    [EDB-35951: Exim ESMTP 4.80 - glibc gethostbyname Denial of Service]
  4. Exploit-DB: exploits/linux/remote/36421.rb
    [EDB-36421: Exim - 'GHOST' glibc gethostbyname Buffer Overflow (Metasploit)]
  5. GitHub: https://github.com/1N3/1N3
    [CVE-2015-0235]
  6. GitHub: https://github.com/1N3/Exploits
    [CVE-2015-0235]
  7. GitHub: https://github.com/AlAIAL90/CVE-2015-0235
    [CVE-2015-0235: PoC for exploiting CVE-2015-0235 : Heap-based buffer overflow in the ...]
  8. GitHub: https://github.com/F88/ghostbusters15
    [CVE-2015-0235: Playbooks 'Fix for CVE-2015-0235(GHOST)' running on Ansible]
  9. GitHub: https://github.com/JustDenisYT/ghosttester
    [CVE-2015-0235: Script to test vulnarability for CVE-2015-0235]
  10. GitHub: https://github.com/RedHatOfficial/rhsecapi
    [CVE-2015-0235]
  11. GitHub: https://github.com/RedHatProductSecurity/cve-pylib
    [CVE-2015-0235]
  12. GitHub: https://github.com/aaronfay/CVE-2015-0235-test
    [CVE-2015-0235: Ansible playbook to check vulnerability for CVE-2015-0235]
  13. GitHub: https://github.com/adherzog/ansible-CVE-2015-0235-GHOST
    [CVE-2015-0235: Ansible playbook, to check for CVE-2015-0235 (GHOST) vulnerability]
  14. GitHub: https://github.com/alanmeyer/CVE-glibc
    [CVE-2015-0235]
  15. GitHub: https://github.com/arm13/ghost_exploit
    [CVE-2015-0235: CVE-2015-0235 EXIM ESTMP GHOST Glibc Gethostbyname() DoS Exploit/PoC]
  16. GitHub: https://github.com/chayim/GHOSTCHECK-cve-2015-0235
    [CVE-2015-0235: A check for GHOST; cve-2015-0235]
  17. GitHub: https://github.com/dineshkumarc987/Exploits
    [CVE-2015-0235]
  18. GitHub: https://github.com/favoretti/lenny-libc6
    [CVE-2015-0235: CVE-2015-0235 patches lenny libc6 packages for amd64]
  19. GitHub: https://github.com/fser/ghost-checker
    [CVE-2015-0235: Test wether you're exposed to ghost (CVE-2015-0235). All kudos go to Qualys Security ...]
  20. GitHub: https://github.com/geekben/cve-collections/blob/master/cve20150235poc.c
    [CVE-2015-0235]
  21. GitHub: https://github.com/limkokholefork/GHOSTCHECK-cve-2015-0235
    [CVE-2015-0235]
  22. GitHub: https://github.com/limkokhole/GHOSTCHECK-cve-2015-0235
    [CVE-2015-0235]
  23. GitHub: https://github.com/makelinux/CVE-2015-0235-workaround
    [CVE-2015-0235: A shared library wrapper with additional checks for vulnerable functions ...]
  24. GitHub: https://github.com/mholzinger/CVE-2015-0235_GHOST
    [CVE-2015-0235]
  25. GitHub: https://github.com/mikesplain/CVE-2015-0235-cookbook
    [CVE-2015-0235: A chef cookbook to test the GHOST vulnerability]
  26. GitHub: https://github.com/r3p3r/1N3-Exploits
    [CVE-2015-0235]
  27. GitHub: https://github.com/sUbc0ol/CVE-2015-0235
    [CVE-2015-0235]
  28. GitHub: https://github.com/xyongcn/exploit
    [CVE-2015-0235]
  29. GitHub: https://github.com/koudaiii-archives/cookbook-update-glibc
    [CVE-2015-0235: Cookbook for update glibc. CVE-2015-0235(GHOST)]
  30. GitHub: https://github.com/nickanderson/cfengine-CVE_2015_0235
    [CVE-2015-0235: Gethostbyname*() buffer overflow exploit in glibc - CVE-2015-0235 ...]
  31. GitHub: https://github.com/piyokango/ghost
    [CVE-2015-0235: Glibc vulnerability GHOST(CVE-2015-0235) Affected software list]
  32. GitHub: https://github.com/tobyzxj/CVE-2015-0235
    [CVE-2015-0235: Glibc gethostbyname bug]

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:H/Au:N/C:C/I:C/A:C/E:H/RL:OF/RC:C
CVSS Base Score:7.6 (High)
Impact Subscore:10.0
Exploitability Subscore:4.9
CVSS Temporal Score:6.6 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.6 (Medium)

Go back to menu.

Plugin Source


This is the debian_DSA-3142.nasl nessus plugin source code. This script is Copyright (C) 2015-2021 Tenable Network Security, Inc.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were  
# extracted from Debian Security Advisory DSA-3142. The text 
# itself is copyright (C) Software in the Public Interest, Inc.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(81029);
  script_version("1.19");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/01/11");

  script_cve_id("CVE-2012-6656", "CVE-2014-6040", "CVE-2014-7817", "CVE-2015-0235");
  script_bugtraq_id(69472, 71216, 72325);
  script_xref(name:"CERT", value:"967332");
  script_xref(name:"DSA", value:"3142");

  script_name(english:"Debian DSA-3142-1 : eglibc - security update");
  script_summary(english:"Checks dpkg output for the updated package.");

  script_set_attribute(
    attribute:"synopsis", 
    value:"The remote Debian host is missing a security-related update."
  );
  script_set_attribute(
    attribute:"description", 
    value:
"Several vulnerabilities have been fixed in eglibc, Debian's version of
the GNU C library :

  - CVE-2015-0235
    Qualys discovered that the gethostbyname and
    gethostbyname2 functions were subject to a buffer
    overflow if provided with a crafted IP address argument.
    This could be used by an attacker to execute arbitrary
    code in processes which called the affected functions.

  The original glibc bug was reported by Peter Klotz.

  - CVE-2014-7817
    Tim Waugh of Red Hat discovered that the WRDE_NOCMD
    option of the wordexp function did not suppress command
    execution in all cases. This allows a context-dependent
    attacker to execute shell commands.

  - CVE-2012-6656 CVE-2014-6040
    The charset conversion code for certain IBM multi-byte
    code pages could perform an out-of-bounds array access,
    causing the process to crash. In some scenarios, this
    allows a remote attacker to cause a persistent denial of
    service."
  );
  script_set_attribute(
    attribute:"see_also",
    value:"https://security-tracker.debian.org/tracker/CVE-2015-0235"
  );
  script_set_attribute(
    attribute:"see_also",
    value:"https://security-tracker.debian.org/tracker/CVE-2014-7817"
  );
  script_set_attribute(
    attribute:"see_also",
    value:"https://security-tracker.debian.org/tracker/CVE-2012-6656"
  );
  script_set_attribute(
    attribute:"see_also",
    value:"https://security-tracker.debian.org/tracker/CVE-2014-6040"
  );
  script_set_attribute(
    attribute:"see_also",
    value:"https://security-tracker.debian.org/tracker/CVE-2015-0235"
  );
  script_set_attribute(
    attribute:"see_also",
    value:"http://www.debian.org/security/2015/dsa-3142"
  );
  script_set_attribute(
    attribute:"solution", 
    value:
"Upgrade the eglibc packages.

For the stable distribution (wheezy), these problems have been fixed
in version 2.13-38+deb7u7.

For the upcoming stable distribution (jessie) and the unstable
distribution (sid), the CVE-2015-0235 issue has been fixed in version
2.18-1 of the glibc package."
  );
  script_set_cvss_base_vector("CVSS2#AV:N/AC:H/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploit_framework_core", value:"true");
  script_set_attribute(attribute:"exploited_by_malware", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Exim GHOST (glibc gethostbyname) Buffer Overflow');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:eglibc");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:7.0");

  script_set_attribute(attribute:"patch_publication_date", value:"2015/01/27");
  script_set_attribute(attribute:"plugin_publication_date", value:"2015/01/28");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_copyright(english:"This script is Copyright (C) 2015-2021 Tenable Network Security, Inc.");
  script_family(english:"Debian Local Security Checks");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");

  exit(0);
}

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

if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);

flag = 0;
if (deb_check(release:"7.0", prefix:"eglibc", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc-bin", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc-dev-bin", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc0.1", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc0.1-dev", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc0.1-dev-i386", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc0.1-i386", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc0.1-i686", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc0.1-pic", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc0.1-prof", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-amd64", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-dev", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-dev-amd64", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-dev-i386", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-dev-mips64", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-dev-mipsn32", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-dev-ppc64", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-dev-s390", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-dev-s390x", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-dev-sparc64", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-i386", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-i686", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-loongson2f", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-mips64", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-mipsn32", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-pic", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-ppc64", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-prof", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-s390", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-s390x", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-sparc64", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6-xen", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6.1", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6.1-dev", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6.1-pic", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"libc6.1-prof", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"locales", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"locales-all", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"multiarch-support", reference:"2.13-38+deb7u7")) flag++;
if (deb_check(release:"7.0", prefix:"nscd", reference:"2.13-38+deb7u7")) flag++;

if (flag)
{
  if (report_verbosity > 0) security_hole(port:0, extra:deb_report_get());
  else security_hole(0);
  exit(0);
}
else audit(AUDIT_HOST_NOT, "affected");

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

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

Go back to menu.

How to Run


Here is how to run the Debian DSA-3142-1 : eglibc - security update 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 Debian Local Security Checks plugin family.
  6. On the right side table select Debian DSA-3142-1 : eglibc - security update plugin ID 81029.
  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 debian_DSA-3142.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: CERT | Computer Emergency Response Team: DSA | Debian Security Advisory: See also: Similar and related Nessus plugins:
  • 81024 - Amazon Linux AMI : glibc (ALAS-2015-473)
  • 81025 - CentOS 5 : glibc (CESA-2015:0090) (GHOST)
  • 81026 - CentOS 6 / 7 : glibc (CESA-2015:0092) (GHOST)
  • 81546 - Cisco Unified Communications Manager Remote Buffer Overflow (CSCus66650) (GHOST)
  • 85449 - Cisco Unified Communications Manager IM and Presence GNU C Library (glibc) Buffer Overflow (CSCus69785) (GHOST)
  • 81423 - Cisco Application Control Engine GNU glibc gethostbyname Function Buffer Overflow Vulnerability (cisco-sa-20150128-ghost) (GHOST)
  • 81594 - Cisco IOS XE GNU C Library (glibc) Buffer Overflow (CSCus69732) (GHOST)
  • 81595 - Cisco IOS XE GNU GNU C Library (glibc) Buffer Overflow (CSCus69731) (GHOST)
  • 81596 - Cisco IOS XR GNU C Library (glibc) Buffer Overflow (GHOST)
  • 92412 - Cisco NX-OS GNU C Library (glibc) Buffer Overflow (GHOST)
  • 81407 - Cisco TelePresence Conductor GNU glibc gethostbyname Function Buffer Overflow Vulnerability (GHOST)
  • 81408 - Cisco TelePresence Video Communication Server GNU glibc gethostbyname Function Buffer Overflow Vulnerability (GHOST)
  • 84488 - Mac OS X 10.10.x < 10.10.4 Multiple Vulnerabilities (GHOST) (Logjam)
  • 86270 - Mac OS X < 10.11 Multiple Vulnerabilities (GHOST)
  • 84489 - Mac OS X Multiple Vulnerabilities (Security Update 2015-005) (GHOST) (Logjam)
  • 81031 - Oracle Linux 6 / 7 : glibc (ELSA-2015-0092) (GHOST)
  • 81167 - Palo Alto Networks PAN-OS <= 5.0.15 / 6.0.x <= 6.0.8 / 6.1.x <= 6.1.2 GNU C Library (glibc) Buffer Overflow (GHOST)
  • 81510 - PHP 5.4.x < 5.4.38 Multiple Vulnerabilities (GHOST)
  • 81511 - PHP 5.5.x < 5.5.22 Multiple Vulnerabilities (GHOST)
  • 81512 - PHP 5.6.x < 5.6.6 Multiple Vulnerabilities (GHOST)
  • 81033 - RHEL 5 : glibc (RHSA-2015:0090) (GHOST)
  • 81034 - RHEL 6 / 7 : glibc (RHSA-2015:0092) (GHOST)
  • 81037 - Scientific Linux Security Update : glibc on SL5.x i386/x86_64 (20150127) (GHOST)
  • 81038 - Scientific Linux Security Update : glibc on SL6.x, SL7.x i386/x86_64 (20150127) (GHOST)
  • 81039 - SuSE 11 Security Update : glibc (SAT Patch Numbers 10202,10204,10206)
  • 81125 - SuSE 10 Security Update : glibc (ZYPP Patch Number 9035)
  • 81042 - Ubuntu 10.04 LTS / 12.04 LTS : eglibc vulnerability (USN-2485-1) (GHOST)
  • 87322 - Xerox ColorQube 92XX Multiple OpenSSL Vulnerabilities (XRX15AD) (FREAK) (GHOST) (POODLE)
  • 87327 - Xerox WorkCentre 77XX Multiple Vulnerabilities (XRX15R) (FREAK) (GHOST)

Version


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

Go back to menu.