Hack The Box - Invite Code
Thu, Sep 5, 2019
2-minute read
題目:invite code
Invite Code
Challenge Info
進入 Hack The Box 的第一關,要得到 invite code 才能註冊
Solution
開啟開發人員工具(⌘+⌥+I)、點開 Console 會看到提示訊息:
| |
看來 invite code 會在附近
接下來看 Network 欄位,看到有個檔案叫 inviteapi.min.js,在最後有 makeInviteCode 看起來就很棒
| |
回到 Console 輸入 makeInviteCode() 並按Enter,得到回傳資料:
| |
得知資料使用 base64 編碼(也有可能是ROT13),解碼之後得到:
| |
要用 POST 對 https://www.hackthebox.eu/api/invite/generate 發出請求
可以用指令解決: curl -XPOST https://www.hackthebox.eu/api/invite/generate
正好網頁中有個 form(輸入 invite code 那個),就拿它來改一下:
| |
按下 Sign Up 按鈕得到:
| |
用 base64 解碼之後得到 invite code
{< admonition info >}
一開始想註冊發現沒註冊鈕,直接猜註冊網址是 https://www.hackthebox.eu/register,結果還真的中了…
輸入完資料後才發現需要 invite code,白高興一場XD {< /admonition >}
Flag
XDMVQ-BNJPS-GCJIX-ZURYV-CGJGI