hailong86
- 关注
1.靶机介绍
靶机下载地址:https://www.vulnhub.com/entry/evm-1,391
靶机提示:
Description
This is super friendly box intended for Beginner's
This works better with VirtualBox rather than VMware。
靶机IP:192.168.56.103(仅主机模式)
2.端口发现
扫描靶机信息,开放了22、25、53、80、110、139、143、445端口,识别到了Samba信息,可以先从445端口入手
3.Samba信息收集
enum4linux -a 192.168.56.103收集下Samba信息,只发现了用户rooter,这里识别的用户应该就是系统用户,登录连接没有任何可用文件
4.暴力破解
这里可以利用用户rooter爆破ssh,没有爆出来,哈哈,目录扫描,发现了wordpress
找到了登录界面,那就枚举下用户名吧
cmseek -u http://192.168.56.103/wordpress识别指纹信息,得到用户名c0rrupt3d_brain
可以利用wpscan --url http://192.168.56.103/wordpress/ -U c0rrupt3d_brain -P /usr/share/wordlists/rockyou.txt 破解出密码为24992499。
利用用户名c0rrupt3d_brain和密码24992499成功登录。
5.getshell
在Appearance—Theme Editor—404.php写入godzilla的一句话,文件目录是
注:
wordpress的Theme下的文件都存在/wordpress/wp-content/themes/下,根据404.php的url提示theme=twentynineteen,404.php文件应该在http://192.168.56.103/wordpress/wp-content/themes/twentynineteen/404.php
利用godzilla拿到了www-data的shell
先看下/etc/passwd的用户,果然有rooter,但是ssh的暴力破解没有成功。。。
6.提权
看下/etc/passwd的权限,进入/home/root3r,.root_password_ssh.txt这名字也太明显了吧。。。
查看.root_password_ssh.txt文件,得到root的密码willy26
切换root,成功拿到flag!!!
如需授权、对文章有疑问或需删除稿件,请联系 FreeBuf 客服小蜜蜂(微信:freebee1024)