> 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).

# 错误消息中的信息泄露

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

**实验目标**

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

**初步观察**

通过操控 `productId` 参数为一个不存在的值，例如：

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

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

<figure><img src="/files/2d0977b8c63f3948c723f709525eaa6176244251" 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 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/information-disclosure/information-disclosure-in-error-messages.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.
