Cyber Risks · PortSwigger Research

Lab: Web shell upload via Content-Type restriction bypass

Summary: This PortSwigger lab presents an image upload function that tries to block unexpected file types but relies on checking user-controllable input to do so. The task is to upload a basic PHP web shell and use it to exfiltrate the contents of /home/carlos/secret, logging in with the credentials wiener:peter.

What you should know: The upload control fails because it trusts a value the attacker supplies, so a file that looks like an image to the check still runs as a PHP web shell and reaches /home/carlos/secret.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related