Sitemap

HackTheBox — Oopsie Writeup

Sep 30, 2021
Press enter or click to view image in full size

nmap 10.10.10.28

發現22, 80 port 開著 先看網頁

gobuster 列舉網頁目錄

比較重要的 /uploads

另一個從網頁原始碼看

http://10.10.10.28/cdn-cgi/login/

到登入頁後拿上一關拿到的帳密去試, 發現可以過 ( 看論壇才知道)

https://sectools.tw/hackthebox-archetype-writeup/

帳密 admin / MEGAORP_4dm1n!!

進去後觀察網址id 可能是身分代碼

用burpsuite intruder去try

Press enter or click to view image in full size

其實後來這邊試到30 就是super admin了

這樣就有權限使用上傳功能,

注意super admin的cookie user=86575; role= super admin

Press enter or click to view image in full size

這邊丟php反向shell, 上面gobuster查到upload位置

就能進到系統了

user.txt

Press enter or click to view image in full size

然後到處翻翻

在login底下翻到db.php

嘗試ssh (nmap有掃到22 port)

成功

先id看看有看到其他group (bugracker)

查詢有沒有屬於他的檔案可以執行

find / -group bugtracker

不知道Provide Bug ID

隨便輸數字看看

好像跟filezilla有關, 查查看有沒有

filezilla是檔案伺服器之一

find / -name filezilla

看了一下裡面有類似像密碼的xml檔

這邊我卡了很久, 最後想到直接strings bugtracker那個檔案

看到一些東西 /root/reports

Press enter or click to view image in full size

這邊很有意思 我們都能猜到root.txt通常不是在 /home/root/ 就是在/root/底下

所以直接嘗試 ../root.txt

bingo

root.txt flag就出來了

結論

除了後臺login的帳戶是上一台機器得到的(這根本通靈)

是一個很有趣的靶機

本文章同步發佈到https://sectools.tw/hackthebox-oopsie-writeup/