# XXE

![](/files/-Mefjri-31Og8D59K83I)

## Introduction

![](/files/-MefkluXdDr3LVXKjwMz)

## eXtensible Markup Language

![](/files/-Mefl8IDRx3AlzYO8i2B)

![](/files/-MeflLe6VpAu4mlqwDC6)

![](/files/-MefldT__P2iqlbscG1b)

## DTD

![](/files/-MeflzTLUgZn4oLirVwA)

![](/files/-MefmASoUTIXKf1xF0Rl)

## XXE Payload

![](/files/-MefmMGafdFnF-2G4wRX)

## Exploiting

![](/files/-Mefn7oeviRwmz1Mu9zL)

Lets start burp and visit the webpage

![](/files/-MefnUuBCXfXwWI9tJWm)

Now lets try to display our name on the page

![](/files/-MefnkcAjfEWu_TDG2xD)

The payload works, now lets try reading the /etc/passwd file

![](/files/-Mefnth0ctvhvNWga_cZ)

We can read it

![](/files/-Mefo-cbgW7Tto7usfUb)

Now lets try to read the user falcon's id\_rsa file, which is also his private key

![](/files/-MefoBtlJ5FVnNSLHbTe)

We can look at it better in the source code

![](/files/-MefoHZRQ8-_FUbxukRI)

![](/files/-MefoTAoqBgV178hGUOE)


---

# 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://writeups.adityadindi.com/tryhackme/walkthroughs-easy/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.
