SSH Agent Socket Discovery
Identifies active SSH agent sockets on compromised hosts to hijack authentication credentials and pivot laterally using delegated key access.
HackIndex.io
Language
SSH:
SSH keys, agents, configs, and backdoor auditing guides
Identifies active SSH agent sockets on compromised hosts to hijack authentication credentials and pivot laterally using delegated key access.
Audits SSH authorized_keys for ForcedCommand directives and wrapper scripts that may enable persistence, privilege escalation, or command execution bypass.
Enumerate SSH client configs and known_hosts files to map trusted relationships, pivot targets, and credential reuse opportunities across the network.
Locate SSH private keys on compromised hosts, extract them, and crack passphrases offline using John the Ripper or Hashcat to enable lateral movement.
SSH post-exploitation harvests credentials and configuration data that enable further movement through the environment. The known_hosts file maps out which hosts the compromised user connects to, giving you a network graph of SSH relationships. If known_hosts is not hashed, you get plaintext hostnames and IPs. Even hashed entries can be cracked against known host lists.
SSH agent socket theft targets users with active agent forwarding. Enumerate /tmp/ssh-*/agent.* sockets and use SSH_AUTH_SOCK to hijack them. Private key collection from ~/.ssh/ directories, backup files, and configuration management caches (Ansible, Puppet, Chef) yields keys that often work across multiple hosts.
Analyze ~/.ssh/config files for ProxyJump definitions, custom ports, and username mappings that reveal infrastructure you have not scanned yet. SSH command history (in bash_history, grep for ssh/scp/sftp) shows connection patterns and sometimes includes passwords passed inline. Every credential and connection detail from this phase feeds directly into lateral movement.
We use cookies to improve your browsing experience, analyze site traffic, and personalize content. By clicking "Accept All", you consent to our use of cookies. Privacy Policy.