> 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/authentication/brute-forcing-a-stay-logged-in-cookie.md).

# القوة الغاشمة على ملف تعريف ارتباط جلسة دائم

### كسر ملف تعريف ارتباط البقاء مسجّلًا للدخول بالقوة الغاشمة

تتيح هذه المختبرات للمستخدمين البقاء متصلين حتى بعد إغلاق متصفحاتهم. ملف تعريف الارتباط المستخدم لهذه الميزة عرضة للهجوم بالقوة الغاشمة. / لحل المختبر، تحتاج إلى كسر ملف تعريف ارتباط Carlos بالقوة الغاشمة للوصول إلى صفحة حسابي الخاصة به.

**بيانات الاعتماد المقدَّمة:** `wiener:peter`/ \*\* اسم الضحية:\*\* `carlos`

### \*\*تحليل الآلية

عند تحديد خيار إعادة الاتصال التلقائي، يتم إرسال الاستعلام التالي:

```bash
username=wiener&password=peter&stay-logged-in=on
```

<figure><img src="/files/5ebad86b62040c9efb317ff39c9dc66b64719767" alt=""><figcaption></figcaption></figure>

ثم يعيد الخادم ملف تعريف ارتباط باسم **stay-logged-in**، ومحتواه مُرمَّز باستخدام Base64:

```bash
d2llbmVyOjUxZGMzMGRkYzQ3M2Q0M2E2MDExZTllYmJhNmNhNzcw
```

<figure><img src="/files/972e0978cbdb17341342cdde3f46da6d7069f38a" alt=""><figcaption></figcaption></figure>

بعد فك التشفير، نحصل على:

```bash
wiener:51dc30ddc473d43a6011e9ebba6ca770
```

<figure><img src="/files/097f988ef140d617be803587b331e33118326d04" alt=""><figcaption></figcaption></figure>

إذًا يكون هيكل ملف تعريف الارتباط كما يلي:

من خلال التحقق من القيمة الهاش عبر CrackStation، نكتشف أنها تطابق القيمة **peter** في MD5.

<figure><img src="/files/6c468af40eeab0feac21c4aa9bcec83d0ba28c14" alt=""><figcaption></figcaption></figure>

### **إعداد القوة الغاشمة**

1. أرسل استعلام ملف تعريف الارتباط إلى **Burp Intruder** واختر قيمة ملف تعريف الارتباط كمنطقة الحقن.

<figure><img src="/files/789b1378715772656599e8f85a25349781a8560c" alt=""><figcaption></figcaption></figure>

في معالجة الحمولة:

* أضف تحويلًا يُنشئ قيمة هاش **MD5**;

<figure><img src="/files/90b4d0af2424d187f577f060f1bb44fa66724bf2" alt=""><figcaption></figcaption></figure>

* أضف بادئة: `carlos:`

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

* شفّر الكل باستخدام **Base64**.

<figure><img src="/files/5a6d187e5dc0815cf06ca6074b2c343229de7569" alt=""><figcaption></figcaption></figure>

1. حمّل قائمة كلمات المرور في إعدادات الحمولة.

<figure><img src="/files/7f74f7ac220bf6be50612479491b2a0b96a796a8" alt=""><figcaption></figcaption></figure>

أثناء الهجوم، تشير استجابة **200** إلى ملف تعريف الارتباط الصحيح لـ Carlos.

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

ملف تعريف الارتباط الذي تم الحصول عليه هو:

```bash
Y2FybG9zOjdkOGJjNWYxYThkMzc4N2QwNmVmMTFjOTdkNDY1NWRm
```

فك التشفير

{% code overflow="wrap" %}

```bash
echo -n "Y2FybG9zOjdkOGJjNWYxYThkMzc4N2QwNmVmMTFjOTdkNDY1NWRm" | base64 -d ;echo
```

{% endcode %}

* carlos:7d8bc5f1a8d3787d06ef11c97d4655df

من خلال التحقق من هذا الهاش على CrackStation، نجد أن كلمة المرور المرتبطة هي **taylor**.

<figure><img src="/files/9f74968748dd2967ada312ed2dfedb644b30e0e1" 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/authentication/brute-forcing-a-stay-logged-in-cookie.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.
