In previous chapters, we have seen how to avoid some restrictions in file uploads. In this recipe, we will face a more complete, although still insufficient, validation and chain another vulnerability in order to, first, upload a webshell into the server, and second, move it into a directory where we can execute it from.
Bypassing file upload restrictions
How to do it...
For this recipe, we need Mutillidae II in our vulnerable VM to be at security level, use the Toggle Security option in the menu to set it, and use Burp Suite as proxy:
- In Mutillidae II's menu, go to Others | Unrestricted File Upload | File Upload.
- The first test will be to attempt uploading a PHP webshell. You can use the ones we used in previous chapters...