heap0 (gdb) disas mainDump of assembler code for function main:0x0804848c : push ebp0x0804848d : mov ebp,esp0x0804848f : and esp,0xfffffff00x08048492 : sub esp,0x20 0x08048495 : mov DWORD PTR [esp],0x40 //인자가 40byte0x0804849c : call 0x8048388 0x080484a1 : mov DWORD PTR [esp+0x18],eax // 0x804a008이 data가 할당된 위치고, esp+0x18에 정의됨. 0x080484a5 : mov DWORD PTR [esp],0x40x080484ac : call 0x8048388 0x080484b1 .. 더보기 ㅋ reversing.kr 풀이가 다날아갔다 ㅡㅡ; 다시써야지 더보기 bof #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("Nah..\n");}}int main(int argc, char* argv[]){func(0xdeadbeef);return 0;} (gdb) x/20x $ebp-0x2c0xbffff63c:0x414141410x414141410x414141410x414141410xbffff64c:0x414141410x414141410x414141410x414141410xbffff65c:0x414141410x80004.. 더보기 이전 1 ··· 9 10 11 12 13 14 15 ··· 27 다음