일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- ASM
- pwnable.kr
- rev
- reversing
- string
- anti
- toddler
- TUCTF
- pico
- pwn
- PMA
- shellcode
- FSB
- Bug
- Rookiss
- Read
- CTF
- Bottle
- Reverse
- pwnable
- 2018
- practicalmalwareanalysis
- format
- Toddler's Bottle
- shellcraft
- picoCTF
- Leak
- CANARY
- writeup
- BOF
- Today
- Total
목록분류 전체보기 (91)
제리의 블로그
random - 1 pt Daddy, teach me how to use random value in programming! ssh random@pwnable.kr -p2222 (pw:guest)ssh 접속정보가 있군요들어가볼까요 random@ubuntu:~$ ls -l total 20 -r--r----- 1 random_pwn root 49 Jun 30 2014 flag -r-sr-x--- 1 random_pwn random 8538 Jun 30 2014 random -rw-r--r-- 1 root root 301 Jun 30 2014 random.c 소스코드가 있으니까사양하지 않고 열어봅니다. #include int main(){ unsigned int random; random = rand(); /..
passcode - 10 pt요약문제의 지문에서 컴파일의 경고를 무시했다는 정보를 토대로 소스코드를 직접 컴파일을 통해 어떠한 경고가 떴는지 확인한 결과 그 경고는 함수에 전달되는 인자의 자료형에 대한 것이었습니다. 프로그램을 직접 실행해서 passcode1 에 10진수를 넣었을 때 Segmentation fault 발생하는 이유를 알아보면 이를 통해 임의의 주소에 4 bytes 만큼 덮어쓸 수 있다는 것을 알게됩니다. welcome 함수에서 사용했던 스택의 데이터가 login 함수에서도 쓰레기값으로 데이터가 그대로 남기 때문에 지역변수 passcode1 를 공격자가 특정 값(주소)을 넣을 수 있습니다. checksec 로 바이너리의 보호기법을 검사해보니 GOT에 write 권한이 있었고 공격 시나리오를..
flag - 7 pt Papa brought me a packed present! let's open it. Download : http://pwnable.kr/bin/flag This is reversing task. all you need is binary이번 문제는 리버싱 분야입니다. 디버깅해보니 섹션정보도 일반 바이너리와 달랐고SYS_mmap 로 새로운 메모리 할당하는 것을 보고 패킹을 의심했었고 # strings ./flag...UPX! UPX!문자열 검사를 해보니UPX 패킹이 되어있었습니다. 언패킹을 해주면 mov edi, offset aIWillMallocAnd ; "I will malloc() and strcpy the flag there. take it." call puts mov edi..
Nihwk CTF 2018 pwn6 주최 측의 치명적인 실수로 문제가 오픈된 사건이 있었던 것 같은데 대회 공정성이 없어지면서 종료 시점 또한 없는 듯 합니다. writeup을 써도 된다기에 이렇게 올립니다. Pwn #6 神奇魔法麵包 2100 你可以解開神奇魔法麵包拿到shell嗎? Please shell it https://nihwkpwn.herokuapp.com/중국어는 번역기 돌려도 모르겠지만 퍼너블인 것은 맞으니까 쉘을 따면 됩니다. nc 0.tcp.ngrok.io 15076 Download: https://nihwkpwn.herokuapp.com/pwnfile Sometimes, the port will be outdated, please wait for refresh접속 정보와 바이너리가 주어집니..
Lab16-02.exe 질문1. 커맨드라인에서 Lab16-02.exe를 실행할 때 어떤 일이 발생하는가? C:\ProgramData\chocolatey\lib\pmalabs\tools\Practical Malware Analysis Labs\Bina ryCollection\Chapter_16L>Lab16-02.exe usage: Lab16-02.exe 2. Lab16-02.exe를 실행할 때 어떤 일이 일어나는지 보고 커맨드라인의 파라미터를 추측해라. C:\ProgramData\chocolatey\lib\pmalabs\tools\Practical Malware Analysis Labs\Bina ryCollection\Chapter_16L>Lab16-02.exe p@ss Incorrect password,..
Lab16-01.exe if ( *(_BYTE *)(__readfsdword(0x30) + 2) ) del_file(); if ( *(_DWORD *)(*(_DWORD *)(__readfsdword(0x30) + 0x18) + 0x10) ) del_file(); if ( *(_DWORD *)(__readfsdword(0x30) + 0x68) == 0x70 ) del_file(); 이 프로그램은 3가지 안티디버깅 기법이 적용된 Lab09 실습 프로그램입니다.디버깅 중이라는 것이 판명되면 악성코드 스스로 삭제하게 됩니다. (sub_401000) 첫번째는 BeingDebugged 플래그 .text:00403554 mov eax, large fs:30h .text:0040355A mov bl, [eax+2] ...
Lab15-03.exe retaddr = 0x40148C;main() 함수 .text:0x40100C 를 보면 위와같은 주소가 저장되는 모습을 볼 수 있습니다. .text:0040148C push ebp .text:0040148D mov ebp, esp .text:0040148F push ebx .text:00401490 push esi .text:00401491 push edi .text:00401492 xor eax, eax .text:00401494 jz short near ptr loc_401496+1그래서 40148C를 확인해보니 xor; jz+1; 형태의 안티디스어셈블리를 확인할 수 있습니다.악성코드의 주요코드가 숨겨져있을거라고 예상이 됩니다.. 40148C의 코드는 call 이나 jmp 명령..
Lab15-02.exe다음은 strings한 결과입니다.ShellExecuteA SHELL32.dll WS2_32.dll InternetCloseHandle InternetReadFile InternetOpenUrlA InternetOpenA WININET.dll fclose fwrite fopen malloc strstr printf MSVCRT.dll _exit _XcptFilter exit __p___initenv __getmainargs _initterm __setusermatherr _adjust_fdiv __p__commode __p__fmode __set_app_type _except_handler3 _controlfp _strdup not enough name internet unable ..
Lab15-01.exeLab15-01.exe 파일을 그냥 더블클릭해보면커맨드 창이 순식간에 떳다 사라진다. 그래서 아래와같이 실행시켜보았다.C:\ProgramData\chocolatey\lib\pmalabs\tools\Practical Malware Analysis Labs\Bina ryCollection\Chapter_15L>Lab15-01.exe Son, I am disappoint.뭔가 조건이 맞지 않은 모양이군요.문자열이 나왔으니 함 찾아볼까요 .data:00403010 0000000A C Good Job! .data:0040301C 00000016 C Son, I am disappoint.실패 문자열뿐만이 아니라 성공 문자열까지 나온 것을 확인할 수 있습니다. .text:00401047 xor ..
bof - 5 pt Nana told me that buffer overflow is one of the most common software vulnerability. Is that true? Download : http://pwnable.kr/bin/bof Download : http://pwnable.kr/bin/bof.c Running at : nc pwnable.kr 9000 #include #include #include void func(int key){ char overflowme[32]; printf("overflow me : "); gets(overflowme); // smash me! if(key == 0xcafebabe){ system("/bin/sh"); } else{ printf..