> 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/zh/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-cross-site-request-forgery-csrf/csrf-user-information-manipulation-pentesting-web.md).

# CSRF 用户信息篡改

我们先开始 **拦截** 一条通过 Burp Suite 进行姓名更改的请求：

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

我们验证同一个请求是否被解释为 **GET**:

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

使用 **GET**，我们通过修改姓名并删除以下内容来发送请求 **令牌** 以及 **时间戳** 以查看它们是否绝对必要：

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

我们可以看到用户名已 **在没有表单的情况下更改**，因此这两个字段不是必需的：

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

在 \*\*好友列表\*\* 中，我们找到了受害者的 \*\*id\*\*：

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

我们尝试在更改以下内容后发起请求 **用户 id** 为受害者的（59），并修改 **名称字段** （在这种情况下，我们没有必要的授权）：

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

因为该请求可以通过以下方式执行 **GET**，如果我们发送该 **链接** 给受害者并且他们从自己的账户打开它，他们的姓名将会被更改，因为他们拥有必要的 **授权**:

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

在这种情况下这是不可能的，但如果没有 **当前密码** 字段，我们就可以更改用户的密码：

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

一种方法是通过以下方式将链接发送给他们 **GET**；当他们 **打开** 它时，更改就会生效。在某些情况下，我们可以在 **HTML**。如果我们发送一张不存在的图片，并将 **插入链接** 方式如下：

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

当受害者打开消息，并且服务器 **将……解释为** 加载该图片（该图片不存在）时，更改将会生效：

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

<figure><img src="/files/d912bad7ee953ead0adc563953b2ef4ccaa6c93c" 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/zh/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-cross-site-request-forgery-csrf/csrf-user-information-manipulation-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.
