Portswigger: Exploiting XXE via image file upload Writeup

Lab link.

This lab lets users attach avatars to comments and uses the Apache Batik library to process avatar image files.

To solve the lab, upload an image that displays the contents of the /etc/hostname file after processing. Then use the “Submit solution” button to submit the value of the server hostname.

In some systems, we need to get ourselves an attack surface. This lab also has a comment section that takes an image file. We can embed XML in the image file or edit the request.

If we upload a png file, this is how the request will look like.

We edit it to XML.

/etc/hostname comes in the image part of the page where the comment is added.

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir