<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Beyond the Logs]]></title><description><![CDATA[Beyond the Logs]]></description><link>https://beyondthelogs.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Dec 2026 19:36:10 GMT</lastBuildDate><atom:link href="https://beyondthelogs.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Real SOC Stories #2: The "Malicious" IP That Turned Out to Be Windows Update]]></title><description><![CDATA[Our threat hunting team flagged an IP backed by a sandbox report full of "malicious" signatures. Thousands of campus machines were talking to it every day…]]></description><link>https://beyondthelogs.hashnode.dev/real-soc-stories-2-the-malicious-ip-that-turned-out-to-be-windows-update</link><guid isPermaLink="true">https://beyondthelogs.hashnode.dev/real-soc-stories-2-the-malicious-ip-that-turned-out-to-be-windows-update</guid><dc:creator><![CDATA[Sanket Taware]]></dc:creator><pubDate>Fri, 27 Nov 2026 13:05:24 GMT</pubDate><content:encoded><![CDATA[<p><em>Our threat hunting team flagged an IP backed by a sandbox report full of "malicious" signatures. Thousands of campus machines were talking to it every day. It had every sign of a true positive. It was Microsoft. This is how we proved it, and what every beginner investigator should take from it.</em></p>
<hr />
<p>In the <a href="https://beyondthelogs.hashnode.dev/real-soc-stories-1-the-student-laptop-that-was-talking-to-a-c2-server">first story</a>, one alert led us to a real infection. This one goes the other way: a <strong>false positive that looked almost exactly like a true positive</strong>. Honestly, I learned more from it.</p>
<p>As before, internal names, addresses and anything sensitive stay out. The IPs in this story are different: they're <strong>public Microsoft cache servers</strong>, so I've kept them in for full context. If you ever run into <strong><code>14.102.231.207</code></strong> in your own logs, this post is for you.</p>
<hr />
<h2>It started with an IOC and a sandbox report</h2>
<p>One morning our threat hunting team handed me an IP address: <strong><code>14.102.231.207</code></strong>. It came with a report from <strong>ANY.RUN</strong>, a popular online malware sandbox. The report was a few months old, and it did not look good:</p>
<ul>
<li>Verdict: <strong>"Malicious activity"</strong></li>
<li>Tag: <strong>loader</strong> (malware whose job is to download and run the next stage)</li>
<li>In the key findings: <strong>70 malicious signatures</strong></li>
</ul>
<p>The request was simple: confirm it's malicious, find the affected users, tell us how critical it is, and if our detection missed it, tell us why and what rule we need.</p>
<p>So I went to our SIEM.</p>
<hr />
<h2>How close this came to being a "true positive"</h2>
<p>Look at what we had at the start, through a beginner's eyes:</p>
<table>
<thead>
<tr>
<th>What we saw</th>
<th>How it reads at first</th>
</tr>
</thead>
<tbody><tr>
<td>A public sandbox report: "Malicious activity", tag "loader"</td>
<td>Known malware infrastructure</td>
</tr>
<tr>
<td>70 malicious signatures</td>
<td>Lots of bad behaviour</td>
</tr>
<tr>
<td>One threat-intel engine on VirusTotal flagging the IP</td>
<td>Independent confirmation</td>
</tr>
<tr>
<td>The IP belongs to a small hosting company in Singapore (AS215724, Edgevana / Colocation America), nothing to do with Microsoft</td>
<td>Attacker-rented server</td>
</tr>
<tr>
<td>Machines downloading <strong><code>.exe</code> files over plain HTTP from a bare IP address</strong></td>
<td>Textbook malware delivery</td>
</tr>
<tr>
<td><strong>More than 2,000 campus machines</strong> talking to it every day</td>
<td>A campus-wide outbreak</td>
</tr>
</tbody></table>
<p>Every row points the same way. Had we taken it at face value, the next steps would have been obvious:</p>
<ul>
<li>Raise a major incident.</li>
<li>Block the IP at the firewall.</li>
<li>Push it into our threat-intel feed.</li>
<li>Start notifying thousands of users.</li>
</ul>
<p>And we would have <strong>broken Windows Defender and security updates for the whole campus</strong>, in the name of security.</p>
<p>Every row in that table turned out to have a boring, legitimate explanation. The rest of this post is how we found them.</p>
<hr />
<h2>First clue: everyone was talking to it</h2>
<p>I searched the last five days of logs for the IP. It showed up only in the <strong>web proxy logs</strong>, but the numbers were wild:</p>
<ul>
<li><strong>More than 100,000 requests a day</strong></li>
<li>From <strong>more than 2,000 different machines</strong> a day</li>
<li>Tens of gigabytes downloaded every day</li>
</ul>
<p>A real command-and-control (C2) server usually looks like a handful of infected machines checking in at regular intervals with small requests. It doesn't look like half the campus downloading gigabytes.</p>
<p>So before counting victims, I looked at <strong>what</strong> they were downloading.</p>
<hr />
<h2>Second clue: what they were downloading</h2>
<p>Grouping the URLs by path, almost everything fell into a few buckets:</p>
<table>
<thead>
<tr>
<th>URL path</th>
<th>What it is</th>
</tr>
</thead>
<tbody><tr>
<td><code>/filestreamingservice/files/&lt;id&gt;</code></td>
<td>Windows Update / Delivery Optimization content</td>
</tr>
<tr>
<td><code>/c/msdownload/update/software/defu/...</code></td>
<td><strong>Microsoft Defender</strong> definition updates</td>
</tr>
<tr>
<td><code>/d/msdownload/update/software/uprl/...kb890830...</code></td>
<td>Microsoft's Malicious Software Removal Tool</td>
</tr>
<tr>
<td><code>/pr/&lt;id&gt;/Office/Data/...</code></td>
<td>Microsoft Office updates</td>
</tr>
<tr>
<td><code>/edgedl/...chrome_component/...</code></td>
<td>Chrome component updates</td>
</tr>
</tbody></table>
<p>So the "malicious" IP was serving <strong>Windows Defender and Office updates</strong>. But a path is just a string, and malware can copy a path. That left four questions to answer properly.</p>
<hr />
<h2>Question 1: Why does this IP have nothing to do with Microsoft?</h2>
<p>This was the hunt team's strongest point, and the most important lesson in the case.</p>
<p><strong>Whois, BGP and geo-IP databases tell you who holds an address block. They don't tell you whose content is served from it.</strong></p>
<p>Microsoft runs a programme called <strong>Microsoft Connected Cache</strong>:</p>
<ul>
<li>Internet providers and data-centre / transit companies host cache servers <strong>on their own hardware and their own IP addresses</strong>.</li>
<li>Those servers keep copies of Windows, Defender and Office updates close to the users who need them.</li>
<li>Microsoft says it <strong>does not publish the IPs</strong> of these partner-run caches.</li>
</ul>
<p>So:</p>
<ul>
<li><strong>Whois correctly showed the hosting company:</strong> <code>14.102.231.0/24</code>, AS215724 (Edgevana / Colocation America), Singapore. Censys showed SSH, an nginx web server on port 80, a .NET web server on port 5000, and no HTTPS at all. The geo-IP service even labelled its usage type "Data Center/Transit", which is exactly the kind of operator Microsoft's documentation describes for these caches.</li>
<li><strong>No public source could say "this is a Microsoft cache".</strong></li>
<li><strong>Passive DNS had no names for it</strong>, because no DNS name points at it (more on that next).</li>
</ul>
<p>The same model exists elsewhere: <strong>Netflix Open Connect</strong> boxes and <strong>Google Global Cache</strong> sit inside ISP networks, on the ISP's IP addresses, serving Netflix's and Google's content.</p>
<p><strong>Beginner lesson:</strong> "the IP doesn't belong to Microsoft" and "the content isn't Microsoft's" are two different claims. The first one is easy to check. The second one is the one that matters.</p>
<hr />
<h2>Question 2: Why a raw IP instead of a proper Microsoft domain?</h2>
<p>Windows' download service is called <strong>Delivery Optimization</strong>. When it needs to download an update, this is what happens:</p>
<ol>
<li>Windows talks to Microsoft's cloud over <strong>HTTPS</strong> and gets the update's details, including its hashes.</li>
<li>Windows asks Microsoft's Delivery Optimization service: <em>"where should I download from?"</em> Microsoft looks at the machine's public IP and may answer: <em>"use this cache server"</em>. The answer is an <strong>IP address</strong>.</li>
<li>Windows rewrites the download URL to point at that IP. It keeps the original Microsoft hostname in a parameter:<pre><code>http://14.102.231.207/c/msdownload/update/software/defu/2026/11/am_delta_patch_1.463.471.0_e8eaaebdf412dd12a7c0c85c47d443dfecb74425.exe?cacheHostOrigin=au.download.windowsupdate.com
</code></pre>
</li>
<li>The cache serves the file. If it holds no copy yet, it fetches one from Microsoft first.</li>
</ol>
<p>Why an IP and not a nice <code>microsoft.com</code> name?</p>
<ul>
<li><strong>The server isn't Microsoft's.</strong> A partner's box doesn't get a <code>microsoft.com</code> name or certificate.</li>
<li><strong>No name is needed.</strong> Microsoft's service hands the address to Windows directly, so there's no DNS lookup at all. That's also why passive DNS showed nothing.</li>
<li><strong>Companies do the same internally.</strong> Microsoft's own setting for pointing Windows at a cache server (<code>DOCacheHost</code>) accepts <strong>plain IP addresses</strong> as well as hostnames.</li>
</ul>
<p><strong>Beginner lesson:</strong> "a raw IP in a URL" is suspicious in a web browser. It's normal for software-to-software traffic, where a program gets the address from a service it already trusts.</p>
<hr />
<h2>Question 3: Why plain HTTP and not HTTPS?</h2>
<p>This surprised me most. <strong>Windows Update has always delivered the actual files over plain HTTP.</strong> It's by design:</p>
<ul>
<li><strong>The security is in the files, not the connection.</strong> Every update is <strong>digitally signed by Microsoft</strong>. Windows checks hashes and signatures before using anything. A file altered on the way fails the check and is thrown away.</li>
<li><strong>The important part does use HTTPS.</strong> The list of files and their expected hashes comes from Microsoft over HTTPS. Only the bulk content travels over HTTP.</li>
<li><strong>HTTP is what makes caching possible.</strong> Encrypted traffic can't be stored and reused by anything in the middle. Over HTTP, the same signed file can be served by ISP caches, company proxies (including our own) and Connected Cache servers.</li>
<li><strong>Microsoft's own firewall guidance lists HTTP (port 80) download hosts</strong> for Windows Update and Delivery Optimization.</li>
</ul>
<p>Security people have criticised this design, and some Microsoft downloads have moved to HTTPS. But for Windows Update and Defender delivery, plain HTTP is still normal.</p>
<p><strong>Beginner lesson:</strong> "unencrypted" doesn't mean "untrusted". Ask where the trust actually comes from. Here it comes from signatures and hashes, not from TLS.</p>
<hr />
<h2>Question 4: Why did ANY.RUN call it malicious back in April?</h2>
<p>The sandbox report was months old. This part taught me to read sandbox reports far more carefully.</p>
<h3>What was actually analysed</h3>
<p>The report showed that someone had <strong>pasted the update link itself</strong> into the sandbox:</p>
<pre><code>http://14.102.231.207/c/msdownload/update/software/defu/2026/04/am_delta_patch_1.449.340.0_98d79ddbb07a08f50aadc0fd669d4f0ff84889e4.exe?cacheHostOrigin=au.download.windowsupdate.com
</code></pre>
<p>Microsoft had published that Defender definition update the day before. The sandbox's Chrome downloaded it, and the file was then run, many times over.</p>
<p>My best guess at how it got there: someone, somewhere, saw their firewall or proxy flag "an <code>.exe</code> over HTTP from a raw IP", got suspicious, and sandboxed it. Exactly what we nearly did.</p>
<h3>Is it the real file?</h3>
<p>Microsoft puts each update file's <strong>SHA-1 hash in the file name</strong>, so I could check it directly:</p>
<ul>
<li>The hash in the name matched the file on VirusTotal.</li>
<li>The file has a <strong>valid Microsoft code signature</strong> (Microsoft Corporation, timestamped by Microsoft).</li>
<li><strong>0 of 70 antivirus engines</strong> flagged it.</li>
<li>The size matched exactly what the sandbox downloaded.</li>
</ul>
<p>You can copy a file <em>name</em>. You can't fake a Microsoft signature, or a file whose SHA-1 matches the one Microsoft put in the name.</p>
<h3>Then why "loader" and 70 malicious signatures?</h3>
<p><strong>The "loader" tag</strong> came from the shape of the event: a browser downloads an executable over HTTP from a bare IP, and the executable runs. That's what a malware loader does too. Intrusion-detection rule sets have rules for exactly this, such as "executable download from a dotted-quad host", and they rate them as informational.</p>
<p><strong>The 70 signatures:</strong> VirusTotal's own sandboxes had also run this file, so I could see what it does:</p>
<pre><code>AM_Delta_Patch_....exe
 └─ starts a second copy of itself
     └─ C:\Windows\System32\MpSigStub.exe /stub ... /payload ... /MpWUStub
</code></pre>
<p><code>MpSigStub.exe</code> is Windows' own <strong>Defender update tool</strong>. The behaviour rules that fired were things like:</p>
<ul>
<li>acquiring debug privileges</li>
<li>listing and handling running processes</li>
<li>anti-debugging tricks</li>
<li>referencing the names of analysis tools</li>
</ul>
<p><strong>Security software behaves like malware by design.</strong> An antivirus updater needs high privileges, deals with protected processes and resists tampering. Behaviour rules see <em>what</em> a program does, not <em>who signed it</em>. Even VirusTotal's two sandboxes disagreed on this exact file: one called it clean with 99% confidence, the other called it malicious.</p>
<p>And <strong>70</strong> isn't 70 different evil behaviours. The sandbox counts rule hits <strong>per process</strong>, and the file had been started dozens of times in that session. A few rules × many starts ≈ 70.</p>
<p>Inside a sandbox the update also <strong>failed</strong> with "file not found": a delta update only applies on top of the right base definitions, and a fresh sandbox doesn't have them. Nothing was installed.</p>
<h3>Why an old report still matters</h3>
<p>A public sandbox report is a <strong>permanent snapshot</strong>. The "Malicious activity" label stays on the page whether or not it was right. Search engines and reputation services pick these reports up. Months later, a hunter searching the IP finds a red verdict and a "loader" tag. That's how a perfectly normal IP ends up looking malicious. A single listing on a small blocklist adds to the impression.</p>
<p><strong>Beginner lesson:</strong> a sandbox verdict is an <strong>opinion about behaviour</strong>, made without knowing who signed the file. Always open the report and check three things: what was submitted, what actually ran, and what the file is.</p>
<h3>A mistake I made on the way</h3>
<p>In my first write-up I said the file "never ran" in the sandbox. Then a teammate sent a screenshot of the same report showing dozens of <code>am_delta_patch</code> processes. I was wrong, and I corrected it.</p>
<p>The conclusion didn't change, but the reasoning had to: the file <strong>did</strong> run, and what it did when it ran became the evidence. Say exactly what you checked, and when someone shows you something that contradicts you, go back and look again.</p>
<hr />
<h2>"Still not sure": proving it with two downloads</h2>
<p>The hunt team still wanted more. Fair. So we made it testable.</p>
<ol>
<li>I downloaded <strong>the same Defender file from Microsoft's own HTTPS download domain</strong> and hashed it: <strong>identical</strong> to the sandbox's file, byte for byte.</li>
<li>I took a URL straight from our proxy logs, fetched it <strong>from the suspicious IP</strong>, then fetched the same file from Microsoft. The SHA-256 hashes were <strong>identical</strong>.</li>
</ol>
<p>So whatever this IP serves is exactly what Microsoft serves. I also gave the team both links to run in the sandbox side by side. The same file should get the same verdict wherever it comes from, which shows the verdict is about Defender's updater, not about the IP.</p>
<hr />
<h2>"Show me on a real machine": the endpoint proof</h2>
<p>The last question was the best one: <strong>can we see this from a Windows laptop's side?</strong></p>
<p>Windows keeps detailed logs of its own downloads, and you can read them with built-in PowerShell. We wrote a small read-only script and ran it on a campus laptop. Here's what Windows itself recorded.</p>
<p><strong>1. Microsoft's service named the cache.</strong> When Windows asked Microsoft's Delivery Optimization service where to download from, the answer in the log was:</p>
<pre><code>"CacheHost":"14.102.231.207","CacheId":"7"
</code></pre>
<p>It said this on campus. On a day the laptop was on a <strong>mobile network at home</strong>, Microsoft gave <strong>the same cache</strong>. So it was nothing about our network: it's simply Microsoft's cache for users in the region.</p>
<p><strong>2. The process was Windows' own update service.</strong> Every connection came from the Delivery Optimization service: <code>svchost.exe -k NetworkService</code>, service <code>DoSvc</code>.</p>
<p><strong>3. Every download named its real Microsoft origin:</strong></p>
<table>
<thead>
<tr>
<th>Windows component</th>
<th>Original Microsoft host</th>
</tr>
</thead>
<tbody><tr>
<td>Windows Update</td>
<td><code>au.download.windowsupdate.com</code> (Defender updates)</td>
</tr>
<tr>
<td>Office Click-to-Run</td>
<td><code>c2r.ts.cdn.office.net</code></td>
</tr>
<tr>
<td>Edge updater</td>
<td><code>msedge.b.tlu.dl.delivery.mp.microsoft.com</code></td>
</tr>
</tbody></table>
<p><strong>4. Windows checked every piece.</strong> Before each download, Windows fetched a piece-hash file and checked each downloaded piece against it.</p>
<p><strong>5. The same server on both sides.</strong> The cache identifies itself with two response headers. The values in the laptop's log were <strong>exactly the same</strong> as the ones the cache sent back when I tested it from our side.</p>
<p><strong>6. The "malicious" chain, completing normally.</strong> The laptop's Defender update log showed <code>MpSigStub</code> successfully applying a Defender delta update, and Defender's event log recorded the version change in the same second. It was the same chain the sandbox had counted as 70 malicious signatures, here doing its normal job.</p>
<p>If you want to try this on your own Windows machine:</p>
<pre><code class="language-powershell"># Which cache server did Microsoft give you, and how much came from it?
Get-DeliveryOptimizationStatus |
  Select-Object PredefinedCallerApplication, CacheHost, BytesFromCacheServer, SourceURL

# Microsoft's answer about your cache host, from Windows' own log
Get-DeliveryOptimizationLog | Where-Object Message -match '"CacheHost"' |
  Select-Object -First 5 TimeCreated, Message
</code></pre>
<hr />
<h2>What a real true positive would have looked like</h2>
<p>This is the table I wish I'd had as a beginner. Same starting signals, different evidence underneath:</p>
<table>
<thead>
<tr>
<th>Check</th>
<th>Microsoft cache (what we found)</th>
<th>Real malware server (what would worry me)</th>
</tr>
</thead>
<tbody><tr>
<td>Who talks to it</td>
<td>Thousands of machines, campus-wide</td>
<td>A handful of machines</td>
</tr>
<tr>
<td>Traffic pattern</td>
<td>Large downloads when updates come out</td>
<td>Small, regular check-ins ("beaconing")</td>
</tr>
<tr>
<td>URL paths</td>
<td>Known Microsoft update paths, the same as on Microsoft's own CDN</td>
<td>Random or odd paths, unusual parameters</td>
</tr>
<tr>
<td>The files</td>
<td>Hash matches Microsoft's name, valid Microsoft signature, 0 detections</td>
<td>Unknown hash, unsigned or oddly signed, detections</td>
</tr>
<tr>
<td>Same file from Microsoft's domain</td>
<td>Byte-for-byte identical</td>
<td>Doesn't exist</td>
</tr>
<tr>
<td>Process on the endpoint</td>
<td>Windows' Delivery Optimization service (<code>svchost</code>, <code>DoSvc</code>)</td>
<td>A program in a user folder, a script host, a fresh executable</td>
</tr>
<tr>
<td>Who chose the server</td>
<td>Microsoft's own service, logged by Windows</td>
<td>Hard-coded in the malware</td>
</tr>
<tr>
<td>What happens after the download</td>
<td>A Defender update is applied</td>
<td>New processes, persistence, connections elsewhere</td>
</tr>
<tr>
<td>Sandbox verdict</td>
<td>Generic behaviour rules on a signed file</td>
<td>Malware family identified, configuration extracted, payload behaviour</td>
</tr>
</tbody></table>
<hr />
<h2>How we closed it</h2>
<ul>
<li><strong>Verdict:</strong> false positive. The IP is a Microsoft Connected Cache server that Microsoft's own service assigns.</li>
<li><strong>Affected users:</strong> none. Two thousand machines were "talking to it" because they were updating.</li>
<li><strong>Not blocked, on purpose.</strong> Blocking it would have slowed or broken <strong>Defender definition and security updates</strong> for thousands of machines. Blocking a "bad IP" isn't free, and here it would have made the campus <em>less</em> secure.</li>
<li><strong>Not added to threat intel.</strong> If it had gone into our IOC feed, our indicator rule would have fired about 100,000 times a day.</li>
<li><strong>Heads-up for next time.</strong> The laptop's logs listed <strong>other</strong> Microsoft cache servers too: <code>14.102.231.202</code> (same network), <code>69.171.211.201</code> and <code>69.171.211.205</code>. They look exactly as "suspicious" (raw IP, HTTP, <code>.exe</code>), so the hunt team knows not to raise them either.</li>
</ul>
<p>And the detection question? Our SIEM had no alert, and our automated triage had never seen the IP. For this IP, that was the right outcome.</p>
<p>We did take one idea from the sandbox: <strong>an executable downloaded over plain HTTP from a bare-IP URL</strong> is a genuinely useful thing to detect. Real loaders do exactly that. The rule just has to exclude the Microsoft update paths and the <code>cacheHostOrigin=</code> parameter, or it drowns in Windows Update traffic.</p>
<hr />
<h2>A checklist before you call an IP malicious</h2>
<p>For anyone starting out in investigation or threat hunting, this is what the case taught me to ask, in roughly this order:</p>
<ol>
<li><strong>What does our own traffic to it look like?</strong> How many machines, how much data, what pattern? Thousands of hosts usually means infrastructure. And leave out your own team's lookups (like our <code>favicon.ico</code> requests) before you count anything.</li>
<li><strong>What is actually being requested?</strong> Group the URLs by path. Recognisable vendor paths are a strong clue (not proof).</li>
<li><strong>Who flagged it, and how many?</strong> One small list out of 90 engines is weak evidence. Look at <em>which</em> sources flag it, not just the count.</li>
<li><strong>Read the sandbox report, not just the verdict.</strong> What was submitted? What ran? Is a malware family named, or only generic behaviour rules?</li>
<li><strong>Check the file, not its name.</strong> Hash, size, code signature, detections. Does the same file exist at the vendor's official source?</li>
<li><strong>Separate "who owns the IP" from "whose content is served".</strong> CDNs and caches break the link between the two.</li>
<li><strong>Ask why the design looks odd before assuming it's malicious.</strong> Plain HTTP, raw IPs and odd ports often have documented reasons. Look them up.</li>
<li><strong>Go to the endpoint.</strong> Which process made the connection, and who told it where to connect? The endpoint has the final word.</li>
<li><strong>Think about the cost of acting.</strong> What breaks if you block it? Closing a false positive deserves the same rigour as confirming a true one.</li>
<li><strong>Write down what you checked, and correct yourself in the open.</strong> Your conclusion is only as good as the evidence you can show.</li>
</ol>
<hr />
<h2>What I took away from it</h2>
<ul>
<li><strong>A false positive can look exactly like a true positive</strong> when every signal comes from reputation and appearance. Evidence beats signals.</li>
<li><strong>Volume and spread are context.</strong> 2,000 machines downloading gigabytes is infrastructure, not an attack.</li>
<li><strong>Who owns the IP isn't who owns the content.</strong></li>
<li><strong>A sandbox verdict is an opinion about behaviour.</strong> Security tools look like malware to behaviour rules.</li>
<li><strong>Old public reports keep their labels forever.</strong> Check what they were actually about.</li>
<li><strong>Hashes and signatures settle arguments.</strong> The endpoint settles the rest.</li>
<li><strong>Not acting can be the secure choice.</strong> Blocking this IP would have hurt patching across the campus.</li>
</ul>
<hr />
<h2>Further reading</h2>
<ul>
<li>Microsoft: <a href="https://learn.microsoft.com/en-us/windows/deployment/update/windows-update-security">Windows Update security</a> (why downloads can use HTTP)</li>
<li>Microsoft: <a href="https://learn.microsoft.com/en-us/windows/deployment/do/delivery-optimization-workflow">Delivery Optimization workflow, privacy, security and endpoints</a></li>
<li>Microsoft: <a href="https://learn.microsoft.com/en-us/windows/deployment/do/mcc-isp">Connected Cache for ISPs</a> and its <a href="https://learn.microsoft.com/en-us/windows/deployment/do/mcc-isp-faq">FAQ</a> (cache IPs aren't published)</li>
<li>Microsoft: <a href="https://www.microsoft.com/Peering/Caching">Connected Cache programme page</a></li>
<li>Microsoft: <a href="https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-deliveryoptimization">Delivery Optimization policies</a> (<code>DOCacheHost</code> accepts IP addresses)</li>
<li>Emerging Threats: <a href="https://community.emergingthreats.net/t/http-dottedquadhost-and-you/2833">http.dottedquadhost and you</a> (why IDS rules flag HTTP to bare IPs)</li>
<li>VirusTotal: <a href="https://docs.virustotal.com/docs/false-positive-contacts">False positive contacts</a> (VirusTotal aggregates vendor verdicts; it doesn't make its own)</li>
<li>SafeBreach, Black Hat USA 2023: <a href="https://i.blackhat.com/BH-US-23/Presentations/US-23-Tomer-Defender-Pretender-final.pdf">Defender-Pretender</a> (how Defender's update mechanism works, and how researchers attacked it)</li>
</ul>
<hr />
<p><em>That's story #2: no malware this time, but one of the most fun investigations I've done. Next time you see Windows pulling <code>.exe</code> files over HTTP from a strange IP, check Delivery Optimization before you panic. As always, if you work in a SOC, I'd love to hear whether you've hit this one too.</em></p>
]]></content:encoded></item><item><title><![CDATA[Real SOC Stories #1: The Student Laptop That Was Talking to a C2 Server]]></title><description><![CDATA[What my job looks like in a SOC that monitors a research university, and the day one alert led us to an infected laptop we couldn't see inside. My other…]]></description><link>https://beyondthelogs.hashnode.dev/real-soc-stories-1-the-student-laptop-that-was-talking-to-a-c2-server</link><guid isPermaLink="true">https://beyondthelogs.hashnode.dev/real-soc-stories-1-the-student-laptop-that-was-talking-to-a-c2-server</guid><dc:creator><![CDATA[Sanket Taware]]></dc:creator><pubDate>Fri, 20 Nov 2026 21:05:51 GMT</pubDate><content:encoded><![CDATA[<p><em>What my job looks like in a SOC that monitors a research university, and the day one alert led us to an infected laptop we couldn't see inside.</em></p>
<hr />
<p>My other posts on this blog are mostly about labs and things I'm learning. This one is different. This is about my actual job.</p>
<p>I work as a Security engineer, and the network I help monitor isn't a typical company network. It's a research university, an IIT campus. I've wanted to write about it for a while, because the cases we handle there rarely look like the clean examples in courses and labs.</p>
<p>So I'm starting a small series where I share real incidents we've actually worked on as a team. Names, IPs and anything sensitive stay out, but the story and how we worked through it are real.</p>
<p>Let's start with one of my favourites.</p>
<hr />
<h2>First, why a university is a different kind of SOC</h2>
<p>When I started, I assumed SOC work would look the same everywhere. It doesn't.</p>
<p>In a company, security usually has the upper hand. Every laptop belongs to the company, every endpoint has an EDR agent, servers have strict rules, and the firewall controls what goes in and out. If something looks off, you can look inside the machine or isolate it with a click.</p>
<p>A research university doesn't work like that. Every department has its own research going on. They host their own websites and applications and need custom ports open for their work. Students and researchers bring their own laptops and phones. Nobody can install an EDR agent on a student's personal laptop just because it joined the campus Wi-Fi. There isn't one central team controlling everything.</p>
<p>For us in the SOC, that means <strong>a lot of noise and very little visibility into the devices themselves.</strong> Strange traffic is often just someone's research project, and when it isn't, we usually can't look inside the device.</p>
<hr />
<h2>How we monitor it anyway</h2>
<p>Since we can't rely on endpoint agents, we use the logs we <em>can</em> collect. We run the <strong>ELK stack</strong> (Elasticsearch, Logstash, Kibana), which is open source, and pull in logs from all over the infrastructure: <strong>firewall, proxy, WAF, SSO, LDAP, VPN, mail, Wi-Fi controller</strong>, etc.</p>
<p>That's where the work happens day to day. If you can't see inside a device, you learn to read everything around it: what it connects to, what it resolves, and who was logged in on it at the time.</p>
<p>This case shows that pretty well.</p>
<hr />
<h2>It started with one alert</h2>
<p>Like most investigations, this one started with a single alert.</p>
<p><strong>CERT-In</strong>, India's national cybersecurity agency, had published an advisory about a malware campaign, with indicators like the IP addresses and domains it used. We don't just read advisories like that. We <strong>turn the indicators into detection rules</strong> in our SIEM, so if anything on campus talks to that infrastructure, we know.</p>
<p>And something did. An internal device was <strong>repeatedly</strong> connecting to infrastructure from that advisory.</p>
<p>A single match doesn't mean much on its own. IPs get reused, and one hit could be someone clicking a bad link once. What made this one worth digging into was the <strong>repetition</strong>. People don't usually visit the same malicious address again and again. Malware that keeps "calling home" for instructions does.</p>
<hr />
<h2>Digging in</h2>
<p>The first thing I wanted to know was what this device was actually doing. So we checked the alert against the rest of the telemetry:</p>
<ul>
<li><strong>Proxy logs</strong> for the web traffic going to that destination.</li>
<li><strong>DNS activity</strong> for what the device was resolving.</li>
</ul>
<p>Put together with the threat intel, the picture was clear: this device was <strong>actively communicating with a live C2 (command-and-control) server.</strong> It wasn't a stale IP or a one-off visit.</p>
<p>Then came the part that's harder on a campus than in a company: <strong>finding out whose device it was.</strong></p>
<p>On a university network, an internal IP tells you very little. Devices get addresses dynamically, move between access points all day, and the same IP can belong to a different device an hour later. So the question isn't "which IP?" but "<strong>which device had this IP at that exact time, and who was logged in on it?</strong>"</p>
<p>To answer that, we correlated the alert timestamps with <strong>authentication records</strong>. That took us from an IP address to a specific endpoint and the user it belonged to.</p>
<hr />
<h2>What we found</h2>
<p>It was a <strong>student's personal laptop.</strong></p>
<p>The student had downloaded something from a <strong>torrent</strong>, and it came with malware. The laptop was sitting on the campus network with a live connection to the attacker's C2 server, where it could receive commands.</p>
<p>It wasn't a server or anything critical, just one personal device on the network. But an infected device inside the network is still a foothold for an attacker. It could be used to poke at other systems, steal credentials, or attack others from the university's IP space. So we treated it seriously.</p>
<hr />
<h2>How we handled it</h2>
<p>This was a team effort. We worked with the cybersecurity team:</p>
<ol>
<li><strong>The C2 IP was blocked at the network firewall</strong>, so nothing on campus can reach it again, including any other device that might be infected and that we hadn't spotted yet.</li>
<li><strong>The student was informed</strong> about what we'd found and where it came from.</li>
<li><strong>The team helped the student clean the malware off the laptop.</strong></li>
</ol>
<hr />
<h2>Why I love this case</h2>
<p>This case is a big part of why I enjoy working in this environment.</p>
<p>We had <strong>no EDR and no agent</strong> on that laptop. It wasn't a managed device and it wasn't a critical asset. In plenty of setups it would have gone unnoticed for a long time.</p>
<p>But because someone had taken a threat intel advisory and turned it into a detection rule, <strong>one alert</strong> was enough to get started. From there, the logs we were already collecting took us from an IP address to a person and a fix.</p>
<hr />
<h2>What I took away from it</h2>
<ul>
<li><strong>Threat intel only helps once it's turned into a detection rule.</strong> Reading an advisory protects nobody. Turning it into a SIEM rule is what caught a live infection.</li>
<li><strong>An alert is where you start, not your conclusion.</strong> The match only told us where to look. The repeated pattern, proxy and DNS evidence, and C2 confirmation are what made it a real incident.</li>
<li><strong>Network and identity logs can tell you a lot about a device.</strong> With no agent on the device, matching network traffic against login records at the right timestamps was how we found the device and person behind it.</li>
<li><strong>Incident response is a team effort.</strong> Detection, investigation, validation and remediation are different jobs, and no one person or tool does all of them.</li>
</ul>
<hr />
<p><em>That's the first story. I've got more cases from the same environment, including some weird ones, and I'll share them in the next posts. If you work in a SOC (especially in education or research), I'd love to hear how monitoring works on your side.</em></p>
]]></content:encoded></item><item><title><![CDATA[Watching the Gatekeeper: How SOC Analysts Monitor Active Directory]]></title><description><![CDATA[A beginner-friendly look at what Active Directory logs actually tell you: Kerberos tickets, Event IDs, and the simple counting trick that finds attackers…]]></description><link>https://beyondthelogs.hashnode.dev/watching-the-gatekeeper-how-soc-analysts-monitor-active-directory</link><guid isPermaLink="true">https://beyondthelogs.hashnode.dev/watching-the-gatekeeper-how-soc-analysts-monitor-active-directory</guid><dc:creator><![CDATA[Sanket Taware]]></dc:creator><pubDate>Thu, 19 Nov 2026 17:22:35 GMT</pubDate><content:encoded><![CDATA[<p><em>A beginner-friendly look at what Active Directory logs actually tell you: Kerberos tickets, Event IDs, and the simple counting trick that finds attackers hiding in the noise.</em></p>
<hr />
<p>In May 2024, ransomware operators (reported to be <strong>Black Basta</strong>) hit Ascension Healthcare and exposed <strong>5.6 million patient records</strong>. One of the reported ways in was neither a fancy zero-day nor a Hollywood hack. It was a <strong>service account with a weak password</strong>. The attackers requested a Kerberos ticket for that account, took it away, cracked the password offline, and walked off with privileged domain credentials.</p>
<p>That technique is called <strong>Kerberoasting</strong>. It leaves a trace in the logs, but only if someone is logging the right events and knows what normal looks like.</p>
<p>That's what this post is about. I just finished TryHackMe's <em>Monitoring Active Directory</em> room, and I want to explain how defenders watch the most important system in almost every Windows network. At the end, I walk through three realistic investigations to show how all of it is used on a real SOC shift.</p>
<hr />
<h2>First, what is Active Directory?</h2>
<p><strong>Active Directory (AD)</strong> is the central directory of a Windows company network. It knows every user, every computer and every group, and it decides who is allowed in.</p>
<p>The server that runs it is the <strong>Domain Controller (DC)</strong>. Think of the DC as the <strong>security desk at the entrance of an office building</strong>: everyone has to check in there before they can go anywhere else.</p>
<p>That's why attackers love AD: <strong>once you control the security desk, you control the whole building.</strong> It's also why defenders watch it so closely.</p>
<hr />
<h2>How you get in: the theme-park model of Kerberos</h2>
<p>AD's default login protocol is <strong>Kerberos</strong>. The easiest way to understand it is a theme park.</p>
<ol>
<li><p><strong>You show your ID at the entrance and get a wristband.</strong>
This is the <strong>TGT (Ticket Granting Ticket)</strong>. It proves you've already been checked.
Logged as <strong>Event 4768</strong> on the DC.</p>
</li>
<li><p><strong>At each ride, you show your wristband and get a ride ticket.</strong>
This is a <strong>service ticket (TGS)</strong> for one specific thing: a file share, a database, a website.
Logged as <strong>Event 4769</strong> on the DC.</p>
</li>
<li><p><strong>You get on the ride.</strong>
This is the actual login session on the target server.
Logged as <strong>Event 4624</strong> on <em>that server</em>.</p>
</li>
</ol>
<p>And if you get your password wrong at the entrance? That's <strong>Event 4771</strong>, a failed "pre-authentication".</p>
<p>There's also an older protocol, <strong>NTLM</strong>, which Windows falls back to when Kerberos can't be used, for example when someone opens a file share by <strong>IP address</strong> (<code>\\10.0.1.50\share</code>) instead of by name. It shows up as <strong>Event 4776</strong> on the DC.</p>
<blockquote>
<p><strong>One detail that surprised me:</strong> these logs only land on the DC for <em>domain</em> accounts. A <em>local</em> account (like a machine's built-in Administrator) is checked by that machine alone, so the DC never sees it. To follow an attacker moving between machines, you need the DC's logs <strong>and</strong> the target machines' logs.</p>
</blockquote>
<hr />
<h2>The Event IDs every analyst should know</h2>
<p>Here's the short version. Each of these is a different log entry Windows writes when something happens:</p>
<table>
<thead>
<tr>
<th>What happened</th>
<th>Event ID</th>
</tr>
</thead>
<tbody><tr>
<td>Kerberos "wristband" (TGT) requested</td>
<td><strong>4768</strong></td>
</tr>
<tr>
<td>Kerberos "ride ticket" (service ticket) requested</td>
<td><strong>4769</strong></td>
</tr>
<tr>
<td>Wrong password at Kerberos login</td>
<td><strong>4771</strong></td>
</tr>
<tr>
<td>NTLM login checked by the DC</td>
<td><strong>4776</strong></td>
</tr>
<tr>
<td>Successful / failed logon</td>
<td><strong>4624</strong> / <strong>4625</strong></td>
</tr>
<tr>
<td>New account created</td>
<td><strong>4720</strong></td>
</tr>
<tr>
<td>Password reset</td>
<td><strong>4724</strong></td>
</tr>
<tr>
<td>Account locked out</td>
<td><strong>4740</strong></td>
</tr>
<tr>
<td>Someone added to a security group</td>
<td><strong>4728</strong>, <strong>4732</strong>, <strong>4756</strong></td>
</tr>
<tr>
<td>An AD object was changed (e.g. a Group Policy)</td>
<td><strong>5136</strong></td>
</tr>
</tbody></table>
<p>Two of these deserve special attention because attackers love them:</p>
<ul>
<li><strong>4720 + 4728/4732/4756:</strong> an attacker who creates a new account and then <strong>adds it to Domain Admins</strong> has given themselves a permanent key to the building.</li>
<li><strong>5136 on a Group Policy Object (GPO):</strong> a GPO pushes settings to <em>every</em> machine in the domain. Change one, and you can disable security tools or deploy ransomware everywhere <strong>in a single action</strong>.</li>
</ul>
<hr />
<h2>The trap: "no logs" doesn't mean "nothing happened"</h2>
<p>This was the most important lesson of the room for me.</p>
<p><strong>Many of the most useful events are not logged by default.</strong> Event 5136 (AD changes) and 4771 (Kerberos failures) are off unless someone turns them on in the <strong>audit policy</strong>.</p>
<p>So imagine you search your SIEM for failed Kerberos logins and get <strong>zero results</strong>. That could mean:</p>
<ol>
<li>Nobody typed a wrong password, or</li>
<li><strong>Nobody turned on logging for it</strong>, so failures happen and nothing records them.</li>
</ol>
<p>Both look exactly the same on screen. That's scary.</p>
<p>The fix is to check the audit policy. On a Domain Controller, one command shows you what's actually being logged:</p>
<pre><code class="language-cmd">auditpol /get /category:*
</code></pre>
<p>If the category you care about says "No Auditing", you have a blind spot.</p>
<hr />
<h2>The real challenge: finding one bad event in 100,000 good ones</h2>
<p>In a company of 500 people, a DC can easily see <strong>50,000 to 100,000 service-ticket requests a day</strong>. That's not a problem, it's normal. Nobody reads them one by one.</p>
<p>So how do you find the attacker? With two simple ideas.</p>
<h3>1. Filter out the robots</h3>
<p>Computers log in too, constantly. Computer accounts in AD always end with a <strong><code>$</code></strong> (like <code>THM-DC$</code>), and they generate a large share of Kerberos traffic. When you're hunting for <em>human</em> behaviour, drop them:</p>
<pre><code class="language-spl">NOT Account_Name="*$*"
</code></pre>
<h3>2. Stack counting: read the bottom of the list</h3>
<p>This technique is almost embarrassingly simple, and it's one of the most useful ones a SOC analyst has:</p>
<ol>
<li>Pick a field (username, source IP, service name, encryption type…).</li>
<li><strong>Count</strong> how often each value appears.</li>
<li><strong>Sort</strong> by count.</li>
<li><strong>Read the bottom.</strong></li>
</ol>
<pre><code class="language-spl">index=win EventCode=4769 NOT Account_Name="*$*"
| stats count by Account_Name
| sort -count
</code></pre>
<p>The top of the list is your <strong>baseline</strong>: the normal, busy, everyday accounts. The bottom is the <strong>long tail</strong>: things that happened only once or twice. Attackers almost never look like the busiest account in the company. They look like the <strong>odd one out</strong>.</p>
<h3>Bringing it back to Kerberoasting</h3>
<p>Remember how Ascension got hit? Here's the trace Kerberoasting leaves:</p>
<ul>
<li><strong>Event 4769</strong> (service ticket request)</li>
<li>for a service that runs under a <strong>user/service account</strong>, not a computer (<code>$</code>)</li>
<li>with <strong>encryption type <code>0x17</code> (RC4)</strong>, an old and weak cipher that attackers request because it cracks much faster than modern <strong><code>0x12</code> (AES-256)</strong></li>
</ul>
<p>If you stack count <code>Ticket_Encryption_Type</code> and everything is <code>0x12</code> except a few lonely <code>0x17</code> rows at the bottom, <strong>those rows are where you start investigating.</strong></p>
<p>In my lab, every ticket I looked at was <code>0x12</code>. That's what a healthy baseline looks like, and it's exactly why an RC4 request would stand out.</p>
<hr />
<h2>Timing tells a story too</h2>
<p><em>When</em> something happens matters as much as <em>what</em> happens:</p>
<ul>
<li>Normal users → business hours</li>
<li>Backup accounts → overnight</li>
<li>Admin accounts → planned maintenance windows</li>
</ul>
<p>An admin account doing things at 3 AM on a Sunday isn't automatically evil, but it's worth a question.</p>
<p>One more good practice I spotted in the lab: the same person had <strong>two accounts</strong>, <code>luke.sullivan</code> for daily work and <code>adm-luke.sullivan</code> for admin tasks. Separating the two means a phishing email that steals the everyday account doesn't automatically give away admin rights. It also makes the logs easier to read: if you see <code>adm-</code> activity, you know it's privileged.</p>
<hr />
<h2>Putting it to work: three investigations from the SOC floor</h2>
<p>Reading about Event IDs is one thing. Using them on a Tuesday afternoon with 300 alerts in the queue is another. In an enterprise you never look at one clean event. You get an alert built on top of millions of logs, and your job is to figure out which handful of them matter.</p>
<p>The three scenarios below show how an analyst actually uses everything above. They're composites I put together from what I learned (the hostnames and usernames are borrowed from the lab environment), but the patterns are the ones real SOCs deal with every day. Two of them contain a false positive, and two contain a real attack. Yes, one scenario has both.</p>
<p>Every investigation follows the same loop:</p>
<ol>
<li><strong>Alert</strong>: what fired, and why?</li>
<li><strong>Triage</strong>: is this obviously normal, or worth digging into?</li>
<li><strong>Scope</strong>: who, what, where and when, and how far does it go?</li>
<li><strong>Verdict</strong>: true positive (a real attack) or false positive (normal activity that looked bad)?</li>
<li><strong>Respond and tune</strong>: contain it if it's real, and improve the alert either way.</li>
</ol>
<hr />
<h3>Scenario 1: The Kerberoasting attack hiding inside a noisy alert</h3>
<p><strong>The alert</strong></p>
<blockquote>
<p><code>Kerberos service ticket requested with RC4 encryption (0x17)</code>: 46 events today.</p>
</blockquote>
<p><strong>First impression: "Oh, this one again."</strong></p>
<p>This alert fires every single day. The company has an old reporting server that only supports RC4, and the team has learned to close the alert without looking. That habit is exactly what an attacker hopes for.</p>
<p><strong>Step 1: Break the alert down instead of judging it as a whole.</strong></p>
<p>46 events is not one thing. We stack count them by <em>who</em> asked, <em>for what</em>, and <em>from where</em>:</p>
<pre><code class="language-spl">index=win EventCode=4769 Ticket_Encryption_Type=0x17
| stats count by Account_Name, Service_Name, Client_Address
| sort -count
</code></pre>
<p>What we find:</p>
<table>
<thead>
<tr>
<th>Account_Name</th>
<th>Service_Name</th>
<th>Client_Address</th>
<th>count</th>
</tr>
</thead>
<tbody><tr>
<td>svc-reporting</td>
<td>svc-sql</td>
<td>10.5.30.140</td>
<td>40</td>
</tr>
<tr>
<td>michelle.smith</td>
<td>svc-sql</td>
<td>10.5.50.12</td>
<td>1</td>
</tr>
<tr>
<td>michelle.smith</td>
<td>svc-backup</td>
<td>10.5.50.12</td>
<td>1</td>
</tr>
<tr>
<td>michelle.smith</td>
<td>svc-web</td>
<td>10.5.50.12</td>
<td>1</td>
</tr>
<tr>
<td>michelle.smith</td>
<td>svc-iis</td>
<td>10.5.50.12</td>
<td>1</td>
</tr>
<tr>
<td>michelle.smith</td>
<td>svc-monitor</td>
<td>10.5.50.12</td>
<td>1</td>
</tr>
<tr>
<td>michelle.smith</td>
<td>svc-sharepoint</td>
<td>10.5.50.12</td>
<td>1</td>
</tr>
</tbody></table>
<p><strong>Step 2: Deal with the noisy top first.</strong></p>
<p>The 40 events at the top come from the known legacy server. To make sure it's the same old pattern and not something pretending to be it, we compare it with the last 30 days: same account, same source IP, same target, about one request per hour, day and night. It matches the documented exception exactly.</p>
<p>So <strong>this part is a false positive.</strong> But we're not done, because the alert had 46 events, not 40.</p>
<p><strong>Step 3: Now read the bottom.</strong></p>
<p>The remaining 6 rows are the interesting ones. michelle.smith works in marketing (10.5.50.12 is her workstation, THM-MKT-WS). Within one minute, her account asked for RC4 tickets for <strong>six different service accounts</strong>. Three things are wrong with that:</p>
<ul>
<li>A marketing user has no business reason to touch the backup, monitoring and SQL services.</li>
<li>Every other ticket she requested in the past month was AES (<code>0x12</code>). Something on her machine specifically <em>asked</em> for the weak cipher.</li>
<li>Six different services in under a minute is not how a human works. It's how a tool works.</li>
</ul>
<p>Here's a query that catches this shape directly (many <em>different</em> services from one account in a short time):</p>
<pre><code class="language-spl">index=win EventCode=4769 Ticket_Encryption_Type=0x17 NOT Service_Name="*$"
| bin _time span=5m
| stats dc(Service_Name) AS services, values(Service_Name) AS which by _time, Account_Name, Client_Address
| where services &gt; 3
</code></pre>
<p><code>bin _time span=5m</code> cuts time into 5-minute buckets, and <code>dc(Service_Name)</code> counts how many <em>different</em> services each account asked for in each bucket.</p>
<p><strong>Step 4: Did she actually use those tickets?</strong></p>
<p>If michelle really needed those services, we would see her log on to those servers right after (Event 4624 on each target). So we check:</p>
<pre><code class="language-spl">index=win EventCode=4624 Account_Name="michelle.smith" host IN (THM-SQL-SRV, THM-WEB-SRV, THM-SHR-SRV)
| stats count by host, Logon_Type
</code></pre>
<p>Zero results. She requested six tickets and used none of them.</p>
<p>That's the fingerprint of Kerberoasting. The attacker doesn't want the <em>service</em>. They want the <em>ticket</em>, so they can take it offline and crack the service account's password from it.</p>
<p><strong>Step 5: Check the endpoint.</strong></p>
<p>The logs on the DC tell us <em>what</em> happened, but not <em>how</em>. So we move to the workstation. The EDR timeline on THM-MKT-WS shows a PowerShell process started from a file in her Downloads folder two minutes before the tickets were requested. Her account was compromised, most likely through a phishing email.</p>
<p><strong>Verdict: TRUE POSITIVE, hidden inside a false positive.</strong></p>
<p><strong>Response:</strong></p>
<ul>
<li>Isolate THM-MKT-WS from the network and reset michelle.smith's password.</li>
<li><strong>Reset the passwords of all six service accounts</strong> to long, random ones. Cracking happens offline on the attacker's own machine and leaves no logs, so we have to assume they will succeed.</li>
<li>Watch for any of those six service accounts logging in from unusual machines over the following days.</li>
</ul>
<p><strong>Tuning:</strong></p>
<p>The old exception was effectively "ignore RC4". The new one only excludes the exact combination <code>svc-reporting + svc-sql + 10.5.30.140</code>. Anything else that uses RC4 still fires. <strong>A whitelist that's too broad is exactly where attackers hide.</strong></p>
<blockquote>
<p>This is the Ascension story from the start of this post, but caught in time.</p>
</blockquote>
<hr />
<h3>Scenario 2: A new account, a privileged group, at 1:40 AM</h3>
<p><strong>The alert</strong></p>
<blockquote>
<p><code>Member added to privileged group outside business hours</code>: <code>svc-backup02</code> added to <strong>Backup Operators</strong> by <code>adm-luke.sullivan</code> at 01:40.</p>
</blockquote>
<p><strong>First impression: this looks bad.</strong></p>
<p>A brand-new account, a privileged group, the middle of the night. That's exactly the "create an account, then add it to a group" chain attackers use for persistence.</p>
<p>And <strong>Backup Operators</strong> sounds harmless, but it isn't. Its members can read any file on a Domain Controller, including the AD database (NTDS.dit) that holds every password hash in the company.</p>
<p><strong>Step 1: Rebuild the full sequence around the change.</strong></p>
<p>One event is data. We want the story, so we pull every account and group event around that time (time picker set to 01:00 to 02:30):</p>
<pre><code class="language-spl">index=win EventCode IN (4720, 4722, 4724, 4728, 4732, 4756)
| table _time, EventCode, SAM_Account_Name, Member_Account_Name, Group_Name, Subject_Account_Name
| sort _time
</code></pre>
<p>What we see:</p>
<table>
<thead>
<tr>
<th>Time</th>
<th>Event</th>
<th>What happened</th>
<th>By</th>
</tr>
</thead>
<tbody><tr>
<td>01:31</td>
<td>4720</td>
<td><code>svc-backup02</code> created</td>
<td>adm-luke.sullivan</td>
</tr>
<tr>
<td>01:31</td>
<td>4722</td>
<td><code>svc-backup02</code> enabled</td>
<td>adm-luke.sullivan</td>
</tr>
<tr>
<td>01:32</td>
<td>4724</td>
<td>Password set</td>
<td>adm-luke.sullivan</td>
</tr>
<tr>
<td>01:40</td>
<td>4732</td>
<td>Added to Backup Operators</td>
<td>adm-luke.sullivan</td>
</tr>
</tbody></table>
<p>One admin did everything, in a clean, logical order. But that alone proves nothing.</p>
<p><strong>Step 2: Was it really Luke behind the admin account?</strong></p>
<p>An attacker who stole <code>adm-luke.sullivan</code> would produce <em>exactly the same events</em>. So the question becomes: where was the admin account used from?</p>
<pre><code class="language-spl">index=win (EventCode=4768 OR EventCode=4771 OR EventCode=4624) Account_Name="adm-luke.sullivan"
| table _time, EventCode, host, Client_Address, Source_Network_Address, Logon_Type
| sort _time
</code></pre>
<p>What we find:</p>
<ul>
<li>The TGT (4768) was requested from 10.5.50.10, which is <strong>THM-IT-DESK</strong>, the IT team's designated admin workstation.</li>
<li>One RDP logon (Logon_Type 10) to the DC from that same machine at 01:28.</li>
<li>Encryption <code>0x12</code> (AES), and <strong>no failed logins (4771)</strong> before it. Nobody was guessing the password.</li>
<li>No other machine used this account that night.</li>
</ul>
<p>Everything points to a legitimate admin, on the right machine, logging in normally.</p>
<p><strong>Step 3: Check the business context.</strong></p>
<p>Logs can tell us <em>what</em> happened, but not <em>whether it was allowed</em>. We check the change management system and find an approved change: <em>"Deploy new backup server. Maintenance window 01:00–03:00. Owner: Luke Sullivan."</em> In the morning, we also message Luke directly, and he confirms it.</p>
<p><strong>Step 4: Does the new account behave like a backup account?</strong></p>
<p>We watch <code>svc-backup02</code> for the next three nights. It only logs on from the new backup server, only to file servers, and only between 01:00 and 04:00. That's exactly the "normal" pattern for a backup account.</p>
<p><strong>Verdict: FALSE POSITIVE (authorized change).</strong></p>
<p><strong>Tuning (be careful here):</strong></p>
<p>The lazy fix is "never alert on adm-luke.sullivan". That's a mistake: if that account is ever stolen, the attacker becomes invisible. Instead:</p>
<ul>
<li>Keep the alert, but automatically attach any matching change ticket so the next analyst can close it in minutes.</li>
<li>Add a new alert for <code>svc-backup02</code> logging on from anywhere <em>other</em> than the backup server. If it's ever abused, we'll know.</li>
</ul>
<p><strong>Lesson:</strong> The verdict didn't come from the alert. It came from four independent checks (the sequence, the source machine, the change ticket, and the behaviour afterwards) that all told the same story.</p>
<hr />
<h3>Scenario 3: "Just another stale password"... except it wasn't</h3>
<p><strong>The alert</strong></p>
<blockquote>
<p><code>Spike in Kerberos pre-authentication failures (4771)</code>: 380 failures in 15 minutes.</p>
</blockquote>
<p><strong>First impression: a stale password.</strong></p>
<p>This is one of the most common false positives in any SOC. Someone changes a service account's password but forgets to update one old script, and the script keeps retrying the old password all day. It usually looks like one account, lots of failures, and some account lockouts (4740).</p>
<p><strong>Step 1: Check the <em>shape</em> of the failures.</strong></p>
<p>A stale password and an attack look very different once you count them the right way. Instead of just counting failures, we count how many <em>different accounts</em> failed from each source:</p>
<pre><code class="language-spl">index=win EventCode=4771
| stats count, dc(Account_Name) AS accounts by Client_Address
| sort -accounts
</code></pre>
<table>
<thead>
<tr>
<th>Client_Address</th>
<th>count</th>
<th>accounts</th>
</tr>
</thead>
<tbody><tr>
<td>::ffff:10.5.50.15</td>
<td>372</td>
<td>186</td>
</tr>
<tr>
<td>::ffff:10.5.30.120</td>
<td>8</td>
<td>1</td>
</tr>
</tbody></table>
<p>That's two very different stories:</p>
<ul>
<li><strong>10.5.30.120 (THM-SQL-SRV): 1 account, 8 failures.</strong> This is the stale-password pattern, one account failing again and again. It's a real but boring problem, so we open a ticket for the IT team. It's a <strong>false positive</strong>, not an attack.</li>
<li><strong>10.5.50.15: 186 different accounts, about 2 failures each.</strong> Nobody mistypes 186 different passwords from one machine. This is <strong>password spraying</strong>: trying one or two common passwords (like <code>Winter2026!</code>) against every account, slowly enough that no single account gets locked out.</li>
</ul>
<p>That last part matters. There were <strong>zero 4740 lockouts</strong>. The attacker stayed under the lockout limit on purpose, so an alert based only on lockouts would have seen nothing.</p>
<p>We also check the <code>Failure_Code</code> field: <code>0x18</code> means "wrong password". That tells us the usernames were real and only the password guesses were wrong.</p>
<p><strong>Step 2: Did any guess work?</strong></p>
<p>The scariest question in a password spray is whether one of the guesses succeeded. A success would show up as a normal TGT (4768) from the same machine, so we look for those:</p>
<pre><code class="language-spl">index=win EventCode=4768 Client_Address="*10.5.50.15"
| stats count by Account_Name
</code></pre>
<p>Two accounts come back:</p>
<ul>
<li><code>jessica.martinez</code>: 10.5.50.15 is her own workstation (THM-HR-WS), so her logon is expected.</li>
<li><code>liam.patel</code>: he's a developer who always works from THM-DEV-WS (10.5.50.20). He has <strong>never</strong> logged in from the HR workstation before. His successful TGT appeared right in the middle of the spray, a few seconds after a failure on another account.</li>
</ul>
<p>The attacker found a working password: liam.patel's.</p>
<p><strong>Step 3: What did they do with it?</strong></p>
<p>Now we follow liam.patel's account across the network. On the DC we find NTLM validations (4776) for him, coming from THM-HR-WS:</p>
<pre><code class="language-spl">index=win EventCode=4776 Logon_Account="liam.patel"
| table _time, Logon_Account, Source_Workstation
</code></pre>
<p>NTLM instead of Kerberos is another clue. Remember that NTLM shows up when someone connects <strong>by IP address</strong>, which is exactly how many attacker tools connect.</p>
<p>Next, we check the file server to see where the account landed:</p>
<pre><code class="language-spl">index=win host=THM-SHR-SRV EventCode IN (4624, 5140) Account_Name="liam.patel"
| table _time, EventCode, Logon_Type, Authentication_Package, Source_Network_Address, Share_Name
</code></pre>
<ul>
<li><strong>4624</strong>, Logon_Type <strong>3</strong> (network), Authentication_Package <strong>NTLM</strong>, from <strong>10.5.50.15</strong>.</li>
<li><strong>5140</strong>: the account opened the <code>HR-Payroll</code> and <code>Finance</code> shares. A developer has no reason to open payroll.</li>
</ul>
<p><strong>Step 4: How did it start?</strong></p>
<p>The spray came from jessica.martinez's workstation, but jessica wasn't sitting there trying 186 passwords. The EDR on THM-HR-WS shows a malicious macro from an email attachment opened 40 minutes before the spray started. Her machine was the attacker's foothold. She's a victim, not a suspect.</p>
<p><strong>Verdict: TRUE POSITIVE.</strong> Phishing led to a password spray, which gave the attacker a valid account, which they used to move to another machine and reach sensitive data. On top of that, there was one unrelated <strong>false positive</strong> (the stale password on the SQL server) that still needed an IT ticket.</p>
<p><strong>Response:</strong></p>
<ul>
<li>Isolate THM-HR-WS.</li>
<li>Disable liam.patel and reset his password. Reset jessica.martinez's password too.</li>
<li>Check whether any data was copied out of the HR-Payroll share.</li>
<li>186 accounts were tested with the same password list, so find and reset any other accounts with weak passwords, and push for MFA.</li>
</ul>
<p><strong>Lesson:</strong> The alert looked exactly like a common false positive. What changed the verdict was counting differently: the number of <em>different accounts</em> per source (<code>dc(Account_Name)</code>) instead of just the number of failures.</p>
<hr />
<h3>What the three scenarios have in common</h3>
<table>
<thead>
<tr>
<th></th>
<th>Alert looked like</th>
<th>Actually was</th>
<th>What decided it</th>
</tr>
</thead>
<tbody><tr>
<td>Scenario 1</td>
<td>Daily RC4 noise</td>
<td>Kerberoasting hidden in the noise</td>
<td>Stack counting the alert instead of closing it</td>
</tr>
<tr>
<td>Scenario 2</td>
<td>An attacker creating a backdoor admin</td>
<td>Authorized maintenance</td>
<td>Source machine, change ticket, and behaviour afterwards</td>
</tr>
<tr>
<td>Scenario 3</td>
<td>A stale service account password</td>
<td>Password spray and lateral movement</td>
<td>Distinct accounts per source, and a logon from an unusual machine</td>
</tr>
</tbody></table>
<p>The pattern: <strong>an alert is a starting point, not a verdict.</strong> You break it down, compare it with normal, follow the account across machines, and check the business context. Only then do you decide.</p>
<hr />
<h2>Key takeaways</h2>
<ul>
<li><strong>AD is the security desk of the network.</strong> Whoever controls it controls everything, so it's what attackers aim for.</li>
<li><strong>Kerberos = wristband (4768) → ride ticket (4769) → ride (4624).</strong> NTLM is the legacy fallback (4776).</li>
<li><strong>Watch account creation, group changes and GPO edits.</strong> They're the fastest routes to escalation and persistence.</li>
<li><strong>No logs ≠ no attack.</strong> Check your audit policy, or you may be blind without knowing it.</li>
<li><strong>Volume is normal.</strong> Filter out computer accounts, then <strong>stack count and read the bottom of the list.</strong></li>
<li><strong>Single events are data; sequences are stories.</strong> A new account → added to Domain Admins → logging in at 3 AM is an incident.</li>
<li><strong>An alert is a starting point, not a verdict.</strong> Break it down, check the context, and follow the account across machines before deciding.</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[WMI Persistence: The Fileless Backdoor Hiding Inside Windows]]></title><description><![CDATA[How attackers "live off the land" using a built-in Windows feature — and how defenders catch them. A beginner-friendly breakdown of what I learned from a…]]></description><link>https://beyondthelogs.hashnode.dev/wmi-persistence-the-fileless-backdoor-hiding-inside-windows</link><guid isPermaLink="true">https://beyondthelogs.hashnode.dev/wmi-persistence-the-fileless-backdoor-hiding-inside-windows</guid><dc:creator><![CDATA[Sanket Taware]]></dc:creator><pubDate>Fri, 06 Nov 2026 17:52:29 GMT</pubDate><content:encoded><![CDATA[<p>Imagine a burglar who never breaks a window. Instead, they quietly reprogram your smart home so that <strong>every night at 3 AM the back door unlocks itself</strong>. No broken glass, no forced entry, nothing obviously out of place. If you only ever check for <em>broken windows</em>, you'll never find them.</p>
<p>That, in a nutshell, is <strong>WMI persistence</strong> — one of the sneakiest ways malware stays alive on a Windows machine. I ran into it while working through a forensics challenge (TryHackMe's <em>After Hours</em> room), and it sent me down a rabbit hole I want to share. By the end of this post you'll understand what WMI is, why attackers love abusing it, how the attack actually works, and how blue teams detect it.</p>
<p>Let's build it up from zero.</p>
<hr />
<h2>First, what even <em>is</em> WMI?</h2>
<p><strong>WMI = Windows Management Instrumentation.</strong> It ships with every single Windows machine, and admins use it constantly — often without realizing it.</p>
<p>Think of WMI as the <strong>building-management system of Windows</strong>. In an office building, facilities management lets you ask questions ("what's the temperature on floor 3?") and set up automations ("if the fire alarm triggers, unlock all the doors"). WMI does the same for Windows:</p>
<ul>
<li><strong>Ask questions:</strong> "How much RAM is installed?" "Which processes are running?" "What's the serial number of this disk?"</li>
<li><strong>Set up automations:</strong> "When a USB drive is plugged in, log it." "When CPU usage spikes, send an alert."</li>
</ul>
<p>It's a legitimate, powerful, <em>trusted</em> part of Windows. And that trust is exactly what makes it a beautiful hiding spot.</p>
<hr />
<h2>The feature that gets abused: Event Subscriptions (a.k.a. "IFTTT for Windows")</h2>
<p>If you've ever used <strong>IFTTT</strong> or a smart-home automation ("<em>IF</em> motion is detected, <em>THEN</em> turn on the light"), you already understand the feature attackers abuse. WMI can run an <strong>event subscription</strong> — an <em>IF this happens, THEN do that</em> rule that lives inside Windows and keeps working across reboots.</p>
<p>Every WMI event subscription is made of <strong>three linked pieces</strong>:</p>
<table>
<thead>
<tr>
<th>Piece</th>
<th>Role</th>
<th>In plain English</th>
</tr>
</thead>
<tbody><tr>
<td><strong>Event Filter</strong></td>
<td>the trigger</td>
<td>the <strong>IF</strong> — "when X happens…"</td>
</tr>
<tr>
<td><strong>Event Consumer</strong></td>
<td>the action</td>
<td>the <strong>THEN</strong> — "…run this command/script"</td>
</tr>
<tr>
<td><strong>Filter-to-Consumer Binding</strong></td>
<td>the link</td>
<td>the wire connecting the IF to the THEN</td>
</tr>
</tbody></table>
<p>A normal, boring example:</p>
<blockquote>
<p><strong>IF</strong> a specific Windows service crashes, <strong>THEN</strong> write an entry to the event log.</p>
</blockquote>
<p>Now the malicious version:</p>
<blockquote>
<p><strong>IF</strong> a certain time of day arrives, <strong>THEN</strong> silently run a hidden PowerShell command.</p>
</blockquote>
<p>Same mechanism. Same trusted feature. Completely different intent.</p>
<hr />
<h2>Why attackers <em>love</em> WMI</h2>
<p>Here's why this technique shows up again and again (it's catalogued as <strong>MITRE ATT&amp;CK T1546.003</strong>):</p>
<ul>
<li>** It's fileless.** The malicious logic can live <em>inside WMI's own database</em>, not as a file on your disk. Most antivirus scans files — if there's no file, there's nothing obvious to scan. It's like hiding a secret note inside the library's card catalog instead of on a bookshelf. Nobody thinks to check the catalog.</li>
<li>** It's "living off the land."** WMI is a signed, trusted Windows component that admins use daily. Malicious WMI activity blends into legitimate activity, so it doesn't stand out.</li>
<li>** It's persistent and self-running.** A scheduled task or a registry "Run" key is relatively easy to find. A WMI subscription re-triggers on its own schedule and <strong>survives reboots</strong>, with no obvious startup entry to spot.</li>
<li>** It's quiet.** Very few defenders routinely inspect the WMI repository. As the lab's story put it: the malware was "hiding in a corner most tools don't think to check." That line stuck with me.</li>
</ul>
<hr />
<h2>How the real attack looked (the interesting part)</h2>
<p>In the lab, I was handed the raw WMI database files from a compromised machine and had to figure out what was hiding inside. When I untangled it, the attack chain looked like this:</p>
<pre><code>[Trigger fires on schedule]
        ↓
A tiny PowerShell command runs (hidden window, no logging)
        ↓
It reads a "config" value from a FAKE WMI class the attacker created
        ↓
That value is decoded through several layers (Base64 → compression)
        ↓
Out pops a small program, loaded straight into memory (still no file!)
        ↓
The program creates a hidden backdoor user account
</code></pre>
<p>Two things made this genuinely clever:</p>
<p><strong>1. The payload hid inside a fake "telemetry" class.</strong>
The attacker created a custom WMI class with an innocent-sounding name (think: <code>Win32_HardwareTelemetry</code>) and stuffed the actual malicious program into one of its properties, disguised as harmless configuration data. It looks like just another boring system class — but it's a storage locker for malware.</p>
<p><strong>2. The loader was tiny and self-contained.</strong>
The command that ran on the trigger was just a short, obfuscated PowerShell one-liner. Cleaned up and translated to plain English, it basically said:</p>
<blockquote>
<p><em>"Go read the hidden config value out of that telemetry class, un-scramble it, and run the result directly in memory."</em></p>
</blockquote>
<p>No malware file ever touched the disk. The payload, the trigger, and the loader all lived <strong>inside the trusted WMI database</strong>. That's the whole point — and the whole problem.</p>
<p><em>(There was even a nice touch: the final program checked the computer's hostname and only "armed" itself on the specific target machine. If you ran it anywhere else, it just quietly refused — a targeting guardrail so the malware doesn't detonate in an analyst's sandbox.)</em></p>
<hr />
<h2>How defenders catch it</h2>
<p>The good news: WMI abuse is very detectable <strong>if you're watching the right place.</strong> Here's how blue teams hunt it.</p>
<p><strong>1. Log the subscription being created.</strong>
<strong>Sysmon</strong> (a free Microsoft monitoring tool) has dedicated events for exactly this:</p>
<ul>
<li><strong>Event ID 19</strong> → a WMI Event <em>Filter</em> was created</li>
<li><strong>Event ID 20</strong> → a WMI Event <em>Consumer</em> was created</li>
<li><strong>Event ID 21</strong> → a <em>Binding</em> was created</li>
</ul>
<p>A simple, high-value detection rule: <strong>alert whenever a new WMI consumer is created that launches PowerShell or cmd, or contains encoded content.</strong> Legitimate software rarely does this.</p>
<p><strong>2. Know what "normal" looks like.</strong>
A clean Windows box has only a handful of default WMI consumers. If you baseline those, then <strong>anything new is worth investigating.</strong> In the lab, the malicious consumer sat right next to a legitimate default one — the only way to tell them apart was knowing which names are supposed to be there.</p>
<p><strong>3. Hunt live with a one-liner.</strong>
On a suspect machine, you can list all three parts of the triad directly:</p>
<pre><code class="language-powershell">Get-WmiObject -Namespace root\subscription -Class __EventFilter
Get-WmiObject -Namespace root\subscription -Class __EventConsumer
Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding
</code></pre>
<p>Then eyeball the consumers: anything running <code>powershell -enc</code>, referencing <code>Base64</code>, or loading code reflectively is a giant red flag.</p>
<p><strong>4. Flag the obfuscation signals.</strong>
Malicious loaders tend to reuse the same ingredients. Watching for keywords like <code>-enc</code>, <code>FromBase64String</code>, <code>DeflateStream</code>, <code>Reflection.Assembly</code>, <code>-nop</code>, and <code>hidden</code> in command lines will catch a huge chunk of this activity.</p>
<hr />
<h2>Key takeaways</h2>
<p>If you remember nothing else, remember these:</p>
<ul>
<li><strong>WMI is "IFTTT for Windows"</strong> — a legit automation feature that attackers repurpose into a trigger-based backdoor.</li>
<li><strong>The attack is always a triad:</strong> a Filter (the <em>when</em>), a Consumer (the <em>what</em>), and a Binding (the glue).</li>
<li><strong>It's loved because it's fileless, trusted, persistent, and quiet</strong> — it hides where defenders rarely look.</li>
<li><strong>It's very detectable</strong> once you watch Sysmon events 19/20/21 and baseline what "normal" consumers look like.</li>
<li><strong>Attackers hide where you're not looking.</strong> The real lesson isn't about WMI specifically — it's that good defense means checking the quiet corners, not just the obvious doors.</li>
</ul>
<hr />
]]></content:encoded></item></channel></rss>