💷XML External Entity Injection (XXE)

here are different types of XXE attacks such as:

  1. Exploiting XXE to retrieve files

  2. Exploiting XXE to perform SSRF attacks

  3. Exploiting BLIND XXE exfiltrate data out-of-band

  4. Exploiting BLIND XXE to retrieve data via error messages

----------------------------------------------------------------

How to Detect and Exploit Them?

To give an example, a basic HTTP request with XML body and the corresponding HTTP response looks like the following:

basic_HTTP_request_with_XML_body_and_the_corresponding_HTTP_response-1

When the attacker sends the following XML data with the XXE payload included, the XML parser processes external entities which ends up the server returning the contents of the internal file /etc/passwd.

code_attack_example_with_XML_data_with_the_XXE_payload_included__1_

Cheatsheet

Last updated