CentOS 5 : glibc (CESA-2015:0090) (GHOST) - Nessus

High   Plugin ID: 81025

This page contains detailed information about the CentOS 5 : glibc (CESA-2015:0090) (GHOST) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 81025
Name: CentOS 5 : glibc (CESA-2015:0090) (GHOST)
Filename: centos_RHSA-2015-0090.nasl
Vulnerability Published: 2015-01-28
This Plugin Published: 2015-01-28
Last Modification Time: 2021-01-04
Plugin Version: 1.24
Plugin Type: local
Plugin Family: CentOS Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/CentOS/release, Host/CentOS/rpm-list, Host/local_checks_enabled

Vulnerability Information


Severity: High
Vulnerability Published: 2015-01-28
Patch Published: 2015-01-27
CVE [?]: CVE-2015-0235
CPE [?]: cpe:/o:centos:centos:5, p-cpe:/a:centos:centos:glibc, p-cpe:/a:centos:centos:glibc-common, p-cpe:/a:centos:centos:glibc-devel, p-cpe:/a:centos:centos:glibc-headers, p-cpe:/a:centos:centos:glibc-utils, p-cpe:/a:centos:centos:nscd
Exploited by Malware: True
In the News: True

Synopsis

The remote CentOS host is missing one or more security updates.

Description

Updated glibc packages that fix one security issue are now available for Red Hat Enterprise Linux 5.

Red Hat Product Security has rated this update as having Critical security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section.

The glibc packages provide the standard C libraries (libc), POSIX thread libraries (libpthread), standard math libraries (libm), and the Name Server Caching Daemon (nscd) used by multiple programs on the system. Without these libraries, the Linux system cannot function correctly.

A heap-based buffer overflow was found in glibc's __nss_hostname_digits_dots() function, which is used by the gethostbyname() and gethostbyname2() glibc function calls. A remote attacker able to make an application call either of these functions could use this flaw to execute arbitrary code with the permissions of the user running the application. (CVE-2015-0235)

Red Hat would like to thank Qualys for reporting this issue.

All glibc users are advised to upgrade to these updated packages, which contain a backported patch to correct this issue.

Solution

Update the affected glibc packages.

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 CentOS 5 : glibc (CESA-2015:0090) (GHOST) 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 Score Source [?]: CVE-2015-0235
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 centos_RHSA-2015-0090.nasl nessus plugin source code. This script is Copyright (C) 2015-2021 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were  
# extracted from Red Hat Security Advisory RHSA-2015:0090 and 
# CentOS Errata and Security Advisory 2015:0090 respectively.
#

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

if (description)
{
  script_id(81025);
  script_version("1.24");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/01/04");

  script_cve_id("CVE-2015-0235");
  script_bugtraq_id(72325);
  script_xref(name:"CERT", value:"967332");
  script_xref(name:"RHSA", value:"2015:0090");

  script_name(english:"CentOS 5 : glibc (CESA-2015:0090) (GHOST)");
  script_summary(english:"Checks rpm output for the updated packages");

  script_set_attribute(
    attribute:"synopsis", 
    value:"The remote CentOS host is missing one or more security updates."
  );
  script_set_attribute(
    attribute:"description", 
    value:
"Updated glibc packages that fix one security issue are now available
for Red Hat Enterprise Linux 5.

Red Hat Product Security has rated this update as having Critical
security impact. A Common Vulnerability Scoring System (CVSS) base
score, which gives a detailed severity rating, is available from the
CVE link in the References section.

The glibc packages provide the standard C libraries (libc), POSIX
thread libraries (libpthread), standard math libraries (libm), and the
Name Server Caching Daemon (nscd) used by multiple programs on the
system. Without these libraries, the Linux system cannot function
correctly.

A heap-based buffer overflow was found in glibc's
__nss_hostname_digits_dots() function, which is used by the
gethostbyname() and gethostbyname2() glibc function calls. A remote
attacker able to make an application call either of these functions
could use this flaw to execute arbitrary code with the permissions of
the user running the application. (CVE-2015-0235)

Red Hat would like to thank Qualys for reporting this issue.

All glibc users are advised to upgrade to these updated packages,
which contain a backported patch to correct this issue."
  );
  # https://lists.centos.org/pipermail/centos-announce/2015-January/020906.html
  script_set_attribute(
    attribute:"see_also",
    value:"http://www.nessus.org/u?93e1c138"
  );
  script_set_attribute(
    attribute:"solution", 
    value:"Update the affected glibc packages."
  );
  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:"cvss_score_source", value:"CVE-2015-0235");
  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:centos:centos:glibc");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:glibc-common");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:glibc-devel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:glibc-headers");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:glibc-utils");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:nscd");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:centos:centos:5");

  script_set_attribute(attribute:"vuln_publication_date", value:"2015/01/28");
  script_set_attribute(attribute:"patch_publication_date", value:"2015/01/27");
  script_set_attribute(attribute:"plugin_publication_date", value:"2015/01/28");
  script_set_attribute(attribute:"in_the_news", value:"true");
  script_set_attribute(attribute:"generated_plugin", value:"current");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_copyright(english:"This script is Copyright (C) 2015-2021 and is owned by Tenable, Inc. or an Affiliate thereof.");
  script_family(english:"CentOS Local Security Checks");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/CentOS/release", "Host/CentOS/rpm-list");

  exit(0);
}


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


if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
release = get_kb_item("Host/CentOS/release");
if (isnull(release) || "CentOS" >!< release) audit(AUDIT_OS_NOT, "CentOS");
os_ver = pregmatch(pattern: "CentOS(?: Linux)? release ([0-9]+)", string:release);
if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "CentOS");
os_ver = os_ver[1];
if (! preg(pattern:"^5([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "CentOS 5.x", "CentOS " + os_ver);

if (!get_kb_item("Host/CentOS/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);


cpu = get_kb_item("Host/cpu");
if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "CentOS", cpu);


flag = 0;
if (rpm_check(release:"CentOS-5", reference:"glibc-2.5-123.el5_11.1")) flag++;
if (rpm_check(release:"CentOS-5", reference:"glibc-common-2.5-123.el5_11.1")) flag++;
if (rpm_check(release:"CentOS-5", reference:"glibc-devel-2.5-123.el5_11.1")) flag++;
if (rpm_check(release:"CentOS-5", reference:"glibc-headers-2.5-123.el5_11.1")) flag++;
if (rpm_check(release:"CentOS-5", reference:"glibc-utils-2.5-123.el5_11.1")) flag++;
if (rpm_check(release:"CentOS-5", reference:"nscd-2.5-123.el5_11.1")) flag++;


if (flag)
{
  security_report_v4(
    port       : 0,
    severity   : SECURITY_HOLE,
    extra      : rpm_report_get()
  );
  exit(0);
}
else
{
  tested = pkg_tests_get();
  if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
  else audit(AUDIT_PACKAGE_NOT_INSTALLED, "glibc / glibc-common / glibc-devel / glibc-headers / glibc-utils / etc");
}

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

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

Go back to menu.

How to Run


Here is how to run the CentOS 5 : glibc (CESA-2015:0090) (GHOST) 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 CentOS Local Security Checks plugin family.
  6. On the right side table select CentOS 5 : glibc (CESA-2015:0090) (GHOST) plugin ID 81025.
  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 centos_RHSA-2015-0090.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a centos_RHSA-2015-0090.nasl -t <IP/HOST>

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: RHSA | Red Hat Security Advisory: CERT | Computer Emergency Response Team: See also: Similar and related Nessus plugins:
  • 81024 - Amazon Linux AMI : glibc (ALAS-2015-473)
  • 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)
  • 81029 - Debian DSA-3142-1 : eglibc - security update
  • 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)
  • 81044 - Oracle Linux 5 : glibc (ELSA-2015-0090) (GHOST)
  • 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 centos_RHSA-2015-0090.nasl version 1.24. For more plugins, visit the Nessus Plugin Library.

Go back to menu.