-
뭐.... 브포를 하니까 풀려서 좀 어이없었음. 처음에는 알고리즘 찾으려고 했는 데 그럴 필요가 없는 문제였다.
# gdb -n -q -x sol.py ./rust-flag import gdb import re flag = "RCTF{" pool = "_}abcdefghijklnmopqrstuvwxyzABCDEFGHIJKLNMOPQRSTUVWXYZ0123456789" gdb.execute("break *0x000055555555afd4") while 1: for i in range(len(pool)): tmp = flag + pool[i] with open("input", "w") as f: f.write(tmp) gdb.execute("run < input") for j in range(len(tmp)): print(gdb.execute("c",to_string=True)) try: gdb.execute("c",to_string=True) flag += pool[i] break except: pass if flag[-1] == '}' : break print(flag)
Press Enter! and you get the flag.
엔터 계속 쳐주다 보면 답 나오더라
'Writeup > CTF_Writeup' 카테고리의 다른 글
[ Defenit CTF 2020 ] Lord fool song remix (0) 2020.06.08 [ Defenit CTF 2020 ] momsTouch (0) 2020.06.08 [ CODEGATE 2020 Preliminary ] RS(702pt) wripte-up (3) 2020.02.09 [Insomni'hack teaser] Kaboom writeup (0) 2020.01.21 [Insomni'hack teaser] Welcome (0) 2020.01.21 댓글