Read the SubStatus in Windows event 4625 before you call it a breach
An overnight alert says 400 failed RDP logons against one server. The number alone tells you almost nothing. The Security log already holds the detail that sorts it. The field to read Every failed logon is ev
An overnight alert says 400 failed RDP logons against one server. The number alone tells you almost nothing. The Security log already holds the detail that sorts it.
The field to read
Every failed logon is event 4625. Inside it, the SubStatus value gives the real reason:
-
0xC0000064: the username does not exist. -
0xC000006A: the username exists, and the password was wrong.
The top-level Status field often shows a generic 0xC000006D. Do not stop there. The specific reason is in SubStatus.
What the pattern says
A single source IP trying dozens of different names, every one returning 0xC0000064, is guessing at who exists. That is enumeration or a spray, and on its own it is a blocked attempt.
Now suppose the same IP starts returning 0xC000006A for one name. A guess landed on a real account. The attacker now knows a valid username and is trying passwords against it.
The last check is the one that makes it an incident: is there a successful logon, event 4624, from that address shortly after? If yes, the failures were the approach and the success is the problem.
A quick way to look
In PowerShell, Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625} pulls the events, and the SubStatus sits in the event's XML data. Group by source address first, then by SubStatus.
A worked example
Suppose the export shows 400 events from one address. Counting by SubStatus gives 396 with 0xC0000064 and 4 with 0xC000006A, all four against the same name, svc-backup. The 396 are a name list being tried. The four are the interesting part: that account exists, and someone now knows it.
Next, filter for event 4624 with that account name and the same source address, and read the logon type and timestamp. A success minutes after the last failure is the finding. No success means the attempt probably failed, but the account still deserves a password check and a lockout policy review, because the attacker learned it is real.
Traps
Repeated failures from one user on one workstation right after a password change are usually a stale saved credential, not an attack. Check the account name against the source before escalating.
Do not treat 4625 as the only source either. If the server sits behind network-level authentication, some failures are logged at that stage, so compare against your firewall or gateway logs when the counts disagree.
Also remember the log tells you what the server saw. If RDP sits behind a gateway, the source address in the event may be the gateway, not the attacker.
Practise it
The free RDP Failed Login Analysis lab on Codelivly works through event 4625 and SubStatus codes with a log you can read. For the surrounding routine, the SOC Analyst Level 1 playbook on Codelivly Resources covers the 6-step triage loop, the Big Five alert playbooks and SIEM mechanics.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.