//a little fun brought to you by bla #include #include #include #include void catcher(int a) { setresuid(geteuid(),geteuid(),geteuid()); printf("WIN!\n"); system("/bin/sh"); exit(0); } int main(int argc, char **argv) { puts("source code is available in level02.c\n"); if (argc != 3 || !atoi(argv[2])) return 1; signal(SIGFPE, catcher); return abs(atoi(argv[1])) / atoi(argv[2]); } SIGFPE는 int형 오류가 ..
level1@io:/levels$ gdb -q level01Reading symbols from /levels/level01...(no debugging symbols found)...done.(gdb) disas mainDump of assembler code for function main: 0x08048080 :push $0x8049128 0x08048085 :call 0x804810f 0x0804808a :call 0x804809f 0x0804808f :cmp $0x10f,%eax 0x08048094 :je 0x80480dc 0x0804809a :call 0x8048103 End of assembler dump. (gdb) p 0x10f$1 = 271(gdb) qlevel1@io:/levels$ ..