> 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/insecure-direct-object-reference-idor-attack/idors-techniques-pentesting-web.md).

# IDOR 技术

> 要利用 IDOR 漏洞，攻击者可以尝试 **修改某个对象的标识符** 在 URL 中，或者使用自动化工具测试不同的值。如果攻击者找到了一个允许访问本不应可用资源的标识符，那么 IDOR 漏洞就已被成功利用。

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

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

## IDOR：

* 我们创建一个文件，我们 **返回标识符** 编号为 1062：

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

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

如果我们按另一个数字筛选，这表明该文档 **不存在**:

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

### 暴力破解：

* 我们发起一次 **暴力破解** 来筛选存在的文件：

```bash
wfuzz --hh=10703,1233 -c -t 200 -z range,1-1500 -d 'pdf_id=FUZZ' http://localhost:5000/download

```

<figure><img src="/files/e4293ec650dce97f3f6b1c892eef06309c768e93" alt="" width="563"><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/insecure-direct-object-reference-idor-attack/idors-techniques-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.
