rop
·
Wargame/Dreamhack
// Name: rop.c // Compile: gcc -o rop rop.c -fno-PIE -no-pie #include #include int main() { char buf[0x30]; setvbuf(stdin, 0, _IONBF, 0); setvbuf(stdout, 0, _IONBF, 0); // Leak canary puts("[1] Leak Canary"); printf("Buf: "); read(0, buf, 0x100); printf("Buf: %s\n", buf); // Do ROP puts("[2] Input ROP payload"); printf("Buf: "); read(0, buf, 0x100); return 0; } 앞선 문제와 동일하게 canary는 얻으면 되고, 이 문제의 ..