본문 바로가기

Wargame/pwnable.kr9

[Rookiss] brain fuck int __cdecl do_brainfuck(char a1) { int result; // eax@1 int v2; // ebx@7 result = a1; switch ( a1 ) { case '>': result = hasAddr++ + 1; break; case ''*7 + ',' #'/bin/sh\x00'payload1_data = '/bin/sh\x00'#'\x00hs/nib/'#payload2 : read &putspayload2 = ''*4#payload4 : setvbuf_plt Python 2.7.7 (default, Jun 1 2014, 14:21:57) [MSC v.1500 64 bit (AMD64)] on win32Type "copyright", "credits" or "license.. 2014. 7. 26.
[Rookiss] ascii_easy ascii 프로그램은 getchar로 한 문자 씩 입력받아서 vuln함수 내에서 strcpy를 수행하는 프로그램이다.아래에 코드에서 보다싶이 0xa8(168) + ebp + ret을 덮을 수 있게된다. (gdb) disass vulnDump of assembler code for function vuln: 0x080484f1 : push %ebp 0x080484f2 : mov %esp,%ebp 0x080484f4 : sub $0xb8,%esp 0x080484fa : movl $0x80000000,0x4(%esp) 0x08048502 : lea -0xa8(%ebp),%eax 0x08048508 : mov %eax,(%esp) 0x0804850b : call 0x80483d0 0x08048510 : leav.. 2014. 7. 21.
[Rookiss] dragon I made a RPG game for my little brother.But to trick him, I made it impossible to win.I hope he doesn't get too angry with me :P! Author : rookissDownload : http://pwnable.kr/bin/dragon Running at : nc pwnable.kr 9004 문제는 아주 간단하게 해결할 수 있는 UAF 취약점이다. system("/bin/sh")를 띄우는 코드도 문제 바이너리에 포함되어 있어서 쉽게 해결할 수 있다. 아래는 Hex-ray 코드이다. void __cdecl FightDragon(int job) { char v1; // al@1 void *v2; // ST1C_4.. 2014. 7. 20.
[Toddler's Bottle] passcode passcode.c 소스 #include #include void login(){ int passcode1; int passcode2; printf("enter passcode1 : "); scanf("%d", passcode1); fflush(stdin); // ha! mommy told me that 32bit is vulnerable to bruteforcing :) printf("enter passcode2 : "); scanf("%d", passcode2); printf("checking...\n"); if(passcode1==338150 && passcode2==13371337){ printf("Login OK!\n"); system("/bin/cat flag"); } else{ printf(.. 2014. 7. 19.