Abuse File Upload
Last updated
Was this helpful?
Last updated
Was this helpful?
File upload functionality is a common feature in web applications, allowing users to submit images, documents, or other files. However, improper handling of file uploads can lead to severe security risks, including remote code execution (RCE), privilege escalation, and data exfiltration.
Here we find an example scenario where this can be exploited:
Imagine we find an application that allows users to upload files of a type but it does not validate the file type, for example, a field for submitting an image
We should submit a file for an image extension such as jpg, or png, among others. But as is not validating input we could try to submit an arbitrary file with a script for a Reverse Shell
Then we set up a listener to catch the connection
Then we hit the web calling the file, and with this, we should catch the shell in our listener
In case it's filtering the uploaded files by a string comparison of the extension or name, we could try to change them arbitrarily to match the requested