pentest-race-conditions
This Claude Code skill provides a structured methodology for identifying and exploiting race conditions and TOCTOU vulnerabilities in web applications through concurrent request manipulation. Use it during authorized penetration tests when assessing applications handling financial transactions, resource quotas, inventory management, or state-sensitive operations where concurrent access controls may be insufficient.
git clone --depth 1 https://github.com/jd-opensource/JoySafeter /tmp/pentest-race-conditions && cp -r /tmp/pentest-race-conditions/skills/pentest-race-conditions ~/.claude/skills/pentest-race-conditionsSKILL.md
# Pentest Race Conditions ## Purpose Exploit applications that fail to handle concurrent requests atomically — enabling double-spend, limit bypass, privilege escalation through parallel requests. Absent from standard WSTG categories but critical in real-world assessments. ## Prerequisites ### Authorization Requirements - **Written authorization** with explicit scope for concurrency testing - **Test accounts** with balances, quotas, or limited-use resources - **Rollback plan** for financial or state-mutating operations - **Rate limit awareness** — confirm acceptable burst volume with target owner ### Environment Setup - Burp Suite Professional with Turbo Intruder extension - Python 3.x with asyncio/aiohttp for parallel request scripting - GNU parallel or xargs for shell-based concurrency - Multiple authenticated sessions (separate cookies/tokens) ## Core Workflow 1. **Target Identification**: Identify race-prone operations — balance transfers, coupon redemption, inventory purchase, vote/like systems, token generation, file operations. 2. **Single-Endpoint Races**: Send N identical requests simultaneously to bypass "one per user" limits, duplicate transactions (limit-overrun). 3. **Multi-Endpoint TOCTOU**: Exploit time gap between check and use — validate coupon then apply coupon, check balance then debit. 4. **Session-Level Races**: Parallel password change + session refresh, simultaneous role change + action execution. 5. **Database-Level Races**: Exploit missing row-level locks, test optimistic vs pessimistic concurrency, trigger deadlocks. 6. **Timing Synchronization**: Use single-packet attack technique (Turbo Intruder) to synchronize requests within microseconds. 7. **Impact Documentation**: Document financial/operational impact with precise reproduction steps and timing requirements. ## Tool Categories | Category | Tools | Purpose | |----------|-------|---------| | Timing Attacks | Turbo Intruder, race-the-web | Microsecond-synchronized parallel requests | | Async Scripting | Python asyncio/aiohttp, httpx | Custom race condition scripts | | Shell Concurrency | GNU parallel, xargs, curl | Quick parallel request testing | | Proxy Analysis | Burp Suite Repeater | Request replay and timing observation | | Database Monitoring | pg_stat_activity, SHOW PROCESSLIST | Observe lock contention and deadlocks | ## References - `references/tools.md` - Tool function signatures and parameters - `references/workflows.md` - Attack pattern definitions and test vectors
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Use when you have a written implementation plan to execute in a separate session with review checkpoints
OpenClaw 安全检测工具,基于安全实践指南验证配置安全、权限隔离、网络策略、日志审计和运行时完整性
OpenClaw 攻击模式检测工具,识别数据外传、反弹Shell、文件泄露、Prompt注入、供应链投毒等高危行为,支持 MITRE ATT&CK 映射
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
AI/LLM application security testing — prompt injection, jailbreaking, data exfiltration, and insecure output handling per OWASP LLM Top 10.
Deep OWASP API Security Top 10 testing for REST, GraphQL, gRPC, and WebSocket APIs — BFLA, mass assignment, rate limiting, and unsafe consumption.