> 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/information-disclosure/information-disclosure-in-error-messages.md).

# 错误消息中的信息泄露

错误消息中的信息泄露，PortSwigger Web Security Academy 实验笔记，包括利用流程、载荷测试、Burp Suite 验证以及修复上下文。

### 错误消息中的信息泄露

**实验目标**

本实验基于过于冗长的 \*\*错误消息\*\*，它们会泄露有关应用程序的敏感信息。/ 目标是识别并提交服务器使用的易受攻击的第三方框架的版本。

**初步观察**

通过操纵 `productId` 参数并赋予一个不存在的值，例如：

```bash
/product?productId=ufeenu
```

应用程序返回一个 **详细错误页面** 而不是通用消息。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-f8d99af5fda98cea3c0d25600c5746e2e9182359%2Fimage%20(195).png?alt=media" alt=""><figcaption></figcaption></figure>

**泄露的信息**

该错误消息明确说明了应用程序的内部细节，包括所使用的框架及其确切版本。

在这种情况下，错误显示该应用程序使用：

```bash
Apache Struts 2 2.3.31
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/zh/web/information-disclosure/information-disclosure-in-error-messages.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
