Skip to main content
SSH (Secure Shell) provides a secure encrypted connection to a remote computer. It is essential for maintaining confidentiality and integrity when accessing remote systems. Default Port: 22

Enumeration

ssh-audit (Configuration Audit)

Nmap Scripts

Public Key Scan

Brute Force

Username Enumeration

Password Brute Force

Private Key Brute Force

Debian Weak PRNG Keys

Some Debian systems have known weak random seed generating predictable keys:

Kerberos / GSSAPI SSO

If the SSH server supports GSSAPI (e.g., Windows OpenSSH on a domain controller):

SSH MitM Attack

Requires being on the local network:
  1. Divert victim’s traffic (ARP spoofing, DNS spoofing)
  2. SSH-MITM acts as proxy, capturing credentials
  3. Forwards commands to real server and relays responses

SFTP Misconfigurations

Command Execution Bypass

Users with non-interactive shells (/usr/bin/nologin) can sometimes execute commands:

SFTP Secure Configuration

SFTP Tunneling

Critical Vulnerabilities

CVE-2024-6387 – regreSSHion

OpenSSH 8.5p1–9.7p1 on 32-bit Linux: unauthenticated RCE via signal-handler race condition in SIGALRM handler. LoginGraceTime must be non-zero.

CVE-2024-3094 – XZ Utils Backdoor

XZ Utils 5.6.0 and 5.6.1 shipped backdoored tarballs that hook RSA_public_decrypt in sshd for pre-auth RCE:

CVE-2025-32433 – Erlang/OTP Pre-Auth RCE

libssh CVE-2018-10933

Server-side libssh 0.6–0.8 accepts SSH_MSG_USERAUTH_SUCCESS from client without authentication.

SSH-Snake (Lateral Movement)

Default Credentials Reference

Config Files