Overview
RAPTOR provides autonomous crash analysis for C/C++ binaries using debugger integration and deterministic replay. The system extracts crash context, classifies vulnerability types, and assesses exploitability.Crash analysis combines debugger traces, disassembly, memory layout analysis, and symbol resolution for comprehensive crash understanding.
Features
- Multi-Debugger Support: Automatic detection of GDB or LLDB
- ASan Integration: Enhanced diagnostics for sanitizer-instrumented binaries
- rr Replay: Deterministic debugging with reverse execution
- Function Tracing: Call trace visualization with Perfetto
- Crash Classification: Automatic vulnerability type detection
- Memory Analysis: Region identification and protection status
Crash Analysis Workflow
Crash Context Extraction
The analyzer extracts comprehensive crash information:Debugger Integration
GDB Analysis
For Linux binaries and general debugging:LLDB Analysis
For macOS binaries (Mach-O format):ASan Integration
Detection
ASan Output Parsing
ASan provides detailed diagnostics:- Crash type (heap-buffer-overflow)
- Access type (READ)
- Crash address
- Stack trace
- Allocation trace
rr Deterministic Debugging
rr provides record-replay debugging with full reverse execution - critical for understanding complex crashes.
Recording a Crash
Reverse Execution Commands
Once in replay mode (GDB interface):- Regular Crashes
- ASan Crashes
Automated Trace Extraction
Use the crash trace script:Function Call Tracing
Setup
1
Build Instrumentation Library
2
Instrument Binary
Add to build:
3
Run with Tracing
4
Convert to Perfetto
Trace Format
Crash Classification
Automatic classification based on signals and context:Crash Types
Heap Overflow
Buffer overflow in heap-allocated memoryIndicators:
- Crash in malloc/free
- ASan: heap-buffer-overflow
- Memory region: heap
Stack Overflow
Buffer overflow on the stackIndicators:
- Crash in strcpy/memcpy
- Stack canary detection
- Memory region: stack
Use-After-Free
Access to freed memoryIndicators:
- ASan: heap-use-after-free
- Crash in heap access
- Invalid heap metadata
Double Free
Freeing memory twiceIndicators:
- SIGABRT in free()
- ASan: double-free
- Heap corruption
NULL Dereference
Dereferencing NULL pointerIndicators:
- SIGSEGV at 0x0
- PC at low address
- NULL pointer in register
Format String
Format string vulnerabilityIndicators:
- Crash in printf family
- %n or %s in input
- Abnormal format string
Memory Region Analysis
Identify which memory region was accessed:Exploitability Assessment
Assess whether crash is exploitable:- High Exploitability
- Medium Exploitability
- Low Exploitability
Stack Buffer Overflow:
- Overwrites return address
- No stack canary
- Controlled input size
- Overwrites heap metadata
- No heap hardening
- Predictable allocation pattern
- %n writes enabled
- Attacker controls format string
- Known binary base
Best Practices
Always Use ASan Builds
Always Use ASan Builds
AddressSanitizer provides the best crash diagnostics:ASan detects:
- Buffer overflows (stack and heap)
- Use-after-free
- Double-free
- Memory leaks
Use rr for Complex Crashes
Use rr for Complex Crashes
Record-replay helps understand non-deterministic crashes:Especially useful for:
- Race conditions
- Heap corruption
- Complex state machines
Generate Core Dumps
Generate Core Dumps
Enable core dumps for post-mortem analysis:
Deduplicate Crashes
Deduplicate Crashes
Use stack hashes to identify unique crashes:
See Also
Vulnerability Analysis
LLM-powered security analysis
Exploit Generation
Generate exploit PoCs