基本信息
- https://www.hackthebox.com/home/machines/profile/432
- 10.10.11.143
端口扫描
22,80,443:
1 | nmap -sC -sV 10.10.11.143 |
80/443
默认页面:
响应中得到域名:
office.paper
加hosts后访问:
office.paper
wordpress 5.2.3,其中一个comment中提示信息:
draft无法直接查看,但可以搜到相关漏洞:
- WordPress <= 5.2.3 - Unauthenticated View Private/Draft Posts WordPress Security Vulnerability
https://wpscan.com/vulnerability/9909
得到Secret Registration URL:
1 | http://chat.office.paper/register/8qozr226AhkCHZdyY |
chat.office.paper
同样添加hosts后访问,是rocket.chat:
使用secret url注册登录:
recyclops bot
频道里有个机器人,可以执行一些命令:
频道是只读的,但可以和机器人私聊:
list file
可以使用list查看目录,file查看文件,并且存在目录遍历:
../hubot/.env
env文件中得到密码:
1 | export ROCKETCHAT_USER=recyclops |
username
/etc/passwd文件和home目录确认用户名:
user flag
dwight ssh密码就是bot密码,得到user.txt
1 | ssh dwight@office.paper |
提权信息
linpeas发现CVE-2021-3560:
- Almorabea/Polkit-exploit: Privilege escalation with polkit - CVE-2021-3560
https://github.com/Almorabea/Polkit-exploit
提权 & root flag
exp一键打:
1 | [root@paper ~]# cat /etc/shadow |
参考资料
- WordPress <= 5.2.3 - Unauthenticated View Private/Draft Posts WordPress Security Vulnerability
https://wpscan.com/vulnerability/9909 - Almorabea/Polkit-exploit: Privilege escalation with polkit - CVE-2021-3560
https://github.com/Almorabea/Polkit-exploit - HTB Paper Writeup | 0xDedinfosec Blog
https://0xdedinfosec.vercel.app/posts/hackthebox-paper-writeup - Paper - Discussion [easy] | RaidForums
https://raidforums.com/Thread-Tutorial-Paper-Discussion-easy