> 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/information-disclosure/authentication-bypass-via-information-disclosure.md).

# تجاوز المصادقة عبر كشف المعلومات

### تجاوز المصادقة عبر كشف المعلومات

تتضمن واجهة إدارة التطبيق آلية لتجاوز المصادقة. يعتمد هذا على ترويسة HTTP مخصصة تستخدمها الواجهة الأمامية، لكنها غير معروفة مسبقًا. / لحل المختبر، تحتاج إلى تحديد اسم هذه الترويسة، واستخدامها لتجاوز المصادقة، والوصول إلى واجهة الإدارة وحذف المستخدم **carlos**.

**الوصول الأولي إلى واجهة الإدارة**

تؤدي محاولة الوصول إلى صفحة الإدارة مباشرةً عبر `/admin` المسار إلى الرسالة التالية:

> *واجهة الإدارة متاحة فقط للمستخدمين المحليين*

يشير ذلك إلى أن الوصول مقيد بالطلبات الواردة من المضيف المحلي.

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

**كشف المعلومات عبر طريقة TRACE**

عند إرسال طلب HTTP باستخدام `TRACE` الطريقة إلى `/admin`، يعيد الخادم ترويسات أكثر من اللازم.

```bash
TRACE /admin
```

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

ومن بين هذه المعلومات، يتم الكشف عن ترويسة مخصصة:

```bash
X-Custom-Ip-Authorization
```

تُستخدم هذه الترويسة من قِبل الواجهة الأمامية لتحديد ما إذا كان الطلب يأتي من مستخدم محلي.

**الالتفاف على المصادقة**

إضافة الترويسة التالية إلى طلب إلى `/admin`:

```bash
X-Custom-Ip-Authorization: 127.0.0.1
```

<figure><img src="/files/4225fac5e07752446e1c0ee360991f73dcd63dfb" alt=""><figcaption></figcaption></figure>

يجعل الخادم يعتبر الطلب محليًا. / تصبح واجهة الإدارة بعد ذلك قابلة للوصول دون مصادقة إضافية.

**الاستغلال النهائي**

بمجرد الاتصال بلوحة الإدارة، يمكن إزالة المستخدم المستهدف عبر الوصول إلى عنوان URL التالي:

```bash
/admin/delete?username=carlos
```


---

# 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/information-disclosure/authentication-bypass-via-information-disclosure.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.
