# XXE

### 5/

Adding the DOCTYPE , a new ENTITY pointing to the filesystem root:

![](/files/yzJe5h0deDiZI7dw4nSy)

### 7/

Modify request with Burpsuite, you can see the data is in json type.

The response is: "You are posting JSON which does not work with a XXE"

![](/files/skZqKw1AUn6KTWQ3DhWq)

First, you must change Content-Type from application/json to application/xml. Next, do similarly with past challenge:

![](/files/STreUC5UIhTMf8KOTm3A)

### 11/ Blind XXE assignment

File to upload to webgoft:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<!ENTITY secret SYSTEM 'file:///home/webgoat/.webgoat-8.2.2//XXE/secret.txt'>
```

Modify Post request (post command with burpsuite) and edit to:

![](/files/IzBhBmU3l0fKoJTIqsmn)

Reload page and submit value you receive:

![](/files/GtT9HwPJEojgICXFcqbE)


---

# 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://dyn20.gitbook.io/writeup-ctf/webgoat/xxe.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.
