https://dreamhack.io/wargame/challenges/872
๋ฌธ์
"Welcome! ๐"์ ์ถ๋ ฅํ๋ html ํ์ด์ง์ ๋๋ค.
์์ค ์ฝ๋๋ฅผ ํ์ธํ์ฌ ๋ฌธ์ ๋ฅผ ํ๊ณ ํ๋๊ทธ๋ฅผ ํ๋ํ์ธ์.
ํ๋๊ทธ ํ์์ DH{...} ์ ๋๋ค.
ํ์ด
1. ๋ฌธ์ ์์ ์ฃผ์ด์ง ์น์ฌ์ดํธ ์ ์
2. Ctrl+U ๋๋ ๋ง์ฐ์ค ์ค๋ฅธ์ชฝ ํด๋ฆญ ํ ํ์ด์ง ์์ค๋ณด๊ธฐ ํด๋ฆญ<!doctype html> <html> <head> <meta charset="utf-8"> <title>Welcome</title> </head> <body> <h1>Welcome! ๐</h1> <form method="POST"> <input type="hidden" name="64se64_encoding" value="IyEvdXNyL2Jpbi9lbnYgcHl0aG9uMwphc2M 9WzY4LCA3MiwgMTIzLCA5OCwgMTAxLCA0OCwgNTIsIDU0LCA5OCwgNTUsIDUzLCA1MCwgNTAsIDk3LCA5NywgN TAsIDEwMSwgNTAsIDU2LCAxMDIsIDUwLCA1NSwgNTQsIDEwMSwgNDgsIDk5LCA1NywgNDksIDQ4LCA1MywgNTA sIDQ5LCAxMDIsIDUwLCA1MSwgOTcsIDQ4LCA1MywgNTYsIDU1LCA0OCwgNDgsIDUzLCA5NywgNTYsIDUxLCA1NS wgNTUsIDUxLCA1NSwgNDgsIDk3LCA0OSwgNDksIDEwMSwgNTMsIDEwMSwgNTIsIDEwMCwgOTksIDQ5LCA1MywgMT AyLCA5OCwgNTAsIDk3LCA5OCwgMTI1XQphcnI9WzAgZm9yIGkgaW4gcmFuZ2UoNjgpXQpmb3IgaSBpbiByYW5nZS gwLDY4KToKICAgIGFycltpXT1jaHIoYXNjW2ldKQpmbGFnPScnLmpvaW4oYXJyKQpwcmludChmbGFnKQ=="> </form> </body> </html>
3. value ๋ถ๋ถ์ base64 ๋ฐฉ์์ผ๋ก ์ธ์ฝ๋ฉ ๋์ด์๋ ์ฝ๋๋ฅผ ๋์ฝ๋ฉ ์ํจ ํ ๊ฒฐ๊ณผ ๊ฐ ํ์ธ
echo "IyEvdXNyL2Jpbi9lbnYgcHl0aG9uMwphc2M9WzY4LCA3MiwgMTIzLCA5OCwgMTAxLCA0OCwgNTIsIDU0LCA5OCw
gNTUsIDUzLCA1MCwgNTAsIDk3LCA5NywgNTAsIDEwMSwgNTAsIDU2LCAxMDIsIDUwLCA1NSwgNTQsIDEwMSwgNDgsIDk5
LCA1NywgNDksIDQ4LCA1MywgNTAsIDQ5LCAxMDIsIDUwLCA1MSwgOTcsIDQ4LCA1MywgNTYsIDU1LCA0OCwgNDgsIDUzL
CA5NywgNTYsIDUxLCA1NSwgNTUsIDUxLCA1NSwgNDgsIDk3LCA0OSwgNDksIDEwMSwgNTMsIDEwMSwgNTIsIDEwMCwgOT
ksIDQ5LCA1MywgMTAyLCA5OCwgNTAsIDk3LCA5OCwgMTI1XQphcnI9WzAgZm9yIGkgaW4gcmFuZ2UoNjgpXQpmb3IgaSB
pbiByYW5nZSgwLDY4KToKICAgIGFycltpXT1jaHIoYXNjW2ldKQpmbGFnPScnLmpvaW4oYXJyKQpwcmludChmbGFnKQ=="
| base64 --decode > flag
---
cat flag
#!/usr/bin/env python3
asc=[68, 72, 123, 98, 101, 48, 52, 54, 98, 55, 53, 50, 50, 97, 97, 50,
101, 50, 56, 102, 50, 55, 54, 101, 48, 99, 57, 49, 48, 53, 50, 49, 102,
50, 51, 97, 48, 53, 56, 55, 48, 48, 53, 97, 56, 51, 55, 55, 51, 55, 48,
97, 49, 49, 101, 53, 101, 52, 100, 99, 49, 53, 102, 98, 50, 97, 98, 125]
arr=[0 for i in range(68)]
for i in range(0,68):
arr[i]=chr(asc[i])
flag=''.join(arr)
print(flag)
์ถ๋ ฅ ๊ฒฐ๊ณผ๋ฌผ ํ์ธ ์ python ์ฝ๋๊ฐ ์ถ๋ ฅ๋๋ ๊ฒ์ ๋ณผ ์ ์๋ค.
4. ๋์ฝ๋ฉํ ์ถ๋ ฅ ๊ฒฐ๊ณผ๋ฌผ python ์ผ๋ก ์คํ
python flag
DH{be046b7522aa2e28f276e0c910521f23a0587005a8377370a11e5e4dc15fb2ab}
DH{..} ํ์์ ํ๋๊ทธ ์ถ๋ ฅ
'Dreamhack' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Dreamhack] cookie Write-Up (1) | 2024.03.16 |
---|---|
[Dreamhack] phpreq Write-Up (2) | 2024.03.15 |
[Dreamhack] ex-req-ex Write-Up (2) | 2024.03.15 |
[Dreamhack] blue-whale Write-Up (3) | 2024.03.15 |
[Dreamhack] baby-linux Write-Up (1) | 2024.03.14 |