handbook/tools/3.Web-Hacking/4.Injection/XXE/Commands/Commands.md
2024-08-31 01:07:22 +02:00

986 B

Top Injection

Detect the vulnerability

Basic entity test, when the XML parser parses the external entities the result should contain "John" in firstName and "Doe" in lastName. Entities are defined inside the DOCTYPE element.

<!--?xml version="1.0" ?-->
<!DOCTYPE replace [<!ENTITY example "Doe"> ]>
 <userInfo>
  <firstName>John</firstName>
  <lastName>&example;</lastName>
 </userInfo>

Types of XXE Attacks: