> 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/json-web-token-jwt-attack/jwt-pivoting-user-pentesting-web.md).

# توجيه المستخدم عبر JWT

## JWT-فارغ:

نصادق كـ **مستخدم عادي** "user" مع امتيازات *ضيف*:

<figure><img src="/files/c654bdd78cdc3bcdec689806f4dbdb9cb9d84245" alt="" width="563"><figcaption></figcaption></figure>

نلاحظ أن لدينا **ملف تعريف ارتباط للجلسة** في JWT:

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

<figure><img src="/files/08dd13a104a0d32a671c4c35b5082ad53f4d1e76" alt=""><figcaption></figcaption></figure>

من **الطرفية**، نقوم بترجمة en **base64** ‏"Header" و"Payload" مع تغيير رقم التعريف، ثم نقوم بإزالة "Verify signature":

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

نلصق الجديد **ملف تعريف ارتباط للجلسة** ونحصل على امتيازات *عادي*:

<figure><img src="/files/04bf87e160fcc34c11eba2d8454011d7e72151a4" alt=""><figcaption></figcaption></figure>

## سر JWT

عند اختبار طريقة JWT الفارغة، هذا **لن يعمل** وسيفشل المحاولة.

<figure><img src="/files/c6aad672d91ae6aa123d5ab1398fa0d3fb5a6b95" alt="" width="563"><figcaption></figcaption></figure>

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

<figure><img src="/files/36aaa85f004186ff97718b11c87671c7209f6bc1" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/61f62a92e5e91053ee7349495f8f9d8c7c3ce88f" 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/json-web-token-jwt-attack/jwt-pivoting-user-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.
