> 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/mass-assignment-attack/mass-assignment-attack-role-admin-pentesting-web.md).

# 批量赋值角色管理员

我们 **创建** 一个新用户：

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

我们使用 Burp Suite 拦截请求，并在响应中发现一个角色为 **clinkt**.

<figure><img src="/files/676b50628589629faabab65d440cb464715fa4a7" alt=""><figcaption></figcaption></figure>

如果我们添加一个 **不存在的新参数** "role"，其内容为"admin"，加入到我们的查询中：

<figure><img src="/files/785a6032a87e483b80a2f7e5627cf7f81046954c" alt=""><figcaption></figcaption></figure>

我们获得 **管理员权限**:

<figure><img src="/files/d279ced9777e058e985b886002d6809b00c2a6e6" 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/mass-assignment-attack/mass-assignment-attack-role-admin-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.
