{"id":388,"date":"2026-11-13T16:50:00","date_gmt":"2026-11-13T16:50:00","guid":{"rendered":"https:\/\/backendside.com\/blog\/?p=388"},"modified":"2026-11-21T12:10:54","modified_gmt":"2026-11-21T12:10:54","slug":"detect-brute-force-logons-event-logs","status":"publish","type":"post","link":"https:\/\/backendside.com\/blog\/2026\/11\/13\/detect-brute-force-logons-event-logs\/","title":{"rendered":"Spotting Brute-Force Logons and Suspicious Service Installs in Event Logs"},"content":{"rendered":"<p class=\"lead\">Put a Windows machine on the internet with Remote Desktop or file sharing open and the password guessing starts within hours. Most of it fails. The attempts that succeed tend to be followed by the same move: install something that survives a reboot, very often as a <strong>Windows service<\/strong>. Both halves of that story &mdash; the guessing and the persistence &mdash; leave clear, specific tracks in the event logs. This is how to find them.<\/p>\n<p>You will need administrator rights to read the Security log. If you want a refresher on the event IDs used below, our <a href=\"https:\/\/backendside.com\/blog\/2026\/06\/03\/windows-event-viewer-guide\/\">Windows Event Viewer guide<\/a> covers the basics of finding and filtering events.<\/p>\n<h2>Part 1: Password attacks<\/h2>\n<h3>The events involved<\/h3>\n<ul>\n<li><strong>4625<\/strong> &mdash; a failed logon. The raw material of every password attack.<\/li>\n<li><strong>4624<\/strong> &mdash; a successful logon. The one you are really worried about.<\/li>\n<li><strong>4740<\/strong> &mdash; an account was locked out. Only appears if a lockout threshold is set.<\/li>\n<li><strong>4648<\/strong> &mdash; logon with explicit credentials. Useful once an attacker starts moving between machines.<\/li>\n<\/ul>\n<p>Inside each 4625, three fields do most of the work: <strong>TargetUserName<\/strong> (which account), <strong>IpAddress<\/strong> (from where) and <strong>LogonType<\/strong> (how). The <strong>SubStatus<\/strong> adds why: <code>0xC000006A<\/code> is a wrong password for a real account, <code>0xC0000064<\/code> is an account that does not exist, <code>0xC0000234<\/code> is an account already locked out.<\/p>\n<h3>Brute force versus password spraying<\/h3>\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th>Brute force<\/th>\n<th>Password spraying<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Strategy<\/td>\n<td>Many passwords against one or a few accounts<\/td>\n<td>One or a few common passwords against many accounts<\/td>\n<\/tr>\n<tr>\n<td>Shape in the log<\/td>\n<td>Hundreds of 4625s, same user name, short interval<\/td>\n<td>Few 4625s per user name, but many different names<\/td>\n<\/tr>\n<tr>\n<td>Typical sub status<\/td>\n<td><code>0xC000006A<\/code>, then <code>0xC0000234<\/code> once locked<\/td>\n<td>Mix of <code>0xC000006A<\/code> and <code>0xC0000064<\/code><\/td>\n<\/tr>\n<tr>\n<td>Lockouts (4740)<\/td>\n<td>Likely, if a threshold is set<\/td>\n<td>Rare &mdash; designed to stay under the threshold<\/td>\n<\/tr>\n<tr>\n<td>Pace<\/td>\n<td>Fast and noisy<\/td>\n<td>Often slow, spread over hours or days<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Spraying is the sneakier of the two precisely because no single account looks hammered. You only see it when you count <em>distinct user names per source<\/em>.<\/p>\n<h3>Counting failures by source<\/h3>\n<p>This turns the last 24 hours of 4625s into a ranked list: how many failures each address produced, and how many different accounts it tried.<\/p>\n<pre style=\"background:#1e1d1b;color:#eceae6;padding:1rem 1.15rem;border-radius:8px;overflow-x:auto;font-size:.85rem;line-height:1.5;\"><code>$since = (Get-Date).AddHours(-24)\n\n$fails = Get-WinEvent -FilterHashtable @{ LogName = 'Security'; Id = 4625; StartTime = $since } |\n  ForEach-Object {\n    $d = @{}\n    ([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }\n    [pscustomobject]@{\n        Time      = $_.TimeCreated\n        User      = $d.TargetUserName\n        Source    = $d.IpAddress\n        LogonType = $d.LogonType\n        SubStatus = $d.SubStatus\n    }\n  }\n\n$fails | Group-Object Source | Sort-Object Count -Descending |\n  Select-Object Count,\n    @{ n = 'Source';   e = { $_.Name } },\n    @{ n = 'Accounts'; e = { ($_.Group.User | Sort-Object -Unique).Count } },\n    @{ n = 'First';    e = { ($_.Group.Time | Measure-Object -Minimum).Minimum } },\n    @{ n = 'Last';     e = { ($_.Group.Time | Measure-Object -Maximum).Maximum } }<\/code><\/pre>\n<p>Read the output like this: a high <strong>Count<\/strong> with <strong>Accounts<\/strong> of 1 or 2 is brute force; a moderate count spread across dozens of accounts is spraying. A source of <code>-<\/code> or empty usually means a local logon attempt rather than a network one.<\/p>\n<h3>Mind the logon type<\/h3>\n<p>Failures of <strong>type 3<\/strong> (network) cover SMB file sharing and similar &mdash; and also most failed Remote Desktop attempts, because with Network Level Authentication the password is checked before a desktop session exists. Successful RDP logons appear as <strong>type 10<\/strong>. So &ldquo;thousands of type 3 failures, then one type 10 success from the same address&rdquo; is the classic shape of an RDP brute-force that worked.<\/p>\n<h3>The question that matters: did any of it work?<\/h3>\n<p>Failures are noise you can block. A success from an address that just produced hundreds of failures is an incident. This cross-checks the two:<\/p>\n<pre style=\"background:#1e1d1b;color:#eceae6;padding:1rem 1.15rem;border-radius:8px;overflow-x:auto;font-size:.85rem;line-height:1.5;\"><code># Sources with 20+ failures in the window\n$noisy = $fails | Group-Object Source | Where-Object Count -ge 20 | ForEach-Object Name\n\n# Successful logons from those same sources\nGet-WinEvent -FilterHashtable @{ LogName = 'Security'; Id = 4624; StartTime = $since } |\n  ForEach-Object {\n    $d = @{}\n    ([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }\n    if ($noisy -contains $d.IpAddress) {\n      [pscustomobject]@{ Time = $_.TimeCreated; User = $d.TargetUserName; Source = $d.IpAddress; LogonType = $d.LogonType; LogonId = $d.TargetLogonId }\n    }\n  }<\/code><\/pre>\n<p>Any row that comes back deserves immediate attention: reset that account&rsquo;s password, look at what the session did (follow its Logon ID), and check for the persistence covered in Part 2.<\/p>\n<div style=\"border:1px solid #c5d3f8;background:linear-gradient(135deg,#eef2fd 0%,#ffffff 72%);border-radius:14px;padding:1.5rem 1.65rem;margin:2rem 0;\">\n<div style=\"font-size:.7rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#2d5be3;margin-bottom:.55rem;\">&#128295; BackendSide Tool<\/div>\n<h4 style=\"margin:0 0 .45rem;font-size:1.15rem;color:#1a1916;font-weight:700;\">DeepDig &mdash; Brute Force, Spraying and Lockouts, Detected for You<\/h4>\n<p style=\"margin:0 0 1.05rem;color:#3d3c38;font-size:.92rem;line-height:1.65;\">The scripts in this article work. <strong>DeepDig<\/strong> saves you writing them: its built-in detection rules cover credential access &mdash; <strong>brute force, password spraying and account lockouts<\/strong> &mdash; along with lateral movement including RDP logons. Related alerts are correlated into a single plain-English incident with severity, recommended fixes and a MITRE ATT&amp;CK mapping. Flip on <strong>Live<\/strong> to stream new alerts as they happen. Everything runs locally.<\/p>\n<p>  <a href=\"https:\/\/backendside.com\/deepdig.php\" style=\"display:inline-flex;align-items:center;gap:.4rem;background:#2d5be3;color:#ffffff;font-weight:600;font-size:.85rem;padding:.6rem 1.2rem;border-radius:6px;text-decoration:none;\">Explore DeepDig &rarr;<\/a>\n<\/div>\n<h3>Reducing the noise at the source<\/h3>\n<ul>\n<li><strong>Do not expose RDP directly to the internet.<\/strong> Put it behind a VPN or gateway. This removes most of the problem outright.<\/li>\n<li><strong>Set an account lockout policy.<\/strong> Check the current one with <code>net accounts<\/code>; a threshold makes brute force visible as 4740 and slows it down.<\/li>\n<li><strong>Rename or disable unused accounts<\/strong>, and use long, unique passwords on any that can log on remotely.<\/li>\n<li><strong>Keep Network Level Authentication on<\/strong> for Remote Desktop.<\/li>\n<\/ul>\n<h2>Part 2: Suspicious service installs<\/h2>\n<p>Services start automatically, run without anyone logged on and often run as <em>LocalSystem<\/em> &mdash; exactly what an attacker wants. Remote-execution tools also commonly work by creating a temporary service on the target. Two events record a new service:<\/p>\n<ul>\n<li><strong>7045<\/strong> in the <strong>System<\/strong> log, from the Service Control Manager. Always on. Fields: <code>ServiceName<\/code>, <code>ImagePath<\/code>, <code>ServiceType<\/code>, <code>StartType<\/code>, <code>AccountName<\/code>.<\/li>\n<li><strong>4697<\/strong> in the <strong>Security<\/strong> log. Includes the account that installed the service, but only appears if <em>Audit Security System Extension<\/em> is enabled.<\/li>\n<\/ul>\n<h3>What a suspicious one looks like<\/h3>\n<p>Legitimate services install from <code>C:Program Files<\/code>, <code>C:WindowsSystem32<\/code> or a driver store, with a recognisable name, usually during an install or update you can account for. Red flags:<\/p>\n<table>\n<thead>\n<tr>\n<th>Signal<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Image path in a user-writable folder<\/td>\n<td><code>C:UsersPublic<\/code>, <code>%TEMP%<\/code>, <code>AppData<\/code>, <code>C:ProgramData<\/code><\/td>\n<\/tr>\n<tr>\n<td>A shell as the &ldquo;service&rdquo;<\/td>\n<td>The command interpreter or PowerShell as the image path, often followed by a long encoded command<\/td>\n<\/tr>\n<tr>\n<td>Random or misleading name<\/td>\n<td>Eight random characters, or a near-copy of a real Windows service name<\/td>\n<\/tr>\n<tr>\n<td>Odd timing<\/td>\n<td>Installed minutes after a remote logon, at night, with no software change planned<\/td>\n<\/tr>\n<tr>\n<td>Short-lived<\/td>\n<td>Installed and gone again &mdash; typical of remote-execution tools<\/td>\n<\/tr>\n<tr>\n<td>Next to other bad signs<\/td>\n<td>Defender protection disabled, a new admin account, a cleared log<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Hunting with PowerShell<\/h3>\n<pre style=\"background:#1e1d1b;color:#eceae6;padding:1rem 1.15rem;border-radius:8px;overflow-x:auto;font-size:.85rem;line-height:1.5;\"><code># Every service install recorded in the System log, flagged if the path looks wrong\n$pattern = 'users\\public|\\temp\\|appdata|programdata|cmd|powershell'\n\nGet-WinEvent -FilterHashtable @{ LogName = 'System'; ProviderName = 'Service Control Manager'; Id = 7045 } |\n  ForEach-Object {\n    $d = @{}\n    ([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }\n    [pscustomobject]@{\n        Time    = $_.TimeCreated\n        Name    = $d.ServiceName\n        Path    = $d.ImagePath\n        Start   = $d.StartType\n        Account = $d.AccountName\n        Flag    = if ($d.ImagePath -match $pattern) { 'CHECK' } else { '' }\n    }\n  } | Sort-Object Time -Descending | Format-Table -AutoSize<\/code><\/pre>\n<p>A flag is a prompt to look, not a verdict &mdash; some legitimate software does install from <code>ProgramData<\/code>. For each flagged entry, check whether the file still exists, who signed it, and what happened on the machine in the minutes before it appeared. And compare against what is installed right now:<\/p>\n<pre style=\"background:#1e1d1b;color:#eceae6;padding:1rem 1.15rem;border-radius:8px;overflow-x:auto;font-size:.85rem;line-height:1.5;\"><code>Get-CimInstance Win32_Service |\n  Where-Object { $_.PathName -notmatch 'Windows\\System32|Program Files' } |\n  Select-Object Name, State, StartMode, StartName, PathName<\/code><\/pre>\n<div style=\"border:1px solid #c5d3f8;background:linear-gradient(135deg,#eef2fd 0%,#ffffff 72%);border-radius:14px;padding:1.5rem 1.65rem;margin:2rem 0;\">\n<div style=\"font-size:.7rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#2d5be3;margin-bottom:.55rem;\">&#128295; BackendSide Tool<\/div>\n<h4 style=\"margin:0 0 .45rem;font-size:1.15rem;color:#1a1916;font-weight:700;\">DeepDig &mdash; A Security Audit That Checks the Services Too<\/h4>\n<p style=\"margin:0 0 1.05rem;color:#3d3c38;font-size:.92rem;line-height:1.65;\">Logs show what was installed; the registry shows what is still there. On a local scan <strong>DeepDig<\/strong> runs a read-only <strong>Security audit<\/strong> covering suspicious services, unquoted service paths with real folder-permission checks, startup keys, Startup-folder shortcuts resolved to what they really run, Defender disabling and exclusions, and remote-access tools &mdash; each finding with evidence, remediation and a MITRE ATT&amp;CK mapping. Its detection rules also flag security services disabled and any log cleared.<\/p>\n<p>  <a href=\"https:\/\/backendside.com\/deepdig.php\" style=\"display:inline-flex;align-items:center;gap:.4rem;background:#2d5be3;color:#ffffff;font-weight:600;font-size:.85rem;padding:.6rem 1.2rem;border-radius:6px;text-decoration:none;\">Explore DeepDig &rarr;<\/a>\n<\/div>\n<h2>Putting the two together<\/h2>\n<p>The strongest signal is not either half alone but the sequence: <strong>a burst of 4625s, a 4624 from the same source, then a 7045 within minutes<\/strong>. Add a 4720\/4732 (new admin account) or a 1102 (log cleared) and there is very little room for an innocent explanation. If you find that sequence, treat the machine as compromised: isolate it, export the logs before anything else, and work through the full timeline. For background on what Windows records and why, see <a href=\"https:\/\/backendside.com\/blog\/2026\/06\/24\/theres-a-black-box-in-your-pc-heres-how-to-open-it\/\">There&rsquo;s a Black Box in Your PC<\/a>.<\/p>\n<h2>Key takeaways<\/h2>\n<ul>\n<li>Password attacks live in <strong>4625<\/strong>; the one that matters is the <strong>4624<\/strong> that follows from the same source.<\/li>\n<li><strong>Brute force<\/strong> hammers one account; <strong>spraying<\/strong> touches many accounts lightly &mdash; count distinct user names per source to see it.<\/li>\n<li>Failed RDP under NLA usually shows as <strong>type 3<\/strong>; successful RDP is <strong>type 10<\/strong>.<\/li>\n<li>New services appear as <strong>7045<\/strong> (System, always on) and <strong>4697<\/strong> (Security, needs auditing). User-writable paths, shells and random names are red flags.<\/li>\n<li>Close RDP to the internet, set a lockout policy, and look for the <strong>failures &rarr; success &rarr; service<\/strong> sequence.<\/li>\n<li><strong>DeepDig<\/strong> ships detection rules for brute force, password spraying and lockouts, plus a read-only security audit that checks services &mdash; all explained in plain English.<\/li>\n<\/ul>\n<div style=\"border:1px solid #c5d3f8;background:linear-gradient(135deg,#eef2fd 0%,#ffffff 72%);border-radius:14px;padding:1.5rem 1.65rem;margin:2rem 0;\">\n<div style=\"font-size:.7rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#2d5be3;margin-bottom:.55rem;\">&#128295; BackendSide Tool<\/div>\n<h4 style=\"margin:0 0 .45rem;font-size:1.15rem;color:#1a1916;font-weight:700;\">DeepDig &mdash; Brute Force, Spraying and Lockouts, Detected for You<\/h4>\n<p style=\"margin:0 0 1.05rem;color:#3d3c38;font-size:.92rem;line-height:1.65;\">The scripts in this article work. <strong>DeepDig<\/strong> saves you writing them: its built-in detection rules cover credential access &mdash; <strong>brute force, password spraying and account lockouts<\/strong> &mdash; along with lateral movement including RDP logons. Related alerts are correlated into a single plain-English incident with severity, recommended fixes and a MITRE ATT&amp;CK mapping. Flip on <strong>Live<\/strong> to stream new alerts as they happen. Everything runs locally.<\/p>\n<p>  <a href=\"https:\/\/backendside.com\/deepdig.php\" style=\"display:inline-flex;align-items:center;gap:.4rem;background:#2d5be3;color:#ffffff;font-weight:600;font-size:.85rem;padding:.6rem 1.2rem;border-radius:6px;text-decoration:none;\">Explore DeepDig &rarr;<\/a>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Password guessing and rogue services are two of the most common ways into, and back into, a Windows machine, and both leave clear tracks in the event logs. How to tell brute force from password spraying, catch the success that follows the failures, and spot a malicious service install among the legitimate ones.<\/p>\n","protected":false},"author":1,"featured_media":444,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,8,2],"tags":[82,79,78,77],"class_list":["post-388","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security","category-tutorials","category-windows","tag-brute-force","tag-deepdig","tag-event-logs","tag-forensics"],"_links":{"self":[{"href":"https:\/\/backendside.com\/blog\/wp-json\/wp\/v2\/posts\/388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/backendside.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/backendside.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/backendside.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/backendside.com\/blog\/wp-json\/wp\/v2\/comments?post=388"}],"version-history":[{"count":1,"href":"https:\/\/backendside.com\/blog\/wp-json\/wp\/v2\/posts\/388\/revisions"}],"predecessor-version":[{"id":445,"href":"https:\/\/backendside.com\/blog\/wp-json\/wp\/v2\/posts\/388\/revisions\/445"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/backendside.com\/blog\/wp-json\/wp\/v2\/media\/444"}],"wp:attachment":[{"href":"https:\/\/backendside.com\/blog\/wp-json\/wp\/v2\/media?parent=388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/backendside.com\/blog\/wp-json\/wp\/v2\/categories?post=388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/backendside.com\/blog\/wp-json\/wp\/v2\/tags?post=388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}