Description
올바르게 입력했을 때 출력되는 Flag를 구해주세요.
플래그의 형식은 DH{…} 입니다.
__int64 __fastcall main(int a1, char **a2, char **a3) { unsigned int i; // [rsp+4h] [rbp-21Ch] char *v5; // [rsp+8h] [rbp-218h] int v6[22]; // [rsp+10h] [rbp-210h] BYREF __int64 v7; // [rsp+68h] [rbp-1B8h] BYREF __int64 v8[18]; // [rsp+80h] [rbp-1A0h] BYREF __int64 buf[34]; // [rsp+110h] [rbp-110h] BYREF buf[33] = __readfsqword(0x28u); v8[0] = 0xFE5D3A093968D02BLL; v8[1] = 0xBA0AA367C2862EAELL; v8[2] = 0x8BEA2ADA9E26604FLL; v8[3] = 0x2E6F41C96DCF5224LL; v8[4] = 0x7FD91BD2949B75F3LL; v8[5] = 0x5B1ED8E6072F3A6LL; v8[6] = 0xC94045C6D4887611LL; v8[7] = 0x9D43DF6DF6B94D95LL; v8[8] = 0xB9A8A83C8AC08D80LL; v8[9] = 0x6D78E80376518464LL; v8[10] = 0xE81A20F2023C2D0LL; v8[11] = 0x2E41EAE69D89F186LL; v8[12] = 0x425C831DD2A3E5FDLL; v8[13] = 0x82788DBBDC4100ECLL; v8[14] = 0x6D0FEE8D3901DD20LL; v8[15] = 0xEBE82A0A41E5D783LL; v8[16] = 0x2AFA26414B72E506LL; v8[17] = 0xD1848E9C21D114DLL; memset(buf, 0, 256); printf("Input : "); fflush(stdout); read(0, buf, 256uLL); v5 = strchr((const char *)buf, 10); if ( v5 ) *v5 = 0; for ( i = 0; i <= 8; ++i ) { sub_562E9EE70209(v6); sub_562E9EE7025C(v6, (_BYTE *)buf + (int)(3 * i), 3u); sub_562E9EE703E7(v6); if ( memcmp(&v7, &v8[2 * (int)i], 16uLL) ) { puts("Wrong!"); return 1LL; } } *((_BYTE *)buf + (int)(3 * i)) = 0; printf("Correct! Flag is %s\n", (const char *)buf); return 0LL; }
buf로부터 3글자씩 MD5 해시값을 구하면 된다.
2bd06839093a5dfeae2e86c267a30aba
DH{
4f60269eda2aea8b2452cf6dc9416f2e
m-d
f3759b94d21bd97fa6f372608eedb105
-5_
117688d4c64540c9954db9f66ddf439d
1s_
808dc08a3ca8a8b96484517603e8786d
vu1
d0c223200fa2810e86f1899de6ea412e
n-e
fde5a3d21d835c42ec0041dcbb8d7882
r-4
20dd01398dee0f6d83d7e5410a2ae8eb
b1e
06e5724b4126fa2a4d111dc2e948180d
~!}
flag는 DH{m-d-5_1s_vu1n-er-4b1e~!}였다.