Dreamhack - pwnable
Return Oriented Programming
// 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; } 코드를 분석하기 전 알아야 하는 것 들 1. ASLR이 걸린 ..
2023. 1. 13. 15:25