Guide: Fixing the vsftpd 2.0.8 Exploit (CVE-2011-2523)
Introduction
vsftpd (Very Secure FTP Daemon) is a popular FTP server used on Linux and Unix-like systems. In 2011, a critical vulnerability was discovered in vsftpd 2.0.8, which allowed remote attackers to execute arbitrary code on the server. This guide provides steps to fix the exploit and prevent similar vulnerabilities.
- No package management (manual compile).
- No version monitoring.
- Outdated firewall rules allowing port 6200 outgoing.
sudo iptables -A INPUT -p tcp --dport 6200 -j DROP
# Or with ufw:
sudo ufw deny 6200
# Connect to backdoor port
s2 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s2.connect((host, 6200))
s2.send(b"id\n")
print(s2.recv(1024)) # Should show uid=0(root)
s2.close()
- https://github.com/vsftpd/vsftpd
Fixed Versions
Or manually:
telnet <target_ip> 21
USER test:)
PASS test
Step 6: Scan for Existing Compromise
Assume the backdoor was triggered. Run a rootkit scan: