Offensive TOCTOU (defensive testing)
Exploits time-of-check/time-of-use race conditions across binaries, kernels, and web apps.
Test report
- Verdict
- Works with setup
- Score
- Tested
- Jul 13, 2026
- Environment
- Claude Code 2.x (agent harness)
- Upstream re-checked
- Aug 10, 2026 · ba68173
Authorized-pentest/CTF education skill: a single SKILL.md that primes Claude with TOCTOU race-condition methodology (symlink/fd races, /proc, container escapes, web auth-vs-authz and payment races, window-widening) plus the correct defensive rule 'operate on the kernel object, not the path.' Tested defensively and locally only: on a planted local vuln_writer.py (localhost/local-file, non-destructive symlink-swap PoC, no weaponized exploit), it correctly diagnosed the os.access()-then-open() race and gave a correct fd-based O_NOFOLLOW fix. A/B: the no-skill base arm found the same race, wrote an equivalent local PoC, and produced a fix that was actually marginally more thorough (O_NOFOLLOW plus fstat ownership/type validation on the fd), so the skill added no measurable output lift on this task.
Scored on four weighted criteria — install, triggering, output vs. baseline, docs. How scoring works
- Installs cleanly 5/5
- Triggers reliably 4/5
- Output vs. baseline 5/10
- Docs & honesty 5/5
What Offensive TOCTOU (defensive testing) does
Time-of-Check / Time-of-Use (TOCTOU) race condition exploitation methodology across binary, kernel, filesystem, web, and container layers. Covers symbolic-link races (open/access/stat split), file-descriptor races, fopen/realpath traversal races, /proc and procfs races, FUSE-backed slow-fs races to widen the window, ptrace and signal races, kernel double-fetch / userspace pointer races,…
How to install Offensive TOCTOU (defensive testing)
git clone https://github.com/SnailSploit/Claude-Red
cd Claude-Red
mkdir -p ~/.claude/skills
cp -r Skills/exploit-dev/offensive-toctou ~/.claude/skills/offensive-toctou
Skills live in ~/.claude/skills/ (global) or .claude/skills/
(per-project). Restart Claude Code after installing.
Commands — how to trigger Offensive TOCTOU (defensive testing)
-
/offensive-toctouExploits time-of-check/time-of-use race conditions across binaries, kernels, and web apps.
It also activates on plain-language prompts like these:
-
Find TOCTOU race conditions in this file-handling code -
Test for symlink race vulnerabilities in this script -
Check our payment API for idempotency race conditions
Frequently asked questions
- Is the Offensive TOCTOU (defensive testing) skill free?
- Yes. The skill itself is free from SnailSploit/Claude-Red. SkillProof publishes the install command and an independent test verdict at no cost.
- Does Offensive TOCTOU (defensive testing) work with Claude Code?
- We tested it with Claude Code 2.x (agent harness) on Jul 13, 2026. Verdict: Works with setup. Authorized-pentest/CTF education skill: a single SKILL.md that primes Claude with TOCTOU race-condition methodology (symlink/fd races, /proc, container escapes, web auth-vs-authz and payment races, window-widening) plus the correct defensive rule 'operate on the kernel object, not the path.' Tested defensively and locally only: on a planted local vuln_writer.py (localhost/local-file, non-destructive symlink-swap PoC, no weaponized exploit), it correctly diagnosed the os.access()-then-open() race and gave a correct fd-based O_NOFOLLOW fix. A/B: the no-skill base arm found the same race, wrote an equivalent local PoC, and produced a fix that was actually marginally more thorough (O_NOFOLLOW plus fstat ownership/type validation on the fd), so the skill added no measurable output lift on this task.
- What is the Offensive TOCTOU (defensive testing) SkillProof Score?
- 7.6/10 — installs cleanly 5/5, triggers reliably 4/5, output vs. baseline 5/10, docs & honesty 5/5.
- How do I install Offensive TOCTOU (defensive testing)?
- Copy the install command from this page, run it in your terminal, and restart Claude Code. Skills live in ~/.claude/skills/ (global) or .claude/skills/ inside a project.
- Can I use Offensive TOCTOU (defensive testing) with Cursor, Copilot, Gemini CLI, Codex or other AI tools?
- The SKILL.md format is native to Claude (Claude Code, Desktop, claude.ai). The instructions inside adapt to other assistants: Cursor rules, GitHub Copilot instructions, Windsurf rules, Custom GPTs, AGENTS.md for OpenAI Codex, and GEMINI.md for Google Gemini CLI — our conversion guides cover each, and the free converter on the tools page does the wrapping for you.