> 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/access-control/multi-step-process-without-access-control.md).

# 没有访问控制的多步骤流程

### 无访问控制的多步骤流程

该实验室提供一个管理面板，其中有一个用于更改用户角色的多步骤流程。该流程存在一个缺陷：其中一个步骤未应用访问控制。/ 为了进行练习，可以先使用以下方式检查管理面板： **administrator:admin** 凭据。/ 要解决该实验室，你需要使用 **wiener:peter** ，并利用有漏洞的步骤将你自己的角色提升为管理员级别。

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

### 流程分析

角色更改发生在两个单独的请求中：

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

#### **第一步：请求升级**

```bash
username=carlos&action=upgrade
```

使用 wiener 会话时，此请求被拒绝：/ 服务器提示该用户不被允许。

<figure><img src="/files/59aa66a7a45064e3aaaae600d9f3ece7ebacf92e" alt=""><figcaption></figcaption></figure>

#### **第二步：确认操作**

```bash
action=upgrade&confirmed=true&username=carlos
```

第二阶段不包含 **访问控制**。/ 通过使用 wiener 的会话 cookie 发送此请求：

<figure><img src="/files/5946f48dd0870b5a35a30bd84393fbc6fc4eec14" alt=""><figcaption></figcaption></figure>

服务器响应 **OK**，尽管 wiener 不应拥有必要的权限


---

# 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/access-control/multi-step-process-without-access-control.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.
