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)
1# SKILL: Arbitrary Write to Code Execution — Expert Attack Playbook23> **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.45## 0. RELATED ROUTING67- [heap-exploitation](../heap-exploitation/SKILL.md) — obtaining the arbitrary write via heap attacks8- [format-string-exploitation](../format-string-exploitation/SKILL.md) — obtaining the arbitrary write via %n9- [stack-overflow-and-rop](../stack-overflow-and-rop/SKILL.md) — stack-based write primitives10- [binary-protection-bypass](../binary-protection-bypass/SKILL.md) — which targets are available given protection configuration11- [heap-exploitation IO_FILE_EXPLOITATION.md](../heap-exploitation/IO_FILE_EXPLOITATION.md) — deep _IO_FILE structure exploitation1213---1415## 1. TARGET SELECTION BY GLIBC VERSION1617| 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.
