Amazon Linux AMI : glibc (ALAS-2015-473) - Nessus

High   Plugin ID: 81024

This page contains detailed information about the Amazon Linux AMI : glibc (ALAS-2015-473) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 81024
Name: Amazon Linux AMI : glibc (ALAS-2015-473)
Filename: ala_ALAS-2015-473.nasl
Vulnerability Published: N/A
This Plugin Published: 2015-01-27
Last Modification Time: 2018-06-27
Plugin Version: 1.17
Plugin Type: local
Plugin Family: Amazon Linux Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/AmazonLinux/release, Host/AmazonLinux/rpm-list, Host/local_checks_enabled

Vulnerability Information


Severity: High
Vulnerability Published: N/A
Patch Published: 2015-01-27
CVE [?]: CVE-2015-0235
CPE [?]: cpe:/o:amazon:linux, p-cpe:/a:amazon:linux:glibc, p-cpe:/a:amazon:linux:glibc-common, p-cpe:/a:amazon:linux:glibc-debuginfo, p-cpe:/a:amazon:linux:glibc-debuginfo-common, p-cpe:/a:amazon:linux:glibc-devel, p-cpe:/a:amazon:linux:glibc-headers, p-cpe:/a:amazon:linux:glibc-static, p-cpe:/a:amazon:linux:glibc-utils, p-cpe:/a:amazon:linux:nscd
Exploited by Malware: True

Synopsis

The remote Amazon Linux AMI host is missing a security update.

Description

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 to either of these functions can use this flaw to execute arbitrary code with the permissions of the user running the application.

Special notes :

Because of the exceptional nature of this security event, we have backfilled our 2014.03 and 2013.09 Amazon Linux AMI repositories with new glibc packages that fix CVE-2015-0235 .

For 2014.09 Amazon Linux AMIs, 'glibc-2.17-55.93.amzn1' addresses the CVE. Running 'yum clean all' followed by 'yum update glibc' will install the fixed package, and you should reboot your instance after installing the update.

For Amazon Linux AMIs 'locked' to the 2014.03 repositories, the same 'glibc-2.17-55.93.amzn1' addresses the CVE. Running 'yum clean all' followed by 'yum update glibc' will install the fixed package, and you should reboot your instance after installing the update.

For Amazon Linux AMIs 'locked' to the 2013.09 repositories, 'glibc-2.12-1.149.49.amzn1' addresses the CVE. Running 'yum clean all' followed by 'yum update glibc' will install the fixed package, and you should reboot your instance after installing the update.

For Amazon Linux AMIs 'locked' to the 2013.03, 2012.09, 2012.03, or 2011.09 repositories, run 'yum clean all' followed by 'yum --releasever=2013.09 update glibc' to install the updated glibc package. You should reboot your instance after installing the update.

If you are using a pre-2011.09 Amazon Linux AMI, then you are using a version of the Amazon Linux AMI that was part of our public beta, and we encourage you to move to a newer version of the Amazon Linux AMI as soon as possible.

Solution

Run 'yum update glibc' to update your system. Note that you may need to run 'yum clean all' first. Once this update has been applied, 'reboot your instance to ensure that all processes and daemons that link against glibc are using the updated version'. On new instance launches, you should still reboot after cloud-init has automatically applied this update.

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 Amazon Linux AMI : glibc (ALAS-2015-473) 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 ala_ALAS-2015-473.nasl nessus plugin source code. This script is Copyright (C) 2015-2018 Tenable Network Security, Inc.

#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from Amazon Linux AMI Security Advisory ALAS-2015-473.
#

include("compat.inc");

if (description)
{
  script_id(81024);
  script_version("1.17");
  script_cvs_date("Date: 2018/06/27 18:42:24");

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

  script_name(english:"Amazon Linux AMI : glibc (ALAS-2015-473)");
  script_summary(english:"Checks rpm output for the updated packages");

  script_set_attribute(
    attribute:"synopsis", 
    value:"The remote Amazon Linux AMI host is missing a security update."
  );
  script_set_attribute(
    attribute:"description", 
    value:
"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 to either of these functions
can use this flaw to execute arbitrary code with the permissions of
the user running the application.

Special notes :

Because of the exceptional nature of this security event, we have
backfilled our 2014.03 and 2013.09 Amazon Linux AMI repositories with
new glibc packages that fix CVE-2015-0235 .

For 2014.09 Amazon Linux AMIs, 'glibc-2.17-55.93.amzn1' addresses the
CVE. Running 'yum clean all' followed by 'yum update glibc' will
install the fixed package, and you should reboot your instance after
installing the update.

For Amazon Linux AMIs 'locked' to the 2014.03 repositories, the same
'glibc-2.17-55.93.amzn1' addresses the CVE. Running 'yum clean all'
followed by 'yum update glibc' will install the fixed package, and you
should reboot your instance after installing the update.

For Amazon Linux AMIs 'locked' to the 2013.09 repositories,
'glibc-2.12-1.149.49.amzn1' addresses the CVE. Running 'yum clean all'
followed by 'yum update glibc' will install the fixed package, and you
should reboot your instance after installing the update.

For Amazon Linux AMIs 'locked' to the 2013.03, 2012.09, 2012.03, or
2011.09 repositories, run 'yum clean all' followed by 'yum
--releasever=2013.09 update glibc' to install the updated glibc
package. You should reboot your instance after installing the update.

If you are using a pre-2011.09 Amazon Linux AMI, then you are using a
version of the Amazon Linux AMI that was part of our public beta, and
we encourage you to move to a newer version of the Amazon Linux AMI as
soon as possible."
  );
  script_set_attribute(
    attribute:"see_also",
    value:"https://alas.aws.amazon.com/ALAS-2015-473.html"
  );
  script_set_attribute(
    attribute:"solution", 
    value:
"Run 'yum update glibc' to update your system. Note that you may need
to run 'yum clean all' first. Once this update has been applied,
'reboot your instance to ensure that all processes and daemons that
link against glibc are using the updated version'. On new instance
launches, you should still reboot after cloud-init has automatically
applied this update."
  );
  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:amazon:linux:glibc");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:glibc-common");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:glibc-debuginfo");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:glibc-debuginfo-common");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:glibc-devel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:glibc-headers");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:glibc-static");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:glibc-utils");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:nscd");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:amazon:linux");

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

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

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/AmazonLinux/release", "Host/AmazonLinux/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);
if (!get_kb_item("Host/AmazonLinux/release")) audit(AUDIT_OS_NOT, "Amazon Linux AMI");
if (!get_kb_item("Host/AmazonLinux/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);


flag = 0;

# Checks for below glibc-2.17
if (rpm_check(release:"ALA", reference:"glibc-2.17-0.0.amzn1"))
{
  # Clean out initial report from first check
  __rpm_report = '';
  if (rpm_check(release:"ALA", reference:"glibc-2.12-1.149.49.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"glibc-common-2.12-1.149.49.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"glibc-debuginfo-2.12-1.149.49.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"glibc-debuginfo-common-2.12-1.149.49.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"glibc-devel-2.12-1.149.49.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"glibc-headers-2.12-1.149.49.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"glibc-static-2.12-1.149.49.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"glibc-utils-2.12-1.149.49.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"nscd-2.12-1.149.49.amzn1")) flag++;
}
else
{
  # Checks for glibc-2.17
  # Clean out initial report from first check
  __rpm_report = '';
  if (rpm_check(release:"ALA", reference:"glibc-2.17-55.93.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"glibc-common-2.17-55.93.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"glibc-debuginfo-2.17-55.93.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"glibc-debuginfo-common-2.17-55.93.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"glibc-devel-2.17-55.93.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"glibc-headers-2.17-55.93.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"glibc-static-2.17-55.93.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"glibc-utils-2.17-55.93.amzn1")) flag++;
  if (rpm_check(release:"ALA", reference:"nscd-2.17-55.93.amzn1")) flag++;
}

if (flag)
{
  if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
  else security_hole(0);
  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-debuginfo / glibc-debuginfo-common / etc");
}

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

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

Go back to menu.

How to Run


Here is how to run the Amazon Linux AMI : glibc (ALAS-2015-473) 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 Amazon Linux Local Security Checks plugin family.
  6. On the right side table select Amazon Linux AMI : glibc (ALAS-2015-473) plugin ID 81024.
  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 ala_ALAS-2015-473.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a ala_ALAS-2015-473.nasl -t <IP/HOST>

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: CERT | Computer Emergency Response Team: ALAS | Amazon Linux Security Advisory: See also: Similar and related Nessus plugins:
  • 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)
  • 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)
  • 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 ala_ALAS-2015-473.nasl version 1.17. For more plugins, visit the Nessus Plugin Library.

Go back to menu.