Overview Methods Artifacts Tools Challenges Legal Resources

Reverse Engineering Guide

What is Reverse Engineering?

Reverse engineering is the process of analyzing a system, application, binary, or device to understand its functionality, design, and implementation without access to source code or documentation. It is used in cybersecurity (malware analysis, vulnerability research), software development (legacy systems, interoperability), and hardware analysis (IoT devices, firmware). Reverse engineering techniques include static analysis (disassembly, decompilation), dynamic analysis (debugging, tracing), and network analysis (traffic inspection).

Industry Context: 70% of malware analysis uses reverse engineering. 50% of vulnerability research relies on reverse engineering (fuzzing + RE). Average reverse engineering engagement: 2-4 weeks.

70%
Malware Analysis Uses RE
50%
Vuln Research Uses RE
2-4w
Avg RE Engagement

Common reverse engineering targets:

Reverse Engineering Methods

Static Analysis (Disassembly)

Analyze binary without executing. Disassemblers convert machine code to assembly (x86/x64, ARM, MIPS). Identify functions, strings, API calls, control flow graphs (CFG). Tools: IDA Pro, Ghidra, Binary Ninja, Radare2.

Most Common

Dynamic Analysis (Debugging)

Execute binary in controlled environment (sandbox, VM). Set breakpoints, step through instructions, modify registers, trace API calls. Detect anti-debugging, unpack malware. Tools: x64dbg, OllyDbg, GDB, WinDbg.

Decompilation (High-Level Code)

Convert machine code back to C/C++/pseudocode. Ghidra decompiler, IDA Hex-Rays decompiler, RetDec (open-source). Faster than reading assembly.

Network Analysis (Traffic Inspection)

Capture and analyze network traffic to understand protocols, API endpoints, C2 communication. Tools: Wireshark, Burp Suite, mitmproxy, Charles Proxy.

Memory Dumping & Analysis

Extract memory from running process (RAM). Analyze unpacked malware, injected code, decrypted strings. Tools: Process Hacker, Cheat Engine, Volatility (memory forensics).

Fuzzing + Reverse Engineering

Combine fuzzing (AFL, libFuzzer) with reverse engineering to find vulnerabilities. Reverse engineer crash inputs, identify root cause.

What to Look For When Reverse Engineering

// Common artifacts in reverse engineering // 1. Hardcoded Credentials (passwords, API keys, tokens) strings binary.exe | grep -i "password\|api_key\|secret" // 2. API Endpoints (URLs, IP addresses, domains) strings binary.exe | grep -E "https?://|www\." // 3. Webhooks (Discord, Slack, Teams) strings binary.exe | grep -i "discord.com/api/webhooks\|hooks.slack.com" // 4. Encryption Keys (AES, RSA, XOR keys) // Look for key schedules, S-boxes (AES), RSA modulus (large primes) // 5. Debugging Symbols (PDB paths, function names) strings binary.exe | grep -i "\.pdb" // 6. Anti-Debugging Techniques // IsDebuggerPresent, NtQueryInformationProcess, CheckRemoteDebuggerPresent // Timing attacks (rdtsc), int 2d, SEH // 7. Packer Signatures (UPX, Themida, VMProtect) detect-it-easy binary.exe // 8. Import Table (API calls) objdump -p binary.exe | grep "DLL Name" // 9. Strings (error messages, debug output, user prompts) strings -n 8 binary.exe

Reverse Engineering Tools

Ghidra (NSA)

Open-source reverse engineering framework. Disassembler (x86/x64, ARM, MIPS, PowerPC), decompiler (C-like pseudocode), scripting (Python/Java), collaborative analysis. Free alternative to IDA Pro.

IDA Pro (Hex-Rays)

Industry-standard disassembler and debugger. Hex-Rays decompiler (C pseudocode). Supports 50+ processors. Expensive ($1,000-$10,000).

x64dbg (Windows Debugger)

Open-source debugger for Windows (x64/x86). UI similar to OllyDbg. Features: breakpoints, tracing, patches, plugins (ScyllaHide for anti-debugging bypass).

Binary Ninja

Commercial disassembler and decompiler (C pseudocode). Intermediate language (BNIL) for analysis. Scriptable (Python, Rust). Cheaper than IDA.

Radare2 (Open-source)

Command-line reverse engineering framework (disassembly, debugging, analysis). Supports many architectures. Steep learning curve but powerful.

Wireshark (Network Analysis)

Network protocol analyzer. Capture live traffic, analyze PCAP files, filter protocols (HTTP, TLS, DNS), follow TCP streams, export objects.

Burp Suite (Web App RE)

Web proxy for intercepting/modifying HTTP/HTTPS traffic. Analyze API endpoints, parameters, authentication tokens. Repeater, Intruder, Scanner modules.

Fiddler (Web Debugging Proxy)

HTTP debugging proxy. Inspect web traffic, decrypt HTTPS, modify requests/responses. Scriptable (FiddlerScript).

Detect It Easy (DIE)

Detect packers, compilers, obfuscators (UPX, Themida, VMProtect, .NET). Identify file type (PE, ELF, Mach-O).

Interactive Reverse Engineering Challenges

Challenge 1: Find the Hidden Password

Use browser Developer Tools (F12) to inspect the page source and find the hidden password.

💡 Tip: Right-click → Inspect (or F12) → Look for hidden HTML elements.

Challenge 2: Bypass the Paywall (Console Challenge)

Click "Pay Now" below. Then, use the browser console (F12 > Console) to call the function that bypasses the paywall.

💡 Tip: In console, type paymentSuccess() and press Enter.

Challenge 3: Find the Webhook URL

Click "Send Test Webhook" below. Use the Network tab (F12 > Network) to find the webhook URL.

💡 Tip: Open DevTools (F12) → Network tab → Click "Send Test Webhook" → Look for POST request to Discord webhook URL.

Further Resources

Practical Malware Analysis (Book)

Definitive guide to malware reverse engineering (static/dynamic analysis, unpacking).

Reverse Engineering for Beginners (Book)

Free book on x86/x64/ARM reverse engineering (assembly, disassembly, debugging).

OpenSecurityTraining (Free RE Courses)

Free reverse engineering courses (x86 assembly, malware analysis, exploit development).

Flare-On Challenge (FireEye/Mandiant)

Annual reverse engineering CTF (capture the flag) competition.

← Back to Knowledge Base