SigReturn-Oriented Programming
·
Wargame/Dreamhack
1. intro 2. code 및 분석 2.1 code // Name: srop.c // Compile: gcc -o srop srop.c -fno-stack-protector -no-pie #include int gadget() { asm("pop %rax;" "syscall;" "ret" ); } int main() { char buf[16]; read(0, buf ,1024); } ┌──(kali㉿kali)-[~/Downloads] └─$ checksec srop [*] '/home/kali/Downloads/srop' Arch: amd64-64-little RELRO: Partial RELRO Stack: No canary found NX: NX enabled PIE: No PIE (0x40000..