Download presentation
Presentation is loading. Please wait.
1
Reverse Engineering for CTFs
Unit 2
2
Last lecture Went over basics of RE Touched on x86
Static analysis with Radare2
3
This lecture Homework Recap Emulation and virtualization with QEMU
Dynamic analysis with gdb and pwndbg Demo Homework
4
QEMU QEMU is a generic and open source machine emulator and virtualizer. Has full system emulation and virtualization technology, but for this class/homework we are interested in user-mode emulation. User-mode emulation: Run programs for another Linux/BSD target, on any supported architecture General Plan: Identify the correct architecture for the file. Google/man page/read the docs to find the correct qemu command to run your file. Install: (This will take a while!) git clone git://git.qemu.org/qemu.git cd qemu git submodule init git submodule update --recursive ./configure (May also need to run sudo apt install libpixman-1-dev) make
5
QEMU Example
6
pwndbg pwndbg is a GDB plug-in to improve debugging with GDB. Install:
git clone cd pwndbg ./setup.sh
7
pwndbg Commands: gdb fileToAnalysis - Start pwndbg
start - Sets a breakpoint at main and executes. c - continue execution b *Address - set a breakpoint at Address s n - Step n instructions n - next instruction. (Avoid stepping into interesting functions) set $reg = value - Set the register $reg equal to value. r2 - Opens Radare2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.