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

, , , , , , , ,

Recent in Exploits/Vulnerabilities:
- Mirai DDoS Malware Source Code Leaked
- mimikittenz – Extract Plain-Text Passwords From Memory
- Massive Yahoo Hack – 500 Million Accounts Compromised

Related Posts:

Most Read in Exploits/Vulnerabilities:
- Learn to use Metasploit – Tutorials, Docs & Videos - 236,523 views
- AJAX: Is your application secure enough? - 120,380 views
- eEye Launches 0-Day Exploit Tracker - 85,872 views


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.