yaklang avatar

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-code

Installs 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


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
1everyinc avatarce-doc-revieweveryinc/compound-engineering-pluginReview requirements, plans, or specs with role-specific lenses. Use when the user wants to improve an existing planning document.3.8Kskills.sh installs
2markdown-viewer avatararchitecturemarkdown-viewer/skillsCreate layered system architecture diagrams using HTML/CSS templates with color-coded tiers and grid layouts. Best for technology stacks, microservices topology3.7Kskills.sh installs
3ar9av avatarwiki-lintar9av/obsidian-wikiAudit and maintain the health of the Obsidian wiki. Use this skill when the user wants to check their wiki for issues, find orphaned pages, detect contradiction3.6Kskills.sh installs
4bencium avatarhuman-architect-mindsetbencium/bencium-marketplaceSystematic architectural thinking for irreplaceable human capabilities - domain modeling, systems thinking, constraint navigation, and AI-aware problem decompos3.5Kskills.sh installs
5bencium avatarrenaissance-architecturebencium/bencium-marketplaceSoftware architecture and UI/UX principles for building genuinely new solutions, not derivative work. Use when designing features, architecting software, brains3.4Kskills.sh installs
6anthropics avatarperformance-reviewanthropics/knowledge-work-pluginsStructure a performance review with self-assessment, manager template, and calibration prep. Use when review season kicks off and you need a self-assessment tem3.4Kskills.sh installs