Pentest race conditions

From jd-opensource/JoySafeter · View interactive version

Pentest race conditions is an AI agent skill from the GitHub repository jd-opensource/JoySafeter. Concurrency exploitation — race conditions, TOCTOU vulnerabilities, and parallel request abuse in web applications.

How to use this skill

Skill file

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

Environment Setup

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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.