Unrestricted file upload – bypassing weak validation
Many applications allow for files to be uploaded for various reasons. Business logic on the server side must include checking for acceptable files; this is known as whitelisting. If such checks are weak or only address one aspect of file attributes (for example, file extensions only), attackers can exploit these weaknesses and upload unexpected file types that may be executable on the server.
Getting ready
Using the DVWA application and Burp, we will exploit a business logic design flaw in the file upload page.
How to do it...
- Ensure the
owaspbwa
VM is running. Select DVWA from the initial landing page of the VM. The landing page will be configured to an IP address specific to your machine. - On the login page, use these credentials—username:
user
; password:user
. - Select the DVWA Security option from the menu on the left. Change the default setting of low to medium and then click Submit: