From 5ff1da29ae9409814119dd5c0df83dc5294db09e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Ta=C5=9Fdelen?= Date: Tue, 19 Nov 2019 08:37:16 +0300 Subject: [PATCH] Update README.md --- README.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 36c8f31..97ae473 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,80 @@ In this section, we'll explain what XML external entity injection is, describe some common examples, explain how to find and exploit various kinds of XXE injection, and summarize how to prevent XXE injection attacks. -##### What is XML external entity injection? +#### What is XML external entity injection? XML external entity injection (also known as XXE) is a web security vulnerability that allows an attacker to interfere with an application's processing of XML data. It often allows an attacker to view files on the application server filesystem, and to interact with any backend or external systems that the application itself can access. In some situations, an attacker can escalate an XXE attack to compromise the underlying server or other backend infrastructure, by leveraging the XXE vulnerability to perform server-side request forgery (SSRF) attacks. + +

+ +

+ +There are various types of XXE attacks: + +|XXE Attack Type |Description | +|----------------|-------------------------------| +|Exploiting XXE to Retrieve Files| Where an external entity is defined containing the contents of a file, and returned in the application's response. | +|Exploiting XXE to Perform SSRF Attacks| Where an external entity is defined based on a URL to a back-end system. | +|Exploiting Blind XXE Exfiltrate Data Out-of-Band| Where sensitive data is transmitted from the application server to a system that the attacker controls. | +|Exploiting blind XXE to Retrieve Data Via Error Messages | Where the attacker can trigger a parsing error message containing sensitive data. | + +##### XML External Entity (XXE) Injection Payloads + +###### XXE: Basic XML Example + +``` + + + John + Doe + +``` + +###### XXE: Entity Example + +``` + + ]> + + John + &example; + +``` + +###### XXE: File Disclosure + +``` + + ]> + + John + &ent; + +``` + +###### XXE: Denial-of-service Example + +``` + + + + + + + + + + +&lol9; + ``` + + #### References : + +👉 [XML External Entity (XXE) Processing](https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Processing) + +👉 [XML External Entity Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html) + +👉 [Testing for XML Injection (OTG-INPVAL-008)](https://www.owasp.org/index.php/Testing_for_XML_Injection_(OTG-INPVAL-008))