
Format String Exploitation
This is a comprehensive playbook for exploiting format string vulnerabilities in printf-family functions. It covers the full attack surface: leaking stack values and arbitrary memory with %p and %s, writing to arbitrary addresses with %n variants, finding your input offset on the stack, and automating exploitation with pwntools' fmtstr_payload. The techniques section walks through GOT overwrites, hook targeting, and pointer chain exploitation for indirect writes. It handles 64-bit quirks like null bytes in addresses and includes blind exploitation methodology when you don't have the binary. The skill reads like distilled CTF wisdom, with offset calculation being the critical detail most base models mess up. If you're doing binary exploitation and need to turn a format string bug into arbitrary read/write primitives, this gives you the exact patterns and tooling.
- skills.sh installs
- 3.8K
- GitHub stars
- 2.6K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add yaklang/hack-skills --skill format-string-exploitation --agent claude-codeInstalls into .claude/skills of the current project.
Files
SKILL: Format String Exploitation — Expert Attack Playbook
AI LOAD INSTRUCTION: Expert format string techniques. Covers stack reading, arbitrary write via %n, GOT overwrite, __malloc_hook overwrite, pointer chain exploitation, blind format string, FORTIFY_SOURCE bypass, 64-bit null byte handling, and pwntools automation. Distilled from ctf-wiki fmtstr, CTF patterns, and real-world scenarios. Base models often miscalculate positional parameter offsets or forget 64-bit address placement after format string.
0. RELATED ROUTING
- stack-overflow-and-rop — combine format string leak with stack overflow for full exploit
- binary-protection-bypass — format string is the primary canary/PIE/ASLR leak method
- arbitrary-write-to-rce — convert format string write primitive to code execution targets
- heap-exploitation — heap address leak via format string for heap exploitation
1. VULNERABILITY IDENTIFICATION
Vulnerable Pattern
Sponsors
Details
- Repository
- github.com/yaklang/hack-skills
- Category
- Code Review & Quality
- First seen
- Jun 3, 2026
More from yaklang/hack-skills
All 102- Http Parameter Pollution3.8K
- Csp Bypass Advanced3.8K
- Browser Exploitation V83.8K
- Open Redirect3.8K
- Symbolic Execution Tools3.8K
- Crlf Injection3.8K
- Insecure Source Code Management3.8K
- Mobile Ssl Pinning Bypass3.8K
- Http Host Header Attacks3.8K
- Web Cache Deception3.8K
- Subdomain Takeover3.8K
- Dependency Confusion3.8K
- Expression Language Injection3.8K
- Csv Formula Injection3.8K
- Active Directory Acl Abuse3.8K
- Linux Privilege Escalation3.8K
- Clickjacking3.8K
- Active Directory Kerberos Attacks3.8K
- Jndi Injection3.8K
- Http2 Specific Attacks3.8K
- Saml Sso Assertion Attacks3.8K
- Arbitrary Write To Rce3.8K
- Active Directory Certificate Services3.8K
- Hash Attack Techniques3.8K