security

Published on January 31st, 2015 📆 | 6921 Views ⚑

0

GHOST Vulnerability In glibc – Everything You Need To Know


iSpeech
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.

[adsense size='1']

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.

Tagged with:



Comments are closed.