> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/ar/web-vulnerabilities/graphql-attack/graphql-introspection-pentesting-web.md).

# استكشاف GraphQL

{% hint style="info" %}
**الاستطلاع في GraphQL** هي آلية تتيح للعملاء الحصول على معلومات حول مخطط GraphQL لواجهة برمجة التطبيقات (API). وهذا يعني أن العملاء يمكنهم استكشاف واكتشاف أنواع البيانات والحقول والعلاقات الموجودة في واجهة برمجة التطبيقات، وهو ما قد يكون مفيدًا جدًا للمطورين الذين يحتاجون إلى إنشاء عملاء GraphQL. ومع ذلك، يمكن أيضًا استخدام الاستطلاع من قبل المهاجمين للحصول على معلومات حساسة حول البنية والبيانات الموجودة في واجهة برمجة التطبيقات، والتي يمكن استخدامها لتنفيذ هجمات أكثر تعقيدًا.
{% endhint %}

نحن \*\*نجد\*\* المحتوى أدناه:

<figure><img src="/files/3cc9505ce0136c058df75b2602664031f535958a" alt=""><figcaption></figcaption></figure>

نحن **اعتراض** الطلب باستخدام Burp Suite:

<figure><img src="/files/c6dabce71116dabc03cb3b66da77d279f09ea9b1" alt=""><figcaption></figcaption></figure>

في عنوان URL، نحن **ندرج** أحد هذه الأدلة (في حالتي، كان /graphql):

<figure><img src="/files/f185e7f5014406273aa9e818a0c4d2afd6a3a3c3" alt=""><figcaption></figcaption></figure>

بمجرد أن وجدنا الدليل، نحن **عيّنا له المحتوى** أدناه:

```bash
?query=fragment%20FullType%20on%20Type%20{+%20%20kind+%20%20name+%20%20description+%20%20fields%20{+%20%20%20%20name+%20%20%20%20description+%20%20%20%20args%20{+%20%20%20%20%20%20...InputValue+%20%20%20%20}+%20%20%20%20type%20{+%20%20%20%20%20%20...TypeRef+%20%20%20%20}+%20%20}+%20%20inputFields%20{+%20%20%20%20...InputValue+%20%20}+%20%20interfaces%20{+%20%20%20%20...TypeRef+%20%20}+%20%20enumValues%20{+%20%20%20%20name+%20%20%20%20description+%20%20}+%20%20possibleTypes%20{+%20%20%20%20...TypeRef+%20%20}+}++fragment%20InputValue%20on%20InputValue%20{+%20%20name+%20%20description+%20%20type%20{+%20%20%20%20...TypeRef+%20%20}+%20%20defaultValue+}++fragment%20TypeRef%20on%20Type%20{+%20%20kind+%20%20name+%20%20ofType%20{+%20%20%20%20kind+%20%20%20%20name+%20%20%20%20ofType%20{+%20%20%20%20%20%20kind+%20%20%20%20%20%20name+%20%20%20%20%20%20ofType%20{+%20%20%20%20%20%20%20%20kind+%20%20%20%20%20%20%20%20name+%20%20%20%20%20%20%20%20ofType%20{+%20%20%20%20%20%20%20%20%20%20kind+%20%20%20%20%20%20%20%20%20%20name+%20%20%20%20%20%20%20%20%20%20ofType%20{+%20%20%20%20%20%20%20%20%20%20%20%20kind+%20%20%20%20%20%20%20%20%20%20%20%20name+%20%20%20%20%20%20%20%20%20%20%20%20ofType%20{+%20%20%20%20%20%20%20%20%20%20%20%20%20%20kind+%20%20%20%20%20%20%20%20%20%20%20%20%20%20name+%20%20%20%20%20%20%20%20%20%20%20%20%20%20ofType%20{+%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20kind+%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20name+%20%20%20%20%20%20%20%20%20%20%20%20%20%20}+%20%20%20%20%20%20%20%20%20%20%20%20}+%20%20%20%20%20%20%20%20%20%20}+%20%20%20%20%20%20%20%20}+%20%20%20%20%20%20}+%20%20%20%20}+%20%20}+}++query%20IntrospectionQuery%20{+%20%20schema%20{+%20%20%20%20queryType%20{+%20%20%20%20%20%20name+%20%20%20%20}+%20%20%20%20mutationType%20{+%20%20%20%20%20%20name+%20%20%20%20}+%20%20%20%20types%20{+%20%20%20%20%20%20...FullType+%20%20%20%20}+%20%20%20%20directives%20{+%20%20%20%20%20%20name+%20%20%20%20%20%20description+%20%20%20%20%20%20locations+%20%20%20%20%20%20args%20{+%20%20%20%20%20%20%20%20...InputValue+%20%20%20%20%20%20}+%20%20%20%20}+%20%20}+}

```

نواجه على الأرجح **هذا الخطأ**، ولحلّه، ما عليك سوى وضع اثنين من **الشرطات السفلية** قبل المتغير:

<figure><img src="/files/0766a67a4d3ec2792ff3b419df044e84cb09a0be" alt=""><figcaption></figcaption></figure>

بمجرد حلّه، ننسخ كل **محتوى الاستجابة**:

<figure><img src="/files/73de105ee52d42ac82527a196a3d240e0c93b3e8" alt=""><figcaption></figcaption></figure>

نلصقه في صفحة الويب الخاصة بـ [graphql-kit](https://graphql-kit.com/graphql-seeager/) في قسم الاستطلاع:

<figure><img src="/files/be4962d610b94287fb4a448487b9fddbacae7227" alt=""><figcaption></figcaption></figure>

الآن، لدينا **عرض رسومي** لبنية GraphQL:

<figure><img src="/files/c4a256fbda47a3831ef5f7f3e9ec50d83ded2087" alt=""><figcaption></figcaption></figure>

في **query**، وبما أننا نعرف الحقول، ندخلها في الطلب ويعيد الخادم قيمها:

<figure><img src="/files/c0422c43a81233bd1ca167538728c96f38ba53b3" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/ar/web-vulnerabilities/graphql-attack/graphql-introspection-pentesting-web.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
