mcpField
P
pentest-race-conditions

pentest-race-conditions

github.com/jd-opensourceSecurity31563 installsUpdated 28w ago
Repository

About pentest-race-conditions

A security skill for authorized penetration testers investigating race conditions caused by non-atomic concurrent requests. It covers synchronized requests, cross-endpoint TOCTOU and session-level tests, with a workflow for documenting impact and reproduction steps.

Key features

  1. 01Identify race-prone operations
  2. 02Test concurrent and synchronized requests
  3. 03Check cross-endpoint TOCTOU
  4. 04Test session and database races
  5. 05Document impact and reproduction steps

Use cases

  1. 01Check for duplicate coupon redemption or transactions
  2. 02Test whether parallel requests bypass usage limits
  3. 03Probe races between balance checks and debits
  4. 04Record reproduction conditions for concurrency flaws

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/jd-opensource/joysafeter --skill pentest-race-conditions

After installing, type/pentest-race-conditionsin Claude Code to confirm it loaded.

Bundled filesreferences/tools.mdreferences/workflows.md

Details

From the project README

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

CategoryToolsPurpose
Timing AttacksTurbo Intruder, race-the-webMicrosecond-synchronized parallel requests
Async ScriptingPython asyncio/aiohttp, httpxCustom race condition scripts
Shell ConcurrencyGNU parallel, xargs, curlQuick parallel request testing
Proxy AnalysisBurp Suite RepeaterRequest replay and timing observation
Database Monitoringpg_stat_activity, SHOW PROCESSLISTObserve lock contention and deadlocks

References

  • references/tools.md - Tool function signatures and parameters
  • references/workflows.md - Attack pattern definitions and test vectors

Comments

Markdown supported