๋ฐ์ํ
ํ์ด ๋ฐฉ๋ฒ
1. flag์ 0~51 ์ค ํ๋์ ์ซ์๊ฐ ๋จ๋์ผ๋ก ๋ํด์ง๋ ํํ์ด๋ค. ๋ฐ๋ผ์ flag์ ascii ์ฝ๋ ๊ฐ ๋ณด๋ค ์์ ๊ฐ์ ์ถ๋ ฅ๋ ์ ์๋ค.
fuzzy = [c + randbelow(len(string.ascii_letters)) for c in flag]
2. ์ฌ๋ฌ๋ฒ ๋ฐ๋ณตํ์ฌ ๊ฐ index์ ๊ฐ์ฅ ์์ ๊ฐ๋ง ์ ์ฅํ๋ค.
3. ์์ ๊ฐ๋ง ์ ์ฅ๋ ๋ฆฌ์คํธ๋ฅผ ๋ณํํ๋ฉด! flag๋ฅผ ์ป์ ์ ์๋ค.
ํ์ด ์ฝ๋
from pwn import *
import time
## 185 ๊ธ์
min_data_list = [255] * 185
for count in range(0, 216) :
p = remote("host3.dreamhack.games", 21384)
data = p.recvline().decode('utf-8').split("[")[1].split("]")[0].split(", ")
cur_data_list = [int(data[i]) for i in range(len(data))]
for index in range(0, len(data)) :
min_data_list[index] = min(cur_data_list[index], min_data_list[index])
print("## count: ", count , " ##")
print(min_data_list)
p.close()
ํ์ด ๊ฒฐ๊ณผ
flag = [89, 73, 83, 70, 123, 109, 121, 95, 116, 119, 111, 95, 115, 48, 108, 117, 116, 105, 48, 110, 115, 58, 95, 48, 110, 101, 95, 119, 104, 101, 114, 101, 95, 116, 104, 101, 95, 97, 118, 101, 114, 97, 103, 101, 95, 48, 102, 95, 114, 97, 110, 100, 48, 109, 95, 110, 117, 109, 98, 101, 114, 115, 95, 114, 101, 109, 97, 105, 110, 115, 95, 99, 111, 110, 115, 116, 97, 110, 116, 44, 95, 97, 110, 100, 95, 97, 110, 48, 116, 104, 101, 114, 95, 119, 104, 101, 114, 101, 95, 116, 104, 101, 95, 117, 112, 112, 101, 114, 95, 97, 110, 100, 95, 49, 111, 119, 101, 114, 95, 98, 111, 117, 110, 100, 115, 95, 111, 102, 95, 114, 97, 110, 100, 111, 109, 95, 110, 117, 109, 98, 101, 114, 115, 95, 114, 101, 109, 97, 105, 110, 95, 99, 48, 110, 115, 116, 97, 110, 116, 46, 87, 104, 97, 116, 95, 109, 101, 116, 104, 111, 100, 95, 100, 49, 100, 95, 121, 111, 117, 95, 117, 115, 101, 63, 125]
print(bytes(flag).decode('utf-8'))
๋ฐ์ํ
'๐ดโโ ๏ธ CTF ๐ดโโ ๏ธ > ๐งฎ ์ํธํ ๐งฎ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Dream Hack - Pwnable] baby-bof (0) | 2023.11.19 |
---|---|
[Dream Hack - Crypto] RSA-wiener (0) | 2023.09.05 |
[Dream Hack - Crypto] chinese what? (0) | 2023.09.04 |
[Dream Hack - Crypto] ICM2022 (0) | 2023.09.04 |
[Dream Hack - Crypto] darimchal_001 (0) | 2023.09.04 |