認証トークン
ログイン画面が渡される。
適当なPasswordを入力した後、Networkタブを見てみると、URLが書いてある。
アクセスすると、パスワードがあった。
預託認証トークン
認証トークンを預かった。
john the ripperで総当たりを試してみる。
rockyou.txtにはないっぽいから単純な総当たり
password:3b8afc
復号キー
認証トークン:e852b4f2-37c0-4403-8df1-faea8805d41b
暗号化トークン:VllRAlMDBAEAAlJbVQAABwULAABTX1IAVFldWQsBVg1TBAUA
XORすればトークンが手に入りそう。(コードはAI)
import base64
# Given inputs
e_base64 = "VllRAlMDBAEAAlJbVQAABwULAABTX1IAVFldWQsBVg1TBAUA"
p_hex = "e852b4f2-37c0-4403-8df1-faea8805d41b"
# Convert e from base64 to bytes
e_bytes = base64.b64decode(e_base64)
# Convert p from hexadecimal to bytes, ignoring the dashes
p_bytes = bytes.fromhex(p_hex.replace("-", ""))
# XOR the two byte arrays
xor_result = bytes([e_byte ^ p_byte for e_byte, p_byte in zip(e_bytes, p_bytes)])
# Convert the result to a readable format (e.g., hexadecimal)
xor_result_hex = xor_result.hex()
xor_result_hex
他ユーザー認証トークン
userid=1が気になる。
2にしてリロードしたらフラグが取れた。