Global SOC / Blog
DNS Audit

THREAT RESEARCH & LABS · Yogesh · 1 November 2026

133,331 SSH Password Guesses: Detecting Brute Force, Spraying and the First Minutes After a Break-In

Port 22 on my honeypot took 133,331 password guesses from 1,245 IPs. Most sources tried fewer than five times, which is exactly why a simple threshold misses them. Here are the Splunk + CrowdStrike and Sentinel + Defender for Endpoint detections for the guessing, the success, and what an attacker does in the first two minutes.

SSH figures cover 22 October to 16 November. Part of my honeypot detection series. Org A runs Splunk with CrowdStrike Falcon. Its Falcon queries use Event Search field names; on raw FDR data, apply the normalisation macro first. Org B runs Microsoft Sentinel with Defender for Endpoint. The sshd-log KQL on this page ran against the honeypot's real Syslog data, and the counts are what came back. The endpoint queries are written from the commands SSH bots typically run after they get in. No bot got in here, so adapt the field names to your environment.

1. What Hit the Server

I built the honeypot to watch PHP exploits on port 80. Port 22 was open too, and it got more traffic than everything else put together.

MetricValue
Failed password attempts133,331
Source IPs1,245
Distinct usernames3,160
Guesses for root54,400 (41%)
Guesses for claude / openclaw740 / 423
Successful attacker logins0

The usernames tell you what attackers expect to find on a cloud Linux box right now: distro defaults (ubuntu, azureuser, pi), CI/CD accounts (deploy, jenkins, runner), game servers, and now AI-agent accounts. If you've made a claude user on a VM so an agent can SSH in, bots are already guessing its password.

The number that matters most for detection is this one:

Attempts per source IP (whole period)Sources
1–4784
5–19243
20–9974
100–99981
1,000+63

Most of the IPs that tried my server tried fewer than five times, in total, over three and a half weeks. A rule like "alert on 20 failures from one IP" can only ever see the 218 sources that crossed 20 in total, and in practice fewer, because most spread their attempts over days. The 784 quiet ones never trip it. The botnets know where your thresholds are.

One more thing jumped out. 184.185.26[.]51 made 2,926 SSH guesses spread over 137 different hours. The same IP also ran the full RedTail exploit kit against port 80 (see the RedTail post). That's a compromised server doing what compromised servers do: guessing SSH passwords and spraying web exploits to recruit the next one. Brute force isn't a separate threat from the web exploits. It's the same botnets.

2. The Attack, Step by Step

Recon Step 1: Find port 22

Mass scanners such as masscan and zmap sweep the whole IPv4 space for open 22 in minutes (T1595.001). You can't stop being found. The first guesses arrived within hours of the VM getting its public IP.

Credential Access Step 2: Guessing

I saw three distinct styles. Each needs a different detection.

Initial Access Step 3: The one that works

On a server with password logins enabled and a weak password somewhere, one of these eventually succeeds (T1078 Valid Accounts, T1021.004 SSH). Nothing got in here, because the only accounts with passwords had strong ones and root couldn't log in with a password. From this point on I'm describing what SSH bots do on the servers they do get into, which is well documented and very consistent.

Discovery Step 4: "Is this box worth it?"

Within seconds of logging in, the bot fingerprints the machine: uname -a, nproc, cat /proc/cpuinfo, free -m, lscpu, sometimes crontab -l and w (T1082 System Information Discovery). It wants the CPU count and architecture so it knows which miner to drop, and whether a human is logged in.

Persistence Step 5: Lock the door behind them

The classic move is to write the attacker's key into ~/.ssh/authorized_keys, often with chattr +i so you can't easily remove it (T1098.004 SSH Authorized Keys). Some bots also change the password they just guessed (echo "root:newpass" | chpasswd) so competing botnets can't use it (T1098 Account Manipulation).

Actions on Objectives Step 6: Mine, or join the botnet

Then comes a miner (T1496), a DDoS bot, or a brute-forcer that starts the cycle against someone else from your IP. That's what 184.185.26[.]51 was doing to me.

3. Pyramid of Pain

LevelIndicatorWhat I'd do with it
IP addresses1,245 sources; 784 of them sent fewer than 5 guessesBlocklists help with the hammerers and do nothing against the long tail. Fail2ban-style blocking makes your logs quieter, not your server safer.
Network artefactsSSH client banners, the /24 that hosted the 416-username workersA useful pivot for threat intel. It rotates every campaign.
Host artefactsThe usernames list (claude, openclaw, deploy…)Tells you which of your accounts are at risk. Check that none of them exist with a password.
ToolsDistributed wordlist workers; low-and-slow modeDetect the shape: many sources, one username, few attempts each.
TTPsSuccess after failures; post-login fingerprinting; authorized_keys writes; password changesThe rules that matter. A bot can rotate every IP it owns, but after it gets in it still has to fingerprint the box and plant a key.

4. Log Detections (sshd)

Both organisations forward sshd logs. Org B uses the Syslog table through the Azure Monitor Agent. Org A uses the Splunk Add-on for Unix and Linux (sourcetype=linux_secure). Here's the KQL parser I used, which every Org B query below builds on:

let SshAuth = Syslog
| where Facility == "auth" and ProcessName == "sshd"
| extend Outcome = case(SyslogMessage startswith "Failed password", "Failed",
                        SyslogMessage startswith "Accepted", "Accepted", "")
| where isnotempty(Outcome)
| extend SrcIp = extract(@"from (\d+\.\d+\.\d+\.\d+)", 1, SyslogMessage),
         User = extract(@"for (?:invalid user )?(\S+) from", 1, SyslogMessage),
         InvalidUser = SyslogMessage has "invalid user",
         Method = extract(@"^Accepted (\S+)", 1, SyslogMessage);

Org A The equivalent field extraction:

index=linux sourcetype=linux_secure process=sshd ("Failed password" OR "Accepted")
| rex "(?<outcome>Failed|Accepted) (?<method>\S+) for (?:invalid user )?(?<user>\S+) from (?<src>\d+\.\d+\.\d+\.\d+)"
| eval invalid_user=if(searchmatch("invalid user"),1,0)

L1. Volume per source (catches the hammerers)

Org B Tested: fired for 170 sources across 749 source-hours. The busiest source made 889 attempts in one hour.

SshAuth
| where Outcome == "Failed"
| summarize Attempts = count(), Users = dcount(User), InvalidPct = round(100.0 * countif(InvalidUser) / count(), 0)
          by SrcIp, Hour = bin(TimeGenerated, 1h)
| where Attempts >= 20

Org A

index=linux sourcetype=linux_secure process=sshd "Failed password"
| rex "for (?:invalid user )?(?<user>\S+) from (?<src>\d+\.\d+\.\d+\.\d+)"
| bin _time span=1h
| stats count as attempts dc(user) as users by _time src host
| where attempts >= 20

Everyone has this rule, and it's fine, but treat it as informational. On an internet-facing host it fires all day and changes nothing. Its real job is to feed L3.

L2. Distributed guessing: many sources, one username, each quiet (T1110.001)

Org B Tested: 22 hours where 10 or more sources each tried the same username fewer than 20 times. The usernames were root, ubuntu and admin.

SshAuth
| where Outcome == "Failed"
| summarize Attempts = count() by SrcIp, User, Hour = bin(TimeGenerated, 1h)
| summarize Sources = dcount(SrcIp), Attempts = sum(Attempts), MaxPerSource = max(Attempts),
            SampleSources = make_set(SrcIp, 20) by User, Hour
| where Sources >= 10 and MaxPerSource < 20

Org A

index=linux sourcetype=linux_secure process=sshd "Failed password"
| rex "for (?:invalid user )?(?<user>\S+) from (?<src>\d+\.\d+\.\d+\.\d+)"
| bin _time span=1h
| stats count as attempts by _time user src
| stats dc(src) as sources sum(attempts) as attempts max(attempts) as max_per_source values(src) as sample_sources by _time user
| where sources >= 10 AND max_per_source < 20

This is the rule that sees the long tail L1 misses. Flip the logic: instead of "which IP is noisy?", ask "which username is being tried from everywhere at once?" If that username exists on your server with a password, it's the one at risk. Medium severity, raised to high if the username is a real account.

L3. Success after failures (the alert that matters)

Org B Tested: 0 results, correctly. The only successful logins were my own, with a key, from an IP that never failed. It only counts failures from the same source against the same server in the hour before each success, so a success followed by unrelated failures doesn't fire.

let Lookback = 1h;
let Failures = SshAuth | where Outcome == "Failed" | project FailTime = TimeGenerated, SrcIp, Computer;
SshAuth
| where Outcome == "Accepted"
| project SuccessTime = TimeGenerated, SrcIp, Computer, User, Method
| join kind=inner Failures on SrcIp, Computer
| where FailTime between ((SuccessTime - Lookback) .. SuccessTime)
| summarize FailuresBefore = count(), FirstFailure = min(FailTime) by SuccessTime, Computer, SrcIp, User, Method
| where FailuresBefore >= 5

Org A

index=linux sourcetype=linux_secure process=sshd ("Failed password" OR "Accepted")
| rex "(?<outcome>Failed|Accepted) (?<method>\S+) for (?:invalid user )?(?<user>\S+) from (?<src>\d+\.\d+\.\d+\.\d+)"
| sort 0 _time
| streamstats time_window=1h count(eval(outcome="Failed")) as failures_last_hour by host src
| where outcome="Accepted" AND failures_last_hour >= 5
| table _time host src user method failures_last_hour

High severity, page someone. The one false positive you'll see is a human who mistyped their password a few times. That's easy to confirm with a phone call, and worth the call.

Both EDRs also record logons on Linux, which gives you the same rule without relying on syslog forwarding:

Org B

let Lookback = 1h;
let Failures = DeviceLogonEvents
| where Timestamp > ago(7d) and ActionType == "LogonFailed" and RemoteIPType == "Public"
| project FailTime = Timestamp, DeviceId, RemoteIP;
DeviceLogonEvents
| where Timestamp > ago(7d) and ActionType == "LogonSuccess" and RemoteIPType == "Public"
| project SuccessTime = Timestamp, DeviceId, DeviceName, RemoteIP, AccountName
| join kind=inner Failures on DeviceId, RemoteIP
| where FailTime between ((SuccessTime - Lookback) .. SuccessTime)
| summarize FailuresBefore = count() by SuccessTime, DeviceName, RemoteIP, AccountName
| where FailuresBefore >= 10

Org A

index=crowdstrike event_platform=Lin event_simpleName IN (UserLogon, UserLogonFailed2) RemoteAddressIP4=*
| where NOT cidrmatch("10.0.0.0/8", RemoteAddressIP4) AND NOT cidrmatch("172.16.0.0/12", RemoteAddressIP4)
    AND NOT cidrmatch("192.168.0.0/16", RemoteAddressIP4)
| sort 0 _time
| streamstats time_window=1h count(eval(event_simpleName="UserLogonFailed2")) as failures_last_hour by aid RemoteAddressIP4
| where event_simpleName="UserLogon" AND failures_last_hour >= 10
| table _time ComputerName RemoteAddressIP4 UserName failures_last_hour

5. Endpoint Detections (after the login)

If L3 is your tripwire, these are your proof. Each one targets something a bot has to do after it gets in, whatever IP or username it used.

E1. Post-login fingerprinting burst (T1082)

Org A

index=crowdstrike event_platform=Lin event_simpleName=ProcessRollup2
    (GrandParentBaseFileName="sshd" OR ParentBaseFileName="sshd")
    (FileName IN ("uname","nproc","lscpu","free","w","crontab","lspci","dmidecode")
     OR CommandLine="*/proc/cpuinfo*" OR CommandLine="*/proc/meminfo*")
| bin _time span=2m
| stats dc(FileName) as distinct_tools values(CommandLine) as commands by _time aid ComputerName UserName
| where distinct_tools >= 3

Org B

DeviceProcessEvents
| where Timestamp > ago(7d)
| where InitiatingProcessParentFileName == "sshd" or InitiatingProcessFileName == "sshd"
| where FileName in~ ("uname","nproc","lscpu","free","w","crontab","lspci","dmidecode")
     or ProcessCommandLine has_any ("/proc/cpuinfo", "/proc/meminfo")
| summarize DistinctTools = dcount(FileName), Commands = make_set(ProcessCommandLine, 20)
          by DeviceName, AccountName, bin(Timestamp, 2m)
| where DistinctTools >= 3

Three or more of these tools within two minutes of an SSH session starting is a bot. Humans log in and do one thing. Some config-management tools (Ansible fact gathering) do this too, so allowlist your automation accounts and source IPs. Medium severity on its own, high if it follows an L3 hit.

E2. authorized_keys written (T1098.004)

Org A

index=crowdstrike event_platform=Lin event_simpleName=ProcessRollup2
    CommandLine="*authorized_keys*"
    (CommandLine="*>>*" OR CommandLine="*echo *" OR FileName IN ("tee","cp","mv","chattr","sed"))
| table _time ComputerName UserName ParentBaseFileName FileName CommandLine

Org B

DeviceFileEvents
| where Timestamp > ago(7d)
| where FileName == "authorized_keys" and ActionType in ("FileCreated", "FileModified")
| where InitiatingProcessFileName !in~ ("ssh-copy-id", "cloud-init", "waagent", "google_guest_agent")
| project Timestamp, DeviceName, FolderPath, InitiatingProcessAccountName,
          InitiatingProcessFileName, InitiatingProcessCommandLine

On a well-run server, keys arrive through your provisioning tool, not through a shell. Any other write is worth a look. High severity if it's root's file or happens inside a session that started after failures.

E3. Password changed or keys made immutable (T1098)

Org A

index=crowdstrike event_platform=Lin event_simpleName=ProcessRollup2
    (FileName IN ("chpasswd","passwd","usermod") OR CommandLine="*chattr*authorized_keys*")
    (GrandParentBaseFileName="sshd" OR ParentBaseFileName IN ("sh","bash","dash"))
| table _time ComputerName UserName ParentBaseFileName FileName CommandLine

Org B

DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName in~ ("chpasswd", "passwd", "usermod")
     or (FileName == "chattr" and ProcessCommandLine has "authorized_keys")
| where InitiatingProcessParentFileName == "sshd" or InitiatingProcessFileName in~ ("sh", "bash", "dash")
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, FileName, ProcessCommandLine

chattr +i on authorized_keys has almost no legitimate use. chpasswd fed from a pipe in an interactive session isn't normal admin behaviour either. High severity.

6. When It Fires

  1. L1 or L2 only: confirm password authentication is off, or that the targeted usernames don't exist. If both are true, close it. If password auth is on, that's your finding. Fix it today.
  2. L3 fired: treat it as compromised until proven otherwise. Org A Network-contain the host in Falcon. Org B Isolate the device in Defender. Then lock the account and kill its sessions.
  3. Check E1 to E3 for that host and time. If any of them fired, the bot did its post-login routine. Pull authorized_keys for every user, check crontab -l and systemd units, and look for new hidden binaries. Falcon RTR or a Defender live response session lets you do this without logging in over SSH.
  4. Scope sideways. Search for the same source IP and the same username across every server. Bots that get one box usually try the same credential everywhere.
  5. Rebuild from a known image, and rotate any credentials or keys that were on the box.

7. Hardening

8. IOCs

These are low value, as section 3 explains. They're here mainly for threat-intel correlation.

TypeValue
Wordlist worker networks109.160.32[.]0/24 (42 workers) and 77.239.124[.]0/24 (6 workers), all on the same 416-username list. The second network also hosted a busybox dropper payload seen on port 80.
Brute force + RedTail184.185.26[.]51 (2,926 SSH guesses over 137 hours, plus the RedTail web kit)