Binary Exploitation/PWN
- Today's session is on one of the harder, more technical categories you will come across!
- It is the perfect category for learning how computers execute code at a low level
- Don't get too overwhelmed or intimidated though, with some time and practice it can be one of the most rewarding categories!
- Due to it being a bit more of a difficult session we have also provided today's slides for you to reference if you need!
Useful tools for today!
- Disassembler/Decompiler - there are a few options so choose what looks best to you!
- Ghidra - Open Source, made by the NSA, been around for a long time so very mature with good ISA support
- IDA - Closed source, used widely by professionals, free version available (need to make an account), only supports x86 + cloud decomp, fairly intuative and easy to use
- Binary Ninja - Partial open source, newer than the other two but gaining a lot of popularity, free version available, everything runs locally
- GDB (The GNU Debugger) - debug binaries, look at execution and memory, test your payloads, would recommend installing PwnDBG or GEF as they provide nice register/stack/code views
- pwntools - Python library for automating solves so you don't have to manually copy and paste your leaks and payloads all the time
- whilehex - input raw hex bytes from the commmand line
- Its worth putting this in your bashrc/zshrc/whatever you have as an alias
alias whilehex = 'while read -r line; do echo -e $line; done', then you can use it aswhilehex | ./[binary] - Now you can type raw and non printable hex bytes into you programs using the format '\xXX'
- Its worth putting this in your bashrc/zshrc/whatever you have as an alias
Today's challenges
- Pwn category on our CTFd
- If you haven't registered an account yet make sure to grab the registration key from #logins on our discord!
- PicoCTF pwn category
If you are struggling then talk to your friends and the people around you! Remember you can always look stuff up too, and if you're really struggling then feel free to ask someone in an AFNOM hoodie. We want everyone to have fun and have a good time learning something new!
Happy PWNing!