How to use the Cyclic Pattern Generator & Offset Finder
The first step in most pwn challenges is finding how many bytes it takes to overwrite the return address. This tool generates exactly the same de Bruijn sequence as pwntools cyclic(); paste the EIP/RIP value after the crash and you get the offset immediately, with nothing to install.
- Choose 32- or 64-bit, set a length and generate the pattern, then feed it to the program to crash it.
- In gdb, read EIP/RIP or the 8 bytes RSP points to and copy the value.
- Paste it on the right and click Find offset to get the padding length for your exploit.