hunt-race-condition
Что он делает
Этот скилл проверяет состояния гонки, когда запросы, отправленные одновременно, обходят одноразовое или ограниченное правило. Он предназначен для разрешённого тестирования купонов, подарочных карт, регистраций и шагов подтверждения.
Когда использовать
- ✓Когда купон, подарочную карту или бонус можно использовать больше одного раза.
- ✓Когда одноразовый код или шаг подтверждения может принимать параллельные запросы.
- ✓Когда создание аккаунта можно завершить дважды до проверки.
Ссылка на скилл
https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-race-condition/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Можете проверить, можно ли погасить наш купон дважды, если отправить два запроса одновременно, в рамках нашего разрешённого теста?”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Агент отправляет группу одинаковых или согласованных запросов в одном узком окне времени, затем проверяет, успешны ли больше одного. Он повторяет попытку, чтобы подтвердить результат.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
Firing a race — two primitives (tooling-agnostic)
Winning a race needs requests that arrive in the same narrow window — sequential sends never
work. Use a single-packet / synchronized-send tool: Burp Repeater "Send group in parallel"
(HTTP/2 single-packet attack), Turbo Intruder (engine=Engine.BURP2, gate sync), or any
client that can flush N requests simultaneously. Two shapes:
- Identical-copies race — fire N IDENTICAL copies of one request at once (limit-overrun: double-spend a coupon/gift-card, exceed a one-per-user quota). Success = ≥2 of the N return 2xx.
- Different-requests race (partial construction) — fire a LIST of DIFFERENT requests in one
synchronized window, repeated over several rounds. For register-then-confirm / TOCTOU races
where the object exists in a usable state mid-creation. Example (email-verification bypass —
register an arbitrary email, then confirm it through the construction window with a blank token):
Get a fresh CSRF fromRequest A: POST /register body: csrf=<csrf>&username=hacker&email=anything@exploit.net&password=pw Request B: GET /confirm params: token= (empty) Fire A and B together, repeat ~20 rounds.GET /registerfirst, then fire the batch. After it succeeds, log in as the new account and perform the objective (e.g. a state-changing admin action such as deleting a user). The blank-token confirm wins during the window where the user row exists but its verification token isn't set yet.
Crown Jewel Targets
Race conditions are high-severity findings because they break financial, access control, and integrity assumptions that defenders rarely stress-test. Highest payouts come from:
- Monetary/credit systems — double-spending gift cards, coupons, referral bonuses, promotional credits, wallet balances
- Vote/reputation manipulation — upvoting the same content multiple times, gaming leaderboards or trending algorithms
- Account limits bypass — exceeding free-tier quotas, bypassing "one per user" restrictions on invites, trial activations, or API key generation
- Privilege escalation — racing role assignment or permission checks during user creation/upgrade flows
- Deletion bypass — reading or exfiltrating data during a narrow window between "marked for deletion" and "actually deleted"
- Payment flows — charging a card once but receiving multiple fulfillments
Best-paying asset types: Fintech apps, SaaS platforms with credit/subscription models, social platforms with reputation systems, e-commerce checkout flows, OAuth/SSO token endpoints.
Attack Surface Signals
URL Patterns
/vote, /upvote, /like, /favorite
/redeem, /apply-coupon, /use-code, /claim
/purchase, /checkout, /confirm-order, /pay
/transfer, /withdraw, /send-money
/invite, /referral, /accept-invite
/upgrade, /activate, /trial
/delete, /deactivate, /cancel
/follow, /subscribe
Response Headers That Signal Race-Prone Backends
X-RateLimit-* # rate limiting exists, but may not be atomic
X-Request-Id # each request independently tracked
No Cache-Control # stateful ops not idempotent
JavaScript Patterns to Grep
// Single-use action buttons with client-side disable
button.disabled = true
$('#btn').prop('disabled', true)
// Optimistic UI updates (state set before server confirms)
setState({ used: true })
// Sequential async calls without locking
await useVoucher(); await deductBalance();
Tech Stack Signals
- Ruby on Rails without
with_lock/lock!— ActiveRecord doesn't lock by default - Node.js with async/await chains — non-atomic DB reads then writes
- PHP without
SELECT ... FOR UPDATE— common in legacy codebases - Microservices — inter-service calls introduce natural TOCTOU windows
- Redis counters without Lua scripts or
INCRatomicity checks - Message queues — idempotency keys often missing
Step-by-Step Hunting Methodology
Enumerate one-time or limited-use actions — Map every endpoint that enforces a "once per user", "limited quantity", or "deduct balance" constraint. These are your primary targets.
Understand the state machine — For each target action, identify: (a) what state is read, (b) what state is written, (c) what validation sits between read and write. The gap between read and write is your window.
Capture a clean baseline request — Perform the action once legitimately with Bu
Частые вопросы
Почему запросы должны прийти одновременно?
При отправке один за другим обычно пропускается узкое временное окно, которое делает гонку возможной.
Какие инструменты используются?
Скилл упоминает параллельную отправку в Burp Repeater и Turbo Intruder для синхронной отправки.
Что считается успехом?
По словам скилла, минимум два одинаковых запроса должны вернуть успешный ответ.
Подробности
Оригинальное описание автора
Hunting skill for race condition vulnerabilities. Built from 12 public bug bounty reports including modern HTTP/2 single-packet attack cases (James Kettle DEF CON 2023 "Smashing the State Machine"; RyotaK / Flatt Security 10,000-request first-sequence-sync expansion 2024). Covers coupon double-redemption, gift-card double-spend, MFA-OTP-validate race, account-create race, faucet/crypto token double-mint, email-activation race, vote/upvote inflation, password-reset token race, rate-limit bypass via concurrent requests. Use when hunting race conditions, TOCTOU bugs, MFA-bypass-via-timing.
Популярность
- Звёзды на GitHub
- 5.4k
- Место в рейтинге
- #14927
- Лицензия
- MIT
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
apk-redteam-pipeline
5.4kПомогает агенту проверить Android-приложение на слабые места безопасности: от поиска APK-файла и декомпиляции до поиска открытых секретов.
bugcrowd-reporting
5.4kПомогает агенту писать лучшие отчёты об уязвимостях для Bugcrowd: выбирать правильную категорию и отвечать на возражения о выходе за рамки программы.
cloud-iam-deep
5.4kПомогает агенту проверить, к чему открывает доступ найденный облачный ключ в AWS, Azure или Google Cloud, в рамках санкционированного теста.
enterprise-vpn-attack
5.4kПомогает агенту проверить VPN- и удалённый доступ от Cisco, Fortinet, Citrix и других на известные слабые места в рамках санкционированного теста.
Похожие скиллы
reverse-engineer-anything
422kПомогает агенту изучить готовые приложения и пакеты, объяснить их функции, сравнить версии или помочь с пересборкой через REA.
1password
394kПомогает агенту настроить командную строку 1Password, войти в нее и читать или подставлять секреты, не выводя их значения в чат.
healthcheck
394kПомогает агенту проверить компьютер или сервер, на котором работает OpenClaw, на риски безопасности, такие как SSH, файрвол, обновления и резервные копии, а затем предложить безопасные исправления.