Перейти к содержанию
Skillpedia
Тестирование35k · #8238

performing-graphql-security-assessment

Что он делает

Этот инструмент помогает проверить безопасность API, которые используют GraphQL. Он ищет распространённые ошибки, которыми могут воспользоваться хакеры, например утечки информации, атаки с внедрением кода и проблемы с правами доступа.

Когда использовать

  • ✓При тестировании безопасности сайта или приложения, которое использует GraphQL.
  • ✓Когда вы подозреваете, что у API GraphQL могут быть уязвимости.
  • ✓Во время санкционированных тестов безопасности систем с API GraphQL.

Ссылка на скилл

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-graphql-security-assessment/SKILL.md

Скопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.

Как использовать

Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.

Готовое сообщение для вставки

Используй этот скилл, чтобы помочь мне: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-graphql-security-assessment/SKILL.md Прочитай файл SKILL.md по этой ссылке и следуй его инструкциям в моей задаче.
Хотите, чтобы ваш ИИ сам находил такие скиллы?Установите бесплатный MCP Skillpedia: одна строка, и перед каждой задачей он ищет среди 15 000+ скиллов.Установить за 1 минуту →

Пример запроса к вашему ИИ

“Проверить безопасность API GraphQL по адресу https://mysite.com/graphql”

5 новых скиллов в неделю. 1 минута чтения.

Как это работает

Инструмент автоматически ищет слабые места в API GraphQL. Он отправляет разные типы запросов, чтобы выявить нарушения безопасности.

Технический текст (оригинальный SKILL.md)

Оригинальный текст автора на английском, прямо с GitHub.

Performing GraphQL Security Assessment

When to Use

  • During authorized penetration tests when the target application uses a GraphQL API
  • When assessing single-page applications (React, Vue, Angular) that communicate via GraphQL
  • For evaluating mobile app backends that expose GraphQL endpoints
  • When testing microservice architectures with a GraphQL gateway or federation
  • During bug bounty programs targeting GraphQL-based APIs

Prerequisites

  • Authorization: Written penetration testing agreement for the target
  • Burp Suite Professional: With InQL extension for GraphQL scanning
  • GraphQL Voyager: Schema visualization tool
  • InQL Scanner: Burp extension for GraphQL introspection and query generation
  • Altair GraphQL Client: Desktop GraphQL client for interactive testing
  • clairvoyance: GraphQL schema enumeration when introspection is disabled
  • curl: For manual GraphQL query submission

Workflow

Step 1: Discover and Fingerprint GraphQL Endpoints

Locate GraphQL endpoints and confirm GraphQL is running.

# Common GraphQL endpoint paths
for path in graphql graphiql playground query gql api/graphql \
  v1/graphql v2/graphql graphql/console; do
  status=$(curl -s -o /dev/null -w "%{http_code}" \
    -X POST -H "Content-Type: application/json" \
    -d '{"query":"{__typename}"}' \
    "https://target.example.com/$path")
  echo "$path: $status"
done

# Check for GraphQL IDEs (GraphiQL, Playground)
curl -s "https://target.example.com/graphiql" | grep -i "graphiql"
curl -s "https://target.example.com/graphql/playground" | grep -i "playground"

# Fingerprint GraphQL engine
curl -s -X POST \
  -H "Content-Type: application/json" \
  -d '{"query":"{__typename}"}' \
  "https://target.example.com/graphql"
# Response varies by engine: Apollo returns "Query", Hasura returns "query_root"

# Check for WebSocket GraphQL subscriptions
# ws://target.example.com/graphql (or wss://)

Step 2: Perform Schema Introspection

Extract the full GraphQL schema to understand the API surface.

# Full introspection query
curl -s -X POST \
  -H "Content-Type: application/json" \
  -d '{"query":"{ __schema { types { name kind fields { name type { name kind ofType { name kind } } } } mutationType { fields { name } } queryType { fields { name } } subscriptionType { fields { name } } } }"}' \
  "https://target.example.com/graphql" | jq .

# Comprehensive introspection query
curl -s -X POST \
  -H "Content-Type: application/json" \
  -d '{"query":"query IntrospectionQuery{__schema{queryType{name}mutationType{name}subscriptionType{name}types{...FullType}directives{name description locations args{...InputValue}}}}fragment FullType on __Type{kind name description fields(includeDeprecated:true){name description args{...InputValue}type{...TypeRef}isDeprecated deprecationReason}inputFields{...InputValue}interfaces{...TypeRef}enumValues(includeDeprecated:true){name description isDeprecated deprecationReason}possibleTypes{...TypeRef}}fragment InputValue on __InputValue{name description type{...TypeRef}defaultValue}fragment TypeRef on __Type{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name}}}}}}}"}' \
  "https://target.example.com/graphql" | jq . > schema.json

# If introspection is disabled, use clairvoyance for schema enumeration
python3 -m clairvoyance \
  -u "https://target.example.com/graphql" \
  -w /usr/share/seclists/Discovery/Web-Content/graphql-field-names.txt \
  -o discovered-schema.json

# Visualize the schema using GraphQL Voyager
# Upload schema.json to https://graphql-kit.com/graphql-voyager/

Step 3: Test Authorization on Queries and Mutations

Verify that access control is enforced at the field and object level.

# Test querying all users (should require admin)
curl -s -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $USER_TOKEN" \
  -d '{"query":"{ users { id email role passwordHash } }"}' \
  "https://target.example.com/graphql" | jq .

# Test accessing sensitive fields on own user
curl -s -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $USER_TOKEN" \
  -d '{"query":"{ user(id: 1) { id email ssn creditCard internalNotes } }"}' \
  "https://target.example.com/graphql" | jq .

# Test mutation authorization (admin-only actions with user token)
curl -s -X POST \
  -H "Content-Type: application/json" \

…
Частые вопросы

Что такое GraphQL?

GraphQL это способ построения API (интерфейсов, через которые программы обмениваются данными), который более эффективен и гибок, чем традиционные подходы.

Что такое тест на проникновение?

Это санкционированная проверка безопасности, в ходе которой специалист пытается взломать систему, чтобы найти уязвимости раньше, чем их найдут злоумышленники.

Нужны ли технические знания, чтобы пользоваться этим?

Этот процесс рассчитан на специалистов по безопасности. Обычным пользователям лучше сообщить о подозрительных уязвимостях разработчикам системы.

Подробности

Оригинальное описание автора

Assessing GraphQL API endpoints for introspection leaks, injection attacks, authorization flaws, and denial-of-service vulnerabilities during authorized security tests.

repo: mukul975/Anthropic-Cybersecurity-Skills

Популярность

Звёзды на GitHub
35k
Место в рейтинге
#8238
Лицензия
Apache-2.0
Обновлён
31.08.2026

Полезен ли этот скилл?

0

Войдите , чтобы голосовать.

Комментарии

  • …

Другие скиллы из этого репозитория

Похожие скиллы