Individual skill

exploiting-arbitrary-write-to-execution

Methodology for converting an arbitrary-write (write-what-where) or write-anything-anywhere primitive into code execution during authorized engagements, covering target selection among GOT/PLT entries, .fini_array/.dtors, __malloc_hook/__free_hook, the atexit/__exit_funcs handler list, and __printf_arginfo_table, plus how mitigations (Full RELRO, pointer mangling) change which target is viable and how to confirm hijacked control flow.

internal/tools/skills/data/binary-exploitation/exploiting-arbitrary-write-to-execution/SKILL.md

Read pinned source

Source commit d42f381ad34843e71a42658e5c57290c713e85af

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
Yes
Repository scan complete
No
Skill scan complete
No
Observed behavior
Instructions only
Last checked
Nov 9, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
1,315
Repository last updated
Nov 8, 2026
License
Apache-2.0

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# Exploiting Arbitrary Write to Execution

## When to Use

- During authorized binary exploitation when a bug yields a **write-what-where** primitive: format-string `%n`, an OOB
  array write, a heap metadata corruption (e.g., tcache/fastbin poisoning to return an arbitrary chunk), or a UAF that
  lets you write a controlled value to a controlled address.
- When you control *where* and *what* you write but do **not** yet have direct control of `RIP`/`EIP`, and you need a
  code pointer to overwrite that the program will later call.
- When deciding between targets based on mitigations: Partial vs Full RELRO, presence of `__malloc_hook`/`__free_hook`
  (removed in glibc >= 2.34), and pointer mangling on `atexit` handlers.
- As the bridge step that turns "I can write 8 bytes somewhere" into "the program jumps to my gadget/one_gadget".

## Critical: Concepts/Steps Most Often Missed