> 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/graphql-attack/graphql-idor-pentesting-web.md).

# GraphQL IDOR

{% hint style="info" %}
在……的上下文中 **GraphQL 中的 IDOR** （不安全直接对象引用）可能发生在攻击者能够猜测或枚举 API 中对象的凭据（ID）时，并且可以使用这些 ID 访问其本不应访问的对象。这可能是因为 API 的开发人员没有在其 API 中正确实现身份验证和授权机制。
{% endhint %}

网站路径侦察阶段：

```bash
gobuster dir -u http://localhost:5000/ -w /usr/share/SecLists/Discovery/Web-Content/directory-list-2.3-medium.txt -t 20

```

<figure><img src="/files/23261fb8eaaed3430f4d50e92414f217b8f8bb87" alt=""><figcaption></figcaption></figure>

我们在这个仓库的 sectito onb 中找到 **设置**:

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

我们 **拦截** 使用 Burp Suite 拦截请求：

<figure><img src="/files/6287b0cc9475d4c7fe3701f7334cebd7486b6c33" alt=""><figcaption></figcaption></figure>

服务器返回的 **机密信息** 在其他用户上，如果我们更改了 **id** 用户：

<figure><img src="/files/147e43b906bbc2e33f05766440aae660620254ea" 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/graphql-attack/graphql-idor-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.
