Tooluck logoTooluck
SKILL.md

arbitrary-write-to-rce

Agent skill fromyaklang/hack-skills

Arbitrary write to RCE playbook. Use when you have an arbitrary write primitive (from heap exploitation, format string, or OOB write) and need to convert it into code execution by targeting GOT, hooks, _IO_FILE vtable, exit_funcs, TLS_dtor_list, modprobe_path, .fini_array, or C++ vtables.

How to install arbitrary-write-to-rce

install arbitrary-write-to-rce
# install the hack-skills pack with the skills CLI
npx skills add yaklang/hack-skills

# or add only this skill to Claude Code: copy the folder

skills/arbitrary-write-to-rce/

# into

~/.claude/skills/arbitrary-write-to-rce/ (all projects)

.claude/skills/arbitrary-write-to-rce/ (one project)

skills/arbitrary-write-to-rce/SKILL.md

MITFull file
1# SKILL: Arbitrary Write to Code Execution — Expert Attack Playbook
2
3> **AI LOAD INSTRUCTION**: Expert techniques for converting an arbitrary write primitive into code execution. Covers every major overwrite target organized by glibc version compatibility: GOT, __malloc_hook, __free_hook, _IO_FILE vtable, __exit_funcs, TLS_dtor_list, _dl_fini, modprobe_path, .fini_array, C++ vtable, and setcontext gadget. This is the "last mile" skill. Base models often target hooks that no longer exist (post-glibc 2.34) or miss pointer mangling requirements.
4
5## 0. RELATED ROUTING
6
7- [heap-exploitation](../heap-exploitation/SKILL.md) — obtaining the arbitrary write via heap attacks
8- [format-string-exploitation](../format-string-exploitation/SKILL.md) — obtaining the arbitrary write via %n
9- [stack-overflow-and-rop](../stack-overflow-and-rop/SKILL.md) — stack-based write primitives
10- [binary-protection-bypass](../binary-protection-bypass/SKILL.md) — which targets are available given protection configuration
11- [heap-exploitation IO_FILE_EXPLOITATION.md](../heap-exploitation/IO_FILE_EXPLOITATION.md) — deep _IO_FILE structure exploitation
12
13---
14
15## 1. TARGET SELECTION BY GLIBC VERSION
16
17| Target | glibc < 2.24 | 2.24–2.33 | ≥ 2.34 | Required Knowledge |
18|---|---|---|---|---|
19| GOT overwrite | OK (Partial RELRO) | OK (Partial RELRO) | OK (Partial RELRO) | Binary base |
20| `__malloc_hook` | OK | OK | **Removed** | libc base |
21| `__free_hook` | OK | OK | **Removed** | libc base |
22…

Excerpt shown under the repository's MIT license.

More skills in hack-skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates