UnrealIRCd 3.2.8.1 Backdoor Exploitation
A backdoored version of UnrealIRCd 3.2.8.1 was distributed from the official download mirror between November 2009 and June 2010. The backdoor executes any system command prefixed with AB; sent as raw data to the IRC port. No authentication or valid IRC handshake is required. If IRC enumeration shows UnrealIRCd version 3.2.8.1, test for this backdoor immediately.
Test the Backdoor
Send the trigger prefix followed by a command. Output may not be returned through the IRC connection, so use a command with observable side effects:
If the backdoor is present, the command after AB; executes on the server. No output returned through IRC is expected. Confirm with a reverse shell or out-of-band callback.
Reverse Shell
Start a listener with nc -lvnp $LPORT first, then trigger the backdoor with a bash reverse shell:
The shell runs as the user running the IRC daemon, typically irc or nobody. Check /etc/unrealircd/ and /home/irc/ for configuration files containing passwords that may be reused elsewhere.
Metasploit Module
Warning
Metasploit modules are limited to one machine per exam in the OSCP. Use the manual method on additional targets.
References
-
LWN: UnrealIRCd BackdoorLINK: LWN: UnrealIRCd Backdoor, lwn.net/Articles/392201 (opens in new tab)
Report on the compromised UnrealIRCd 3.2.8.1 distribution