목록Security/Reverse Engineering (5)
수호의 메모장
https://dreamhack.io/wargame/challenges/981 Permpkin Description chall 바이너리를 실행하여 플래그를 어떠한 연산을 거쳐 나온 결과를 flag1.txt와 flag2.txt로 저장하였습니다. 사용자는 chall 을 실행하여 sample flag를 연산한 후 rev1.txt와 rev2.txt 파일을 생성 dreamhack.io IDA로 main 함수를 열어보면 아래와 같이 되어 있다: __int64 __fastcall main(int a1, char **a2, char **a3) { size_t v3; // rbx size_t v4; // rbx char v6[32]; // [rsp+0h] [rbp-B0h] BYREF char v7[32]; // [rsp..
https://www.ascii-code.com/ flag[0] = 0x78 ^ 0x34 == L flag[1] = 0x31 == 1 flag[2] = 0x7C ^ 0x32 == N flag[3] = 0xFFFFFFDD ^ 0x88 = 0x55 == U flag[4] = 0x58 == X flag[5] = ' '
#include int main() { int input = 0; //mov dword ptr [ebp-4], 0 printf("This is Password Gussing Problem>>"); //0x804a008 scanf("%d", &input); //0x47006425 if (input == "0x113") printf("Good Job!!"); //0x804a02f else printf("Sorry... Try Again.. :("); //0x804a03a return 0; } psuedocode
헥스에디터로 뭐 하나 분석하려고 했건만 30일 체험판이 끝나버렸대요 ಢ‸ಢ 010 Editor의 편리함을 아는 나는 차마 HxD로 돌아가기 싫어하는데.. 제겐 든든한 아이다씨가 있죠! 먼저 만료된 010 Editor을 실행시키면 아래와 같은 String을 포착할 수 있어요: IDA로 String을 추출시키고 xref를 따라가 봅시다 위의 함수로 이동 되는데, 이것을 hexray로 디컴파일 하면 아래와 같은 의사코드가 나와요 딱봐도 라이센싱과 관련된 함수로 보이죠? 전체 의사코드는 아래와 같아요: void __fastcall j_nullsub_54_0(__int64 a1) { int v2; // r15d __int64 v3; // rax const struct QString *v4; // rbx const..
유저모드에서 프로세스를 검색하기 위해서는 EnumProcess나 CreateToolhelp32Snapshot를 사용하게 된다. 위 두 함수 모두 내부적으로는 NtQuerySystemInformation를 호출하게 된다. 따라서 NtQuerySystemInformation를 API Hooking하여 유저모드에서 프로세스를 숨길 수 있게 된다. https://github.com/dslee2022/HideProcess-UM 실제 구현 코드는 필자의 깃헙에 업로드 하였다. 시연 영상: https://youtu.be/XbuQplBr9rY