[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DB9Q9JKM6ABTH0A4YV5NYP":3,"skill-same:01M7DB9Q9JKM6ABTH0A4YV5NYP":86},{"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":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":53,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M7DB9Q9JKM6ABTH0A4YV5NYP","performing-api-fuzzing-with-restler",null,"Uses Microsoft RESTler to perform stateful REST API fuzzing: compiles an OpenAPI\u002FSwagger spec into a RESTler grammar, configures authentication, and runs test\u002Ffuzz-lean\u002Ffuzz modes that generate request sequences exercising producer-consumer dependencies, then flags 500 errors, auth bypasses, resource leaks, and injection bugs. Use when fuzzing REST APIs for stateful bugs or running RESTler-based automated API security testing.","SaiVatsal\u002FSkills-I-Use","SaiVatsal","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F242597752?v=4","01M7D5YM1T4VXW9203M0GFAHZ1","SaiVatsalPolimera","01M7D5YM2D61ST39XVR2V7B7ZJ",3,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fperforming-api-fuzzing-with-restler\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fperforming-api-fuzzing-with-restler\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: performing-api-fuzzing-with-restler\ndescription: 'Uses Microsoft RESTler to perform stateful REST API fuzzing: compiles\n  an OpenAPI\u002FSwagger spec into a RESTler grammar, configures authentication, and runs\n  test\u002Ffuzz-lean\u002Ffuzz modes that generate request sequences exercising producer-consumer\n  dependencies, then flags 500 errors, auth bypasses, resource leaks, and injection\n  bugs. Use when fuzzing REST APIs for stateful bugs or running RESTler-based automated\n  API security testing.\n\n  '\ndomain: cybersecurity\nsubdomain: api-security\ntags:\n- api-security\n- fuzzing\n- restler\n- automated-testing\n- openapi\n- stateful-testing\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.PS-01\n- ID.RA-01\n- PR.DS-10\n- DE.CM-01\nmitre_attack:\n- T1190\n- T1059.007\n- T1552.001\n- T1055\n- T1059\n---\n# Performing API Fuzzing with RESTler\n\n## When to Use\n\n- Performing automated security testing of REST APIs using their OpenAPI\u002FSwagger specifications\n- Discovering bugs that only manifest through specific sequences of API calls (stateful testing)\n- Finding 500 Internal Server Error responses that indicate unhandled exceptions or crash conditions\n- Testing API input validation by fuzzing parameters with malformed, boundary, and injection payloads\n- Running continuous security regression testing in CI\u002FCD pipelines for API changes\n\n**Do not use** against production environments without explicit authorization and monitoring. RESTler creates and deletes resources aggressively during fuzzing.\n\n## Prerequisites\n\n- Written authorization specifying the target API and acceptable testing scope\n- Python 3.12+ and .NET 8.0 runtime installed\n- RESTler downloaded from https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frestler-fuzzer\n- OpenAPI\u002FSwagger specification (v2 or v3) for the target API\n- API authentication credentials (tokens, API keys, or OAuth credentials)\n- Isolated test\u002Fstaging environment (RESTler can create thousands of resources per hour)\n\n## Workflow\n\n### Step 1: RESTler Installation and Setup\n\n```bash\n# Clone and build RESTler\ngit clone https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frestler-fuzzer.git\ncd restler-fuzzer\n\n# Build RESTler\npython3 .\u002Fbuild-restler.py --dest_dir \u002Fopt\u002Frestler\n\n# Verify installation\n\u002Fopt\u002Frestler\u002Frestler\u002FRestler --help\n\n# Alternative: Use pre-built release\n# Download from https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frestler-fuzzer\u002Freleases\n```\n\n### Step 2: Compile the API Specification\n\n```bash\n# Compile the OpenAPI spec into a RESTler fuzzing grammar\n\u002Fopt\u002Frestler\u002Frestler\u002FRestler compile \\\n    --api_spec \u002Fpath\u002Fto\u002Fopenapi.yaml\n\n# Output directory structure:\n# Compile\u002F\n#   grammar.py          - Generated fuzzing grammar\n#   grammar.json        - Grammar in JSON format\n#   dict.json           - Custom dictionary for fuzzing values\n#   engine_settings.json - Engine configuration\n#   config.json         - Compilation config\n```\n\n**Custom dictionary for targeted fuzzing (dict.json):**\n```json\n{\n    \"restler_fuzzable_string\": [\n        \"fuzzstring\",\n        \"' OR '1'='1\",\n        \"\\\" OR \\\"1\\\"=\\\"1\",\n        \"\u003Cscript>alert(1)\u003C\u002Fscript>\",\n        \"..\u002F..\u002F..\u002Fetc\u002Fpasswd\",\n        \"${7*7}\",\n        \"{{7*7}}\",\n        \"a]UNION SELECT 1,2,3--\",\n        \"\\\"; cat \u002Fetc\u002Fpasswd; echo \\\"\",\n        \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"\n    ],\n    \"restler_fuzzable_int\": [\n        \"0\",\n        \"-1\",\n        \"999999999\",\n        \"2147483647\",\n        \"-2147483648\"\n    ],\n    \"restler_fuzzable_bool\": [\"true\", \"false\", \"null\", \"1\", \"0\"],\n    \"restler_fuzzable_datetime\": [\n        \"2024-01-01T00:00:00Z\",\n        \"0000-00-00T00:00:00Z\",\n        \"9999-12-31T23:59:59Z\",\n        \"invalid-date\"\n    ],\n    \"restler_fuzzable_uuid4\": [\n        \"00000000-0000-0000-0000-000000000000\",\n        \"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\"\n    ],\n    \"restler_custom_payload\": {\n        \"\u002Fusers\u002F{userId}\": [\"1\", \"0\", \"-1\", \"admin\", \"' OR 1=1--\"],\n        \"\u002Forders\u002F{orderId}\": [\"1\", \"0\", \"999999999\"]\n    }\n}\n```\n\n### Step 3: Configure Authentication\n\n```python\n# authentication_token.py - RESTler authentication module\nimport requests\nimport json\nimport time\n\nclass AuthenticationProvider:\n    def __init__(self):\n        self.token = None\n        self.token_expiry = 0\n        self.auth_url = \"https:\u002F\u002Ftarget-api.example.com\u002Fapi\u002Fv1\u002Fauth\u002Flogin\"\n        self.credentials = {\n            \"email\": \"fuzzer@test.com\",\n            \"password\": \"FuzzerPass123!\"\n        }\n\n    def get_token(self):\n        \"\"\"Get or refresh authentication token.\"\"\"\n        current_time = time.time()\n        if self.token and current_time \u003C self.token_expiry - 60:\n            return self.token\n\n        resp = requests.post(self.auth_url, json=self.credentials)\n        if resp.status_code == 200:\n            data = resp.json()\n            self.token = data[\"access_token\"]\n            self.token_expiry = current_time + 3600  # Assume 1-hour TTL\n            return self.token\n        else:\n            raise Exception(f\"Authentication failed: {resp.status_code}\")\n\n    def get_auth_header(self):\n        \"\"\"Return the authentication header for RESTler.\"\"\"\n        token = self.get_token()\n        return f\"Authorization: Bearer {token}\"\n\n# Export the token refresh command for RESTler\nauth = AuthenticationProvider()\nprint(auth.get_auth_header())\n```\n\n**Engine settings for authentication (engine_settings.json):**\n```json\n{\n    \"authentication\": {\n        \"token\": {\n            \"token_refresh_interval\": 300,\n            \"token_refresh_cmd\": \"python3 \u002Fpath\u002Fto\u002Fauthentication_token.py\"\n        }\n    },\n    \"max_combinations\": 20,\n    \"max_request_execution_time\": 30,\n    \"global_producer_timing_delay\": 2,\n    \"no_ssl\": false,\n    \"host\": \"target-api.example.com\",\n    \"target_port\": 443,\n    \"garbage_collection_interval\": 300,\n    \"max_sequence_length\": 10\n}\n```\n\n### Step 4: Run RESTler in Test Mode (Smoke Test)\n\n```bash\n# Test mode: Quick validation that all endpoints are reachable\n\u002Fopt\u002Frestler\u002Frestler\u002FRestler test \\\n    --grammar_file Compile\u002Fgrammar.py \\\n    --dictionary_file Compile\u002Fdict.json \\\n    --settings Compile\u002Fengine_settings.json \\\n    --no_ssl \\\n    --target_ip target-api.example.com \\\n    --target_port 443\n\n# Review test results\ncat Test\u002FResponseBuckets\u002FrunSummary.json\n```\n\n```python\n# Parse test results\nimport json\n\nwith open(\"Test\u002FResponseBuckets\u002FrunSummary.json\") as f:\n    summary = json.load(f)\n\nprint(\"Test Mode Summary:\")\nprint(f\"  Total requests: {summary.get('total_requests_sent', {}).get('num_requests', 0)}\")\nprint(f\"  Successful (2xx): {summary.get('num_fully_valid', 0)}\")\nprint(f\"  Client errors (4xx): {summary.get('num_invalid', 0)}\")\nprint(f\"  Server errors (5xx): {summary.get('num_server_error', 0)}\")\n\n# Identify uncovered endpoints\ncovered = summary.get('covered_endpoints', [])\ntotal = summary.get('total_endpoints', [])\nuncovered = set(total) - set(covered)\nif uncovered:\n    print(f\"\\nUncovered endpoints ({len(uncovered)}):\")\n    for ep in uncovered:\n        print(f\"  - {ep}\")\n```\n\n### Step 5: Run Fuzz-Lean Mode\n\n```bash\n# Fuzz-lean: One pass through all endpoints with security checkers enabled\n\u002Fopt\u002Frestler\u002Frestler\u002FRestler fuzz-lean \\\n    --grammar_file Compile\u002Fgrammar.py \\\n    --dictionary_file Compile\u002Fdict.json \\\n    --settings Compile\u002Fengine_settings.json \\\n    --target_ip target-api.example.com \\\n    --target_port 443 \\\n    --time_budget 1  # 1 hour max\n\n# Checkers automatically enabled in fuzz-lean:\n# - UseAfterFree: Tests accessing resources after deletion\n# - NamespaceRule: Tests accessing resources across namespaces\u002Ftenants\n# - ResourceHierarchy: Tests child resources with wrong parent IDs\n# - LeakageRule: Tests for information disclosure in error responses\n# - InvalidDynamicObject: Tests with malformed dynamic object IDs\n```\n\n### Step 6: Run Full Fuzzing Mode\n\n```bash\n# Full fuzz mode: Extended fuzzing for comprehensive coverage\n\u002Fopt\u002Frestler\u002Frestler\u002FRestler fuzz \\\n    --grammar_file Compile\u002Fgrammar.py \\\n    --dictionary_file Compile\u002Fdict.json \\\n    --settings Compile\u002Fengine_settings.json \\\n    --target_ip target-api.example.com \\\n    --target_port 443 \\\n    --time_budget 4 \\\n    --enable_checkers UseAfterFree NamespaceRule ResourceHierarchy LeakageRule InvalidDynamicObject PayloadBody\n\n# Analyze fuzzing results\npython3 \u003C\u003C'EOF'\nimport json\nimport os\n\nresults_dir = \"Fuzz\u002FResponseBuckets\"\nbugs_dir = \"Fuzz\u002Fbug_buckets\"\n\n# Parse bug buckets\nif os.path.exists(bugs_dir):\n    for bug_file in os.listdir(bugs_dir):\n        if bug_file.endswith(\".txt\"):\n            with open(os.path.join(bugs_dir, bug_file)) as f:\n                content = f.read()\n            print(f\"\\n=== Bug: {bug_file} ===\")\n            print(content[:500])\n\n# Parse response summary\nsummary_file = os.path.join(results_dir, \"runSummary.json\")\nif os.path.exists(summary_file):\n    with open(summary_file) as f:\n        summary = json.load(f)\n    print(f\"\\nFuzz Summary:\")\n    print(f\"  Duration: {summary.get('time_budget_hours', 0)} hours\")\n    print(f\"  Total requests: {summary.get('total_requests_sent', {}).get('num_requests', 0)}\")\n    print(f\"  Bugs found: {summary.get('num_bugs', 0)}\")\n    print(f\"  500 errors: {summary.get('num_server_error', 0)}\")\nEOF\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Stateful Fuzzing** | API fuzzing that maintains state across requests by using responses from earlier requests as inputs to later ones, enabling testing of multi-step workflows |\n| **Producer-Consumer Dependencies** | RESTler's inference that a value produced by one API call (e.g., a created resource ID) should be consumed by a subsequent call |\n| **Fuzzing Grammar** | Compiled representation of the API specification that defines how to generate valid and invalid requests for each endpoint |\n| **Checker** | RESTler security rule that tests for specific vulnerability patterns like use-after-free, namespace isolation, or information leakage |\n| **Bug Bucket** | RESTler's categorization of discovered bugs by type and endpoint, grouping similar failures for efficient triage |\n| **Garbage Collection** | RESTler's periodic cleanup of resources created during fuzzing to prevent resource exhaustion on the target system |\n\n## Tools & Systems\n\n- **RESTler**: Microsoft Research's stateful REST API fuzzing tool that compiles OpenAPI specs into fuzzing grammars\n- **Schemathesis**: Property-based API testing tool that generates test cases from OpenAPI\u002FGraphQL schemas\n- **Dredd**: API testing tool that validates API implementations against OpenAPI\u002FAPI Blueprint documentation\n- **Fuzz-lightyear**: Yelp's stateless API fuzzer focused on finding authentication and authorization vulnerabilities\n- **API Fuzzer**: OWASP tool for API endpoint fuzzing with customizable payload dictionaries\n\n## Common Scenarios\n\n### Scenario: Microservice API Fuzzing Campaign\n\n**Context**: A fintech company has 12 microservice APIs with OpenAPI specifications. Before a major release, the security team runs RESTler fuzzing against each service in the staging environment to catch bugs.\n\n**Approach**:\n1. Collect OpenAPI specs for all 12 services and compile each into a RESTler grammar\n2. Configure authentication for each service with service-specific credentials\n3. Run test mode on each service to validate endpoint reachability and fix grammar issues\n4. Run fuzz-lean mode (1 hour per service) to identify quick wins\n5. Find 23 bugs in fuzz-lean mode: 8 unhandled 500 errors, 5 use-after-free patterns, 4 namespace isolation failures, 6 information leakage in error responses\n6. Run full fuzz mode (4 hours per service) on the 5 services with the most bugs\n7. Discover 47 additional bugs including a critical authentication bypass where deleting a user and reusing their token still allows access\n8. Generate bug reports and track remediation through JIRA integration\n\n**Pitfalls**:\n- Running RESTler against production without understanding that it creates and deletes thousands of resources\n- Not configuring authentication correctly, causing RESTler to only test unauthenticated access\n- Using the default dictionary without adding application-specific injection payloads\n- Not setting a time budget, allowing RESTler to run indefinitely\n- Ignoring the compilation warnings that indicate endpoints RESTler cannot reach due to dependency issues\n\n## Output Format\n\n```\n## RESTler API Fuzzing Report\n\n**Target**: User Service API (staging.example.com)\n**Specification**: OpenAPI 3.0 (42 endpoints)\n**Duration**: 4 hours (full fuzz mode)\n**Total Requests**: 145,832\n\n### Bug Summary\n\n| Category | Count | Severity |\n|----------|-------|----------|\n| 500 Internal Server Error | 12 | High |\n| Use After Free | 3 | Critical |\n| Namespace Rule Violation | 5 | Critical |\n| Information Leakage | 8 | Medium |\n| Resource Leak | 4 | Low |\n\n### Critical Findings\n\n**1. Use-After-Free: Deleted user token still valid**\n- Sequence: POST \u002Fusers -> DELETE \u002Fusers\u002F{id} -> GET \u002Fusers\u002F{id}\n- After deleting user, GET with the deleted user's token returns 200\n- Impact: Deleted accounts can still access the API\n\n**2. Namespace Violation: Cross-tenant data access**\n- Sequence: POST \u002Fusers (tenant A) -> GET \u002Fusers\u002F{id} (tenant B token)\n- User created by tenant A is accessible with tenant B's credentials\n- Impact: Multi-tenant isolation breach\n\n**3. 500 Error: Unhandled integer overflow**\n- Request: POST \u002Forders {\"quantity\": 2147483648}\n- Response: 500 Internal Server Error with stack trace\n- Impact: DoS potential, information disclosure via stack trace\n\n### Coverage\n\n- Endpoints covered: 38\u002F42 (90.5%)\n- Uncovered: POST \u002Fadmin\u002Fmigrate, DELETE \u002Fadmin\u002Fcache,\n  PUT \u002Fconfig\u002Fadvanced, POST \u002Fwebhooks\u002Ftest\n```\n","# Performing API Fuzzing with RESTler\n\n## When to Use\n\n- Performing automated security testing of REST APIs using their OpenAPI\u002FSwagger specifications\n- Discovering bugs that only manifest through specific sequences of API calls (stateful testing)\n- Finding 500 Internal Server Error responses that indicate unhandled exceptions or crash conditions\n- Testing API input validation by fuzzing parameters with malformed, boundary, and injection payloads\n- Running continuous security regression testing in CI\u002FCD pipelines for API changes\n\n**Do not use** against production environments without explicit authorization and monitoring. RESTler creates and deletes resources aggressively during fuzzing.\n\n## Prerequisites\n\n- Written authorization specifying the target API and acceptable testing scope\n- Python 3.12+ and .NET 8.0 runtime installed\n- RESTler downloaded from https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frestler-fuzzer\n- OpenAPI\u002FSwagger specification (v2 or v3) for the target API\n- API authentication credentials (tokens, API keys, or OAuth credentials)\n- Isolated test\u002Fstaging environment (RESTler can create thousands of resources per hour)\n\n## Workflow\n\n### Step 1: RESTler Installation and Setup\n\n```bash\n# Clone and build RESTler\ngit clone https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frestler-fuzzer.git\ncd restler-fuzzer\n\n# Build RESTler\npython3 .\u002Fbuild-restler.py --dest_dir \u002Fopt\u002Frestler\n\n# Verify installation\n\u002Fopt\u002Frestler\u002Frestler\u002FRestler --help\n\n# Alternative: Use pre-built release\n# Download from https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frestler-fuzzer\u002Freleases\n```\n\n### Step 2: Compile the API Specification\n\n```bash\n# Compile the OpenAPI spec into a RESTler fuzzing grammar\n\u002Fopt\u002Frestler\u002Frestler\u002FRestler compile \\\n    --api_spec \u002Fpath\u002Fto\u002Fopenapi.yaml\n\n# Output directory structure:\n# Compile\u002F\n#   grammar.py          - Generated fuzzing grammar\n#   grammar.json        - Grammar in JSON format\n#   dict.json           - Custom dictionary for fuzzing values\n#   engine_settings.json - Engine configuration\n#   config.json         - Compilation config\n```\n\n**Custom dictionary for targeted fuzzing (dict.json):**\n```json\n{\n    \"restler_fuzzable_string\": [\n        \"fuzzstring\",\n        \"' OR '1'='1\",\n        \"\\\" OR \\\"1\\\"=\\\"1\",\n        \"\u003Cscript>alert(1)\u003C\u002Fscript>\",\n        \"..\u002F..\u002F..\u002Fetc\u002Fpasswd\",\n        \"${7*7}\",\n        \"{{7*7}}\",\n        \"a]UNION SELECT 1,2,3--\",\n        \"\\\"; cat \u002Fetc\u002Fpasswd; echo \\\"\",\n        \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"\n    ],\n    \"restler_fuzzable_int\": [\n        \"0\",\n        \"-1\",\n        \"999999999\",\n        \"2147483647\",\n        \"-2147483648\"\n    ],\n    \"restler_fuzzable_bool\": [\"true\", \"false\", \"null\", \"1\", \"0\"],\n    \"restler_fuzzable_datetime\": [\n        \"2024-01-01T00:00:00Z\",\n        \"0000-00-00T00:00:00Z\",\n        \"9999-12-31T23:59:59Z\",\n        \"invalid-date\"\n    ],\n    \"restler_fuzzable_uuid4\": [\n        \"00000000-0000-0000-0000-000000000000\",\n        \"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\"\n    ],\n    \"restler_custom_payload\": {\n        \"\u002Fusers\u002F{userId}\": [\"1\", \"0\", \"-1\", \"admin\", \"' OR 1=1--\"],\n        \"\u002Forders\u002F{orderId}\": [\"1\", \"0\", \"999999999\"]\n    }\n}\n```\n\n### Step 3: Configure Authentication\n\n```python\n# authentication_token.py - RESTler authentication module\nimport requests\nimport json\nimport time\n\nclass AuthenticationProvider:\n    def __init__(self):\n        self.token = None\n        self.token_expiry = 0\n        self.auth_url = \"https:\u002F\u002Ftarget-api.example.com\u002Fapi\u002Fv1\u002Fauth\u002Flogin\"\n        self.credentials = {\n            \"email\": \"fuzzer@test.com\",\n            \"password\": \"FuzzerPass123!\"\n        }\n\n    def get_token(self):\n        \"\"\"Get or refresh authentication token.\"\"\"\n        current_time = time.time()\n        if self.token and current_time \u003C self.token_expiry - 60:\n            return self.token\n\n        resp = requests.post(self.auth_url, json=self.credentials)\n        if resp.status_code == 200:\n            data = resp.json()\n            self.token = data[\"access_token\"]\n            self.token_expiry = current_time + 3600  # Assume 1-hour TTL\n            return self.token\n        else:\n            raise Exception(f\"Authentication failed: {resp.status_code}\")\n\n    def get_auth_header(self):\n        \"\"\"Return the authentication header for RESTler.\"\"\"\n        token = self.get_token()\n        return f\"Authorization: Bearer {token}\"\n\n# Export the token refresh command for RESTler\nauth = AuthenticationProvider()\nprint(auth.get_auth_header())\n```\n\n**Engine settings for authentication (engine_settings.json):**\n```json\n{\n    \"authentication\": {\n        \"token\": {\n            \"token_refresh_interval\": 300,\n            \"token_refresh_cmd\": \"python3 \u002Fpath\u002Fto\u002Fauthentication_token.py\"\n        }\n    },\n    \"max_combinations\": 20,\n    \"max_request_execution_time\": 30,\n    \"global_producer_timing_delay\": 2,\n    \"no_ssl\": false,\n    \"host\": \"target-api.example.com\",\n    \"target_port\": 443,\n    \"garbage_collection_interval\": 300,\n    \"max_sequence_length\": 10\n}\n```\n\n### Step 4: Run RESTler in Test Mode (Smoke Test)\n\n```bash\n# Test mode: Quick validation that all endpoints are reachable\n\u002Fopt\u002Frestler\u002Frestler\u002FRestler test \\\n    --grammar_file Compile\u002Fgrammar.py \\\n    --dictionary_file Compile\u002Fdict.json \\\n    --settings Compile\u002Fengine_settings.json \\\n    --no_ssl \\\n    --target_ip target-api.example.com \\\n    --target_port 443\n\n# Review test results\ncat Test\u002FResponseBuckets\u002FrunSummary.json\n```\n\n```python\n# Parse test results\nimport json\n\nwith open(\"Test\u002FResponseBuckets\u002FrunSummary.json\") as f:\n    summary = json.load(f)\n\nprint(\"Test Mode Summary:\")\nprint(f\"  Total requests: {summary.get('total_requests_sent', {}).get('num_requests', 0)}\")\nprint(f\"  Successful (2xx): {summary.get('num_fully_valid', 0)}\")\nprint(f\"  Client errors (4xx): {summary.get('num_invalid', 0)}\")\nprint(f\"  Server errors (5xx): {summary.get('num_server_error', 0)}\")\n\n# Identify uncovered endpoints\ncovered = summary.get('covered_endpoints', [])\ntotal = summary.get('total_endpoints', [])\nuncovered = set(total) - set(covered)\nif uncovered:\n    print(f\"\\nUncovered endpoints ({len(uncovered)}):\")\n    for ep in uncovered:\n        print(f\"  - {ep}\")\n```\n\n### Step 5: Run Fuzz-Lean Mode\n\n```bash\n# Fuzz-lean: One pass through all endpoints with security checkers enabled\n\u002Fopt\u002Frestler\u002Frestler\u002FRestler fuzz-lean \\\n    --grammar_file Compile\u002Fgrammar.py \\\n    --dictionary_file Compile\u002Fdict.json \\\n    --settings Compile\u002Fengine_settings.json \\\n    --target_ip target-api.example.com \\\n    --target_port 443 \\\n    --time_budget 1  # 1 hour max\n\n# Checkers automatically enabled in fuzz-lean:\n# - UseAfterFree: Tests accessing resources after deletion\n# - NamespaceRule: Tests accessing resources across namespaces\u002Ftenants\n# - ResourceHierarchy: Tests child resources with wrong parent IDs\n# - LeakageRule: Tests for information disclosure in error responses\n# - InvalidDynamicObject: Tests with malformed dynamic object IDs\n```\n\n### Step 6: Run Full Fuzzing Mode\n\n```bash\n# Full fuzz mode: Extended fuzzing for comprehensive coverage\n\u002Fopt\u002Frestler\u002Frestler\u002FRestler fuzz \\\n    --grammar_file Compile\u002Fgrammar.py \\\n    --dictionary_file Compile\u002Fdict.json \\\n    --settings Compile\u002Fengine_settings.json \\\n    --target_ip target-api.example.com \\\n    --target_port 443 \\\n    --time_budget 4 \\\n    --enable_checkers UseAfterFree NamespaceRule ResourceHierarchy LeakageRule InvalidDynamicObject PayloadBody\n\n# Analyze fuzzing results\npython3 \u003C\u003C'EOF'\nimport json\nimport os\n\nresults_dir = \"Fuzz\u002FResponseBuckets\"\nbugs_dir = \"Fuzz\u002Fbug_buckets\"\n\n# Parse bug buckets\nif os.path.exists(bugs_dir):\n    for bug_file in os.listdir(bugs_dir):\n        if bug_file.endswith(\".txt\"):\n            with open(os.path.join(bugs_dir, bug_file)) as f:\n                content = f.read()\n            print(f\"\\n=== Bug: {bug_file} ===\")\n            print(content[:500])\n\n# Parse response summary\nsummary_file = os.path.join(results_dir, \"runSummary.json\")\nif os.path.exists(summary_file):\n    with open(summary_file) as f:\n        summary = json.load(f)\n    print(f\"\\nFuzz Summary:\")\n    print(f\"  Duration: {summary.get('time_budget_hours', 0)} hours\")\n    print(f\"  Total requests: {summary.get('total_requests_sent', {}).get('num_requests', 0)}\")\n    print(f\"  Bugs found: {summary.get('num_bugs', 0)}\")\n    print(f\"  500 errors: {summary.get('num_server_error', 0)}\")\nEOF\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Stateful Fuzzing** | API fuzzing that maintains state across requests by using responses from earlier requests as inputs to later ones, enabling testing of multi-step workflows |\n| **Producer-Consumer Dependencies** | RESTler's inference that a value produced by one API call (e.g., a created resource ID) should be consumed by a subsequent call |\n| **Fuzzing Grammar** | Compiled representation of the API specification that defines how to generate valid and invalid requests for each endpoint |\n| **Checker** | RESTler security rule that tests for specific vulnerability patterns like use-after-free, namespace isolation, or information leakage |\n| **Bug Bucket** | RESTler's categorization of discovered bugs by type and endpoint, grouping similar failures for efficient triage |\n| **Garbage Collection** | RESTler's periodic cleanup of resources created during fuzzing to prevent resource exhaustion on the target system |\n\n## Tools & Systems\n\n- **RESTler**: Microsoft Research's stateful REST API fuzzing tool that compiles OpenAPI specs into fuzzing grammars\n- **Schemathesis**: Property-based API testing tool that generates test cases from OpenAPI\u002FGraphQL schemas\n- **Dredd**: API testing tool that validates API implementations against OpenAPI\u002FAPI Blueprint documentation\n- **Fuzz-lightyear**: Yelp's stateless API fuzzer focused on finding authentication and authorization vulnerabilities\n- **API Fuzzer**: OWASP tool for API endpoint fuzzing with customizable payload dictionaries\n\n## Common Scenarios\n\n### Scenario: Microservice API Fuzzing Campaign\n\n**Context**: A fintech company has 12 microservice APIs with OpenAPI specifications. Before a major release, the security team runs RESTler fuzzing against each service in the staging environment to catch bugs.\n\n**Approach**:\n1. Collect OpenAPI specs for all 12 services and compile each into a RESTler grammar\n2. Configure authentication for each service with service-specific credentials\n3. Run test mode on each service to validate endpoint reachability and fix grammar issues\n4. Run fuzz-lean mode (1 hour per service) to identify quick wins\n5. Find 23 bugs in fuzz-lean mode: 8 unhandled 500 errors, 5 use-after-free patterns, 4 namespace isolation failures, 6 information leakage in error responses\n6. Run full fuzz mode (4 hours per service) on the 5 services with the most bugs\n7. Discover 47 additional bugs including a critical authentication bypass where deleting a user and reusing their token still allows access\n8. Generate bug reports and track remediation through JIRA integration\n\n**Pitfalls**:\n- Running RESTler against production without understanding that it creates and deletes thousands of resources\n- Not configuring authentication correctly, causing RESTler to only test unauthenticated access\n- Using the default dictionary without adding application-specific injection payloads\n- Not setting a time budget, allowing RESTler to run indefinitely\n- Ignoring the compilation warnings that indicate endpoints RESTler cannot reach due to dependency issues\n\n## Output Format\n\n```\n## RESTler API Fuzzing Report\n\n**Target**: User Service API (staging.example.com)\n**Specification**: OpenAPI 3.0 (42 endpoints)\n**Duration**: 4 hours (full fuzz mode)\n**Total Requests**: 145,832\n\n### Bug Summary\n\n| Category | Count | Severity |\n|----------|-------|----------|\n| 500 Internal Server Error | 12 | High |\n| Use After Free | 3 | Critical |\n| Namespace Rule Violation | 5 | Critical |\n| Information Leakage | 8 | Medium |\n| Resource Leak | 4 | Low |\n\n### Critical Findings\n\n**1. Use-After-Free: Deleted user token still valid**\n- Sequence: POST \u002Fusers -> DELETE \u002Fusers\u002F{id} -> GET \u002Fusers\u002F{id}\n- After deleting user, GET with the deleted user's token returns 200\n- Impact: Deleted accounts can still access the API\n\n**2. Namespace Violation: Cross-tenant data access**\n- Sequence: POST \u002Fusers (tenant A) -> GET \u002Fusers\u002F{id} (tenant B token)\n- User created by tenant A is accessible with tenant B's credentials\n- Impact: Multi-tenant isolation breach\n\n**3. 500 Error: Unhandled integer overflow**\n- Request: POST \u002Forders {\"quantity\": 2147483648}\n- Response: 500 Internal Server Error with stack trace\n- Impact: DoS potential, information disclosure via stack trace\n\n### Coverage\n\n- Endpoints covered: 38\u002F42 (90.5%)\n- Uncovered: POST \u002Fadmin\u002Fmigrate, DELETE \u002Fadmin\u002Fcache,\n  PUT \u002Fconfig\u002Fadvanced, POST \u002Fwebhooks\u002Ftest\n```\n",{"name":5,"tags":25,"author":32,"domain":33,"license":15,"version":34,"nist_csf":35,"subdomain":26,"description":40,"mitre_attack":41},[26,27,28,29,30,31],"api-security","fuzzing","restler","automated-testing","openapi","stateful-testing","mahipal","cybersecurity","1.0.0",[36,37,38,39],"PR.PS-01","ID.RA-01","PR.DS-10","DE.CM-01","Uses Microsoft RESTler to perform stateful REST API fuzzing: compiles an OpenAPI\u002FSwagger spec into a RESTler grammar, configures authentication, and runs test\u002Ffuzz-lean\u002Ffuzz modes that generate request sequences exercising producer-consumer dependencies, then flags 500 errors, auth bypasses, resource leaks, and injection bugs. Use when fuzzing REST APIs for stateful bugs or running RESTler-based automated API security testing.\n",[42,43,44,45,46],"T1190","T1059.007","T1552.001","T1055","T1059","main","8a3b3de73262a4c4db64523949360f3c599c2fb1","Anthropic-Cybersecurity-Skills-main\u002Fskills\u002Fperforming-api-fuzzing-with-restler",0,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use","https:\u002F\u002Fgithub.com\u002FSaiVatsal","https:\u002F\u002Fsaivatsal.github.io\u002FPortfolio\u002F","The Longer It Takes The Stronger It Becomes ","2026-09-21 22:45:58",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add SaiVatsal\u002FSkills-I-Use --skill performing-api-fuzzing-with-restler",{"tool":62,"command":63},"bunx","bunx skills add SaiVatsal\u002FSkills-I-Use --skill performing-api-fuzzing-with-restler",{"tool":65,"command":66},"pnpm","pnpm dlx skills add SaiVatsal\u002FSkills-I-Use --skill performing-api-fuzzing-with-restler","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fperforming-api-fuzzing-with-restler\u002FSKILL.md",true,[70,74,80],{"path":71,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fapi-reference.md","REFERENCE","参考文档",1965,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fperforming-api-fuzzing-with-restler\u002Freferences\u002Fapi-reference.md",{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"scripts\u002Fagent.py","SCRIPT","脚本",7425,"https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002FAnthropic-Cybersecurity-Skills-main\u002Fskills\u002Fperforming-api-fuzzing-with-restler\u002Fscripts\u002Fagent.py",[87,95,103,112,119,126],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":91,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":20},"01M7DJZP6E6KMBQV4CZSDPZEZ8","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":99,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":20},"01M7DJZFTS5TS06K2TV3MDTE67","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fweb-artifacts-builder\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":107,"licenseFileUrl":108,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":20},"01M7DJRK4SRQ908F2TJM6EZ7EV","ui-styling","Create beautiful, accessible user interfaces with shadcn\u002Fui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs. Use when building user interfaces, implementing design systems, creating responsive layouts, adding accessible components (dialogs, dropdowns, forms, tables), customizing themes and colors, implementing dark mode, generating visual designs and posters, or establishing consistent styling patterns across applications.","MIT","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fui-styling\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fui-styling\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":107,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":20},"01M7DJR902059VEQP23PVM2WA0","design","Comprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social\u002Fads\u002Fweb\u002Fprint), icon design (15 styles, SVG, Gemini 3.1 Pro), social photos (HTML→screenshot, multi-platform). Actions: design logo, create CIP, generate mockups, build slides, design banner, generate icon, create social photos, social media images, brand identity, design system. Platforms: Facebook, Twitter, LinkedIn, YouTube, Instagram, Pinterest, TikTok, Threads, Google Ads.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fdesign\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":107,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":20},"01M7DJR56QF5N6XYTCPCFHFMNP","design-system","Token architecture, component specifications, and slide generation. Three-layer tokens (primitive→semantic→component), CSS variables, spacing\u002Ftypography scales, component specs, strategic slide creation. Use for design tokens, systematic design, brand-compliant presentations.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fdesign-system\u002FSKILL.md",[],[],{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":107,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":20},"01M7DJQXB6M0SFF7NX8J5N01AH","banner-design","Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with AI-generated visuals. Actions: design, create, generate banner. Platforms: Facebook, Twitter\u002FX, LinkedIn, YouTube, Instagram, Google Display, website hero, print. Styles: minimalist, gradient, bold typography, photo-based, illustrated, geometric, retro, glassmorphism, 3D, neon, duotone, editorial, collage. Uses ui-ux-pro-max, frontend-design, ai-artist, ai-multimodal skills.","https:\u002F\u002Fgithub.com\u002FSaiVatsal\u002FSkills-I-Use\u002Fblob\u002Fmain\u002Fui-ux-pro-max-skill-main\u002Fcli\u002Fassets\u002Fskills\u002Fbanner-design\u002FSKILL.md",[],[]]