1
0

CELTF ToDo管理サービス writeup

Posted at

認証トークン

image.png
ログイン画面が渡される。
適当なPasswordを入力した後、Networkタブを見てみると、URLが書いてある。
image.png
image.png
アクセスすると、パスワードがあった。

預託認証トークン

認証トークンを預かった。
image.png
john the ripperで総当たりを試してみる。
image.png
rockyou.txtにはないっぽいから単純な総当たり
image.png
image.png
password:3b8afc

image.png
トークンが手に入る。

復号キー

認証トークン: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

他ユーザー認証トークン

image.png
userid=1が気になる。
image.png
2にしてリロードしたらフラグが取れた。

特権ログイン

gobusterで列挙したらadminが出てきた。image.png

image.png

htmlを見てたら、答えがあった。
image.png

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0