|
2 | 2 |
|
3 | 3 | > An XML External Entity attack is a type of attack against an application that parses XML input and allows XML entities. XML entities can be used to tell the XML parser to fetch specific content on the server. |
4 | 4 |
|
| 5 | + |
5 | 6 | ## Summary |
6 | 7 |
|
7 | 8 | - [Tools](#tools) |
8 | | -- [Labs](#labs) |
9 | 9 | - [Detect the vulnerability](#detect-the-vulnerability) |
10 | 10 | - [Exploiting XXE to retrieve files](#exploiting-xxe-to-retrieve-files) |
11 | 11 | - [Classic XXE](#classic-xxe) |
|
35 | 35 | - [XXE inside XLSX file](#xxe-inside-xlsx-file) |
36 | 36 | - [XXE inside DTD file](#xxe-inside-dtd-file) |
37 | 37 | - [Windows Local DTD and Side Channel Leak to disclose HTTP response/file contents](#windows-local-dtd-and-side-channel-leak-to-disclose-http-responsefile-contents) |
| 38 | +- [Labs](#labs) |
| 39 | +- [References](#references) |
| 40 | + |
38 | 41 |
|
39 | 42 | ## Tools |
40 | 43 |
|
|
88 | 91 | python ./otori.py --clone --module "G-XXE-Basic" --singleuri "file:///etc/passwd" --module-options "TEMPLATEFILE" "TARGETURL" "BASE64ENCODE" "DOCTYPE" "XMLTAG" --outputbase "./output-generic-solr" --overwrite --noerrorfiles --noemptyfiles --nowhitespacefiles --noemptydirs |
89 | 92 | ``` |
90 | 93 |
|
91 | | -## Labs |
92 | | - |
93 | | -* [PortSwigger Labs for XXE](https://portswigger.net/web-security/all-labs#xml-external-entity-xxe-injection) |
94 | | - * [Exploiting XXE using external entities to retrieve files](https://portswigger.net/web-security/xxe/lab-exploiting-xxe-to-retrieve-files) |
95 | | - * [Exploiting XXE to perform SSRF attacks](https://portswigger.net/web-security/xxe/lab-exploiting-xxe-to-perform-ssrf) |
96 | | - * [Blind XXE with out-of-band interaction](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-out-of-band-interaction) |
97 | | - * [Blind XXE with out-of-band interaction via XML parameter entities](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-out-of-band-interaction-using-parameter-entities) |
98 | | - * [Exploiting blind XXE to exfiltrate data using a malicious external DTD](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-out-of-band-exfiltration) |
99 | | - * [Exploiting blind XXE to retrieve data via error messages](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-data-retrieval-via-error-messages) |
100 | | - * [Exploiting XInclude to retrieve files](https://portswigger.net/web-security/xxe/lab-xinclude-attack) |
101 | | - * [Exploiting XXE via image file upload](https://portswigger.net/web-security/xxe/lab-xxe-via-file-upload) |
102 | | - * [Exploiting XXE to retrieve data by repurposing a local DTD](https://portswigger.net/web-security/xxe/blind/lab-xxe-trigger-error-message-by-repurposing-local-dtd) |
103 | | -* [GoSecure workshop - Advanced XXE Exploitation](https://gosecure.github.io/xxe-workshop) |
104 | | - |
105 | 94 |
|
106 | 95 | ## Detect the vulnerability |
107 | 96 |
|
@@ -730,6 +719,22 @@ From https://gist.github.com/infosec-au/2c60dc493053ead1af42de1ca3bdcc79 |
730 | 719 | ]><xxx>cacat</xxx> |
731 | 720 | ``` |
732 | 721 |
|
| 722 | +## Labs |
| 723 | + |
| 724 | +* [Root Me - XML External Entity](https://www.root-me.org/en/Challenges/Web-Server/XML-External-Entity) |
| 725 | +* [PortSwigger Labs for XXE](https://portswigger.net/web-security/all-labs#xml-external-entity-xxe-injection) |
| 726 | + * [Exploiting XXE using external entities to retrieve files](https://portswigger.net/web-security/xxe/lab-exploiting-xxe-to-retrieve-files) |
| 727 | + * [Exploiting XXE to perform SSRF attacks](https://portswigger.net/web-security/xxe/lab-exploiting-xxe-to-perform-ssrf) |
| 728 | + * [Blind XXE with out-of-band interaction](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-out-of-band-interaction) |
| 729 | + * [Blind XXE with out-of-band interaction via XML parameter entities](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-out-of-band-interaction-using-parameter-entities) |
| 730 | + * [Exploiting blind XXE to exfiltrate data using a malicious external DTD](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-out-of-band-exfiltration) |
| 731 | + * [Exploiting blind XXE to retrieve data via error messages](https://portswigger.net/web-security/xxe/blind/lab-xxe-with-data-retrieval-via-error-messages) |
| 732 | + * [Exploiting XInclude to retrieve files](https://portswigger.net/web-security/xxe/lab-xinclude-attack) |
| 733 | + * [Exploiting XXE via image file upload](https://portswigger.net/web-security/xxe/lab-xxe-via-file-upload) |
| 734 | + * [Exploiting XXE to retrieve data by repurposing a local DTD](https://portswigger.net/web-security/xxe/blind/lab-xxe-trigger-error-message-by-repurposing-local-dtd) |
| 735 | +* [GoSecure workshop - Advanced XXE Exploitation](https://gosecure.github.io/xxe-workshop) |
| 736 | + |
| 737 | + |
733 | 738 | ## References |
734 | 739 |
|
735 | 740 | - [A Deep Dive into XXE Injection - Trenton Gordon - July 22, 2019](https://www.synack.com/blog/a-deep-dive-into-xxe-injection/) |
|
0 commit comments