What problem does it solve?
Integer arithmetic bugs in C/C++/Rust/Go binaries are easy to overlook because the wrap itself is invisible — the real damage happens downstream when a wrapped value sizes an allocation, copy, or bounds check. This Skill provides a systematic methodology for tracing attacker-controlled integers to dangerous sinks, computing wrapping inputs, and proving exploitability with a working overflow chain.
Core Features & Use Cases
- Sink Mapping: Identify where attacker-controlled integers feed malloc, memcpy, read, loop bounds, or array indexes, tracking type widths and signedness at each step.
- Wrap Input Computation: Calculate exact inputs that trigger overflow, underflow, truncation, or signedness confusion (e.g. count=2^32 truncating a 64-bit product to a 32-byte allocation).
- Confirmed Exploitation: Trigger undersized-allocation/oversized-copy chains, verify corruption of adjacent targets (privilege flags, heap metadata, stack buffers), and escalate to authorization bypass or RCE.
- Use Case: During an authorized audit of a binary that parses a count/element-size pair, use this methodology to show that count=4294967296 truncates the allocation to 32 bytes while the copy uses the full value, overwriting an adjacent is_admin flag and producing a privilege-escalation proof for the report.
Quick Start
Analyze the target binary for integer arithmetic feeding allocations or copies, then follow the workflow to compute a wrapping input and demonstrate the downstream overflow with a pwntools proof of concept.