मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी35k · #8181

performing-api-fuzzing-with-restler

यह क्या करती है

यह टूल APIs (ऑनलाइन services जिन्हें apps आपस में बात करने के लिए इस्तेमाल करते हैं) में security खामियां ढूंढने में मदद करता है। यह अपने आप कई तरह के data combinations से API को टेस्ट करता है, ताकि देखा जा सके कि कुछ टूटता है या नहीं।

कब इस्तेमाल करें

  • ✓API को live करने से पहले उसकी security टेस्ट करते समय।
  • ✓यह जांचते समय कि API commands का कोई खास क्रम कोई समस्या पैदा करता है या नहीं।
  • ✓ऐसी errors खोजते समय जो बताएं कि API हैक हो सकती है।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-api-fuzzing-with-restler/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-api-fuzzing-with-restler/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे API की security OpenAPI specification का इस्तेमाल करके टेस्ट करो और errors ढूंढो।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह टूल RESTler नाम के program का इस्तेमाल करता है, जो एक description file (OpenAPI/Swagger) से समझता है कि API कैसे काम करती है। फिर यह API को कई तरह का data भेजता है, जिसमें खतरनाक data भी शामिल है, ताकि vulnerabilities मिल सकें।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Performing API Fuzzing with RESTler

When to Use

  • Performing automated security testing of REST APIs using their OpenAPI/Swagger specifications
  • Discovering bugs that only manifest through specific sequences of API calls (stateful testing)
  • Finding 500 Internal Server Error responses that indicate unhandled exceptions or crash conditions
  • Testing API input validation by fuzzing parameters with malformed, boundary, and injection payloads
  • Running continuous security regression testing in CI/CD pipelines for API changes

Do not use against production environments without explicit authorization and monitoring. RESTler creates and deletes resources aggressively during fuzzing.

Prerequisites

  • Written authorization specifying the target API and acceptable testing scope
  • Python 3.12+ and .NET 8.0 runtime installed
  • RESTler downloaded from https://github.com/microsoft/restler-fuzzer
  • OpenAPI/Swagger specification (v2 or v3) for the target API
  • API authentication credentials (tokens, API keys, or OAuth credentials)
  • Isolated test/staging environment (RESTler can create thousands of resources per hour)

Workflow

Step 1: RESTler Installation and Setup

# Clone and build RESTler
git clone https://github.com/microsoft/restler-fuzzer.git
cd restler-fuzzer

# Build RESTler
python3 ./build-restler.py --dest_dir /opt/restler

# Verify installation
/opt/restler/restler/Restler --help

# Alternative: Use pre-built release
# Download from https://github.com/microsoft/restler-fuzzer/releases

Step 2: Compile the API Specification

# Compile the OpenAPI spec into a RESTler fuzzing grammar
/opt/restler/restler/Restler compile \
    --api_spec /path/to/openapi.yaml

# Output directory structure:
# Compile/
#   grammar.py          - Generated fuzzing grammar
#   grammar.json        - Grammar in JSON format
#   dict.json           - Custom dictionary for fuzzing values
#   engine_settings.json - Engine configuration
#   config.json         - Compilation config

Custom dictionary for targeted fuzzing (dict.json):

{
    "restler_fuzzable_string": [
        "fuzzstring",
        "' OR '1'='1",
        "\" OR \"1\"=\"1",
        "<script>alert(1)</script>",
        "../../../etc/passwd",
        "${7*7}",
        "{{7*7}}",
        "a]UNION SELECT 1,2,3--",
        "\"; cat /etc/passwd; echo \"",
        "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
    ],
    "restler_fuzzable_int": [
        "0",
        "-1",
        "999999999",
        "2147483647",
        "-2147483648"
    ],
    "restler_fuzzable_bool": ["true", "false", "null", "1", "0"],
    "restler_fuzzable_datetime": [
        "2024-01-01T00:00:00Z",
        "0000-00-00T00:00:00Z",
        "9999-12-31T23:59:59Z",
        "invalid-date"
    ],
    "restler_fuzzable_uuid4": [
        "00000000-0000-0000-0000-000000000000",
        "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
    ],
    "restler_custom_payload": {
        "/users/{userId}": ["1", "0", "-1", "admin", "' OR 1=1--"],
        "/orders/{orderId}": ["1", "0", "999999999"]
    }
}

Step 3: Configure Authentication

# authentication_token.py - RESTler authentication module
import requests
import json
import time

class AuthenticationProvider:
    def __init__(self):
        self.token = None
        self.token_expiry = 0
        self.auth_url = "https://target-api.example.com/api/v1/auth/login"
        self.credentials = {
            "email": "fuzzer@test.com",
            "password": "FuzzerPass123!"
        }

    def get_token(self):
        """Get or refresh authentication token."""
        current_time = time.time()
        if self.token and current_time < self.token_expiry - 60:
            return self.token

        resp = requests.post(self.auth_url, json=self.credentials)
        if resp.status_code == 200:
            data = resp.json()
            self.token = data["access_token"]
            self.token_expiry = current_time + 3600  # Assume 1-hour TTL
            return self.token
        else:
            raise Exception(f"Authentication failed: {resp.status_code}")

    def get_auth_header(self):
        """Return the authentication header for RESTler."""
        token = self.get_token()
        return f"Authorization: Bearer {token}"

# Export the token refresh command for RESTler
auth = AuthenticationProvider()
print(auth.get_auth_header())

Engine settings for authentication (engine_settings.json):

…

अक्सर पूछे जाने वाले सवाल

क्या इस टूल को इस्तेमाल करने की अनुमति चाहिए?

हां, API टेस्ट करने के लिए लिखित अनुमति चाहिए, खासकर production में चल रही API के लिए। यह टूल तेज़ी से बहुत सारा data बना और मिटा सकता है।

'fuzzing' क्या है?

Fuzzing एक testing तकनीक है, जिसमें किसी program को random या अनपेक्षित data भेजा जाता है, ताकि देखा जा सके कि वह गलत तरीके से व्यवहार करता है या crash होता है।

'stateful bugs' क्या होते हैं?

ये ऐसी खामियां होती हैं जो तभी दिखती हैं जब API पर एक के बाद एक कई actions किए जाते हैं, न कि हर action को अलग-अलग टेस्ट करने पर।

जानकारी

लेखक का मूल विवरण

Uses Microsoft RESTler to perform stateful REST API fuzzing: compiles an OpenAPI/Swagger spec into a RESTler grammar, configures authentication, and runs test/fuzz-lean/fuzz 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 a

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

GitHub स्टार
35k
रैंकिंग में स्थान
#8181
लाइसेंस
Apache-2.0
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills