
🌇│System_Study/📕│Dreamhack_Hacking
Exploit Tech: Return to Shellcode
Return Address OverWrite 카나리 우회와 셸 코드를 이용해 셸을 획득하는 방법 // Name: r2s.c // Compile: gcc -o r2s r2s.c -zexecstack #include #include void init() { setvbuf(stdin, 0, 2, 0); setvbuf(stdout, 0, 2, 0); } int main() { char buf[0x50]; init(); printf("Address of the buf: %p\n", buf); printf("Distance between buf and $rbp: %ld\n", (char*)__builtin_frame_address(0) - buf); printf("[1] Leak the canary\n"); pri..