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

exploiting-excessive-data-exposure-in-api

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

यह जांचता है कि कोई मोबाइल ऐप या वेबसाइट इंटरनेट पर ज़रूरत से ज़्यादा जानकारी तो नहीं भेज रही। यह उस निजी या संवेदनशील डेटा को ढूंढता है जिसे सामने नहीं आना चाहिए।

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

  • ✓जब आपको शक हो कि कोई ऐप या वेबसाइट ऐसा डेटा दिखा रही है जो उसे नहीं दिखाना चाहिए।
  • ✓मोबाइल ऐप के API की सुरक्षा का ऑडिट करते समय।
  • ✓यह देखने के लिए कि API के जवाब में कोई संवेदनशील जानकारी लीक तो नहीं हो रही।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-excessive-data-exposure-in-api/SKILL.md

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

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

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

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

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

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

“मेरे बैंकिंग ऐप का API जांचो कि क्या वह पूरा बैलेंस भेज रहा है, जबकि उसे सिर्फ स्टेटमेंट भेजना चाहिए।”

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

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

यह देखता है कि ऐप स्क्रीन पर क्या दिखाता है और API क्या-क्या भेजता है, दोनों की तुलना करता है। अगर API ऐसा अतिरिक्त डेटा भेजता है जो स्क्रीन पर इस्तेमाल नहीं होता, तो यह अलर्ट दिखाता है।

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

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

Exploiting Excessive Data Exposure in API

When to Use

  • Testing APIs where the frontend displays a subset of data but the API response includes additional fields
  • Assessing mobile application APIs where responses are designed for multiple client types and may contain excess data
  • Identifying PII leakage in API responses that include email addresses, phone numbers, SSNs, or payment data not shown in the UI
  • Testing GraphQL APIs where clients can request arbitrary fields including sensitive attributes
  • Evaluating APIs after microservice refactoring where internal service-to-service data leaks into public endpoints

Do not use without written authorization. Data exposure testing involves capturing and analyzing potentially sensitive personal data.

Prerequisites

  • Written authorization specifying target API endpoints and scope
  • Burp Suite Professional or mitmproxy configured as intercepting proxy
  • Two test accounts at different privilege levels (regular user and admin)
  • Browser developer tools or mobile proxy setup for traffic capture
  • Python 3.10+ with requests and json libraries
  • API documentation (OpenAPI spec) for comparison against actual responses

Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.

Workflow

Step 1: Response Schema Discovery

Compare documented API responses with actual responses:

import requests
import json

BASE_URL = "https://target-api.example.com/api/v1"
headers = {"Authorization": "Bearer <user_token>", "Content-Type": "application/json"}

# Fetch a resource and analyze all returned fields
endpoints_to_test = [
    ("GET", "/users/me", None),
    ("GET", "/users/me/orders", None),
    ("GET", "/products", None),
    ("GET", "/users/me/settings", None),
    ("GET", "/transactions", None),
]

for method, path, body in endpoints_to_test:
    resp = requests.request(method, f"{BASE_URL}{path}", headers=headers, json=body)
    if resp.status_code == 200:
        data = resp.json()
        # Recursively extract all field names
        def extract_fields(obj, prefix=""):
            fields = []
            if isinstance(obj, dict):
                for k, v in obj.items():
                    full_key = f"{prefix}.{k}" if prefix else k
                    fields.append(full_key)
                    fields.extend(extract_fields(v, full_key))
            elif isinstance(obj, list) and obj:
                fields.extend(extract_fields(obj[0], f"{prefix}[]"))
            return fields

        all_fields = extract_fields(data)
        print(f"\n{method} {path} - {len(all_fields)} fields returned:")
        for f in sorted(all_fields):
            print(f"  {f}")

Step 2: Sensitive Data Pattern Detection

Scan API responses for sensitive data patterns:

import re

SENSITIVE_PATTERNS = {
    "email": r'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}',
    "phone": r'(\+?1?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4})',
    "ssn": r'\b\d{3}-\d{2}-\d{4}\b',
    "credit_card": r'\b(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|3[47][0-9]{13})\b',
    "password_hash": r'\$2[aby]?\$\d{2}\$[./A-Za-z0-9]{53}',
    "api_key": r'(?:api[_-]?key|apikey)["\s:=]+["\']?([a-zA-Z0-9_\-]{20,})',
    "internal_ip": r'\b(?:10\.\d{1,3}|172\.(?:1[6-9]|2\d|3[01])|192\.168)\.\d{1,3}\.\d{1,3}\b',
    "aws_key": r'AKIA[0-9A-Z]{16}',
    "jwt_token": r'eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+',
    "uuid": r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}',
}

SENSITIVE_FIELD_NAMES = [
    "password", "password_hash", "secret", "token", "ssn", "social_security",
    "credit_card", "card_number", "cvv", "pin", "private_key", "api_key",
    "internal_id", "debug", "trace", "stack_trace", "created_by_ip",
    "last_login_ip", "salt", "session_id", "refresh_token", "mfa_secret",
    "date_of_birth", "bank_account", "routing_number", "tax_id"
]

def scan_response(endpoint, response_text):
    findings = []
    # Check for sensitive data patterns in values
    for pattern_name, pattern in SENSITIVE_PATTERNS.items():
        matches = re.findall(pattern, response_text)
        if matches:
            findings.append({
                "endpoint": endpoint,
                "type": "sensitive_value",
                "pattern": pattern_name,
                "count": len(matches),

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

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

हां, किसी भी API की जांच से पहले लिखित अनुमति लेना ज़रूरी है। बिना अनुमति जांच करना गैरकानूनी है।

'ज़रूरत से ज़्यादा डेटा' क्या होता है?

यह वह जानकारी है जो API भेजता है, लेकिन ऐप को उसकी ज़रूरत नहीं होती या वह उसे यूज़र को नहीं दिखाता। इसमें निजी डेटा, पासवर्ड या अंदरूनी जानकारी शामिल हो सकती है।

क्या यह टूल डेटा लीक के सभी तरीके ढूंढ सकता है?

यह मुख्य रूप से API के जवाब में डेटा लीक पर ध्यान देता है, जहां भेजे गए डेटा की तुलना स्क्रीन पर दिखने वाले डेटा से होती है। दूसरे तरह के लीक के लिए अलग टूल की ज़रूरत पड़ सकती है।

जानकारी

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

Tests APIs for excessive data exposure (OWASP API3:2023) by intercepting raw API responses and comparing them against what the UI actually renders, looking for leaked PII, internal identifiers, debug data, or business-sensitive fields the frontend filters but the API still transmits. Use when auditing REST or mobile-app APIs for over-fetching, response filtering bypass, or unintended data leakage

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

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

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

0

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

कमेंट

  • …

इस repository की और skills

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