SSHole is an authentication bypass in OpenSSH on musl-based Linux, mostly Alpine: on a vulnerable host, a password between 257 and 1,024 bytes long logs you in as an account that has no password at all. It went public on November 5, exploit code appeared on GitHub the same day, and attackers were trying it within hours. The usual vulnerability response struggles here for three reasons: these hosts are often cloud images and appliances nobody thinks of as "Linux servers", Microsoft Defender for Endpoint doesn't support Alpine, and scanners are flagging glibc hosts that aren't exploitable at all.
This post covers what makes a host vulnerable, how to scope your exposure, what exploitation looks like in sshd logs, and the KQL, SPL and auditd rules to hunt for the follow-on activity researchers have seen so far.
How the bypass works
The root cause, as explained in the Alpine advisory and the original Wakefield research, is two reasonable decisions colliding:
- Without PAM, sshd checks a password by running it through
crypt()with the salt from the stored hash and comparing the result. For accounts whose stored field is too short to contain a salt, such as*, sshd borrows the salt from another real account. That behavior dates from a 2016 fix that stopped attackers telling valid and invalid accounts apart by timing. - musl's
crypt()returns the string*when it fails, and it fails for SHA-256 and SHA-512 hashing of keys longer than 256 bytes.
Put them together: a long enough password hashes to *, which matches the stored *, and sshd accepts the login. OpenSSH treats the root cause as outside OpenSSH but added a workaround in sshd, released as OpenSSH 10.6p2 on November 5. The CVE record and GitHub advisory describe the range as 256 to 1,024 characters; the Alpine advisory and lab reproductions say 257, which is what matters if you're testing.
Is your host exposed?
All of these have to be true, per the Alpine advisory:
- The system uses musl libc. glibc distributions (Debian, Ubuntu, RHEL, Fedora) are not exploitable, and neither are Dropbear, the BSDs or macOS.
- sshd runs without PAM: Alpine's
openssh-serverpackage, oropenssh-server-pamwithUsePAM no. PasswordAuthenticationis enabled, which is the OpenSSH default.- At least one account has
*as its password field, and at least one other local account has a$5$or$6$password hash. Accounts locked with!are not affected.
The vulnerable code has been there since OpenSSH 7.3p1 in 2016. Default Alpine is partly protected: root ships with *, but PermitRootLogin prohibit-password blocks password logins as root unless someone changed it. The bigger risk is Alpine's official tiny-cloud images from 3.18.11 to 3.24.3, which ship an alpine user with * and passwordless doas. They're safe on first boot, but as soon as any account on the machine gets a $6$ password, the alpine account is reachable with a long password and is one doas away from root. Wakefield says that on the official AWS and Azure images the flaw leads to root. Images that use cloud-init set PasswordAuthentication no and aren't affected.
Outside Alpine, SecurityWeek lists embedded builds from OpenWrt, Buildroot and Yocto that pair musl with OpenSSH. That's the category to worry about: appliances, edge devices and lab boxes that never made it into your asset inventory.
The Debian security tracker lists OpenSSH in bookworm and trixie as vulnerable with urgency "unimportant", because the fix is in the upstream code. Expect your scanner to flag glibc hosts. They need the update eventually, but they are not exploitable through SSHole. Spend this week on musl hosts.
Scoping: find the musl hosts with password SSH
Your vulnerability scanner's CVE view is the starting point (the vulnerability management post covers triaging KEV entries), but given the noise above, confirm on the host. On Alpine, the questions are which OpenSSH package is installed, whether password authentication is on, and which accounts are exposed:
apk info -v 2>/dev/null | grep -E '^openssh-server' # package and version
sshd -T 2>/dev/null | grep -Ei '^(passwordauthentication|usepam|permitrootlogin) '
awk -F: '$2 == "*" {print "star:", $1}' /etc/shadow # accounts with '*' password field
awk -F: '$2 ~ /^\$[56]\$/ {print "hashed:", $1}' /etc/shadow # accounts with SHA-256/512 hashes
ls -la /etc/doas.d/ /etc/doas.conf 2>/dev/null
A host with passwordauthentication yes, no PAM, at least one "star" account and at least one "hashed" account is exploitable until patched. Run it through your config management or as an SSM / Run Command job rather than by hand. Don't forget container images: Alpine is the most common base image, and while most containers don't run sshd, some (dev environments, bastion and SFTP images) do. Search your image registry's SBOM data for openssh-server on Alpine bases.
What exploitation looks like in the logs
The exploit doesn't produce a strange log line. It produces a normal successful login. On Alpine it goes to /var/log/messages by default:
sshd-session[1234]: Accepted password for alpine from 203.0.113.50 port 56134 ssh2
The Alpine advisory's guidance is to treat any Accepted password for line for an account that has no password (root, alpine, or a key-only service account) as a strong indicator. That's the detection. Two details make it work in practice:
- Process name. Since OpenSSH 9.8, the per-connection process is
sshd-session, notsshd. Rules filtering onsshdalone, including some published for this CVE, will miss current Alpine versions. - The failed-then-accepted pattern. Lab reproductions (one write-up) report that the exploit needs two password attempts on the same connection: the first fails and the second succeeds. That gives a failed and an accepted password line with the same source port. Use it to rank results, not as the only signal, since the reproductions aren't from the vendor and a different exploit could behave differently.
Getting these logs into a SIEM is the first gap to close. Microsoft's Defender for Endpoint on Linux prerequisites don't list Alpine, and distributions that aren't listed aren't supported, so on these hosts you depend on syslog and auditd. Forward syslog to a collector (BusyBox syslogd -R or syslog-ng) that feeds Sentinel's Syslog table or your Splunk inputs.
Detection 1: password logins for accounts that shouldn't have one
let NoPasswordAccounts = dynamic(["root", "alpine"]); // add your key-only service accounts Syslog | where TimeGenerated > ago(14d) | where ProcessName in ("sshd", "sshd-session") | where SyslogMessage has "Accepted password for" | extend User = extract(@"Accepted password for (\S+) from", 1, SyslogMessage), SrcIP = extract(@" from (\S+) port \d+", 1, SyslogMessage) | extend NoPasswordAccount = User in (NoPasswordAccounts) | summarize Logons = count(), Sources = make_set(SrcIP, 20), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by Computer, User, NoPasswordAccount | order by NoPasswordAccount desc, FirstSeen desc
Rows where NoPasswordAccount is true are the alert; keep the list of no-password accounts in a watchlist built from the scoping script above rather than hard-coding it. Everything else is still worth a hunt: on Alpine cloud images, password SSH is unusual enough that any Accepted password line from an internet source deserves a second look. The lookback is 14 days because exploitation started on November 5.
The Splunk equivalent. On Alpine the data usually arrives from /var/log/messages, so check which sourcetype your input assigns:
index=* (sourcetype=linux_secure OR sourcetype=syslog) "Accepted password for" | rex "(?<ssh_proc>sshd(?:-session)?)\[\d+\]: Accepted password for (?<ssh_user>\S+) from (?<src_ip>\S+) port (?<src_port>\d+)" | where isnotnull(ssh_user) | eval no_password_account=if(in(ssh_user, "root", "alpine"), 1, 0) | stats count min(_time) AS first_seen max(_time) AS last_seen values(src_ip) AS sources BY host ssh_user no_password_account | sort - no_password_account, - first_seen | convert ctime(first_seen) ctime(last_seen)
Detection 2: failed then accepted on the same connection
Syslog | where TimeGenerated > ago(14d) | where ProcessName in ("sshd", "sshd-session") | where SyslogMessage has_any ("Failed password for", "Accepted password for") | extend Outcome = iff(SyslogMessage has "Accepted password", "Accepted", "Failed"), User = extract(@"password for (?:invalid user )?(\S+) from", 1, SyslogMessage), SrcIP = extract(@" from (\S+) port \d+", 1, SyslogMessage), SrcPort = extract(@" port (\d+)", 1, SyslogMessage) | summarize Failed = countif(Outcome == "Failed"), Accepted = countif(Outcome == "Accepted"), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by Computer, User, SrcIP, SrcPort | where Failed >= 1 and Accepted >= 1 | extend Seconds = datetime_diff('second', LastSeen, FirstSeen) | order by FirstSeen desc
A person who mistypes a password and gets it right on the second try produces the same shape, so this is a hunt, not an alert. Results with an account from your no-password list, a sub-second Seconds value, or a source you've never seen before rise to the top.
Detection 3: a second sshd on a new port
GreyNoise's honeypot timeline shows one attacker starting a second sshd on port 2222 with TCP forwarding enabled. sshd logs a Server listening on line when it starts, so an unexpected port is easy to spot in the same data:
Syslog | where TimeGenerated > ago(14d) | where ProcessName == "sshd" | where SyslogMessage has "Server listening on" | extend ListenPort = toint(extract(@" port (\d+)", 1, SyslogMessage)) | where ListenPort != 22 | summarize Starts = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by Computer, ListenPort | order by FirstSeen desc
If you run SSH on a non-standard port on purpose, exclude that port per host. Any new port on a host that was just patched or just alerted on detection 1 is a strong signal.
What attackers did after getting in
The public reporting so far (GreyNoise, BleepingComputer, The Hacker News) describes a handful of actors, with watchTowr reporting botnets and cryptominers. GreyNoise's honeypots recorded the clearest sequence, and it's typical of opportunistic Linux intrusions:
| Stage | What was observed | Where to look |
|---|---|---|
| Recon | id, uname -a, /etc/os-release; checks for /.dockerenv, /run/.containerenv and /proc/1/cgroup to see if it's a container | auditd execve logging, if enabled |
| Credential access | Reading /etc/shadow, including through doas -n | auditd watch on /etc/shadow |
| Cloud credentials | Requests to instance metadata endpoints (169.254.169.254, Alibaba's 100.100.100.200, and Azure's) | Cloud-side alerts, egress logs |
| Persistence | SSH keys with comments SSHHOLE-HIT and fleet-access; a server_manager user with a doas rule; a second sshd on 2222; fake tiny-cloud services in /etc/init.d/ | auditd, file integrity checks |
| Implant | "TAC Agent", a Python implant installed as an /etc/init.d/tac-agent service, beaconing to tac.vpnla[.]org on 8443 with user agent TAC-Agent/1.0 | Proxy and DNS logs |
GreyNoise groups some of this under an actor label it calls GT10 and is explicit that its clusters are investigative leads, not attribution. Use the specific indicators for sweeps, but build detections on the behaviors, because the next operator will use different names.
The metadata requests matter beyond the host. If the attacker read instance credentials, they can use them from anywhere. On AWS, GuardDuty raises UnauthorizedAccess: when instance credentials are used from outside AWS; treat that finding on an Alpine instance this month as confirmed compromise. On other clouds, review what the instance identity could access and look for its use from unexpected sources.
Detection 4: auditd on the files attackers touch
BusyBox commands don't log anything themselves, so if you want host-level evidence beyond sshd, auditd is the tool. These rules use the syscall form that the auditctl man page recommends over the older -w watches, and cover the paths from the table above:
-a always,exit -F arch=b64 -F dir=/root/.ssh/ -F perm=wa -k ssh_keys -a always,exit -F arch=b64 -F dir=/home/alpine/.ssh/ -F perm=wa -k ssh_keys -a always,exit -F arch=b64 -F dir=/etc/doas.d/ -F perm=wa -k doas_conf -a always,exit -F arch=b64 -F path=/etc/doas.conf -F perm=wa -k doas_conf -a always,exit -F arch=b64 -F dir=/etc/init.d/ -F perm=wa -k init_scripts -a always,exit -F arch=b64 -F path=/etc/passwd -F perm=wa -k identity -a always,exit -F arch=b64 -F path=/etc/shadow -F perm=rwa -k identity
Rules on paths that don't exist can fail to load, so create /root/.ssh/ and /etc/doas.d/ first and drop the doas.conf line if you don't use one. The read rule on /etc/shadow also fires on routine logins, so count it rather than alerting on it. Then search the keys:
index=* sourcetype=linux_audit type=SYSCALL key IN ("ssh_keys", "doas_conf", "init_scripts", "identity") | eval interactive=if(auid!="4294967295" AND auid!="-1", "ssh/login session", "daemon") | stats count min(_time) AS first_seen values(exe) AS exe values(comm) AS comm values(auid) AS auid values(interactive) AS context BY host key | sort - first_seen | convert ctime(first_seen)
Changes to these paths are rare on a cloud image outside of provisioning, so on Alpine hosts a hit from an interactive session (a set login UID) during the exposure window is worth an alert. Your provisioning tooling will write authorized_keys and /etc/passwd at build time; exclude those by time or by the provisioning user.
Response: patch, restart, then assume the host is burned if you find a hit
- Update and restart. Alpine's fixed packages include 10.3_p1-r2 (3.24), 10.2_p1-r1 (3.23), 10.0_p1-r11 (3.22), 9.9_p2-r1 (3.21) and 9.7_p1-r6 (3.20); the advisory lists older branches too. Upgrading the package doesn't restart the running daemon, so run
rc-service sshd restart. A patched package with an old sshd still running is still vulnerable. - If you can't patch today, set
PasswordAuthentication noand restart sshd. Most cloud images shouldn't accept passwords anyway. - If detection 1 hits on a no-password account, treat the host as compromised. Rebuilding is cleaner than cleaning, especially for a cloud image. Before you destroy it, capture
/var/log/messages,/etc/passwd,/etc/shadow, everyauthorized_keysfile,/etc/doas.d/,/etc/init.d/and/etc/hosts. - Rotate what the host could reach: instance role or managed identity credentials, any secrets in environment files, and SSH keys stored on it. Check whether the same
authorized_keysentries appear on other hosts. - Sweep for the indicators: the key comments, the
server_manageraccount, port 2222 listeners and connections to the TAC Agent domain across all Linux hosts, not just Alpine ones.
Hardening
- Key-only SSH as the default for every image you build. Set
PasswordAuthentication noin the base image and check it in your image pipeline. - Don't expose SSH to the internet. Use a bastion, your cloud provider's session manager or a VPN, and restrict port 22 in security groups to known ranges.
- Inventory musl systems explicitly. Alpine VMs, appliances and embedded devices are the hosts your EDR doesn't cover. Know where they are and make sure their logs reach the SIEM.
- Watch the patch-to-exploit window. Here, exploit code was public the same day as the fix and exploitation attempts followed within hours. Plan for KEV-class bugs to need same-day response on internet-facing systems.
SSHole is narrow: one libc, one configuration, one class of account. That's exactly why it gets missed. The hosts it hits are the ones outside your usual coverage, and the evidence is a normal-looking login. Patch and restart the musl hosts this week, alert on password logins for accounts that have no password, and give those hosts the same log coverage as everything else.
Every issue includes a full detection rule for Sentinel, CrowdStrike or Splunk, with investigation steps, false positive guidance and MITRE mapping. Platforms rotate so you get broad coverage over time.
Join — $14.99/mo See a Sample Issue