Skip to main content
CTFWorld
RevDifficulty: Beginner -> Elite

Reverse Engineering (Rev)

Reverse engineering asks you to understand compiled programs—ELF, PE, Mach-O, Android APKs, WebAssembly, .NET, or custom VMs—without original source code. You combine static disassembly/decompilation with dynamic instrumentation and SMT constraint solving to uncover secret checks and flag generators.

Core Attack Classes & Concepts

Static Analysis & Decompilation

Inspecting strings, imports, cross-references, and decompiled pseudocode to map program intent.

Key Techniques: Finding main() via libc_start_main, rebuilding structs, and isolating key verification routines.

Dynamic Debugging & Instrumentation

Running binaries under debuggers or hooking frameworks to inspect live registers and decrypted buffers.

Key Techniques: Conditional breakpoints, patching anti-debug checks (ptrace/IsDebuggerPresent), and Frida runtime hooks.

Symbolic Execution & SMT Solvers

Modeling complex math constraints as equations and letting solvers compute valid inputs automatically.

Key Techniques: z3-solver bitvector modeling and angr path exploration for branch-heavy crackmes.

Packers, Obfuscation & Custom VMs

Unpacking UPX/custom crypters, untangling control-flow flattening, and disassembling custom bytecode.

Key Techniques: Dumping memory at OEP (Original Entry Point), scripting IDAPython/Ghidra headless analyzers, and lifting VM opcodes.

Mobile, .NET, Python & WASM Reversing

Decompiling managed runtimes where rich metadata and bytecode often survive compilation.

Key Techniques: jadx for Android APK/DEX, dnSpy/ILSpy for .NET, pyinstxtractor/uncompyle6 for PyInstaller, and wasm2c.

Competition Methodology Checklist

  1. 1

    Triage first: run file, strings, ldd/objdump, and Detect It Easy (DIE) to spot language, packer, and compiler.

  2. 2

    Open in Ghidra/IDA/Binary Ninja and locate string references like "Correct" or "Wrong" to jump straight to logic.

  3. 3

    Rename functions and variables aggressively—good naming turns unreadable decompiler output into clear pseudocode.

  4. 4

    Verify tricky bitwise transforms dynamically in GDB or x64dbg instead of guessing by hand.

  5. 5

    When facing 200+ arithmetic checks, extract constraints into a Python z3 script rather than inverting manually.

Reference Pattern

Solving a Byte Constraint Check with Z3
python
from z3 import *

s = Solver()
chars = [BitVec(f'c{i}', 8) for i in range(3)]
s.add(chars[0] ^ 0x42 == 0x21)
s.add(chars[1] == ord('t'))
s.add(chars[1] + chars[2] == 0xda)

if s.check() == sat:
    m = s.model()
    print(''.join(chr(m[c].as_long()) for c in chars))  # "ctf"

SMT solvers turn tedious algebraic flag checks into millisecond automated solutions.

Recommended Practice Progression

Challenge / TrackPlatformLevelFocus
Beginner Crackmes (Level 1-2)Crackmes.oneBeginnerStatic analysis and simple XOR/string checks
Reverse Engineering TrackpicoCTFBeginnerAssembly reading, GDB, and Python bytecode
Flare-On Annual ArchiveMandiant FLAREAdvancedReal-world malware-grade Windows, VM, and obfuscation puzzles
Reversing CategoryRoot-MeIntermediateELF, PE, Android, and anti-debug progression

Defensive Engineering Takeaway

Never rely on client-side obfuscation to protect secrets or licensing logic; move sensitive verification server-side and use reverse engineering skills to rapidly dissect real malware payloads during incident response.