XML External Entity
Exploit XXE to read files. Entities resolve against a simulated filesystem only.
Mission briefing
SiteMapper ingests XML sitemaps from customers to crawl their sites. Uploads are parsed with external entities enabled for convenience. Find out whether crafted XML can reach files on the server filesystem.
Every task in this room is done. Your rank progress just moved forward.
Objectives
- Exfiltrate /etc/passwd via a reflected XXE
- Confirm the blind parser still expands entities
Task 1 XXE Data Exfiltration Hard 15 pts
Scenario
SiteMapper accepts XML sitemap uploads and expands entities in loc elements. Parsed content is echoed back in a preview panel. Pull contents from a local file through a crafted entity reference.
Your approach
- Review the sample sitemap format on the upload page.
- Build XML with a SYSTEM entity pointing at a local file URI.
- Reference the entity inside a loc tag and upload the document.
- Read the echoed file contents or flag in the preview output.
- Submit the exfiltrated flag value.
Upload a sitemap that defines a SYSTEM entity pointing at a file.
Open lab →Hint
<!ENTITY xxe SYSTEM "file:///etc/passwd"> inside a <loc>
Task 2 Blind XXE Expert 20 pts
Scenario
The blind parser still resolves external entities but shows no file contents. Success is silent—a processed status without data leakage. Confirm entity expansion works even when nothing is reflected.
Your approach
- Reuse the entity technique from the reflected parser lab.
- Upload valid malicious XML to the blind endpoint.
- Watch for a processed response without error messages.
- Note the lab flag issued for successful blind parsing.
- Submit that flag.
The parser expands entities but returns no content.
Open lab →Hint
Same payload style as task 1 — success is 'processed' with no echo.