Skip to main content

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

AddressSanitizer provides superior crash diagnostics - always use ASan builds when available.

Detection

ASan Output Parsing

ASan provides detailed diagnostics:
The analyzer extracts:
  • 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):

Automated Trace Extraction

Use the crash trace script:

Function Call Tracing

Visualize execution flow with function tracing and Perfetto UI.

Setup

1

Build Instrumentation Library

2

Instrument Binary

Add to build:
3

Run with Tracing

4

Convert to Perfetto

Trace Format

Dots indicate call depth - easy to see execution path to crash.

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:
Stack Buffer Overflow:
  • Overwrites return address
  • No stack canary
  • Controlled input size
Heap Overflow:
  • Overwrites heap metadata
  • No heap hardening
  • Predictable allocation pattern
Format String:
  • %n writes enabled
  • Attacker controls format string
  • Known binary base

Best Practices

AddressSanitizer provides the best crash diagnostics:
ASan detects:
  • Buffer overflows (stack and heap)
  • Use-after-free
  • Double-free
  • Memory leaks
Record-replay helps understand non-deterministic crashes:
Especially useful for:
  • Race conditions
  • Heap corruption
  • Complex state machines
Enable core dumps for post-mortem analysis:
Use stack hashes to identify unique crashes:

See Also

Vulnerability Analysis

LLM-powered security analysis

Exploit Generation

Generate exploit PoCs