Download to Windows¶
Quiet Methods¶
Enterprise Distribution (SCCM/Intune/EDR-brokered)¶
- Use sanctioned software delivery where available; best for scale and auditability.
WinRM - Remote Execution Tools¶
$session = New-PSSession -ComputerName <host> -Authentication Kerberos
Copy-Item '<local_path>' -Destination 'C:\Path\' -ToSession $session
Remove-PSSession $session
SMB¶
Start SMB Share (Linux)¶
impacket-smbserver¶
impacket-smbserver <share_name> <directory_of_share> -smb2support -user <share_user> -password <share_password>
Samba¶
Samba configuration file: /etc/samba/smb.conf
[share]
comment = My Share
browseable = yes
path = /srv/SMB
read only = no
guest ok = yes
writable = yes
create mask = 0777
Give SMB permissions to the share directory.
Start sambaConnect to SMB Share (Windows)¶
PowerShell¶
$pass = ConvertTo-SecureString '<password>' -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential('<domain>\<username>', $pass)
New-PSDrive -Name X -PSProvider FileSystem -Root \\<ip>\<share_name> -Credential $cred
Copy-Item '<local_path>' X:\
Remove-PSDrive -Name X
CMD¶
net use X: \\<ip_address>\<share_name> /user:<domain>\<username> <password>
copy "<local_path>" X:\
net use X: /delete /y
Internal HTTPS Staging (approved host)¶
SSH¶
Noisy Methods - Lab/CTF Use¶
Download files¶
powershell -Command "Add-Type -AssemblyName System.Net.Http;$u='http://example.com/file';$p='<output_location>';$c=New-Object System.Net.Http.HttpClient;[IO.File]::WriteAllBytes($p,$c.GetByteArrayAsync($u).Result);$c.Dispose()"