GHOST Vulnerability In glibc – Everything You Need To Know

Keep on Guard!


So the big panic in the past week or so has been about this GHOST vulnerability in glibc which under certain circumstances can allow remote code execution (serious business!).

So we’ve had Heartbleed, POODLE and Shellshock and now we have awfully cute GHOST.

GHOST Vulnerability In glibc

What is it?

The CVE for GHOST is – CVE-2015-0235, the technical explanation:

Heap-based buffer overflow in the __nss_hostname_digits_dots function in glibc 2.2, and other 2.x versions before 2.18, allows context-dependent attackers to execute arbitrary code via vectors related to the (1) gethostbyname or (2) gethostbyname2 function, aka “GHOST.”

The patches were released by major vendors on January 27th, so most people should be patched by now. It’s pretty widespread because basically every Linux system has GNU C Library or glibc, so before patching pretty much every Linux system is vulnerable (apart from Ubuntu 14.04 LTS which is safe out of the box).

This server is still on Ubuntu 10.04 LTS, the patching looks as below, this was the output before patching:

And after:

Which is the patched version for Ubuntu 10.04 LTS.

Qualys managed to develop an actual working exploit for this by sending a specially crafted e-mail to an unpatched machine they could get a remote Linux shell. They claim that this bypasses all existing protections (like ASLR, PIE and NX) on both 32-bit and 64-bit systems.

The full technical analysis can be found here: GHOST-CVE-2015-0235.txt

Who is affected?

The first vulnerable version of the GNU C Library affected by this is glibc-2.2, released on November 10, 2000. It was fixed on May 21, 2013 (between the releases of glibc-2.17 and glibc-2.18). Unfortunately, it was not recognized as a security threat; as a result, most stable and long-term-support distributions were left exposed including Debian 7 (wheezy), Red Hat Enterprise Linux 6 & 7, CentOS 6 & 7, Ubuntu 12.04, for example.

They also tested a lot of software and found most of the major ones are not vulnerable (so stop panicking) – apache, cups, dovecot, gnupg, isc-dhcp, lighttpd, mariadb/mysql, nfs-utils, nginx, nodejs, openldap, openssh, postfix, proftpd, pure-ftpd, rsyslog, samba, sendmail, sysklogd, syslog-ng, tcp_wrappers, vsftpd, and xinetd are not vulnerable to GHOST.

So yah, it’s not that easy to exploit, it’s not the end of the Internet as we know it.

What should we do?

Update your packages ASAP! On Ubuntu/Debian based systems that’s as easy as:

You can check the version using the command:

Honestly if you’re unpatched, you’re not super likely to get hit by this – but there is a small risk so if you can, do patch.


Posted in: Exploits/Vulnerabilities, Linux Hacking

,

Latest Posts:


BSQLinjector - Blind SQL Injection Tool Download BSQLinjector – Blind SQL Injection Tool Download in Ruby
BSQLinjector is an easy to use Blind SQL Injection tool in Ruby, that uses blind methods to retrieve data from SQL databases.
CCleaner Hack - Spreading Malware To Specific Tech Companies CCleaner Hack – Spreading Malware To Specific Tech Companies
The CCleaner Hack is blowing up, initially estimated to be huge, it's hit at least 700k computers & is specifically targeting 20 top tech organisations.
AWSBucketDump - AWS S3 Security Scanning Tool AWSBucketDump – AWS S3 Security Scanning Tool
AWSBucketDump is an AWS S3 Security Scanning Tool, which allows you to quickly enumerate AWS S3 buckets to look for interesting or confidential files.
nbtscan Download - NetBIOS Scanner For Windows & Linux nbtscan Download – NetBIOS Scanner For Windows & Linux
nbtscan is a command-line NetBIOS scanner for Windows that is SUPER fast, it scans for open NetBIOS nameservers on a local or remote TCP/IP network.
Equifax Data Breach - Hack Due To Missed Apache Patch Equifax Data Breach – Hack Due To Missed Apache Patch
The Equifax data breach is pretty huge with 143 million records leaked from the hack in the US alone with unknown more in Canada and the UK.
Seth - RDP Man In The Middle Attack Tool Seth – RDP Man In The Middle Attack Tool
Seth is an RDP Man In The Middle attack tool written in Python to MiTM RDP connections by attempting to downgrade the connection to extract clear text creds


One Response to GHOST Vulnerability In glibc – Everything You Need To Know

  1. Gunstick February 2, 2015 at 10:21 pm #

    I bet you cannot exploit this by sending an email. with all special craftiness in the world, this is impossible.