<?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" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Eric’s Substack]]></title><description><![CDATA[I write about all things information security, security operations, digital forensics & incident response, and some miscellaneous in between.]]></description><link>https://blog.ecapuano.com</link><image><url>https://substackcdn.com/image/fetch/$s_!lrkf!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c9bc99-8815-431a-8473-21ce5748124c_400x400.jpeg</url><title>Eric’s Substack</title><link>https://blog.ecapuano.com</link></image><generator>Substack</generator><lastBuildDate>Thu, 16 Apr 2026 20:59:42 GMT</lastBuildDate><atom:link href="https://blog.ecapuano.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Eric Capuano]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[ecapuano@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[ecapuano@substack.com]]></itunes:email><itunes:name><![CDATA[Eric Capuano]]></itunes:name></itunes:owner><itunes:author><![CDATA[Eric Capuano]]></itunes:author><googleplay:owner><![CDATA[ecapuano@substack.com]]></googleplay:owner><googleplay:email><![CDATA[ecapuano@substack.com]]></googleplay:email><googleplay:author><![CDATA[Eric Capuano]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Hunting MongoBleed (CVE-2025-14847)]]></title><description><![CDATA[Detecting CVE-2025-14847 Exploitation with Velociraptor]]></description><link>https://blog.ecapuano.com/p/hunting-mongobleed-cve-2025-14847</link><guid isPermaLink="false">https://blog.ecapuano.com/p/hunting-mongobleed-cve-2025-14847</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Sat, 27 Dec 2025 03:41:01 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!TxTh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc136c293-8a0c-4e3c-9846-6c24fcebd980_3584x1876.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>CVE-2025-14847 dropped recently and it&#8217;s a nasty one. Dubbed &#8220;MongoBleed&#8221; by the security community, it&#8217;s a memory disclosure vulnerability in MongoDB&#8217;s zlib decompression that allows attackers to extract sensitive data&#8212;credentials, session tokens, PII&#8212;directly from server memory. No authentication required. If you&#8217;re running MongoDB in production, you need to pay attention to this.</p><p>Patches are available, and you should apply them immediately if you haven&#8217;t already. But patching alone isn&#8217;t enough&#8212;you need to know if you were exploited <em>before</em> the patch. That&#8217;s where detection comes in.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Eric&#8217;s Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>After reading <a href="https://doublepulsar.com/merry-christmas-day-have-a-mongodb-security-incident-9537f54289eb">Kevin Beaumont&#8217;s excellent writeup on the vulnerability</a>, I got to work building detection capabilities. As far as I know, this is currently the only defensive signature for CVE-2025-14847 that exists (as of this post being published). The result is a Velociraptor artifact for live hunting, with KAPE Targets for triage forensic collection <a href="https://github.com/EricZimmerman/KapeFiles/pull/1075">coming soon</a>.</p><p>What will make this CVE particularly challenging for blue teams is that it seems to be only detectable in the MongoDB server logs which are extremely unlikely to be shipped to any SIEM, and it requires somewhat complex logic which could be tricky to port into most SIEM detection engines. Fortunately, <a href="https://docs.velociraptor.app/">Velociraptor</a> was a quick fix to both of these challenges.</p><p>Let me walk you through the vulnerability, the detection logic, and how I validated it against real attack traffic.</p><h2>What is MongoBleed?</h2><p>MongoBleed exploits a flaw in how MongoDB handles zlib-compressed network messages. When compression is enabled (which it often is for performance), an attacker can craft connections that cause the server to leak chunks of its memory in responses. Think <a href="https://heartbleed.com/">Heartbleed</a>, but for MongoDB.</p><p>The affected versions span multiple major releases:</p><ul><li><p><strong>8.2.x:</strong> 8.2.0 - 8.2.2 (fixed in 8.2.3)</p></li><li><p><strong>8.0.x:</strong> 8.0.0 - 8.0.16 (fixed in 8.0.17)</p></li><li><p><strong>7.0.x:</strong> 7.0.0 - 7.0.27 (fixed in 7.0.28)</p></li><li><p><strong>6.0.x:</strong> 6.0.0 - 6.0.26 (fixed in 6.0.27)</p></li><li><p><strong>5.0.x:</strong> 5.0.0 - 5.0.31 (fixed in 5.0.32)</p></li><li><p><strong>4.4.x:</strong> 4.4.0 - 4.4.29 (fixed in 4.4.30)</p></li><li><p><strong>4.2.x:</strong> 4.2.0 and later (no fix)</p></li><li><p><strong>4.0.x:</strong> 4.0.0 and later (no fix)</p></li><li><p><strong>3.6.x:</strong> 3.6.0 and later (no fix)</p></li></ul><p>That&#8217;s a lot of potentially vulnerable MongoDB instances out there. </p><h2>The Attack Pattern</h2><p>Here&#8217;s where it gets interesting from a detection standpoint. The exploit works by establishing <em>many</em> rapid connections to the MongoDB server&#8212;we&#8217;re talking tens of thousands per minute. Each connection probes for memory leaks, and the attacker aggregates the leaked data to reconstruct sensitive information.</p><p>But here&#8217;s the key insight: the exploit never sends client metadata.</p><p>Every legitimate MongoDB driver&#8212;whether it&#8217;s PyMongo, the Node.js driver, mongosh, or any other&#8212;sends a &#8220;client metadata&#8221; message immediately after connecting. This metadata includes the driver name, version, operating system, and application name. MongoDB logs this as event ID 51800.</p><p>The MongoBleed exploit? It connects (event ID 22943), does its thing, and disconnects (event ID 22944). No metadata. Ever.</p><p>This gives us a reliable detection signal: a source IP with hundreds or thousands of connections but zero metadata events is almost certainly not legitimate traffic.</p><p><strong>Note:</strong> The behavior I described above reflects the behavior of the <em><strong>current public proof-of-concept exploit</strong></em>. A motivated attacker could modify the exploit to send fake client metadata after connecting, making the traffic appear more legitimate. However, the extreme connection velocity (100,000+ connections/minute) would remain difficult to mask without significantly reducing exploitation speed&#8212;creating a trade-off between stealth and effectiveness. Defense in depth applies: patch vulnerable systems rather than relying solely on behavioral detection.</p><h2>Building the Detection</h2><p>The Velociraptor artifact I created&#8212;<code>Linux.Detection.CVE202514847.MongoBleed</code>&#8212;implements a multi-faceted detection approach:</p><ol><li><p><strong>Parse MongoDB JSON logs</strong> for connection events (22943), metadata events (51800), and disconnection events (22944)</p></li><li><p><strong>Aggregate by source IP</strong> within a configurable time window</p></li><li><p><strong>Calculate the metadata rate</strong>&#8212;what percentage of connections sent metadata?</p></li><li><p><strong>Calculate connection velocity</strong>&#8212;how many connections per minute?</p></li><li><p><strong>Apply risk scoring</strong> based on the combination of factors</p></li></ol><p>The risk levels break down like this:</p><ul><li><p><strong>HIGH:</strong> &#8805;100 connections AND &lt;10% metadata rate AND &#8805;500 conn/min</p></li><li><p><strong>MEDIUM:</strong> &#8805;100 connections AND &lt;10% metadata rate (lower velocity)</p></li><li><p><strong>LOW:</strong> &#8805;100 connections (normal metadata rate)</p></li><li><p><strong>INFO:</strong> &lt;100 connections</p></li></ul><p>The velocity component is important. Without it, you might flag a misconfigured application that made 100 connections over several hours without proper driver initialization. With velocity factored in, we&#8217;re looking for the characteristic burst pattern of the exploit&#8212;100,000+ connections per minute.</p><h2>Testing Against Real Attack Traffic</h2><p>I wasn&#8217;t about to release a detection artifact without validating it against actual exploitation. So I set up a lab environment:</p><ol><li><p>Spun up a vulnerable MongoDB 8.2.2 container with zlib compression enabled</p></li><li><p>Deployed a Velociraptor server and installed the Linux client inside the container</p></li><li><p>Ran the <a href="https://github.com/joe-desimone/mongobleed">mongobleed POC</a> against it</p></li><li><p>Collected the artifact and checked the results</p></li></ol><p>Here&#8217;s what the exploit traffic looked like:</p><ul><li><p><strong>Connections:</strong> 499</p></li><li><p><strong>Metadata Events:</strong> 0</p></li><li><p><strong>Duration:</strong> 0.3 seconds</p></li><li><p><strong>Velocity:</strong> 111,716 connections/min</p></li><li><p><strong>Metadata Rate:</strong> 0.00%</p></li><li><p><strong>Risk Level:</strong> HIGH - Likely MongoBleed Exploitation</p></li></ul><p>Detection confirmed. The artifact correctly flagged the attack with HIGH confidence.</p><p>I repeated this across MongoDB 6.0, 7.0, 8.0, and 8.2 to ensure the log format was consistent and detection worked across all vulnerable versions. It did.</p><h2>But What About False Positives?</h2><p>Any detection is only as good as its false positive rate. To validate the thresholds, I analyzed several days of production MongoDB logs from real-world deployments. The results were reassuring:</p><p><strong>Production (Legitimate Traffic):</strong></p><ul><li><p><strong>Velocity:</strong> 0.2 - 3.2 conn/min</p></li><li><p><strong>Metadata Rate:</strong> 99 - 100%</p></li><li><p><strong>Daily Volume:</strong> 300 - 4,500 connections</p></li></ul><p><strong>Attack Traffic:</strong></p><ul><li><p><strong>Velocity:</strong> 100,000+ conn/min</p></li><li><p><strong>Metadata Rate:</strong> 0%</p></li><li><p><strong>Volume:</strong> 499 connections in 0.3 seconds</p></li></ul><p>The difference between legitimate and attack traffic is 3-5 orders of magnitude. That&#8217;s a comfortable margin. Legitimate applications consistently send metadata with every connection, and their velocity is measured in single-digit connections per minute, not hundreds of thousands.</p><p>A caveat: I only had access to a handful of production MongoDB log sets to validate against. Your environment may look different&#8212;high-throughput applications, connection pooling behavior, or unusual driver configurations could shift these patterns. The default thresholds should be a sane starting point, but don&#8217;t be afraid to tweak the parameters if you&#8217;re seeing unexpected results. That&#8217;s what they&#8217;re there for.</p><h2>Using the Artifact</h2><p>The artifact provides three data sources:</p><ul><li><p><strong>MongoDBLogAnalysis</strong>: Parses log files from disk at standard paths (<code>/var/log/mongodb/*.log*</code>, etc.)</p></li><li><p><strong>DockerMongoDBLogs</strong>: Parses logs from Docker containers when you specify a container pattern</p></li><li><p><strong>RawConnectionEvents</strong>: Returns individual connection events for detailed investigation</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TxTh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc136c293-8a0c-4e3c-9846-6c24fcebd980_3584x1876.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TxTh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc136c293-8a0c-4e3c-9846-6c24fcebd980_3584x1876.png 424w, https://substackcdn.com/image/fetch/$s_!TxTh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc136c293-8a0c-4e3c-9846-6c24fcebd980_3584x1876.png 848w, https://substackcdn.com/image/fetch/$s_!TxTh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc136c293-8a0c-4e3c-9846-6c24fcebd980_3584x1876.png 1272w, https://substackcdn.com/image/fetch/$s_!TxTh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc136c293-8a0c-4e3c-9846-6c24fcebd980_3584x1876.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TxTh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc136c293-8a0c-4e3c-9846-6c24fcebd980_3584x1876.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c136c293-8a0c-4e3c-9846-6c24fcebd980_3584x1876.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:568117,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.ecapuano.com/i/182671772?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc136c293-8a0c-4e3c-9846-6c24fcebd980_3584x1876.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!TxTh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc136c293-8a0c-4e3c-9846-6c24fcebd980_3584x1876.png 424w, https://substackcdn.com/image/fetch/$s_!TxTh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc136c293-8a0c-4e3c-9846-6c24fcebd980_3584x1876.png 848w, https://substackcdn.com/image/fetch/$s_!TxTh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc136c293-8a0c-4e3c-9846-6c24fcebd980_3584x1876.png 1272w, https://substackcdn.com/image/fetch/$s_!TxTh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc136c293-8a0c-4e3c-9846-6c24fcebd980_3584x1876.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The Docker source is smart about not executing unnecessarily&#8212;if you don&#8217;t specify a container pattern or Docker isn&#8217;t running, it skips entirely. No wasted cycles.</p><p>Key parameters you might want to tune:</p><ul><li><p><code>TimeRangeMinutes</code>: How far back to look (default: 60 minutes)</p></li><li><p><code>ConnectionThreshold</code>: Minimum connections to flag (default: 100)</p></li><li><p><code>VelocityThreshold</code>: Minimum connections/minute for HIGH risk (default: 500)</p></li><li><p><code>DockerContainerPattern</code>: Container name pattern if running MongoDB in Docker</p></li></ul><h2>Assumptions and Limitations</h2><p>A few things to keep in mind:</p><ul><li><p><strong>JSON logging is required.</strong> MongoDB 4.4+ defaults to JSON-formatted logs, which is what this artifact parses. If you&#8217;re running an older version with legacy text logs, this won&#8217;t work out of the box.</p></li><li><p><strong>Log retention matters.</strong> The artifact can only analyze logs that exist. If your MongoDB logs rotate aggressively or the attacker clears them, you&#8217;ll miss the evidence.</p></li><li><p><strong>This is Linux-only.</strong> While MongoDB runs on Windows, the vast majority of production deployments are on Linux. The artifact has a precondition limiting it to Linux systems.</p></li></ul><h2>Get the Artifact</h2><p>The artifact is published on the <a href="https://docs.velociraptor.app/exchange/artifacts/pages/linux.detection.cve202514847.mongobleed/">Velociraptor Artifact Exchange</a>. You can import it directly into your Velociraptor deployment and start hunting immediately using the <strong><a href="https://docs.velociraptor.app/artifact_references/pages/server.import.artifactexchange/">Server.Import.ArtifactExchange</a></strong> server artifact.</p><p>If you&#8217;re running MongoDB in your environment, here&#8217;s what I&#8217;d recommend:</p><ol><li><p><strong>Patch now</strong> if you haven&#8217;t already. The fixed versions are 8.2.3, 8.0.17, 7.0.28, and 6.0.27.</p></li><li><p><strong>Run this artifact</strong> against your MongoDB servers to check for exploitation attempts&#8212;even if you&#8217;ve patched, attackers may have hit you before the fix was applied.</p></li><li><p><strong>Check your log retention</strong>. If you only keep a few hours of logs, you may have already lost evidence. Consider extending retention for security-critical systems.</p></li></ol><p>This vulnerability is trivial to exploit and the POC is public. If your MongoDB instances were internet-exposed with compression enabled, assume you were scanned at minimum.</p><h2>References</h2><ul><li><p><a href="https://doublepulsar.com/merry-christmas-day-have-a-mongodb-security-incident-9537f54289eb">Kevin Beaumont&#8217;s MongoBleed Writeup</a> &#8212; the post that kicked off this research</p></li><li><p><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-14847">CVE-2025-14847 (MITRE)</a></p></li><li><p><a href="https://github.com/joe-desimone/mongobleed">mongobleed POC by Joe Desimone</a></p></li><li><p><a href="https://www.ox.security/blog/attackers-could-exploit-zlib-to-exfiltrate-data-cve-2025-14847/">Ox Security Technical Analysis</a></p></li><li><p><a href="https://jira.mongodb.org/browse/SERVER-115508">MongoDB Bug Filing</a></p></li></ul><p>Happy hunting.</p><div><hr></div><p><em>Want to learn to wield Velociraptor like a pro? Check out our on-demand training: </em><strong><a href="https://academy.digitaldefenseinstitute.com/courses/225936b9-6eec-4838-aae4-5dc65274179b">Threat Hunting &amp; Incident Response with Velociraptor</a></strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://academy.digitaldefenseinstitute.com/courses/225936b9-6eec-4838-aae4-5dc65274179b" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TiIA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef32ce0-603b-4f19-9995-9901eeb3a693_2000x1127.png 424w, https://substackcdn.com/image/fetch/$s_!TiIA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef32ce0-603b-4f19-9995-9901eeb3a693_2000x1127.png 848w, https://substackcdn.com/image/fetch/$s_!TiIA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef32ce0-603b-4f19-9995-9901eeb3a693_2000x1127.png 1272w, https://substackcdn.com/image/fetch/$s_!TiIA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef32ce0-603b-4f19-9995-9901eeb3a693_2000x1127.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TiIA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef32ce0-603b-4f19-9995-9901eeb3a693_2000x1127.png" width="1456" height="820" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4ef32ce0-603b-4f19-9995-9901eeb3a693_2000x1127.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:820,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Threat Hunting &amp; Incident Response with Velociraptor logo&quot;,&quot;title&quot;:&quot;Threat Hunting &amp; Incident Response with Velociraptor logo&quot;,&quot;type&quot;:null,&quot;href&quot;:&quot;https://academy.digitaldefenseinstitute.com/courses/225936b9-6eec-4838-aae4-5dc65274179b&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Threat Hunting &amp; Incident Response with Velociraptor logo" title="Threat Hunting &amp; Incident Response with Velociraptor logo" srcset="https://substackcdn.com/image/fetch/$s_!TiIA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef32ce0-603b-4f19-9995-9901eeb3a693_2000x1127.png 424w, https://substackcdn.com/image/fetch/$s_!TiIA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef32ce0-603b-4f19-9995-9901eeb3a693_2000x1127.png 848w, https://substackcdn.com/image/fetch/$s_!TiIA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef32ce0-603b-4f19-9995-9901eeb3a693_2000x1127.png 1272w, https://substackcdn.com/image/fetch/$s_!TiIA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ef32ce0-603b-4f19-9995-9901eeb3a693_2000x1127.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Eric&#8217;s Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[DFIR Artifact: PowerShell Transcripts]]></title><description><![CDATA[The "flight data recorder" for PowerShell activity.]]></description><link>https://blog.ecapuano.com/p/dfir-artifact-powershell-transcripts</link><guid isPermaLink="false">https://blog.ecapuano.com/p/dfir-artifact-powershell-transcripts</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Thu, 14 Aug 2025 17:44:05 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/06312e5d-3599-4e22-9022-e0d88afd0e95_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You are probably familiar with the concept of the &#8220;black box&#8221; or &#8220;flight data recorder&#8221; that is onboard all commercial airliners. This is the piece of the aircraft most critically sought after in a crash investigation as it contains detailed recordings of everything happening onboard the aircraft up until the accident.</p><p>PowerShell (version 5+) has a similar feature! In a previous post, I wrote about PowerShell <a href="https://blog.ecapuano.com/p/powershell-artifact-consolehost_historytxt">ConsoleHost_History</a>, but PowerShell transcripts are even better (when they are properly enabled!)</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Eric&#8217;s Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h1>What are PowerShell Transcripts?</h1><p>PowerShell transcripts are plain&#8209;text logs that capture everything typed in an interactive PowerShell session <strong>and</strong> all text written back to the console (inputs <em>and</em> outputs). You can start/stop them manually with <code>Start-Transcript</code> / <code>Stop-Transcript</code>, or turn them on automatically across machines via Group Policy / Intune. When enabled, each session writes a file named like <code>PowerShell_transcript.&lt;COMPUTER&gt;.&lt;random&gt;.&lt;timestamp&gt;.txt</code> (by default into the user&#8217;s Documents folder). Enabling the <strong>invocation header</strong> adds a per&#8209;command timestamp line to the log&#8212;gold for timelines. Read more: <a href="https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-7.5">Microsoft Learn</a></p><blockquote><p>TL;DR: Transcripts = &#8220;what the user did and what PowerShell showed,&#8221; with host/process metadata and (optionally) per&#8209;command timestamps. They&#8217;re easy to enable and easy to collect at scale.</p></blockquote><h2>Why Responders Should Care</h2><ul><li><p><strong>Rich context:</strong> Header includes username, &#8220;RunAs&#8221; user, computer name, host application (e.g., <code>powershell.exe</code>, ISE), process ID, PowerShell version, and start/stop times&#8212;handy for tying activity to processes and accounts.</p></li><li><p><strong>Actual outputs:</strong> Unlike <code>ConsoleHost_history.txt</code>/PSReadLine history, transcripts preserve <em>outputs</em>, not just commands&#8212;useful when attackers enumerate, dump configs, or test connectivity.</p></li><li><p><strong>Fleet&#8209;wide coverage:</strong> Enabling the <strong>Turn on PowerShell Transcription</strong> policy is functionally the same as running <code>Start-Transcript</code> for every session. You can also force <strong>Include invocation headers</strong> to get per&#8209;command timestamps.</p></li><li><p><strong>Cross&#8209;version story:</strong> PowerShell 7 (&#8220;PowerShell Core&#8221;) also supports these policies via its own Administrative Templates (&#8220;PowerShell Core&#8221;). </p></li></ul><h2>Where They Live (and How They&#8217;re Named)</h2><p>It&#8217;s imperative to know the various locations Transcripts may exist in your environment so that you&#8217;re prepared to acquire them in an incident. Tools like <a href="https://ericzimmerman.github.io/KapeDocs/#!index.md">KAPE</a> and <a href="https://docs.velociraptor.app/">Velociraptor</a> have solid insights into the <a href="https://github.com/EricZimmerman/KapeFiles/blob/master/Targets/Windows/PowerShellTranscripts.tkape">most common locations</a> of Transcripts and many other forensic artifacts.</p><p><strong>Default (manual </strong><code>Start-Transcript</code><strong>):</strong></p><pre><code>$HOME\Documents\PowerShell_transcript.&lt;COMPUTER&gt;.&lt;random&gt;.&lt;timestamp&gt;.txt</code></pre><p>You may also find them in other locations for various reasons. For instance, I have observed that when <code>SYSTEM</code> runs PowerShell (whether for legitimate or illegitimate reasons), it sometimes generates a transcript in <code>C:\Windows\System32</code>.</p><p><strong>Policy&#8209;controlled output directory (recommended):</strong><br>Set a central, write&#8209;only path (e.g., <code>\\logshare\psx\</code>) so logs persist if the endpoint is wiped. <a href="https://cloud.google.com/blog/topics/threat-intelligence/greater-visibility/">Mandiant recommends</a> a restricted, write&#8209;only share to reduce tampering and lateral visibility.</p><p><strong>Find the configured drop&#8209;off path (Windows PowerShell 5.1):</strong></p><pre><code># HKLM takes precedence over HKCU 
$paths = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription',
         'HKCU:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription'
$cfg = foreach($p in $paths){ if(Test-Path $p){ Get-ItemProperty $p } }
$cfg | Select-Object PSPath, OutputDirectory, EnableTranscripting, EnableInvocationHeader</code></pre><p><strong>PowerShell 7+:</strong> </p><p>In PS7+, policies live under <code>...Microsoft\PowerShellCore\Transcription</code>.</p><p><strong>Key names you&#8217;ll see:</strong> <code>EnableTranscripting</code>, <code>EnableInvocationHeader</code>, <code>OutputDirectory</code> (also present in PowerShell&#8217;s JSON config model).</p><h2>Enable It Right (GPO / Intune / Registry)</h2><p><strong>Group Policy path (Windows PowerShell):</strong><br><code>Computer Configuration &#8594; Administrative Templates &#8594; Windows Components &#8594; Windows PowerShell &#8594; Turn on PowerShell Transcription</code><br>Enabling this is equivalent to starting a transcript for every session. Set <strong>Include invocation headers</strong> and a central <strong>Output directory</strong>.</p><p><strong>PowerShell 7 (&#8220;PowerShell Core&#8221;):</strong><br>Install/use the <strong>PowerShell Core</strong> ADMX templates and configure the same setting under the <strong>PowerShell Core</strong> nodes.</p><p><strong>One&#8209;liner to verify via registry (WinPS 5.1):</strong></p><pre><code>Get-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription' ` -ErrorAction SilentlyContinue | Select EnableTranscripting, EnableInvocationHeader, OutputDirectory</code></pre><p><strong>Intune:</strong> Configure &#8220;Turn on PowerShell Transcription&#8221; and set <strong>Include invocation headers</strong> + <strong>Transcript output directory</strong> in the profile. Read more about this approach <a href="https://www.anoopcnair.com/turn-on-powershell-transcription-with-intune/">here</a>.</p><h2>Field Collection &amp; Triage</h2><p><strong>Quick hunt for local transcripts (note, expects unchanged default paths):</strong></p><pre><code># Assumes default locations
Get-ChildItem -Path C:\Users -Filter 'PowerShell_transcript*.txt' -Recurse -ErrorAction SilentlyContinue |
  Select-Object FullName, Length, LastWriteTime | Sort-Object LastWriteTime -Desc</code></pre><p>For an even more robust version, see this <a href="https://gist.github.com/ecapuano/073859578f91724577d57c99f2c4429c">example</a>.</p><h2>Reading the Header (What You Get for Free)</h2><p>Each transcript begins with a header like:</p><pre><code>**********************
Windows PowerShell transcript start
Start time: 20250814113458
Username: ERIC-PC\eric
RunAs User: ERIC-PC\eric
Configuration Name: 
Machine: ERIC-PC (Microsoft Windows NT 10.0.26100.0)
Host Application: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
Process ID: 58464
PSVersion: 5.1.26100.4768
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.26100.4768
BuildVersion: 10.0.26100.4768
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
&lt;actual commands will follow&gt;</code></pre><p>One of my favorite datapoints in the header is the <code>Host Application</code> field which identifies the process that launched the PowerShell session. While in most cases this will be <code>powershell.exe</code> or <code>pwsh.exe</code>, unusual values&#8212;like <code>rundll32.exe</code>, <code>mshta.exe</code>, or a line-of-business app executable&#8212;can be a goldmine for investigators.</p><p>Spotting a suspicious or unexpected host process can reveal cases where PowerShell was spawned as part of a malicious execution chain (for example, malware using <code>rundll32.exe</code> to run inline PowerShell code). This insight is valuable because it can:</p><ul><li><p><strong>Expose defense evasion</strong> &#8212; Attackers often hide PowerShell inside non-obvious parent processes to blend in with legitimate activity.</p></li><li><p><strong>Provide lead evidence for lateral movement or persistence</strong> &#8212; An odd host process could indicate exploitation of an application vulnerability or abuse of a scheduled task/service.</p></li><li><p><strong>Help correlate with other telemetry</strong> &#8212; Matching the host process name and PID to EDR or Sysmon logs can quickly expand the picture of how and when the PowerShell session was launched.</p></li></ul><p><strong>Pro Tip!</strong></p><p>If <code>wsmprovhost.exe</code> appears as the <code>Host Application</code>, it means the PowerShell session was started via <strong>WinRM</strong> (PowerShell Remoting). This process hosts remote shells on the target and runs under the connecting user&#8217;s context. It&#8217;s normal for admin tasks and automation, but suspicious if seen at odd times, from unusual IPs, or tied to accounts that don&#8217;t typically perform remote management&#8212;often a sign of lateral movement.</p><h2>Reading the Transcript</h2><p>The standard expected output of the transcript itself will be every command that was executed and the output of that command.</p><pre><code># &lt;header removed for brevity&gt;
PS C:\Users\jdoe&gt; Get-Date
Thursday, August 14, 2025 2:02:36 PM

PS C:\Users\jdoe&gt; Get-Process | Select-Object -First 3

Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
    563      36    14692      32120       1.92   1056   1 chrome
    427      24    10240      22144       0.33   3420   1 explorer
    308      20     8232      17896       0.05   8124   1 powershell

PS C:\Users\jdoe&gt; ipconfig

Windows IP Configuration


Ethernet adapter Ethernet0:

   Connection-specific DNS Suffix  . : contoso.local
   IPv4 Address. . . . . . . . . . . : 10.1.2.55
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.1.2.1

PS C:\Users\jdoe&gt; exit
**********************
Windows PowerShell transcript end
End time: 2025-08-14 14:03:10
**********************</code></pre><p>If <strong>invocation headers</strong> are enabled, you&#8217;ll also see per&#8209;command timestamp lines before each command&#8212;perfect for minute&#8209;by&#8209;minute timelines.</p><pre><code># &lt;header removed for brevity&gt;
**********************
Command start time: 20250814140236
**********************
PS C:\Users\jdoe&gt; Get-Date
Thursday, August 14, 2025 2:02:36 PM

**********************
Command start time: 20250814140242
**********************
PS C:\Users\jdoe&gt; Get-Process | Select-Object -First 3

Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
    563      36    14692      32120       1.92   1056   1 chrome
    427      24    10240      22144       0.33   3420   1 explorer
    308      20     8232      17896       0.05   8124   1 powershell

**********************
Command start time: 20250814140252
**********************
PS C:\Users\jdoe&gt; ipconfig

Windows IP Configuration


Ethernet adapter Ethernet0:

   Connection-specific DNS Suffix  . : contoso.local
   IPv4 Address. . . . . . . . . . . : 10.1.2.55
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.1.2.1

**********************
Command start time: 20250814140308
**********************
PS C:\Users\jdoe&gt; exit
**********************
Windows PowerShell transcript end
End time: 2025-08-14 14:03:10
**********************</code></pre><h2>Example: Reconstructing an Intrusion from a Transcript</h2><p>Look for telltale sequences such as:</p><ul><li><p>Recon: <code>Get-ADUser</code>, <code>Get-LocalGroupMember</code>, <code>whoami /all</code></p></li><li><p>Payload fetch/exec: <code>IEX (New-Object Net.WebClient).DownloadString(...)</code></p></li><li><p>Defense evasion: <code>Set-MpPreference -DisableRealtimeMonitoring $true</code>, adding AV exclusions</p></li><li><p>Persistence: <code>schtasks /create ...</code> or <code>New-ItemProperty ... Run</code> keys</p></li><li><p>Exfil test: <code>Invoke-WebRequest</code> to attacker infra</p></li></ul><p>Tie the per&#8209;command timestamps to 4104/4103 events and process trees (EDR) to validate.</p><h2>Limitations &amp; Gotchas (Know Before You Lean on It)</h2><ul><li><p><strong>Order &amp; completeness:</strong> Some host&#8209;written text (e.g., <code>Write-Host</code>) can appear out of order relative to pipeline output. Edge cases can miss output if a script stops transcription mid&#8209;formatting; Microsoft documents these limitations and a workaround (wrap in a script block and pipe to <code>Out-Default</code>). Don&#8217;t panic&#8212;just correlate with event logs.</p></li><li><p><strong>Tamper&#8209;able files:</strong> Transcripts are plaintext owned by the user that generated them. Use a <strong>write&#8209;only</strong> central share and ship copies to your SIEM.</p></li><li><p><strong>Scope:</strong> Transcripts record text in the PowerShell host. If a tool writes to a separate GUI or network socket without emitting console text, you won&#8217;t see it here.</p></li><li><p><strong>Unmanaged or in-process PowerShell</strong> &#8212; Attackers can bypass transcription by loading the PowerShell engine via .NET (e.g., custom runspaces) or using portable/renamed binaries outside your managed installation. These sessions don&#8217;t honor Group Policy/registry logging settings and may evade both transcription and Script Block Logging. Read more about this <a href="https://medium.com/@polygonben/unmasking-defence-evasion-unmanaged-powershell-c-net-process-injection-88d1f1a180d5">here</a>.</p></li><li><p><strong>Version split:</strong> Historical nuance&#8212;Windows PowerShell vs PowerShell 7 policies live in different registry hives/nodes; ensure you configure both where PS7 is deployed.</p></li><li><p><strong>Ops impact:</strong> If you force logging to an unavailable network share, some automation may hang or fail; test carefully before broad rollout. (If centralizing, ensure service accounts can write and you have offline buffering.)</p></li></ul><h2>Detection Notes (Hardening &amp; Evasion)</h2><ul><li><p><strong>Watch for logging disablement:</strong> Alert on changes to transcription/script&#8209;block logging registry keys (Enable/Disable flips) under user or machine policy hives&#8212;classic defense&#8209;evasion. Sigma rules exist specifically for this pattern, good example detection <a href="https://detection.fyi/sigmahq/sigma/windows/registry/registry_set/registry_set_powershell_logging_disabled/">here</a>.</p></li><li><p><strong>Pair with Script Block Logging:</strong> Script block logs (<code>4104</code>) capture the <em>de&#8209;obfuscated</em> code that executed. Even if an attacker obfuscates or uses <code>-EncodedCommand</code>, you still get the decoded content in many cases. Read more about this <a href="https://docs.nxlog.co/integrate/powershell-activity.html">here</a>.</p></li><li><p><strong>Correlate transcripts with Script Block Logging for stealthy techniques</strong> &#8212; When paired with Event ID 4104 (decoded script blocks), transcripts can expose both the original cradle command (e.g., <code>IEX (New-Object Net.WebClient).DownloadString(...)</code>) and the attacker&#8217;s obfuscated payload. This combined view gives analysts a before/after look that&#8217;s far harder for adversaries to fully hide, even when using the infamous &#8220;PowerShell Download Cradle&#8221;. Read about this technique <a href="https://dfir.au/posts/2018/downloadcradle/">here</a>.</p></li></ul><h2>Enablement Cheat&#8209;Sheet</h2><p><strong>Manual (ad&#8209;hoc, only for current session):</strong></p><pre><code>Start-Transcript -OutputDirectory 'C:\Transcripts' -IncludeInvocationHeader
# ...do work...
Stop-Transcript</code></pre><p><strong>Manual (permanent, machine-wide):</strong></p><pre><code><code>New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription' -Name EnableTranscripting -Value 1 -PropertyType DWord -Force
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription' -Name EnableInvocationHeader -Value 1 -PropertyType DWord -Force</code></code></pre><p><strong>Fleet (policy):</strong></p><ul><li><p>Turn on <strong>PowerShell Transcription</strong> (+ include invocation headers) and point <strong>Output Directory</strong> at a central, write&#8209;only share. (Windows PowerShell <em>and</em> PowerShell Core templates.)</p></li></ul><p><strong>Verify it&#8217;s working (PS 5.1 &amp; PS 7):</strong></p><pre><code>$roots = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\Transcription',
         'HKLM:\SOFTWARE\Policies\Microsoft\PowerShellCore\Transcription'
$roots | ?{ Test-Path $_ } | %{
  [pscustomobject](Get-ItemProperty $_ | 
    Select EnableTranscripting, EnableInvocationHeader, OutputDirectory, PSPath)
}</code></pre><h1>Summary</h1><p>Treat PowerShell transcripts as your shell&#8217;s flight recorder: enable them everywhere, include invocation headers, point output to a restricted, write&#8209;only path, and alert on attempts to disable logging. In return you get per&#8209;session, per&#8209;command truth that stitches cleanly to 4103/4104 and EDR process trees, survives history clearing, and spotlights the telltale flags, Defender&#8209;tamper switches, and LOLBIN abuse. They&#8217;re plaintext and not tamper&#8209;proof&#8212;so hash, preserve, and corroborate&#8212;but for the cost of a single GPO/Intune setting they deliver incredible visibility. If you change one thing after reading this, make PowerShell transcription your default; future&#8209;you (and your incident timeline) will thank you.</p><p>Want to get hands-on experience with this sort of analysis? Check out <a href="https://digitaldefenseinstitute.com/#courses">my hands-on courses</a> which leverage these and many other artifacts for intrusion analysis in live-fire IR simulations.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Eric&#8217;s Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Introduction to YARA]]></title><description><![CDATA[The Swiss-army knife of malware detection.]]></description><link>https://blog.ecapuano.com/p/introduction-to-yara</link><guid isPermaLink="false">https://blog.ecapuano.com/p/introduction-to-yara</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Tue, 11 Mar 2025 21:27:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!t_JD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f4812a7-0852-48ec-b6aa-ad4dec3cfef8_600x664.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you've spent any time in malware analysis, threat hunting, or incident response, you've likely heard of YARA. YARA is an essential tool for security professionals looking to identify and classify malware samples based on textual or binary patterns. But what makes YARA so powerful, and how can you start leveraging it in your security workflows? Let's dive in.</p><h2>What is YARA?</h2><p>YARA is an open-source tool created by Victor M. Alvarez to help malware researchers and analysts define and search for malware families based on customized signatures. Instead of relying on traditional hash-based detection (which is easily bypassed with minor file modifications), YARA enables analysts to create flexible and reusable rules that describe known malware behaviors.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Eric&#8217;s Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>At its core, YARA rules consist of pattern-matching conditions that are applied to files, memory dumps, or network traffic to detect malicious activity. These rules help analysts identify similar malware samples, even when attackers make modifications to evade detection.</p><h2>Why YARA is a Game-changer for Threat Hunting</h2><p>Unlike traditional antivirus signatures that rely on exact file hashes, YARA allows for:</p><ul><li><p><strong>Pattern-based detection</strong>: Define text or binary sequences to identify malware, even if its hash changes.</p></li><li><p><strong>Behavior-based identification</strong>: Detect threats based on characteristics rather than exact matches.</p></li><li><p><strong>Memory scanning</strong>: Analyze live processes for suspicious patterns.</p></li><li><p><strong>Automated threat hunting</strong>: Integrate with SIEMs, EDRs, and other security tools for real-time detection.</p></li><li><p><strong>Cross-platform support</strong>: YARA can be used on Windows, Linux, and macOS, making it versatile for different environments.</p></li></ul><h2>Writing Your First YARA Rule</h2><p>A simple YARA rule looks like this:</p><pre><code><code>rule Example_Malware_Detection {
    meta:
        author = "Your Name"
        description = "Detects a sample malware family"
        date = "2025-03-11"
    strings:
        $malicious_string1 = "bad_code_here"
        $malicious_string2 = { E8 00 00 00 00 5D C3 }
    condition:
        any of them // matches any of the strings provided
}
</code></code></pre><h3>Breakdown of this rule:</h3><ul><li><p><strong>Meta section</strong>: Includes metadata about the rule.</p></li><li><p><strong>Strings section</strong>: Defines text or byte patterns to look for.</p></li><li><p><strong>Condition section</strong>: Specifies when to trigger a match (e.g., if any of the defined strings appear in a file).</p></li></ul><h3>Let&#8217;s Try It!</h3><p>Let&#8217;s write a simple rule to detect the <code>cmd.exe</code> executable using conditions that are met within this binary.</p><ol><li><p>Download the YARA engine here: </p><ol><li><p>https://github.com/VirusTotal/yara/releases</p></li></ol></li><li><p>Download the Sysinternals Strings utility here: </p><ol><li><p>https://learn.microsoft.com/en-us/sysinternals/downloads/strings</p></li></ol></li><li><p>Run strings against cmd.exe to see what type of human-readable strings we can match with our pattern</p><pre><code>strings64.exe -accepteula C:\Windows\System32\cmd.exe</code></pre><ol><li><p>We&#8217;ll select a string which is unique to this executable, at least for the sake of this exercise.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!t_JD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f4812a7-0852-48ec-b6aa-ad4dec3cfef8_600x664.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!t_JD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f4812a7-0852-48ec-b6aa-ad4dec3cfef8_600x664.png 424w, https://substackcdn.com/image/fetch/$s_!t_JD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f4812a7-0852-48ec-b6aa-ad4dec3cfef8_600x664.png 848w, https://substackcdn.com/image/fetch/$s_!t_JD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f4812a7-0852-48ec-b6aa-ad4dec3cfef8_600x664.png 1272w, https://substackcdn.com/image/fetch/$s_!t_JD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f4812a7-0852-48ec-b6aa-ad4dec3cfef8_600x664.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!t_JD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f4812a7-0852-48ec-b6aa-ad4dec3cfef8_600x664.png" width="600" height="664" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2f4812a7-0852-48ec-b6aa-ad4dec3cfef8_600x664.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:664,&quot;width&quot;:600,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:34478,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.ecapuano.com/i/158868242?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f4812a7-0852-48ec-b6aa-ad4dec3cfef8_600x664.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!t_JD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f4812a7-0852-48ec-b6aa-ad4dec3cfef8_600x664.png 424w, https://substackcdn.com/image/fetch/$s_!t_JD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f4812a7-0852-48ec-b6aa-ad4dec3cfef8_600x664.png 848w, https://substackcdn.com/image/fetch/$s_!t_JD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f4812a7-0852-48ec-b6aa-ad4dec3cfef8_600x664.png 1272w, https://substackcdn.com/image/fetch/$s_!t_JD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f4812a7-0852-48ec-b6aa-ad4dec3cfef8_600x664.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></li><li><p>We can use this string to craft a YARA rule.</p><ol><li><p>Save this to <code>detect_cmd.yar</code> and place it in the directory you unzipped the YARA engine</p><pre><code>rule detect_cmd
{
    meta:
        description = "Simple example rule to detect cmd.exe"
        author = "blog.ecapuano.com"
    
    strings:
        $mz = { 4D 5A }  // MZ header for portable executable files
        $cmd_processor = "Windows Command Processor" ascii
    
    condition:
        $mz at 0 and $cmd_processor
}</code></pre><ol><li><p>Notice, I&#8217;ve added a condition called <code>$mz</code> that looks for the well-known header of a portable executable being at location <code>0</code> or the start of the file, which is a good way to ensure we only trigger a detection on an executable.</p></li></ol></li></ol></li><li><p>Now, with your rule file saved, test it by scanning your own cmd.exe (on a Windows system of course)</p><pre><code>yara64.exe -s detect_cmd.yar C:\Windows\system32\cmd.exe</code></pre><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5Xj_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc486a597-db7a-45a3-a77e-d5cca1fa9eef_1460x107.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5Xj_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc486a597-db7a-45a3-a77e-d5cca1fa9eef_1460x107.png 424w, https://substackcdn.com/image/fetch/$s_!5Xj_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc486a597-db7a-45a3-a77e-d5cca1fa9eef_1460x107.png 848w, https://substackcdn.com/image/fetch/$s_!5Xj_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc486a597-db7a-45a3-a77e-d5cca1fa9eef_1460x107.png 1272w, https://substackcdn.com/image/fetch/$s_!5Xj_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc486a597-db7a-45a3-a77e-d5cca1fa9eef_1460x107.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5Xj_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc486a597-db7a-45a3-a77e-d5cca1fa9eef_1460x107.png" width="1456" height="107" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c486a597-db7a-45a3-a77e-d5cca1fa9eef_1460x107.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:107,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:18632,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.ecapuano.com/i/158868242?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc486a597-db7a-45a3-a77e-d5cca1fa9eef_1460x107.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5Xj_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc486a597-db7a-45a3-a77e-d5cca1fa9eef_1460x107.png 424w, https://substackcdn.com/image/fetch/$s_!5Xj_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc486a597-db7a-45a3-a77e-d5cca1fa9eef_1460x107.png 848w, https://substackcdn.com/image/fetch/$s_!5Xj_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc486a597-db7a-45a3-a77e-d5cca1fa9eef_1460x107.png 1272w, https://substackcdn.com/image/fetch/$s_!5Xj_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc486a597-db7a-45a3-a77e-d5cca1fa9eef_1460x107.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p></p></li></ol></li></ol><h2>Where to Find High-quality YARA Rules</h2><p>Creating your own YARA rules is powerful, but leveraging community-driven rules can give you a head start. Some great sources include:</p><ul><li><p><a href="https://yarahq.github.io/">YARA Forge</a> - YARA Forge automates the collection, standardization, and optimization of high-quality YARA rules from public repositories.</p></li><li><p><a href="https://github.com/Yara-Rules/rules">YARA-Rules Repository</a> &#8211; A large collection of community-maintained rules.</p></li><li><p><a href="https://github.com/Neo23x0/signature-base">Florian Roth's Sigma &amp; YARA Rules</a> &#8211; Excellent rules for threat detection.</p></li><li><p><a href="https://virustotal.github.io/yara/">VirusTotal&#8217;s YARA Hub</a> &#8211; A great resource for learning more about YARA and integrating it into your workflows.</p></li></ul><h2>Automating YARA Scanning</h2><p>To maximize YARA&#8217;s potential, integrate it with automation tools like:</p><ul><li><p><a href="https://docs.velociraptor.app/docs/forensic/searching/">Velociraptor</a> &#8211; Conducts live memory and file system analysis using YARA.</p></li><li><p><a href="https://www.nextron-systems.com/thor/">THOR Scanner</a> - Nextron&#8217;s own scanner using their private and public rulesets.</p></li><li><p><a href="https://docs.limacharlie.io/docs/ext-yara">LimaCharlie</a> &#8211; Automates YARA-based detections across an enterprise.</p></li></ul><h2>Final Thoughts</h2><p>YARA is an indispensable tool in any security professional&#8217;s toolkit. Whether you're analyzing malware, conducting threat hunting, or building advanced detection capabilities, YARA provides the flexibility and power needed to stay ahead of adversaries. Start experimenting with YARA today, and soon enough, you'll be writing powerful rules that can spot malware before it becomes a problem.</p><h1>Want to try this in a real threat detection scenario? </h1><p>Check out the hands-on lab in <a href="https://academy.digitaldefenseinstitute.com/courses/eca7ec1f-22dd-4d1f-b473-7a085facb26a">So You Want to be a SOC Analyst?</a> to use YARA to find actual malware in a live environment!</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Eric&#8217;s Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The Role of Fuzzy Hashes in Security Operations]]></title><description><![CDATA[Enhancing Malware Analysis with Similarity-Based Hashing Techniques]]></description><link>https://blog.ecapuano.com/p/the-role-of-fuzzy-hashes-in-security</link><guid isPermaLink="false">https://blog.ecapuano.com/p/the-role-of-fuzzy-hashes-in-security</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Thu, 19 Dec 2024 02:35:55 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/9529a614-5af8-4264-8f22-5909fcb0a72e_1024x1024.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Bonus Content!</strong> Hands-on Lab at the bottom :)</p><div><hr></div><p>Security Operations daily routines can feel like a game of whack-a-mole&#8212;because often teams are using IOCs (indicators of compromise) that have a very short shelf life. For instance, an IT person might detect suspicious activity to/from a certain IP address, and decide to simply block that IP address and move on. The problem with that approach is that IP addresses are disposable and easy to change. <strong>The same is true with malware hashes.</strong></p><p>A traditional approach to identifying malware is to catalog its static hash (such as SHA1, SHA256, MD5) into a list of known malicious files. This is how traditional antivirus software operated&#8212;it compared files on your system against this list of known-bad hashes. However, this method has a significant weakness: static hashes are extremely fragile. Even the tiniest modification to a file completely changes its hash, allowing a previously identified "bad" file to appear "good" again.</p><p>Here are some common techniques malware authors use to evade static hash detection:</p><ul><li><p>Byte manipulation: Adding, removing, or modifying single bytes in the malware code</p></li><li><p>Payload repackaging: Compressing or encrypting the malicious code differently each time</p></li><li><p>Polymorphic code: Automatically modifying the malware's code structure while maintaining functionality</p></li><li><p>Padding insertion: Adding random data between code sections to change the file's hash</p></li><li><p>Code reordering: Changing the sequence of code blocks without affecting the program's behavior</p></li></ul><p>These simple modifications completely change the malware's static hash while preserving its malicious functionality, making traditional hash-based detection ineffective.</p><p>That&#8217;s where fuzzy hashes come in. Unlike traditional hashes, which are great for spotting exact matches, fuzzy hashes focus on finding &#8220;close enough&#8221; similarities. This makes them incredibly useful for detecting malware that&#8217;s been slightly modified or identifying patterns in large sets of data. In this post, we&#8217;ll break down the different types of hashes, how fuzzy hashes work, and why they&#8217;re a key part of malware identification.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Eric&#8217;s Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h1>Static Hashes</h1><p>Traditional static hashing algorithms like MD5, SHA1, and SHA256 work by processing a file's data in a deterministic way to produce a fixed-length output (the hash). Here's how they generally work:</p><ol><li><p>The file is read as a stream of bytes</p></li><li><p>The data is processed in fixed-size blocks through a mathematical function</p></li><li><p>Each block's result is combined with the previous results in a way that any change, no matter how small, cascades through the entire calculation</p></li><li><p>The final output is a fixed-length string of characters that uniquely represents the input data</p></li></ol><p>This is why changing even a single bit in a file results in a completely different hash value &#8212; the cascading nature of the algorithm ensures that the entire hash changes. While this property makes static hashes excellent for verifying file integrity and detecting exact matches, it makes them ineffective for detecting similar or slightly modified files.</p><h1>Fuzzy Hashes</h1><p>Fuzzy hashes work differently from static hashes by breaking down files into smaller chunks and creating signatures that can survive minor modifications. Here's how they typically work:</p><ol><li><p>Files are divided into variable-sized blocks based on content patterns rather than fixed sizes</p></li><li><p>Each block is hashed separately, creating a sequence of smaller hashes rather than one large hash</p></li><li><p>The sequence of block hashes is combined to create a "fuzzy hash signature" that represents the file's structure</p></li><li><p>When comparing files, their fuzzy hash signatures are analyzed for similarity, producing a match percentage rather than a binary match/no-match result</p></li></ol><p>This approach offers several key advantages for security analysts:</p><ul><li><p>Can identify variants of known malware even after minor code modifications</p></li><li><p>Maintains effectiveness against common malware obfuscation techniques</p></li><li><p>Provides similarity scores that help analysts correlate separate investigations</p></li><li><p>Works well for identifying malware families or code reuse</p></li></ul><p>Below, we&#8217;ll break down a few of the most common fuzzy hashing techniques.</p><h2>SSDEEP</h2><p><a href="https://github.com/ssdeep-project/ssdeep">SSDEEP</a> is one of the most widely used fuzzy hashing tools in cybersecurity. It implements <a href="http://dx.doi.org/10.1016/j.diin.2006.06.015">context triggered piecewise hashing</a> (CTPH), which was originally developed for spam detection but found great utility in malware analysis.</p><p>Here's how SSDEEP specifically works:</p><ol><li><p>It divides the input file into blocks based on content patterns rather than fixed sizes</p></li><li><p>Uses a rolling hash function to identify trigger points in the data that determine block boundaries</p></li><li><p>Generates a hash for each block using a traditional hashing function</p></li><li><p>Combines these block hashes into a single signature that represents the file's structure</p></li></ol><p>Key advantages of SSDEEP include:</p><ul><li><p>Ability to detect files that are similar but not identical</p></li><li><p>Resistance to simple obfuscation techniques commonly used by malware authors</p></li><li><p>Generation of compact signatures that are easy to store and compare</p></li><li><p>Fast comparison operations making it practical for large-scale analysis</p></li></ul><p>SSDEEP outputs similarity scores from 0 to 100, where 100 indicates the highest similarity between two files. Security analysts typically consider scores above 50 as significant enough to warrant further investigation.</p><p>Read more about SSDEEP</p><ul><li><p><a href="https://ssdeep-project.github.io/ssdeep/index.html">https://ssdeep-project.github.io/ssdeep/index.html</a></p></li></ul><h2>IMPHASH (Import Hash)</h2><p><a href="https://cloud.google.com/blog/topics/threat-intelligence/tracking-malware-import-hashing/">IMPHASH</a>, originally developed by Mandiant in 2014, is another fuzzy hashing technique specifically designed for Windows Portable Executable (PE) files. Unlike ssdeep which analyzes the entire file content, IMPHASH focuses on the <a href="https://sandsprite.com/CodeStuff/Understanding_imports.html">Import Address Table</a> (IAT) of executable files.</p><p>Here's how IMPHASH works:</p><ol><li><p>It extracts the Import Address Table from a PE file</p></li><li><p>Combines the DLL names and their imported function names in a specific order</p></li><li><p>Creates a hash of this combined string using MD5</p></li></ol><p>IMPHASH is particularly useful because:</p><ul><li><p>Malware variants often maintain similar import patterns even when the rest of the code changes</p></li><li><p>It can identify malware families that use the same codebase or development patterns</p></li><li><p>It's effective at detecting packed or obfuscated malware that share similar unpacking routines</p></li><li><p>The calculation is relatively fast compared to other fuzzy hashing methods</p></li><li><p>It&#8217;s natively supported in popular monitoring tools like <a href="https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon">Sysmon</a></p></li></ul><p>However, IMPHASH does have limitations:</p><ul><li><p>Only works with Windows PE files</p></li><li><p>Can be defeated if malware authors deliberately modify their import patterns</p></li><li><p>May produce false positives with legitimate applications that share common import patterns (happens more often than you&#8217;d think)</p></li></ul><p>Read more about IMPHASH</p><ul><li><p><a href="https://blog.virustotal.com/2014/02/virustotal-imphash.html">https://blog.virustotal.com/2014/02/virustotal-imphash.html</a></p></li><li><p><a href="https://cloud.google.com/blog/topics/threat-intelligence/tracking-malware-import-hashing/">https://cloud.google.com/blog/topics/threat-intelligence/tracking-malware-import-hashing/</a></p></li></ul><h2>TLSH (Trend Micro Locality Sensitive Hash)</h2><p><a href="https://github.com/trendmicro/tlsh">TLSH</a> is another fuzzy hashing algorithm that was developed by Trend Micro and released as open source. It's particularly effective at identifying similarities between files, even when they've undergone significant modifications.</p><p>Here's how TLSH works:</p><ol><li><p>The file is split into sliding windows</p></li><li><p>These windows are used to populate a <a href="https://en.wikipedia.org/wiki/Bloom_filter#Counting_Bloom_filters">counting bloom filter</a></p></li><li><p>The bloom filter data is processed to generate a digest</p></li><li><p>Final hash includes file metadata like length and quartile points</p></li></ol><p>Key advantages of TLSH include:</p><ul><li><p>More robust against certain types of file modifications compared to SSDEEP</p></li><li><p>Better performance when comparing large sets of files</p></li><li><p>Provides distance scores that are more consistent across different file sizes</p></li><li><p>Works well with both small and large files (recommended minimum 50 bytes)</p></li></ul><p>TLSH has some unique characteristics that make it particularly valuable for malware analysis:</p><ul><li><p>The distance scoring is symmetrical, meaning comparing A to B gives the same result as B to A</p></li><li><p>It's less sensitive to file size differences than other fuzzy hashing algorithms</p></li><li><p>The algorithm is designed to be robust against adversarial modifications</p></li><li><p>Can effectively cluster similar files in large datasets</p></li></ul><p>Like other fuzzy hashing methods, TLSH should be used as part of a comprehensive malware analysis strategy, often in combination with SSDEEP and IMPHASH for the most effective results.</p><p>Read more about TLSH</p><ul><li><p><a href="https://github.com/trendmicro/tlsh/blob/master/TLSH_CTC_final.pdf">https://github.com/trendmicro/tlsh/blob/master/TLSH_CTC_final.pdf</a></p></li><li><p><a href="https://github.com/trendmicro/tlsh/blob/master/TLSH_Introduction.pdf">https://github.com/trendmicro/tlsh/blob/master/TLSH_Introduction.pdf</a></p></li></ul><h1>Want to try it yourself?</h1><p>I've created a hands-on lab so you can get practical experience with this concept.</p><p>The lab consists of a single PowerShell script which does the following;</p><ol><li><p>Downloads and unzips SSDEEP to the working directory.</p></li><li><p>Copies itself 9 times, adding a slight modification (random GUID) to each copy.</p></li><li><p>Captures static and fuzzy hashes of the original and each copy.</p></li><li><p>Interactively compares the hash techniques.</p></li></ol><h2>Lab Instructions</h2><p>While you <em>can</em> fire up a VM for this one, it&#8217;s not necessary. Simply delete the folder when you&#8217;re done. </p><ol><li><p>Create a folder anywhere on your system, like your Desktop or a temporary folder.</p></li><li><p>Download <a href="https://gist.github.com/ecapuano/ac7c8b37e4723f872e6f56076e8e694c">this script</a> to a file called <code>HashMorpher.ps1</code> in the newly created folder.</p></li><li><p>Inspect the script! It&#8217;s very straight-forward and well commented.</p><ol><li><p>If you&#8217;re feeling paranoid, feed it to <a href="https://chatgpt.com/share/6763828c-8248-800b-8286-0a664c1b148d">ChatGPT</a>!</p></li></ol></li><li><p>Run the script in PowerShell.</p><p><code>.\HashMorpher.ps1</code></p></li><li><p>Follow the prompts, learn cool stuff.</p></li><li><p>Repeat as many times as you wish.</p></li><li><p>Delete the folder when you&#8217;re done.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;8f34614e-ed1b-43bf-b81f-690e189d666b&quot;,&quot;duration&quot;:null}"></div></li></ol><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/p/the-role-of-fuzzy-hashes-in-security?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Eric&#8217;s Substack! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/p/the-role-of-fuzzy-hashes-in-security?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.ecapuano.com/p/the-role-of-fuzzy-hashes-in-security?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div>]]></content:encoded></item><item><title><![CDATA[Atomic & Stateful Detection Rules]]></title><description><![CDATA[Harnessing the Power of Precision and Context in Detection Engineering]]></description><link>https://blog.ecapuano.com/p/atomic-and-stateful-detection-rules</link><guid isPermaLink="false">https://blog.ecapuano.com/p/atomic-and-stateful-detection-rules</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Mon, 14 Oct 2024 19:20:55 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/15982d5a-678a-4be3-bf97-9a9863b9b18e_1024x1024.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hello, readers! I had a topic in mind that I felt might make a good post for those breaking into the defensive side of information security: <strong>atomic</strong> and <strong>stateful</strong> detections.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Eric&#8217;s Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><h2>What are they?</h2><p>In detection engineering, effective detection strategies hinge on understanding the two primary types of detection rules: atomic and stateful. Both serve crucial purposes, and neither is inherently better than the other, as each has specific strengths depending on the goal.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sG-D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc773f14b-3b3c-4e1a-a013-d5eaa3f409ce_919x759.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sG-D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc773f14b-3b3c-4e1a-a013-d5eaa3f409ce_919x759.png 424w, https://substackcdn.com/image/fetch/$s_!sG-D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc773f14b-3b3c-4e1a-a013-d5eaa3f409ce_919x759.png 848w, https://substackcdn.com/image/fetch/$s_!sG-D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc773f14b-3b3c-4e1a-a013-d5eaa3f409ce_919x759.png 1272w, https://substackcdn.com/image/fetch/$s_!sG-D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc773f14b-3b3c-4e1a-a013-d5eaa3f409ce_919x759.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sG-D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc773f14b-3b3c-4e1a-a013-d5eaa3f409ce_919x759.png" width="919" height="759" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c773f14b-3b3c-4e1a-a013-d5eaa3f409ce_919x759.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:759,&quot;width&quot;:919,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:77541,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sG-D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc773f14b-3b3c-4e1a-a013-d5eaa3f409ce_919x759.png 424w, https://substackcdn.com/image/fetch/$s_!sG-D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc773f14b-3b3c-4e1a-a013-d5eaa3f409ce_919x759.png 848w, https://substackcdn.com/image/fetch/$s_!sG-D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc773f14b-3b3c-4e1a-a013-d5eaa3f409ce_919x759.png 1272w, https://substackcdn.com/image/fetch/$s_!sG-D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc773f14b-3b3c-4e1a-a013-d5eaa3f409ce_919x759.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Atomic detections</strong> focus on <em>single, isolated events</em> or activities that can be identified as malicious or benign without further context. These are quick and precise but limited in scope.</p><p><strong>Stateful detections</strong>, often called correlation rules, rely on analyzing <em>multiple events over time</em> to build context and detect patterns of malicious behavior. They offer more depth but come with added complexity.</p><p>Simply put, atomic detections focus on identifying a single event as potentially harmful, while stateful rules analyze multiple events to reveal behaviors that might indicate a larger issue.</p><h2>Example of an Atomic Detection</h2><p>Let&#8217;s first look at a simple example for an atomic detection. <a href="https://github.com/SigmaHQ/sigma">Sigma</a> is an open-source standard for writing detection rules in a platform-agnostic format, making it easier to share and apply detection logic across different systems and SIEMs. Below is an example of an atomic <a href="https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_whoami_execution_from_high_priv_process.yml">Sigma rule</a> which looks for execution of <code>whoami.exe</code> with an unusually high privileged context for this process.</p><pre><code>title: Whoami.EXE Execution From Privileged Process
id: 79ce34ca-af29-4d0e-b832-fc1b377020db
related:
    - id: 80167ada-7a12-41ed-b8e9-aa47195c66a1
      type: obsolete
status: test
description: Detects the execution of "whoami.exe" by privileged accounts that are often abused by threat actors
references:
    - https://speakerdeck.com/heirhabarov/hunting-for-privilege-escalation-in-windows-environment
    - https://web.archive.org/web/20221019044836/https://nsudo.m2team.org/en-us/
author: Florian Roth (Nextron Systems), Teymur Kheirkhabarov
date: 2022-01-28
modified: 2023-12-04
tags:
    - attack.privilege-escalation
    - attack.discovery
    - attack.t1033
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - OriginalFileName: 'whoami.exe'
        - Image|endswith: '\whoami.exe'
    selection_user:
        User|contains:
            - 'AUTHORI'
            - 'AUTORI'
            - 'TrustedInstaller'
    condition: all of selection_*
falsepositives:
    - Unknown
level: high</code></pre><p>This rule only needs a <strong>single</strong> process creation event to find this criteria, therefore, it is <strong>atomic</strong>.</p><h2>Example of a Stateful Detection</h2><p>While Sigma is an extremely popular collection of open source detection rules, it has historically been limited to only atomic rules. However, recent advancements in the Sigma project have <a href="https://sigmahq.io/docs/meta/correlations.html">introduced support for stateful rules</a> for some conversion backends.</p><p>One of the simplest and most popular examples of a stateful rule is looking for brute force activity. The approach is often &#8220;look for X number of failed logons over Y amount of time.&#8221; The logic is simple enough, but cannot be accomplished with atomic rules because the rule must observe multiple events over a time period. It gets even trickier when you add &#8220;X number of logons, by the same username OR from the same source IP, over Y amount of time.&#8221;</p><p>Here is an <strong>atomic</strong> detection looking for a single failed logon. (<a href="https://sigmahq.io/docs/meta/correlations.html#event-count">source</a>)</p><pre><code>title: Windows Failed Logon Event
name: failed_logon # Rule Reference
description: Detects failed logon events on Windows systems.
logsource:
    product: windows
    service: security
detection:
    selection:
        EventID: 4625
    condition: selection</code></pre><p>This would be an incredibly noisy rule as failed logons happen all of the time.</p><p>If we want to detect only an unusually high number of failed logons in a short period of time, we&#8217;d need a <strong>stateful</strong> rule.</p><pre><code>title: Multiple failed logons for a single user (possible brute force attack)
correlation:
    type: event_count
    rules:
        - failed_logon # Referenced here
    group-by:
        - TargetUserName
        - TargetDomainName
    timespan: 5m
    condition:
        gte: 10</code></pre><p>Notice that we can define a <code>timespan</code>, <code>condition</code>, and even <code>group-by</code> values to fine-tune the behavior of our stateful rule. With this logic, our rule will only fire when 10 or more failed logons occur within 5 minutes, where the same username is observed across all events.</p><p>Now, it&#8217;s important to state that there are other types of stateful rules beyond a simple &#8220;X count over Y amount of time&#8221;&#8230; You can also track more complex things such as event ancestry. For instance, you might want to detect on a very particular process chain such as <code>winword.exe</code> &#8594; <code>cmd.exe</code> &#8594; <code>wscript.exe</code> &#8594; <code>mshta.exe</code>. This would be nearly impossible in an atomic rule, because often <strong>only the parent process information is available in the context of a process creation event</strong>. This means an atomic rule can only know one level above any given process event. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ACqi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1879a56-9d6c-4a83-a838-dc64e978fa3e_689x486.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ACqi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1879a56-9d6c-4a83-a838-dc64e978fa3e_689x486.png 424w, https://substackcdn.com/image/fetch/$s_!ACqi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1879a56-9d6c-4a83-a838-dc64e978fa3e_689x486.png 848w, https://substackcdn.com/image/fetch/$s_!ACqi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1879a56-9d6c-4a83-a838-dc64e978fa3e_689x486.png 1272w, https://substackcdn.com/image/fetch/$s_!ACqi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1879a56-9d6c-4a83-a838-dc64e978fa3e_689x486.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ACqi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1879a56-9d6c-4a83-a838-dc64e978fa3e_689x486.png" width="689" height="486" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b1879a56-9d6c-4a83-a838-dc64e978fa3e_689x486.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:486,&quot;width&quot;:689,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:53202,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ACqi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1879a56-9d6c-4a83-a838-dc64e978fa3e_689x486.png 424w, https://substackcdn.com/image/fetch/$s_!ACqi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1879a56-9d6c-4a83-a838-dc64e978fa3e_689x486.png 848w, https://substackcdn.com/image/fetch/$s_!ACqi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1879a56-9d6c-4a83-a838-dc64e978fa3e_689x486.png 1272w, https://substackcdn.com/image/fetch/$s_!ACqi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1879a56-9d6c-4a83-a838-dc64e978fa3e_689x486.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In the first example, if we only need to know when <code>winword.exe</code> <em>directly</em> launches <code>mshta.exe</code>, we could accomplish this by observing a single Event 4688 (or Sysmon Event 1) and find both the Image and Parent Image fields containing the required detection data.</p><p>In the second example, <code>winword.exe</code> still launches <code>mshta.exe</code>, but <em>not directly</em>. Multiple other processes are chained together before <code>mshta.exe</code> is ultimately executed. The only way to know that <code>mshta.exe</code> was a grandchild of <code>winword.exe</code> is with a stateful rule engine that can keep track of the entire chain. </p><h2>Summary</h2><p>In conclusion, both atomic and stateful detection rules play critical roles in detection engineering, each excelling in different scenarios. <strong>Atomic rules</strong> are fast, straightforward, and effective for simple, well-defined threats like detecting the execution of a specific malicious file, such as <code>mimikatz.exe</code>. In such cases, only a single event or piece of telemetry needs to be observed to trigger an alert, making atomic rules ideal for pinpointing specific behaviors quickly.</p><p>On the other hand, when dealing with more complex attack patterns that unfold over time or across multiple data points, <strong>stateful detection</strong> becomes invaluable. For instance, detecting a series of 12 failed login attempts by a user like <code>john.doe</code> within a 5-minute window requires correlating several events across a timeline to identify suspicious behavior. In this case, stateful rules are crucial for building context and uncovering more advanced or stealthy threats that might otherwise go unnoticed.</p><p>To build a robust detection strategy, it&#8217;s essential to leverage both atomic and stateful rules in your environment. Start by using atomic rules for known, high-confidence threats, while stateful rules can help uncover stealthy or advanced attacks that unfold over time.</p><p>To enhance your understanding and dive deeper into stateful and atomic detections, I recommend exploring the following resources:</p><ul><li><p><a href="https://sigmahq.io/">Sigma Detection Format</a></p></li><li><p><a href="https://www.elastic.co/security-labs/practical-security-engineering-stateful-detection">Practical Security Engineering: Stateful Detection</a></p></li><li><p><a href="https://sigmahq.io/docs/meta/correlations.html">Sigma Correlations Documentation</a></p></li><li><p><a href="https://docs.limacharlie.io/v2/docs/stateful-rules">LimaCharlie Documentation on Stateful Rules</a></p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Eric&#8217;s Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Prefetch Analysis Lab]]></title><description><![CDATA[Analyze evidence of execution artifacts from a data breach investigation.]]></description><link>https://blog.ecapuano.com/p/prefetch-analysis-lab</link><guid isPermaLink="false">https://blog.ecapuano.com/p/prefetch-analysis-lab</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Mon, 29 Apr 2024 17:16:09 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff829a240-b16b-4039-9ccc-32d049d57764_498x300.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1>What is Prefetch?</h1><p>In the world of digital forensics, Windows Prefetch files are a goldmine of information for investigators looking to understand program execution behavior. Prefetch files, automatically generated by Windows, are designed to speed up the application launch process. However, they also serve a critical secondary function by logging essential data about program execution. As this forensic artifact is covered in great detail in many other places, I will not recap it heavily here. I encourage you to do your own research to better understand the finer points of Prefetch. A fantastic resource to better understand the intricacies of prefetch is Microsoft&#8217;s own <a href="https://cdn-dynmedia-1.microsoft.com/is/content/microsoftcorp/microsoft/final/en-us/microsoft-brand/documents/IR-Guidebook-Final.pdf">Guidance for Incident Responders</a>. I&#8217;ve captured the relevant pieces in the screenshot below and I strongly encourage you to read all points.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DXva!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d9f948-fc23-4031-bdc7-331db55506bf_928x744.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DXva!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d9f948-fc23-4031-bdc7-331db55506bf_928x744.png 424w, https://substackcdn.com/image/fetch/$s_!DXva!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d9f948-fc23-4031-bdc7-331db55506bf_928x744.png 848w, https://substackcdn.com/image/fetch/$s_!DXva!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d9f948-fc23-4031-bdc7-331db55506bf_928x744.png 1272w, https://substackcdn.com/image/fetch/$s_!DXva!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d9f948-fc23-4031-bdc7-331db55506bf_928x744.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DXva!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d9f948-fc23-4031-bdc7-331db55506bf_928x744.png" width="928" height="744" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/90d9f948-fc23-4031-bdc7-331db55506bf_928x744.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:744,&quot;width&quot;:928,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:241581,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DXva!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d9f948-fc23-4031-bdc7-331db55506bf_928x744.png 424w, https://substackcdn.com/image/fetch/$s_!DXva!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d9f948-fc23-4031-bdc7-331db55506bf_928x744.png 848w, https://substackcdn.com/image/fetch/$s_!DXva!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d9f948-fc23-4031-bdc7-331db55506bf_928x744.png 1272w, https://substackcdn.com/image/fetch/$s_!DXva!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90d9f948-fc23-4031-bdc7-331db55506bf_928x744.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In this post, we&#8217;ll explore the practical aspects of Prefetch file analysis, guiding you through a hands-on lab designed to equip you with the skills needed to extract, interpret, and utilize this information effectively. The lab utilizes prefetch files collected from a system involved in a simulated data breach attack. </p><h1>Attack Scenario</h1><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YRB3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff829a240-b16b-4039-9ccc-32d049d57764_498x300.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YRB3!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff829a240-b16b-4039-9ccc-32d049d57764_498x300.gif 424w, https://substackcdn.com/image/fetch/$s_!YRB3!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff829a240-b16b-4039-9ccc-32d049d57764_498x300.gif 848w, https://substackcdn.com/image/fetch/$s_!YRB3!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff829a240-b16b-4039-9ccc-32d049d57764_498x300.gif 1272w, https://substackcdn.com/image/fetch/$s_!YRB3!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff829a240-b16b-4039-9ccc-32d049d57764_498x300.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YRB3!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff829a240-b16b-4039-9ccc-32d049d57764_498x300.gif" width="498" height="300" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f829a240-b16b-4039-9ccc-32d049d57764_498x300.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:300,&quot;width&quot;:498,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YRB3!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff829a240-b16b-4039-9ccc-32d049d57764_498x300.gif 424w, https://substackcdn.com/image/fetch/$s_!YRB3!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff829a240-b16b-4039-9ccc-32d049d57764_498x300.gif 848w, https://substackcdn.com/image/fetch/$s_!YRB3!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff829a240-b16b-4039-9ccc-32d049d57764_498x300.gif 1272w, https://substackcdn.com/image/fetch/$s_!YRB3!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff829a240-b16b-4039-9ccc-32d049d57764_498x300.gif 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We are investigating an intrusion involving a workstation owned by Bill Lumbergh of the Initech Software company. Bill is currently an IT technician hoping to break into the exciting cybersecurity career field. </p><p>Recently, Bill was looking for free resources for testing his skills in web app penetration testing and used Reddit to try to find a cracked version of a popular software called Burpsuite Pro. Unfortunately, an unsavory Redditor may have sent Bill some malware.</p><p>We have acquired key forensic artifacts from Bill&#8217;s system to better understand what happened once he ran the malware. This lab focuses exclusively on the Prefetch files obtained from Bill&#8217;s system. You might be surprised at just how much this one artifact will reveal about this attack.</p><h1>Lab Guide</h1><p>I have learned that Notion is much better for delivering lab guides than Substack, so the actual hands-on portion of this guide is covered <a href="https://detailed-leo-854.notion.site/Prefetch-Lab-Guide-bf461dc72ecc4c5dbc7e2378f2af823f?pvs=4">here</a>.</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Eric&#8217;s Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[So you want to be a SOC Analyst? 2.0]]></title><description><![CDATA[A revamp of the original SYWTBSA blog series, made much easier with cloud-hosted VMs. All you need is a web browser!]]></description><link>https://blog.ecapuano.com/p/so-you-want-to-be-a-soc-analyst-20</link><guid isPermaLink="false">https://blog.ecapuano.com/p/so-you-want-to-be-a-soc-analyst-20</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Fri, 03 Nov 2023 02:36:04 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/d6804016-8fe6-49a1-8b3c-8e9da77e69e6_1024x1004.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div><hr></div><h2>What&#8217;s this about?</h2><p>For those familiar with my free series, <a href="https://blog.ecapuano.com/p/so-you-want-to-be-a-soc-analyst-intro">So You Want to be a SOC Analyst?</a> &#8212; this is version 2.0 which follows the same path as the original but features fully cloud-hosted VMs which have been preconfigured for this lab. This saves a lot of time on setup, and removes any requirement for running VMs locally which is difficult or impossible for some users.</p><h2>How does it work?</h2><p>Simply register for the pay-what-you-can course, and everything you need will be accessible in your web browser.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://academy.digitaldefenseinstitute.com/courses/eca7ec1f-22dd-4d1f-b473-7a085facb26a&quot;,&quot;text&quot;:&quot;Register for the Course&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://academy.digitaldefenseinstitute.com/courses/eca7ec1f-22dd-4d1f-b473-7a085facb26a"><span>Register for the Course</span></a></p><p></p><h2>What will I need to have in order to do this lab?</h2><p>A web browser, that&#8217;s it!</p><h2>How is this different than the original, free SYWTBSA?</h2><p>The primary difference is that the original series required you to download and setup two virtual machines. This is becoming more difficult for participants without powerful systems for running VMs, or those on ARM-type CPUs (Mac M1/M2). Now, you don&#8217;t have to download anything, and can connect to a cloud-hosted VM.</p><p>The other difference is that I have modified and improved several steps of the original labs to add some interesting new techniques&#8230; So there will be slight differences in the lab content itself. </p><h2>Why is this a paid course when the original series was free?</h2><p>Primarily because 2.0 requires use of VMs running in the cloud which incur real costs for me. Also, it takes real time to continue supporting students working through the series and keeping the labs up to date. I try to make most of my beginner content free. </p><h2>I want to give it a try!</h2><p>Great! Click the button below to register.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://academy.digitaldefenseinstitute.com/courses/eca7ec1f-22dd-4d1f-b473-7a085facb26a&quot;,&quot;text&quot;:&quot;Register for SYWTBSA Course&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://academy.digitaldefenseinstitute.com/courses/eca7ec1f-22dd-4d1f-b473-7a085facb26a"><span>Register for SYWTBSA Course</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Threat Hunting with Velociraptor - Long Tail Analysis Lab]]></title><description><![CDATA[Leverage "rarity" in Velociraptor hunts to identify outliers with a hands-on lab using data generated from 10 systems, one of which is compromised.]]></description><link>https://blog.ecapuano.com/p/threat-hunting-with-velociraptor</link><guid isPermaLink="false">https://blog.ecapuano.com/p/threat-hunting-with-velociraptor</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Sat, 28 Oct 2023 03:38:43 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!J8G_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F931feca1-7c05-4230-9810-3db93426ae75_2000x718.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[
      <p>
          <a href="https://blog.ecapuano.com/p/threat-hunting-with-velociraptor">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[VMware Memory Analysis with MemProcFS]]></title><description><![CDATA[A lab guide for analyzing an infected memory image of a running VMware system with MemProcFS.]]></description><link>https://blog.ecapuano.com/p/vmware-memory-analysis-with-memprocfs</link><guid isPermaLink="false">https://blog.ecapuano.com/p/vmware-memory-analysis-with-memprocfs</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Sat, 27 May 2023 22:24:51 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!bWsL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F790d73b8-f2e0-4808-b7d0-9aac8200eae0_484x619.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Let&#8217;s get hands-on with one my favorite memory analysis tools, <a href="https://github.com/ufrisk/MemProcFS">MemProcFS</a> by Ulf Frisk. </p><p>I highly recommend watching this <a href="https://www.youtube.com/watch?v=oHn8PB8dv6c">video demo</a> by Ulf Frisk which outlines a lot of what we&#8217;re about to do and will give you a solid primer on the capabilities of the tool.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Eric&#8217;s Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>In this guide, we&#8217;ll make a little noise on a Windows VM running in VMware Workstation, and use MemProcFS to analyze the memory image of the compromised running VM.</p><h2>Prepare the lab environment</h2><p>To get started, you&#8217;ll need the lab environment (both VMs) I outline in <a href="https://blog.ecapuano.com/p/so-you-want-to-be-a-soc-analyst-part">this post</a>, but feel free to skip the LimaCharlie step as we won&#8217;t be using it for this guide. No harm in doing it as it only adds to the fun to be able to see EDR telemetry of what we&#8217;ll do next.</p><p>If you are using the same Windows VM you deployed from a previous lab some time ago, it may be expired at this point and you need to pull down a new one or else it will shut itself down periodically. </p><p>Once your lab environment is setup, <strong>complete only the following steps</strong> of <a href="https://blog.ecapuano.com/p/so-you-want-to-be-a-soc-analyst-part-ea2">this post</a>:</p><ul><li><p><a href="https://blog.ecapuano.com/i/104530375/generate-our-c-payload">Generate a C2 Payload</a></p></li><li><p><a href="https://blog.ecapuano.com/i/104530375/start-command-and-control-session">Start Command and Control Session</a></p></li></ul><p>At this point, you should have an active Sliver implant on your Windows VM. Leave it running, now let&#8217;s prep our host system to use MemProcFS.</p><h2>Install MemProcFS on your host</h2><p>For the purpose of this guide, I am assuming your host system is Windows. If you are using a different host OS, you&#8217;ll need to adapt these steps for your host. This needs to be accomplished on the host so that MemProcFS has direct access to VMware running on the host.</p><ol><li><p>On your host system (not within a VM), download MemProcFS 5.6.5 from GitHub with the link below. I am hardcoding the version we use for the purpose of the guide, but latest releases can be found <a href="https://github.com/ufrisk/MemProcFS/releases">here</a>.</p><ol><li><p><a href="https://github.com/ufrisk/MemProcFS/releases/download/v5.6/MemProcFS_files_and_binaries_v5.6.5-win_x64-20230525.zip">https://github.com/ufrisk/MemProcFS/releases/download/v5.6/MemProcFS_files_and_binaries_v5.6.5-win_x64-20230525.zip</a></p></li><li><p>Unzip it to a location you can easily find later.</p></li></ol></li><li><p>Download and install Python 3.11</p><ol><li><p><a href="https://www.python.org/ftp/python/3.11.3/python-3.11.3-amd64.exe">https://www.python.org/ftp/python/3.11.3/python-3.11.3-amd64.exe</a></p></li></ol></li><li><p>Download and install <a href="https://github.com/dokan-dev/dokany">Dokany</a>, a dependency that MemProcFS uses to mount memory images as file systems.</p><ol><li><p><a href="https://github.com/dokan-dev/dokany/releases/download/v2.0.6.1000/DokanSetup.exe">https://github.com/dokan-dev/dokany/releases/download/v2.0.6.1000/DokanSetup.exe</a></p></li></ol></li></ol><h2>Do Evil Things on your Windows VM</h2><p>With the Sliver session we should have open from previous steps, let&#8217;s interact with the session and do something that will look interesting in memory.</p><p>Currently, our C2 implant is running as it&#8217;s own process with the name of whatever Sliver generated when you created your payload. Not only is this suspicious if someone else were to look at running processes, but it&#8217;s volatile as someone may terminate that process.</p><ol><li><p>Let&#8217;s get some information about the privileges our C2 session currently has on the victim</p><pre><code>getuid</code></pre><pre><code>whoami</code></pre><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!236t!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb96234d3-c539-4cfe-9c3b-e54bd75f07f7_438x188.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!236t!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb96234d3-c539-4cfe-9c3b-e54bd75f07f7_438x188.png 424w, https://substackcdn.com/image/fetch/$s_!236t!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb96234d3-c539-4cfe-9c3b-e54bd75f07f7_438x188.png 848w, https://substackcdn.com/image/fetch/$s_!236t!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb96234d3-c539-4cfe-9c3b-e54bd75f07f7_438x188.png 1272w, https://substackcdn.com/image/fetch/$s_!236t!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb96234d3-c539-4cfe-9c3b-e54bd75f07f7_438x188.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!236t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb96234d3-c539-4cfe-9c3b-e54bd75f07f7_438x188.png" width="438" height="188" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b96234d3-c539-4cfe-9c3b-e54bd75f07f7_438x188.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:188,&quot;width&quot;:438,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:18644,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!236t!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb96234d3-c539-4cfe-9c3b-e54bd75f07f7_438x188.png 424w, https://substackcdn.com/image/fetch/$s_!236t!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb96234d3-c539-4cfe-9c3b-e54bd75f07f7_438x188.png 848w, https://substackcdn.com/image/fetch/$s_!236t!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb96234d3-c539-4cfe-9c3b-e54bd75f07f7_438x188.png 1272w, https://substackcdn.com/image/fetch/$s_!236t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb96234d3-c539-4cfe-9c3b-e54bd75f07f7_438x188.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><ol><li><p>Notice, we&#8217;re running as the &#8220;User&#8221; account on the machine. While this account has admin rights, a more powerful user context to run under would be &#8220;System&#8221; &#8212; one easy way to achieve this is to inject into a process that is already running as system.</p></li></ol></li><li><p>Examine the process tree on the victim, and see what process you are running as by running the following command in Sliver within your C2 session.</p><pre><code>ps -T</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bWsL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F790d73b8-f2e0-4808-b7d0-9aac8200eae0_484x619.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bWsL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F790d73b8-f2e0-4808-b7d0-9aac8200eae0_484x619.png 424w, https://substackcdn.com/image/fetch/$s_!bWsL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F790d73b8-f2e0-4808-b7d0-9aac8200eae0_484x619.png 848w, https://substackcdn.com/image/fetch/$s_!bWsL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F790d73b8-f2e0-4808-b7d0-9aac8200eae0_484x619.png 1272w, https://substackcdn.com/image/fetch/$s_!bWsL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F790d73b8-f2e0-4808-b7d0-9aac8200eae0_484x619.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bWsL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F790d73b8-f2e0-4808-b7d0-9aac8200eae0_484x619.png" width="484" height="619" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/790d73b8-f2e0-4808-b7d0-9aac8200eae0_484x619.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:619,&quot;width&quot;:484,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:62192,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bWsL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F790d73b8-f2e0-4808-b7d0-9aac8200eae0_484x619.png 424w, https://substackcdn.com/image/fetch/$s_!bWsL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F790d73b8-f2e0-4808-b7d0-9aac8200eae0_484x619.png 848w, https://substackcdn.com/image/fetch/$s_!bWsL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F790d73b8-f2e0-4808-b7d0-9aac8200eae0_484x619.png 1272w, https://substackcdn.com/image/fetch/$s_!bWsL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F790d73b8-f2e0-4808-b7d0-9aac8200eae0_484x619.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></li><li><p>Let&#8217;s be extra shady, and inject another C2 implant into the security tool we see running on the system &#8220;<code>Sysmon64.exe</code>&#8221; &#8212; there is a very good chance this process is running with higher privileges than we currently have.</p><ol><li><p>Take note of the Process ID your instance of Sysmon64 is running as, in my case it is <code>7148</code></p></li></ol></li><li><p>Let&#8217;s &#8220;migrate&#8221; our C2 payload into the running sysmon process</p><pre><code>migrate &lt;sysmon_pid&gt;</code></pre><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rmAp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9722c71f-d74b-4a57-a0f1-67433bae9f84_1189x143.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rmAp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9722c71f-d74b-4a57-a0f1-67433bae9f84_1189x143.png 424w, https://substackcdn.com/image/fetch/$s_!rmAp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9722c71f-d74b-4a57-a0f1-67433bae9f84_1189x143.png 848w, https://substackcdn.com/image/fetch/$s_!rmAp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9722c71f-d74b-4a57-a0f1-67433bae9f84_1189x143.png 1272w, https://substackcdn.com/image/fetch/$s_!rmAp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9722c71f-d74b-4a57-a0f1-67433bae9f84_1189x143.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rmAp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9722c71f-d74b-4a57-a0f1-67433bae9f84_1189x143.png" width="1189" height="143" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9722c71f-d74b-4a57-a0f1-67433bae9f84_1189x143.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:143,&quot;width&quot;:1189,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:40616,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rmAp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9722c71f-d74b-4a57-a0f1-67433bae9f84_1189x143.png 424w, https://substackcdn.com/image/fetch/$s_!rmAp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9722c71f-d74b-4a57-a0f1-67433bae9f84_1189x143.png 848w, https://substackcdn.com/image/fetch/$s_!rmAp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9722c71f-d74b-4a57-a0f1-67433bae9f84_1189x143.png 1272w, https://substackcdn.com/image/fetch/$s_!rmAp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9722c71f-d74b-4a57-a0f1-67433bae9f84_1189x143.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div></li><li><p>If your migrate command succeeds, a new C2 session will open from the victim, now running inside of the Sysmon64 process.</p></li><li><p>Switch into the new C2 session</p><pre><code>use &lt;new_session_id&gt;</code></pre><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zFnF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd969bd44-85f1-4a01-be4f-9ea9c34fa847_701x122.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zFnF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd969bd44-85f1-4a01-be4f-9ea9c34fa847_701x122.png 424w, https://substackcdn.com/image/fetch/$s_!zFnF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd969bd44-85f1-4a01-be4f-9ea9c34fa847_701x122.png 848w, https://substackcdn.com/image/fetch/$s_!zFnF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd969bd44-85f1-4a01-be4f-9ea9c34fa847_701x122.png 1272w, https://substackcdn.com/image/fetch/$s_!zFnF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd969bd44-85f1-4a01-be4f-9ea9c34fa847_701x122.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zFnF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd969bd44-85f1-4a01-be4f-9ea9c34fa847_701x122.png" width="701" height="122" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d969bd44-85f1-4a01-be4f-9ea9c34fa847_701x122.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:122,&quot;width&quot;:701,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:86387,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zFnF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd969bd44-85f1-4a01-be4f-9ea9c34fa847_701x122.png 424w, https://substackcdn.com/image/fetch/$s_!zFnF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd969bd44-85f1-4a01-be4f-9ea9c34fa847_701x122.png 848w, https://substackcdn.com/image/fetch/$s_!zFnF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd969bd44-85f1-4a01-be4f-9ea9c34fa847_701x122.png 1272w, https://substackcdn.com/image/fetch/$s_!zFnF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd969bd44-85f1-4a01-be4f-9ea9c34fa847_701x122.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div></li><li><p>Now let&#8217;s check our privileges again</p><pre><code>getuid</code></pre><pre><code>whoami</code></pre><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XVCN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24fdff74-2b9f-4443-beb3-e32665be26e6_446x195.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XVCN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24fdff74-2b9f-4443-beb3-e32665be26e6_446x195.png 424w, https://substackcdn.com/image/fetch/$s_!XVCN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24fdff74-2b9f-4443-beb3-e32665be26e6_446x195.png 848w, https://substackcdn.com/image/fetch/$s_!XVCN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24fdff74-2b9f-4443-beb3-e32665be26e6_446x195.png 1272w, https://substackcdn.com/image/fetch/$s_!XVCN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24fdff74-2b9f-4443-beb3-e32665be26e6_446x195.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XVCN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24fdff74-2b9f-4443-beb3-e32665be26e6_446x195.png" width="446" height="195" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/24fdff74-2b9f-4443-beb3-e32665be26e6_446x195.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:195,&quot;width&quot;:446,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:90213,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XVCN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24fdff74-2b9f-4443-beb3-e32665be26e6_446x195.png 424w, https://substackcdn.com/image/fetch/$s_!XVCN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24fdff74-2b9f-4443-beb3-e32665be26e6_446x195.png 848w, https://substackcdn.com/image/fetch/$s_!XVCN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24fdff74-2b9f-4443-beb3-e32665be26e6_446x195.png 1272w, https://substackcdn.com/image/fetch/$s_!XVCN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24fdff74-2b9f-4443-beb3-e32665be26e6_446x195.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><ol><li><p>Notice we are now running in the System user context, which is the most powerful account on a single machine.</p></li></ol></li><li><p>To add some interesting activity for analysis, let&#8217;s drop to an interactive shell in our new C2 session running inside of Sysmon64</p><pre><code>shell</code></pre><ol><li><p>Type Y and hit enter to confirm</p></li><li><p>We are now in a PowerShell session on the victim</p></li></ol><pre><code>whoami</code></pre><pre><code>Get-Process</code></pre></li><li><p>While there are many things we could do from here, we likely have enough to make our memory analysis interesting. So let&#8217;s switch back to our host and begin the process of mounting and analyzing the Windows VM&#8217;s memory.</p></li></ol><h2>Analyze Memory with MemProcFS</h2><p>Switch back to your Windows host system and let&#8217;s launch MemProcFS.</p><ol><li><p>In an administrative PowerShell prompt, change to the location you unzipped MemProcFS.</p><pre><code>cd C:\path\to\MemProcFS_directory</code></pre></li><li><p>Inspect the help output </p><pre><code>.\MemProcFS.exe -h</code></pre><ol><li><p>Take specific note of the entries at the end which describe the usefulness of the <code>-forensic</code> and <code>-forensic-yara-rules</code> options as we&#8217;ll be using both.</p></li></ol></li><li><p>Let&#8217;s download a <a href="https://raw.githubusercontent.com/Neo23x0/signature-base/master/yara/gen_gcti_sliver.yar">Yara rule that specifically looks for Sliver C2 implants</a>. Run the following command in your PowerShell console</p><pre><code>IWR -Uri https://raw.githubusercontent.com/Neo23x0/signature-base/master/yara/gen_gcti_sliver.yar -Outfile gen_gcti_sliver.yar</code></pre></li><li><p>Now that our Yara rule is staged, we&#8217;re ready to run MemProcFS to mount the memory image of our running Windows VM victim</p><pre><code>.\MemProcFS.exe -device vmware -forensic 1 -forensic-yara-rules ".\gen_gcti_sliver.yar"</code></pre></li><li><p>MemProcFS will prompt you to decide which VM you want to mount memory from. We want to choose the VM-ID that is associated with our Windows VM. In my case, it&#8217;s fairly simple since I know the Linux VM has 2GB of RAM and the Windows VM has 8GB.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tMxL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99478f0-395f-4895-b356-d1a081b2ddf6_1149x261.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tMxL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99478f0-395f-4895-b356-d1a081b2ddf6_1149x261.png 424w, https://substackcdn.com/image/fetch/$s_!tMxL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99478f0-395f-4895-b356-d1a081b2ddf6_1149x261.png 848w, https://substackcdn.com/image/fetch/$s_!tMxL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99478f0-395f-4895-b356-d1a081b2ddf6_1149x261.png 1272w, https://substackcdn.com/image/fetch/$s_!tMxL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99478f0-395f-4895-b356-d1a081b2ddf6_1149x261.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tMxL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99478f0-395f-4895-b356-d1a081b2ddf6_1149x261.png" width="1149" height="261" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c99478f0-395f-4895-b356-d1a081b2ddf6_1149x261.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:261,&quot;width&quot;:1149,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:236220,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tMxL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99478f0-395f-4895-b356-d1a081b2ddf6_1149x261.png 424w, https://substackcdn.com/image/fetch/$s_!tMxL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99478f0-395f-4895-b356-d1a081b2ddf6_1149x261.png 848w, https://substackcdn.com/image/fetch/$s_!tMxL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99478f0-395f-4895-b356-d1a081b2ddf6_1149x261.png 1272w, https://substackcdn.com/image/fetch/$s_!tMxL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc99478f0-395f-4895-b356-d1a081b2ddf6_1149x261.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><ol><li><p>Enter your VM-ID and press ENTER</p></li><li><p>The following output means that our memory is now mounted at drive letter M:\ on our host system</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!e7qG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4224a8b0-010c-40b8-958f-9843b99ba693_821x390.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!e7qG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4224a8b0-010c-40b8-958f-9843b99ba693_821x390.png 424w, https://substackcdn.com/image/fetch/$s_!e7qG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4224a8b0-010c-40b8-958f-9843b99ba693_821x390.png 848w, https://substackcdn.com/image/fetch/$s_!e7qG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4224a8b0-010c-40b8-958f-9843b99ba693_821x390.png 1272w, https://substackcdn.com/image/fetch/$s_!e7qG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4224a8b0-010c-40b8-958f-9843b99ba693_821x390.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!e7qG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4224a8b0-010c-40b8-958f-9843b99ba693_821x390.png" width="821" height="390" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4224a8b0-010c-40b8-958f-9843b99ba693_821x390.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:390,&quot;width&quot;:821,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:258287,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!e7qG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4224a8b0-010c-40b8-958f-9843b99ba693_821x390.png 424w, https://substackcdn.com/image/fetch/$s_!e7qG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4224a8b0-010c-40b8-958f-9843b99ba693_821x390.png 848w, https://substackcdn.com/image/fetch/$s_!e7qG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4224a8b0-010c-40b8-958f-9843b99ba693_821x390.png 1272w, https://substackcdn.com/image/fetch/$s_!e7qG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4224a8b0-010c-40b8-958f-9843b99ba693_821x390.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></li></ol></li></ol><h2>Analyze Memory</h2><ol><li><p>On your host system, browse to the newly mounted M: drive.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YyOv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf8245c8-1cf5-42a2-9720-97c26734b9ae_698x404.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YyOv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf8245c8-1cf5-42a2-9720-97c26734b9ae_698x404.png 424w, https://substackcdn.com/image/fetch/$s_!YyOv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf8245c8-1cf5-42a2-9720-97c26734b9ae_698x404.png 848w, https://substackcdn.com/image/fetch/$s_!YyOv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf8245c8-1cf5-42a2-9720-97c26734b9ae_698x404.png 1272w, https://substackcdn.com/image/fetch/$s_!YyOv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf8245c8-1cf5-42a2-9720-97c26734b9ae_698x404.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YyOv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf8245c8-1cf5-42a2-9720-97c26734b9ae_698x404.png" width="698" height="404" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf8245c8-1cf5-42a2-9720-97c26734b9ae_698x404.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:404,&quot;width&quot;:698,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:34531,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YyOv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf8245c8-1cf5-42a2-9720-97c26734b9ae_698x404.png 424w, https://substackcdn.com/image/fetch/$s_!YyOv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf8245c8-1cf5-42a2-9720-97c26734b9ae_698x404.png 848w, https://substackcdn.com/image/fetch/$s_!YyOv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf8245c8-1cf5-42a2-9720-97c26734b9ae_698x404.png 1272w, https://substackcdn.com/image/fetch/$s_!YyOv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf8245c8-1cf5-42a2-9720-97c26734b9ae_698x404.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></li><li><p>There are many awesome things available to you here, as you have essentially mounted memory of a running machine as if it was a basic file system. Start by looking at basic information such as the running processes on the system</p><ol><li><p>Browse to <code>M:\sys\proc</code> and open <code>proc.txt</code></p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ncz9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a4001f-6162-4698-bd54-c3b3e06190f7_899x299.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ncz9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a4001f-6162-4698-bd54-c3b3e06190f7_899x299.png 424w, https://substackcdn.com/image/fetch/$s_!ncz9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a4001f-6162-4698-bd54-c3b3e06190f7_899x299.png 848w, https://substackcdn.com/image/fetch/$s_!ncz9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a4001f-6162-4698-bd54-c3b3e06190f7_899x299.png 1272w, https://substackcdn.com/image/fetch/$s_!ncz9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a4001f-6162-4698-bd54-c3b3e06190f7_899x299.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ncz9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a4001f-6162-4698-bd54-c3b3e06190f7_899x299.png" width="899" height="299" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/84a4001f-6162-4698-bd54-c3b3e06190f7_899x299.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:299,&quot;width&quot;:899,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:45133,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ncz9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a4001f-6162-4698-bd54-c3b3e06190f7_899x299.png 424w, https://substackcdn.com/image/fetch/$s_!ncz9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a4001f-6162-4698-bd54-c3b3e06190f7_899x299.png 848w, https://substackcdn.com/image/fetch/$s_!ncz9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a4001f-6162-4698-bd54-c3b3e06190f7_899x299.png 1272w, https://substackcdn.com/image/fetch/$s_!ncz9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a4001f-6162-4698-bd54-c3b3e06190f7_899x299.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><ol><li><p>Search for your interesting process names such as your Sliver EXE or the process we migrated into: <code>Sysmon64</code></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VSPL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa71f6c17-6335-4e1f-ab84-a3e18b09f706_929x622.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VSPL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa71f6c17-6335-4e1f-ab84-a3e18b09f706_929x622.png 424w, https://substackcdn.com/image/fetch/$s_!VSPL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa71f6c17-6335-4e1f-ab84-a3e18b09f706_929x622.png 848w, https://substackcdn.com/image/fetch/$s_!VSPL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa71f6c17-6335-4e1f-ab84-a3e18b09f706_929x622.png 1272w, https://substackcdn.com/image/fetch/$s_!VSPL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa71f6c17-6335-4e1f-ab84-a3e18b09f706_929x622.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VSPL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa71f6c17-6335-4e1f-ab84-a3e18b09f706_929x622.png" width="929" height="622" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a71f6c17-6335-4e1f-ab84-a3e18b09f706_929x622.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:622,&quot;width&quot;:929,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:104192,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VSPL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa71f6c17-6335-4e1f-ab84-a3e18b09f706_929x622.png 424w, https://substackcdn.com/image/fetch/$s_!VSPL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa71f6c17-6335-4e1f-ab84-a3e18b09f706_929x622.png 848w, https://substackcdn.com/image/fetch/$s_!VSPL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa71f6c17-6335-4e1f-ab84-a3e18b09f706_929x622.png 1272w, https://substackcdn.com/image/fetch/$s_!VSPL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa71f6c17-6335-4e1f-ab84-a3e18b09f706_929x622.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p></li></ol></li><li><p>Browse to <code>M:\sys\net </code>and open netstat.txt</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yB5x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd59d6bfd-f9c9-48b4-b540-7abda88257ef_911x618.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yB5x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd59d6bfd-f9c9-48b4-b540-7abda88257ef_911x618.png 424w, https://substackcdn.com/image/fetch/$s_!yB5x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd59d6bfd-f9c9-48b4-b540-7abda88257ef_911x618.png 848w, https://substackcdn.com/image/fetch/$s_!yB5x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd59d6bfd-f9c9-48b4-b540-7abda88257ef_911x618.png 1272w, https://substackcdn.com/image/fetch/$s_!yB5x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd59d6bfd-f9c9-48b4-b540-7abda88257ef_911x618.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yB5x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd59d6bfd-f9c9-48b4-b540-7abda88257ef_911x618.png" width="911" height="618" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d59d6bfd-f9c9-48b4-b540-7abda88257ef_911x618.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:618,&quot;width&quot;:911,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:111898,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yB5x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd59d6bfd-f9c9-48b4-b540-7abda88257ef_911x618.png 424w, https://substackcdn.com/image/fetch/$s_!yB5x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd59d6bfd-f9c9-48b4-b540-7abda88257ef_911x618.png 848w, https://substackcdn.com/image/fetch/$s_!yB5x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd59d6bfd-f9c9-48b4-b540-7abda88257ef_911x618.png 1272w, https://substackcdn.com/image/fetch/$s_!yB5x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd59d6bfd-f9c9-48b4-b540-7abda88257ef_911x618.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ol><li><p>Two easy search terms here: suspicious processes (implant or sysmon) or simply the IP address of the suspected C2 server</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HtRe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc76214b9-a74d-4745-8942-b2044f35acd8_881x249.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HtRe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc76214b9-a74d-4745-8942-b2044f35acd8_881x249.png 424w, https://substackcdn.com/image/fetch/$s_!HtRe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc76214b9-a74d-4745-8942-b2044f35acd8_881x249.png 848w, https://substackcdn.com/image/fetch/$s_!HtRe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc76214b9-a74d-4745-8942-b2044f35acd8_881x249.png 1272w, https://substackcdn.com/image/fetch/$s_!HtRe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc76214b9-a74d-4745-8942-b2044f35acd8_881x249.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HtRe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc76214b9-a74d-4745-8942-b2044f35acd8_881x249.png" width="881" height="249" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c76214b9-a74d-4745-8942-b2044f35acd8_881x249.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:249,&quot;width&quot;:881,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:45038,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HtRe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc76214b9-a74d-4745-8942-b2044f35acd8_881x249.png 424w, https://substackcdn.com/image/fetch/$s_!HtRe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc76214b9-a74d-4745-8942-b2044f35acd8_881x249.png 848w, https://substackcdn.com/image/fetch/$s_!HtRe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc76214b9-a74d-4745-8942-b2044f35acd8_881x249.png 1272w, https://substackcdn.com/image/fetch/$s_!HtRe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc76214b9-a74d-4745-8942-b2044f35acd8_881x249.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></li><li><p>Notice many CLOSED and a couple ESTABLISHED connections to our C2 IP address from the Sliver generated EXE as well as from Sysmon64. This is highly unusual as Sysmon should rarely, if ever, be communicating on the network.</p></li></ol></li></ol></li><li><p>Now let&#8217;s get to the good part&#8230; Remember how we asked MemProcFS to run a Yara scan for Sliver C2? Let&#8217;s see if it found any hits.</p><ol><li><p>Browse to M:\forensic\yara and open match-count.txt &#8212; this simply tells us if there were any matches for our signature. In my case, there were 4 matches.</p></li><li><p>To get a closer look at the matches, let&#8217;s open M:\forensic\yara\result.txt </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ob2G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc14fe5f9-7477-4c8e-9151-23f90a1a0c9a_983x648.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ob2G!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc14fe5f9-7477-4c8e-9151-23f90a1a0c9a_983x648.png 424w, https://substackcdn.com/image/fetch/$s_!Ob2G!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc14fe5f9-7477-4c8e-9151-23f90a1a0c9a_983x648.png 848w, https://substackcdn.com/image/fetch/$s_!Ob2G!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc14fe5f9-7477-4c8e-9151-23f90a1a0c9a_983x648.png 1272w, https://substackcdn.com/image/fetch/$s_!Ob2G!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc14fe5f9-7477-4c8e-9151-23f90a1a0c9a_983x648.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ob2G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc14fe5f9-7477-4c8e-9151-23f90a1a0c9a_983x648.png" width="983" height="648" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c14fe5f9-7477-4c8e-9151-23f90a1a0c9a_983x648.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:648,&quot;width&quot;:983,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:75578,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ob2G!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc14fe5f9-7477-4c8e-9151-23f90a1a0c9a_983x648.png 424w, https://substackcdn.com/image/fetch/$s_!Ob2G!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc14fe5f9-7477-4c8e-9151-23f90a1a0c9a_983x648.png 848w, https://substackcdn.com/image/fetch/$s_!Ob2G!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc14fe5f9-7477-4c8e-9151-23f90a1a0c9a_983x648.png 1272w, https://substackcdn.com/image/fetch/$s_!Ob2G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc14fe5f9-7477-4c8e-9151-23f90a1a0c9a_983x648.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!V9jz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2565762f-2017-4d12-b258-7fc2c18038c5_985x644.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!V9jz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2565762f-2017-4d12-b258-7fc2c18038c5_985x644.png 424w, https://substackcdn.com/image/fetch/$s_!V9jz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2565762f-2017-4d12-b258-7fc2c18038c5_985x644.png 848w, https://substackcdn.com/image/fetch/$s_!V9jz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2565762f-2017-4d12-b258-7fc2c18038c5_985x644.png 1272w, https://substackcdn.com/image/fetch/$s_!V9jz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2565762f-2017-4d12-b258-7fc2c18038c5_985x644.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!V9jz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2565762f-2017-4d12-b258-7fc2c18038c5_985x644.png" width="985" height="644" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2565762f-2017-4d12-b258-7fc2c18038c5_985x644.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:644,&quot;width&quot;:985,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:77664,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!V9jz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2565762f-2017-4d12-b258-7fc2c18038c5_985x644.png 424w, https://substackcdn.com/image/fetch/$s_!V9jz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2565762f-2017-4d12-b258-7fc2c18038c5_985x644.png 848w, https://substackcdn.com/image/fetch/$s_!V9jz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2565762f-2017-4d12-b258-7fc2c18038c5_985x644.png 1272w, https://substackcdn.com/image/fetch/$s_!V9jz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2565762f-2017-4d12-b258-7fc2c18038c5_985x644.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><ol><li><p>Notice how easily we were able to find this C2 implant with a simple yara scan.</p></li></ol></li></ol></li><li><p>Now let&#8217;s better try to understand why Sysmon64 is triggering detections for Sliver by looking for code injection. This is another feature of the <code>-forensic</code> option we enabled, which automatically looks for suspicious activity like signs of possible injection which we accomplished with our <code>migrate</code> command.</p><ol><li><p>Browse to <code>M:\forensic\findevil</code> and open <code>findevil.txt</code></p></li><li><p>While this file is a bit challenging to interpret at first, it will often contain evidence of code injection due to the many behaviors we see when one process injects code into another. Unfortunately, its also a bit prone to false positives so it takes time to get comfortable with interpreting these results to quickly find evil. One solid universal tip is: &#8220;Start with things you already suspect are bad,&#8221; so let&#8217;s search for entries related to Sysmon64.</p></li><li><p>In my output, I&#8217;ve filtered down to things I already suspect&#8230; While there are many indications of possible injection here, I&#8217;ve highlighted the lower false-positive prone detections looking for memory sections with unusual read-write-execute (RWX) or read-execute (RX) permissions. Read more about the detection types <a href="https://github.com/ufrisk/MemProcFS/wiki/FS_FindEvil">here</a>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mCWe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F909b2aa9-2ec2-46f2-9dfe-f346b85f5056_1433x677.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mCWe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F909b2aa9-2ec2-46f2-9dfe-f346b85f5056_1433x677.png 424w, https://substackcdn.com/image/fetch/$s_!mCWe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F909b2aa9-2ec2-46f2-9dfe-f346b85f5056_1433x677.png 848w, https://substackcdn.com/image/fetch/$s_!mCWe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F909b2aa9-2ec2-46f2-9dfe-f346b85f5056_1433x677.png 1272w, https://substackcdn.com/image/fetch/$s_!mCWe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F909b2aa9-2ec2-46f2-9dfe-f346b85f5056_1433x677.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mCWe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F909b2aa9-2ec2-46f2-9dfe-f346b85f5056_1433x677.png" width="1433" height="677" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/909b2aa9-2ec2-46f2-9dfe-f346b85f5056_1433x677.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:677,&quot;width&quot;:1433,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:159524,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mCWe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F909b2aa9-2ec2-46f2-9dfe-f346b85f5056_1433x677.png 424w, https://substackcdn.com/image/fetch/$s_!mCWe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F909b2aa9-2ec2-46f2-9dfe-f346b85f5056_1433x677.png 848w, https://substackcdn.com/image/fetch/$s_!mCWe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F909b2aa9-2ec2-46f2-9dfe-f346b85f5056_1433x677.png 1272w, https://substackcdn.com/image/fetch/$s_!mCWe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F909b2aa9-2ec2-46f2-9dfe-f346b85f5056_1433x677.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p></li></ol></li><li><p>There are so many incredibly useful things you can further examine from this memory image. Here is some inspiration to consider furthering your knowledge</p><ol><li><p>Examine <code>M:\forensic\timeline\timeline_all.txt</code> searching for your known IOCs</p></li><li><p>Examine M:\forensic\timeline\timeline_net.txt and understand the beacon behavior of your C2 implants</p></li><li><p>Examine process objects by navigating to them by name under M:\name\&lt;process_name&gt;</p><ol><li><p>Try this with your Sliver EXE &#8212; you can pull the EXE right out of memory by browsing to <code>M:\name\&lt;process_name&gt;\modules\&lt;process_name&gt;.exe\</code> and copying out the <code>pefile.dll</code></p></li><li><p>Warning, this is your actual C2 implant so be careful not to trigger antivirus on your host!</p></li></ol></li></ol></li></ol><h2>Congrats, you&#8217;ve analyzed a memory image!</h2><p>I hope you enjoyed this very brief primer on MemProcFS. I strongly recommend pursuing additional knowledge with the resources listed on the project&#8217;s GitHub: https://github.com/ufrisk/MemProcFS#get-started</p><p>Happy hunting!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Eric&#8217;s Substack is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Capturing & Parsing Forensic Triage Acquisitions for Investigation Timelining]]></title><description><![CDATA[This guide will walk you though capturing and processing triage acquisitions into forensic timelines, step-by-step, with a VM containing all needed tools.]]></description><link>https://blog.ecapuano.com/p/capturing-and-parsing-forensic-triage</link><guid isPermaLink="false">https://blog.ecapuano.com/p/capturing-and-parsing-forensic-triage</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Wed, 12 Apr 2023 04:09:58 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77c022d6-c077-476e-a31f-e1044ee3c28f_1322x921.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[
      <p>
          <a href="https://blog.ecapuano.com/p/capturing-and-parsing-forensic-triage">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Find Threats in Event Logs with Hayabusa]]></title><description><![CDATA[A powerful technique for finding threats in Windows event logs.]]></description><link>https://blog.ecapuano.com/p/find-threats-in-event-logs-with-hayabusa</link><guid isPermaLink="false">https://blog.ecapuano.com/p/find-threats-in-event-logs-with-hayabusa</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Tue, 21 Mar 2023 02:29:16 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!v7KX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99120b49-3969-4b83-9e39-2636773dcb13_922x396.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[
      <p>
          <a href="https://blog.ecapuano.com/p/find-threats-in-event-logs-with-hayabusa">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[A "Thank You" to Paid Subscribers]]></title><description><![CDATA[I sincerely want to thank those of you that are supporting this blog. Here are some resources just for you.]]></description><link>https://blog.ecapuano.com/p/a-thank-you-to-paid-subscribers</link><guid isPermaLink="false">https://blog.ecapuano.com/p/a-thank-you-to-paid-subscribers</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Mon, 20 Mar 2023 22:22:11 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!lrkf!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c9bc99-8815-431a-8473-21ce5748124c_400x400.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[
      <p>
          <a href="https://blog.ecapuano.com/p/a-thank-you-to-paid-subscribers">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Mounting E01 Forensic Images in Linux]]></title><description><![CDATA[So you want to mount an E01 forensic image? This guide will help.]]></description><link>https://blog.ecapuano.com/p/mounting-e01-forensic-images-in-linux</link><guid isPermaLink="false">https://blog.ecapuano.com/p/mounting-e01-forensic-images-in-linux</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Fri, 10 Mar 2023 11:45:56 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!lrkf!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c9bc99-8815-431a-8473-21ce5748124c_400x400.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you have an Encase Expert Witness Format E01 image, and you&#8217;d like to mount it for examination, there is a free library for Linux that will assist.</p><p>E01 images are compressed, forensically sound containers for disk images acquired during an investigation. To work with them, we must utilize a tool that will stream decompress the image so that we can mount and work with the contents.</p><p>These tools and shortcuts are preinstalled on the <a href="https://www.sans.org/tools/sift-workstation/">Linux SIFT workstation</a>. </p><ol><li><p>Install the <code>ewf-tools</code> library (already included on Linux SIFT workstation)</p><pre><code>sudo apt-get install ewf-tools</code></pre></li><li><p>Examine the metadata associated with the E01 by running <code>ewfinfo</code></p><pre><code>ewfinfo your_image.e01</code></pre></li><li><p>Let&#8217;s create a mount point that we&#8217;ll use to mount the E01 as a raw device</p><pre><code>mkdir -p /mnt/ewf_mount</code></pre></li><li><p>Now, mount the E01 forensic image to a new raw device</p><pre><code>ewfmount your_image.e01 /mnt/ewf_mount</code></pre><ol><li><p>A successful mount operation will provide a very minimal output such as &#8220;ewfmount 20140812&#8221;</p></li><li><p>You will now have a stream-decompressed raw device at <code>/mnt/ewf_mount/ewf1</code></p><pre><code>ls -alh /mnt/ewf_mount</code></pre></li></ol></li><li><p>Create a new mount point for the logical mount we&#8217;re about to perform, and then mount the device to the new logical mount point.</p><pre><code>mkdir -p /mnt/logical_mount</code></pre><pre><code>mount -o ro,show_sys_files,streams_interface=windows /mnt/ewf_mount/ewf1 /mnt/logical_mount</code></pre><ol><li><p>Pro Tip: create a bash alias that simplifies this mount command for the future, allowing you to replace it with simply <code>mountwin</code> &#8212; you must reload bash for it to take effect.</p><pre><code>echo &#8220;alias mountwin='mount -o ro,show_sys_files,streams_interface=windows'&#8220; &#187; ~/.bash_aliases</code></pre></li></ol></li><li><p>Now, change directory into the logical mount point, and examine the file system!</p><pre><code>cd /mnt/logical_mount</code></pre><pre><code>ls -alh</code></pre><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.ecapuano.com/subscribe?"><span>Subscribe now</span></a></p><p></p></li></ol>]]></content:encoded></item><item><title><![CDATA[Live Incident Response with Velociraptor]]></title><description><![CDATA[A video walk-through of incident handling using the open source Velociraptor agent]]></description><link>https://blog.ecapuano.com/p/live-incident-response-with-velociraptor</link><guid isPermaLink="false">https://blog.ecapuano.com/p/live-incident-response-with-velociraptor</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Fri, 03 Mar 2023 12:56:53 GMT</pubDate><enclosure url="https://substackcdn.com/image/youtube/w_728,c_limit/Q1IoGX--814" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This is a video I posted some time ago, but I wanted a more permanent place to point to it and it&#8217;s supporting guides for anyone wanting more exposure to one of my favorite DFIR tools.</p><p>This walk-through was performed live in front of a group of students and practitioners in Denver, however, I wrote a hands-on guide that accompanies the talk to allow you to try your hand at many of the notebook activities I cover.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.ecapuano.com/subscribe?"><span>Subscribe now</span></a></p><h2>Watch the demonstration here:</h2><div id="youtube2-Q1IoGX--814" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;Q1IoGX--814&quot;,&quot;startTime&quot;:&quot;383s&quot;,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/Q1IoGX--814?start=383s&amp;rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><h2>See the accompanying guide here:</h2><div class="github-gist" data-attrs="{&quot;innerHTML&quot;:&quot;<div id=\&quot;gist116792963\&quot; class=\&quot;gist\&quot;>\n    <div class=\&quot;gist-file\&quot; translate=\&quot;no\&quot;>\n      <div class=\&quot;gist-data\&quot;>\n        <div class=\&quot;js-gist-file-update-container js-task-list-container file-box\&quot;>\n  <div id=\&quot;file-handout-md\&quot; class=\&quot;file my-2\&quot;>\n      <div id=\&quot;file-handout-md-readme\&quot; class=\&quot;Box-body readme blob js-code-block-container p-5 p-xl-6 \&quot;>\n    <article class=\&quot;markdown-body entry-content container-lg\&quot; itemprop=\&quot;text\&quot;><h1 dir=\&quot;auto\&quot;><a id=\&quot;user-content-live-incident-response-with-velociraptor---handout\&quot; class=\&quot;anchor\&quot; aria-hidden=\&quot;true\&quot; href=\&quot;#live-incident-response-with-velociraptor---handout\&quot;><svg class=\&quot;octicon octicon-link\&quot; viewBox=\&quot;0 0 16 16\&quot; version=\&quot;1.1\&quot; width=\&quot;16\&quot; height=\&quot;16\&quot; aria-hidden=\&quot;true\&quot;><path fill-rule=\&quot;evenodd\&quot; d=\&quot;M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\&quot;></path></svg></a>Live Incident Response with Velociraptor - Handout</h1>\n<p dir=\&quot;auto\&quot;><a href=\&quot;https://twitter.com/eric_capuano\&quot; rel=\&quot;nofollow\&quot;>@eric_capuano</a> || <a href=\&quot;https://www.reconinfosec.com\&quot; rel=\&quot;nofollow\&quot;>Recon InfoSec</a></p>\n<p dir=\&quot;auto\&quot;>Watch the recorded talk here: <a href=\&quot;https://www.youtube.com/watch?v=Q1IoGX--814\&quot; rel=\&quot;nofollow\&quot;>https://www.youtube.com/watch?v=Q1IoGX--814</a></p>\n<p dir=\&quot;auto\&quot;>This handout is meant to accompany the <a href=\&quot;https://www.youtube.com/watch?v=Q1IoGX--814\&quot; rel=\&quot;nofollow\&quot;>live talk</a>, but contains many useful notebook examples for post-processing Velociraptor hunt results.</p>\n<hr>\n<h2 dir=\&quot;auto\&quot;><a id=\&quot;user-content-hunting-for-phish-victims\&quot; class=\&quot;anchor\&quot; aria-hidden=\&quot;true\&quot; href=\&quot;#hunting-for-phish-victims\&quot;><svg class=\&quot;octicon octicon-link\&quot; viewBox=\&quot;0 0 16 16\&quot; version=\&quot;1.1\&quot; width=\&quot;16\&quot; height=\&quot;16\&quot; aria-hidden=\&quot;true\&quot;><path fill-rule=\&quot;evenodd\&quot; d=\&quot;M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\&quot;></path></svg></a>Hunting for phish victims</h2>\n<p dir=\&quot;auto\&quot;><strong>Objective:</strong> Using the name of a suspicious email attachment, we can quickly identify which users/systems may have been impacted.</p>\n<p dir=\&quot;auto\&quot;><strong>Hunt Artifact:</strong> <code>Windows.Search.FileFinder</code></p>\n<p dir=\&quot;auto\&quot;>Parameters:</p>\n<ul dir=\&quot;auto\&quot;>\n<li>SearchFilesGlob: <code>C:\\Users\\**\\Security_Protocol*</code></li>\n</ul>\n<p dir=\&quot;auto\&quot;><strong>Notebook:</strong></p>\n<pre><code>SELECT Fqdn,FullPath,BTime AS CreatedTime,MTime as ModifiedTime, Hash,\nlabel(client_id=ClientId, labels=\&quot;phish_victim\&quot;, op=\&quot;set\&quot;) // label all systems with detections\nFROM source()\n</code></pre>\n<hr>\n<h2 dir=\&quot;auto\&quot;><a id=\&quot;user-content-lateral-movement\&quot; class=\&quot;anchor\&quot; aria-hidden=\&quot;true\&quot; href=\&quot;#lateral-movement\&quot;><svg class=\&quot;octicon octicon-link\&quot; viewBox=\&quot;0 0 16 16\&quot; version=\&quot;1.1\&quot; width=\&quot;16\&quot; height=\&quot;16\&quot; aria-hidden=\&quot;true\&quot;><path fill-rule=\&quot;evenodd\&quot; d=\&quot;M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\&quot;></path></svg></a>Lateral Movement</h2>\n<p dir=\&quot;auto\&quot;><strong>Objective:</strong> When dealing with advanced adversaries, it is safe to assume the breach has expanded beyond the initial victims of the phish campaign... Let's launch a quick hunt to find possible lateral movement using the usernames of the phish victims</p>\n<p dir=\&quot;auto\&quot;><strong>Hunt Artifact:</strong> <code>Windows.EventLogs.RDPAuth</code></p>\n<p dir=\&quot;auto\&quot;><strong>Notebook:</strong></p>\n<pre><code>SELECT EventTime,Computer,Channel,EventID,UserName,LogonType,SourceIP,Description,Message,Fqdn FROM source()\nWHERE ( // excluded logons of the user on their own system\n(UserName =~ \&quot;Chad.Chan\&quot; AND NOT Computer =~ \&quot;ACC-01\&quot;)&nbsp;\nOR (UserName =~ \&quot;Jean.Owen\&quot; AND NOT Computer =~ \&quot;ACC-05\&quot;)\nOR (UserName =~ \&quot;Albert.Willoughby\&quot; AND NOT Computer =~ \&quot;ACC-09\&quot;)\nOR (UserName =~ \&quot;Anna.Ward\&quot; AND NOT Computer =~ \&quot;ACC-04\&quot;)\n)\nAND NOT EventID = 4634 // less interested in logoff events\nAND NOT (Computer =~ \&quot;dc\&quot; OR Computer =~ \&quot;exchange\&quot; OR Computer =~ \&quot;fs1\&quot;)\nORDER BY EventTime\n</code></pre>\n<hr>\n<h2 dir=\&quot;auto\&quot;><a id=\&quot;user-content-process-analysis\&quot; class=\&quot;anchor\&quot; aria-hidden=\&quot;true\&quot; href=\&quot;#process-analysis\&quot;><svg class=\&quot;octicon octicon-link\&quot; viewBox=\&quot;0 0 16 16\&quot; version=\&quot;1.1\&quot; width=\&quot;16\&quot; height=\&quot;16\&quot; aria-hidden=\&quot;true\&quot;><path fill-rule=\&quot;evenodd\&quot; d=\&quot;M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\&quot;></path></svg></a>Process Analysis</h2>\n<p dir=\&quot;auto\&quot;><strong>Objective:</strong> Find potentially compromised systems by baselining all running processes in the environment. This notebook returns processes marked as <code>untrusted</code> by Authenticode.</p>\n<p dir=\&quot;auto\&quot;><strong>Hunt Artifact:</strong> <code>Windows.System.Pslist</code></p>\n<p dir=\&quot;auto\&quot;><strong>Notebook:</strong></p>\n<pre><code>SELECT Name,Exe,CommandLine,Hash.SHA256 AS SHA256, Authenticode.Trusted, Username, Fqdn, count() AS Count FROM source()\nWHERE Authenticode.Trusted = \&quot;untrusted\&quot; // unsigned binaries\n// List of environment-specific processes to exclude\nAND NOT Exe = \&quot;C:\\\\Program Files\\\\filebeat-rss\\\\filebeat.exe\&quot;\nAND NOT Exe = \&quot;C:\\\\Program Files\\\\filebeat\\\\filebeat.exe\&quot;\nAND NOT Exe = \&quot;C:\\\\Program Files\\\\winlogbeat-rss\\\\winlogbeat.exe\&quot;\nAND NOT Exe = \&quot;C:\\\\Program Files\\\\winlogbeat\\\\winlogbeat.exe\&quot;\nAND NOT Exe = \&quot;C:\\\\user-automation\\\\user.exe\&quot;\nAND NOT Exe = \&quot;C:\\\\salt\\\\bin\\\\python.exe\&quot;\n// Stack for prevalence analysis\nGROUP BY Exe\n// Sort results ascending\nORDER BY Count\n</code></pre>\n<hr>\n<p dir=\&quot;auto\&quot;><strong>Objective:</strong> Leverage VirusTotal to quickly check untrusted processes for detections. Be mindful that free VT API is limited to 4 lookups / min &amp;amp; 500 / day so we'll be as efficient as possible with what we query against VT.</p>\n<p dir=\&quot;auto\&quot;><strong>Hunt Artifact:</strong> <code>Windows.System.Pslist</code></p>\n<p dir=\&quot;auto\&quot;><strong>Notebook:</strong></p>\n<pre><code>// Get a free VT api key\nLET VTKey &amp;lt;= \&quot;&amp;lt;your_api_key&amp;gt;\&quot;\n// Build the list of untrusted processes first\nLet Results = SELECT Name,CommandLine,Exe,Hash.SHA256 AS SHA256, count() AS Count FROM source()\nWHERE Authenticode.Trusted = \&quot;untrusted\&quot;\nAND SHA256 // only entries with the required SHA256\n// List of environment-specific processes to exclude\nAND NOT Exe = \&quot;C:\\\\user-automation\\\\user.exe\&quot;\nGROUP BY Exe,SHA256\n// Now combine the previous query with the Server Enrichment query\nSELECT *, {SELECT VTRating FROM Artifact.Server.Enrichment.Virustotal(VirustotalKey=VTKey, Hash=SHA256) } AS VTResults FROM foreach(row=Results) WHERE Count &amp;lt; 10\nORDER BY VTResults DESC\n</code></pre>\n<hr>\n<p dir=\&quot;auto\&quot;><strong>Objective:</strong> Get process ancestry for known malware. Here we learn important details about how the malware was launched.</p>\n<p dir=\&quot;auto\&quot;><strong>Hunt Artifact:</strong> <code>Generic.System.Pstree</code> with</p>\n<p dir=\&quot;auto\&quot;>Parameters:</p>\n<ul dir=\&quot;auto\&quot;>\n<li>Process Regex: <code>.*(tkg|mshta|Security_Protocol).*</code></li>\n</ul>\n<p dir=\&quot;auto\&quot;><strong>Notebook:</strong> <code>none required</code></p>\n<hr>\n<h2 dir=\&quot;auto\&quot;><a id=\&quot;user-content-persistence\&quot; class=\&quot;anchor\&quot; aria-hidden=\&quot;true\&quot; href=\&quot;#persistence\&quot;><svg class=\&quot;octicon octicon-link\&quot; viewBox=\&quot;0 0 16 16\&quot; version=\&quot;1.1\&quot; width=\&quot;16\&quot; height=\&quot;16\&quot; aria-hidden=\&quot;true\&quot;><path fill-rule=\&quot;evenodd\&quot; d=\&quot;M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\&quot;></path></svg></a>Persistence</h2>\n<p dir=\&quot;auto\&quot;><strong>Objective:</strong> Use a builtin artifact to hunt for potential persistence mechanisms.</p>\n<p dir=\&quot;auto\&quot;><strong>Hunt Artifact:</strong> <code>Windows.Sys.StartupItems</code></p>\n<p dir=\&quot;auto\&quot;><strong>Notebook:</strong></p>\n<pre><code>LET Results = SELECT count() AS Count, Fqdn, Name, FullPath, Command FROM source()\n// filter common FPs\nWHERE NOT FullPath =~ \&quot;bginfo.lnk\&quot;\nAND NOT FullPath =~ \&quot;desktop.ini\&quot;\nAND NOT FullPath =~ \&quot;Outlook.lnk\&quot;\nAND NOT FullPath =~ \&quot;chrome.lnk\&quot;\nAND NOT (Name =~ \&quot;OneDrive\&quot; AND FullPath =~ \&quot;OneDrive\&quot; AND Command =~ \&quot;OneDrive\&quot;)\n// end common FPs\nGROUP BY Name, FullPath, Command // stack them\nSELECT * FROM Results\nWHERE Count &amp;lt; 10\nORDER BY Count // sorts ascending\n</code></pre>\n<hr>\n<p dir=\&quot;auto\&quot;><strong>Objective:</strong> Use a builtin artifact to hunt for potential persistence mechanisms.</p>\n<p dir=\&quot;auto\&quot;><strong>Hunt Artifact:</strong> <code>Windows.System.TaskScheduler</code></p>\n<p dir=\&quot;auto\&quot;><strong>Notebook:</strong></p>\n<pre><code>LET Results = SELECT FullPath,Command,Arguments,Fqdn, count() AS Count FROM source()\nWHERE Command AND Arguments\nAND NOT Command =~ \&quot;OneDriveStandaloneUpdater.exe\&quot;\nAND NOT (Command = \&quot;C:\\\\Windows\\\\System32\\\\Essentials\\\\RunTask.exe\&quot; AND FullPath =~ \&quot;Essentials\&quot;)\nAND NOT Command =~ \&quot;MpCmdRun.exe\&quot;\nAND NOT Arguments =~ \&quot;sildailycollector.vbs\&quot;\nAND NOT Command = \&quot;C:\\\\Windows\\\\system32\\\\vssadmin.exe\&quot;\nAND NOT FullPath =~ \&quot;BPA Scheduled Scan\&quot;\nAND NOT Arguments =~ \&quot;CheckDatabaseRedundancy\&quot;\nAND NOT Arguments =~ \&quot;silcollector.cmd\&quot;\nGROUP BY FullPath,Command,Arguments\nSELECT * FROM Results\nWHERE Count &amp;lt; 5\nORDER BY Count // sorts ascending\n</code></pre>\n<hr>\n<p dir=\&quot;auto\&quot;><strong>Objective:</strong> Leverage Sysinternals Autorunsc to hunt for potential persistence mechanisms.</p>\n<p dir=\&quot;auto\&quot;><strong>Hunt Artifact:</strong> <code>Windows.Sysinternals.Autoruns</code></p>\n<p dir=\&quot;auto\&quot;><strong>Notebook:</strong></p>\n<pre><code>LET Results = SELECT count() AS Count, Fqdn, Entry,Category,Profile,Description,`Image Path` AS ImagePath,`Launch String` AS LaunchString,`SHA-256` AS SHA256 FROM source()\nWHERE NOT Signer\nAND Enabled = \&quot;enabled\&quot;\nGROUP BY ImagePath,LaunchString\nSELECT * FROM Results\nWHERE Count &amp;lt; 5 // return entries present on fewer than 5 systems\nORDER BY Count\n</code></pre>\n<hr>\n<h2 dir=\&quot;auto\&quot;><a id=\&quot;user-content-scoping-with-known-malware-locations\&quot; class=\&quot;anchor\&quot; aria-hidden=\&quot;true\&quot; href=\&quot;#scoping-with-known-malware-locations\&quot;><svg class=\&quot;octicon octicon-link\&quot; viewBox=\&quot;0 0 16 16\&quot; version=\&quot;1.1\&quot; width=\&quot;16\&quot; height=\&quot;16\&quot; aria-hidden=\&quot;true\&quot;><path fill-rule=\&quot;evenodd\&quot; d=\&quot;M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\&quot;></path></svg></a>Scoping with known malware locations</h2>\n<p dir=\&quot;auto\&quot;><strong>Objective:</strong> Find all systems with suspected malware on disk</p>\n<p dir=\&quot;auto\&quot;><strong>Hunt Artifact:</strong> <code>Windows.Search.FileFinder</code></p>\n<p dir=\&quot;auto\&quot;>Parameters:</p>\n<ul dir=\&quot;auto\&quot;>\n<li>SearchFilesGlobTable:</li>\n</ul>\n<pre><code>    - C:\\**\\msxsl.exe\n    - C:\\**\\*.hta\n    - C:\\**\\drivers\\svchost.exe\n    - C:\\**\\tkg.exe\n    - C:\\**\\Security_Protocol*\n    - C:\\**\\XKnqbpzl.txt\n</code></pre>\n<p dir=\&quot;auto\&quot;><strong>Notebook:</strong></p>\n<pre><code>SELECT Fqdn,FullPath,MTime AS ModifiedTime,BTime as CreationTime, Hash,\nlabel(client_id=ClientId, labels=\&quot;compromised\&quot;, op=\&quot;set\&quot;) // label all systems with detections\nFROM source()\n</code></pre>\n<hr>\n<h2 dir=\&quot;auto\&quot;><a id=\&quot;user-content-lets-just-find-cobaltstrike-already\&quot; class=\&quot;anchor\&quot; aria-hidden=\&quot;true\&quot; href=\&quot;#lets-just-find-cobaltstrike-already\&quot;><svg class=\&quot;octicon octicon-link\&quot; viewBox=\&quot;0 0 16 16\&quot; version=\&quot;1.1\&quot; width=\&quot;16\&quot; height=\&quot;16\&quot; aria-hidden=\&quot;true\&quot;><path fill-rule=\&quot;evenodd\&quot; d=\&quot;M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\&quot;></path></svg></a>Let's just find CobaltStrike already</h2>\n<p dir=\&quot;auto\&quot;><strong>Objective:</strong> Leveraging the power of Yara, let's just sweep all processes in memory for signatures matching the popular Cobalt Strike attack tool.</p>\n<p dir=\&quot;auto\&quot;><strong>Hunt Artifact:</strong> <code>Windows.Detection.Yara.Process</code></p>\n<p dir=\&quot;auto\&quot;>Parameters:</p>\n<ul dir=\&quot;auto\&quot;>\n<li>Default yara signature is Cobalt Strike</li>\n</ul>\n<p dir=\&quot;auto\&quot;><strong>Notebook:</strong></p>\n<pre><code>SELECT Fqdn, ProcessName, Pid, Rule,\nlabel(client_id=ClientId, labels=\&quot;cobaltstrike\&quot;, op=\&quot;set\&quot;) // label all systems with detections\nFROM source()\n</code></pre>\n<hr>\n<h2 dir=\&quot;auto\&quot;><a id=\&quot;user-content-remediation---quarantine\&quot; class=\&quot;anchor\&quot; aria-hidden=\&quot;true\&quot; href=\&quot;#remediation---quarantine\&quot;><svg class=\&quot;octicon octicon-link\&quot; viewBox=\&quot;0 0 16 16\&quot; version=\&quot;1.1\&quot; width=\&quot;16\&quot; height=\&quot;16\&quot; aria-hidden=\&quot;true\&quot;><path fill-rule=\&quot;evenodd\&quot; d=\&quot;M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\&quot;></path></svg></a>Remediation - Quarantine</h2>\n<p dir=\&quot;auto\&quot;><strong>Objective:</strong> Now that we have a solid grasp on the scope of the intrusion, lets quarantine all impacted systems to prevent further damage.</p>\n<p dir=\&quot;auto\&quot;><strong>Hunt Artifact:</strong> <code>Windows.Remediation.Quarantine</code> (run against all systems labeled <code>compromised</code>)</p>\n<p dir=\&quot;auto\&quot;><strong>Notebook:</strong> <code>none required</code></p>\n<hr>\n<h2 dir=\&quot;auto\&quot;><a id=\&quot;user-content-begin-forensics\&quot; class=\&quot;anchor\&quot; aria-hidden=\&quot;true\&quot; href=\&quot;#begin-forensics\&quot;><svg class=\&quot;octicon octicon-link\&quot; viewBox=\&quot;0 0 16 16\&quot; version=\&quot;1.1\&quot; width=\&quot;16\&quot; height=\&quot;16\&quot; aria-hidden=\&quot;true\&quot;><path fill-rule=\&quot;evenodd\&quot; d=\&quot;M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z\&quot;></path></svg></a>Begin Forensics</h2>\n<p dir=\&quot;auto\&quot;><strong>Objective:</strong> Now that compromised systems are quarantined, lets pull back forensics data for deeper analysis</p>\n<p dir=\&quot;auto\&quot;><strong>Hunt Artifact:</strong> <code>Windows.KapeFiles.Targets</code> (run against all systems labeled <code>compromised</code>)</p>\n<p dir=\&quot;auto\&quot;>Paramenters:</p>\n<ul dir=\&quot;auto\&quot;>\n<li>Kape targets: <code>_SANS_Triage</code></li>\n</ul>\n<p dir=\&quot;auto\&quot;><strong>Notebook:</strong> <code>none required</code></p>\n</article>\n  </div>\n\n  </div>\n</div>\n\n      </div>\n      <div class=\&quot;gist-meta\&quot;>\n        <a href=\&quot;https://gist.github.com/ecapuano/daee6f3704273c2c8b527f522c1725db/raw/0eb76db8ad09092c57d2c92b3bbccb02ce8f52aa/handout.md\&quot; style=\&quot;float:right\&quot;>view raw</a>\n        <a href=\&quot;https://gist.github.com/ecapuano/daee6f3704273c2c8b527f522c1725db#file-handout-md\&quot;>\n          handout.md\n        </a>\n        hosted with &amp;#10084; by <a href=\&quot;https://github.com\&quot;>GitHub</a>\n      </div>\n    </div>\n</div>\n&quot;,&quot;stylesheet&quot;:&quot;https://github.githubassets.com/assets/gist-embed-d68a95cf247f.css&quot;}" data-component-name="GitgistToDOM"><link rel="stylesheet" href="https://github.githubassets.com/assets/gist-embed-d68a95cf247f.css"><div id="gist116792963" class="gist">
    <div class="gist-file">
      <div class="gist-data">
        <div class="js-gist-file-update-container js-task-list-container file-box">
  <div id="file-handout-md" class="file my-2">
      <div id="file-handout-md-readme" class="Box-body readme blob js-code-block-container p-5 p-xl-6 ">
    <article class="markdown-body entry-content container-lg" itemprop="text"><h1><a id="user-content-live-incident-response-with-velociraptor---handout" class="anchor" href="#live-incident-response-with-velociraptor---handout"></a>Live Incident Response with Velociraptor - Handout</h1>
<p><a href="https://twitter.com/eric_capuano">@eric_capuano</a> || <a href="https://www.reconinfosec.com">Recon InfoSec</a></p>
<p>Watch the recorded talk here: <a href="https://www.youtube.com/watch?v=Q1IoGX--814">https://www.youtube.com/watch?v=Q1IoGX--814</a></p>
<p>This handout is meant to accompany the <a href="https://www.youtube.com/watch?v=Q1IoGX--814">live talk</a>, but contains many useful notebook examples for post-processing Velociraptor hunt results.</p>
<hr>
<h2><a id="user-content-hunting-for-phish-victims" class="anchor" href="#hunting-for-phish-victims"></a>Hunting for phish victims</h2>
<p><strong>Objective:</strong> Using the name of a suspicious email attachment, we can quickly identify which users/systems may have been impacted.</p>
<p><strong>Hunt Artifact:</strong> <code>Windows.Search.FileFinder</code></p>
<p>Parameters:</p>
<ul>
<li>SearchFilesGlob: <code>C:\Users\**\Security_Protocol*</code></li>
</ul>
<p><strong>Notebook:</strong></p>
<pre><code>SELECT Fqdn,FullPath,BTime AS CreatedTime,MTime as ModifiedTime, Hash,
label(client_id=ClientId, labels="phish_victim", op="set") // label all systems with detections
FROM source()
</code></pre>
<hr>
<h2><a id="user-content-lateral-movement" class="anchor" href="#lateral-movement"></a>Lateral Movement</h2>
<p><strong>Objective:</strong> When dealing with advanced adversaries, it is safe to assume the breach has expanded beyond the initial victims of the phish campaign... Let's launch a quick hunt to find possible lateral movement using the usernames of the phish victims</p>
<p><strong>Hunt Artifact:</strong> <code>Windows.EventLogs.RDPAuth</code></p>
<p><strong>Notebook:</strong></p>
<pre><code>SELECT EventTime,Computer,Channel,EventID,UserName,LogonType,SourceIP,Description,Message,Fqdn FROM source()
WHERE ( // excluded logons of the user on their own system
(UserName =~ "Chad.Chan" AND NOT Computer =~ "ACC-01")&nbsp;
OR (UserName =~ "Jean.Owen" AND NOT Computer =~ "ACC-05")
OR (UserName =~ "Albert.Willoughby" AND NOT Computer =~ "ACC-09")
OR (UserName =~ "Anna.Ward" AND NOT Computer =~ "ACC-04")
)
AND NOT EventID = 4634 // less interested in logoff events
AND NOT (Computer =~ "dc" OR Computer =~ "exchange" OR Computer =~ "fs1")
ORDER BY EventTime
</code></pre>
<hr>
<h2><a id="user-content-process-analysis" class="anchor" href="#process-analysis"></a>Process Analysis</h2>
<p><strong>Objective:</strong> Find potentially compromised systems by baselining all running processes in the environment. This notebook returns processes marked as <code>untrusted</code> by Authenticode.</p>
<p><strong>Hunt Artifact:</strong> <code>Windows.System.Pslist</code></p>
<p><strong>Notebook:</strong></p>
<pre><code>SELECT Name,Exe,CommandLine,Hash.SHA256 AS SHA256, Authenticode.Trusted, Username, Fqdn, count() AS Count FROM source()
WHERE Authenticode.Trusted = "untrusted" // unsigned binaries
// List of environment-specific processes to exclude
AND NOT Exe = "C:\\Program Files\\filebeat-rss\\filebeat.exe"
AND NOT Exe = "C:\\Program Files\\filebeat\\filebeat.exe"
AND NOT Exe = "C:\\Program Files\\winlogbeat-rss\\winlogbeat.exe"
AND NOT Exe = "C:\\Program Files\\winlogbeat\\winlogbeat.exe"
AND NOT Exe = "C:\\user-automation\\user.exe"
AND NOT Exe = "C:\\salt\\bin\\python.exe"
// Stack for prevalence analysis
GROUP BY Exe
// Sort results ascending
ORDER BY Count
</code></pre>
<hr>
<p><strong>Objective:</strong> Leverage VirusTotal to quickly check untrusted processes for detections. Be mindful that free VT API is limited to 4 lookups / min &amp; 500 / day so we'll be as efficient as possible with what we query against VT.</p>
<p><strong>Hunt Artifact:</strong> <code>Windows.System.Pslist</code></p>
<p><strong>Notebook:</strong></p>
<pre><code>// Get a free VT api key
LET VTKey &lt;= "&lt;your_api_key&gt;"
// Build the list of untrusted processes first
Let Results = SELECT Name,CommandLine,Exe,Hash.SHA256 AS SHA256, count() AS Count FROM source()
WHERE Authenticode.Trusted = "untrusted"
AND SHA256 // only entries with the required SHA256
// List of environment-specific processes to exclude
AND NOT Exe = "C:\\user-automation\\user.exe"
GROUP BY Exe,SHA256
// Now combine the previous query with the Server Enrichment query
SELECT *, {SELECT VTRating FROM Artifact.Server.Enrichment.Virustotal(VirustotalKey=VTKey, Hash=SHA256) } AS VTResults FROM foreach(row=Results) WHERE Count &lt; 10
ORDER BY VTResults DESC
</code></pre>
<hr>
<p><strong>Objective:</strong> Get process ancestry for known malware. Here we learn important details about how the malware was launched.</p>
<p><strong>Hunt Artifact:</strong> <code>Generic.System.Pstree</code> with</p>
<p>Parameters:</p>
<ul>
<li>Process Regex: <code>.*(tkg|mshta|Security_Protocol).*</code></li>
</ul>
<p><strong>Notebook:</strong> <code>none required</code></p>
<hr>
<h2><a id="user-content-persistence" class="anchor" href="#persistence"></a>Persistence</h2>
<p><strong>Objective:</strong> Use a builtin artifact to hunt for potential persistence mechanisms.</p>
<p><strong>Hunt Artifact:</strong> <code>Windows.Sys.StartupItems</code></p>
<p><strong>Notebook:</strong></p>
<pre><code>LET Results = SELECT count() AS Count, Fqdn, Name, FullPath, Command FROM source()
// filter common FPs
WHERE NOT FullPath =~ "bginfo.lnk"
AND NOT FullPath =~ "desktop.ini"
AND NOT FullPath =~ "Outlook.lnk"
AND NOT FullPath =~ "chrome.lnk"
AND NOT (Name =~ "OneDrive" AND FullPath =~ "OneDrive" AND Command =~ "OneDrive")
// end common FPs
GROUP BY Name, FullPath, Command // stack them
SELECT * FROM Results
WHERE Count &lt; 10
ORDER BY Count // sorts ascending
</code></pre>
<hr>
<p><strong>Objective:</strong> Use a builtin artifact to hunt for potential persistence mechanisms.</p>
<p><strong>Hunt Artifact:</strong> <code>Windows.System.TaskScheduler</code></p>
<p><strong>Notebook:</strong></p>
<pre><code>LET Results = SELECT FullPath,Command,Arguments,Fqdn, count() AS Count FROM source()
WHERE Command AND Arguments
AND NOT Command =~ "OneDriveStandaloneUpdater.exe"
AND NOT (Command = "C:\\Windows\\System32\\Essentials\\RunTask.exe" AND FullPath =~ "Essentials")
AND NOT Command =~ "MpCmdRun.exe"
AND NOT Arguments =~ "sildailycollector.vbs"
AND NOT Command = "C:\\Windows\\system32\\vssadmin.exe"
AND NOT FullPath =~ "BPA Scheduled Scan"
AND NOT Arguments =~ "CheckDatabaseRedundancy"
AND NOT Arguments =~ "silcollector.cmd"
GROUP BY FullPath,Command,Arguments
SELECT * FROM Results
WHERE Count &lt; 5
ORDER BY Count // sorts ascending
</code></pre>
<hr>
<p><strong>Objective:</strong> Leverage Sysinternals Autorunsc to hunt for potential persistence mechanisms.</p>
<p><strong>Hunt Artifact:</strong> <code>Windows.Sysinternals.Autoruns</code></p>
<p><strong>Notebook:</strong></p>
<pre><code>LET Results = SELECT count() AS Count, Fqdn, Entry,Category,Profile,Description,`Image Path` AS ImagePath,`Launch String` AS LaunchString,`SHA-256` AS SHA256 FROM source()
WHERE NOT Signer
AND Enabled = "enabled"
GROUP BY ImagePath,LaunchString
SELECT * FROM Results
WHERE Count &lt; 5 // return entries present on fewer than 5 systems
ORDER BY Count
</code></pre>
<hr>
<h2><a id="user-content-scoping-with-known-malware-locations" class="anchor" href="#scoping-with-known-malware-locations"></a>Scoping with known malware locations</h2>
<p><strong>Objective:</strong> Find all systems with suspected malware on disk</p>
<p><strong>Hunt Artifact:</strong> <code>Windows.Search.FileFinder</code></p>
<p>Parameters:</p>
<ul>
<li>SearchFilesGlobTable:</li>
</ul>
<pre><code>    - C:\**\msxsl.exe
    - C:\**\*.hta
    - C:\**\drivers\svchost.exe
    - C:\**\tkg.exe
    - C:\**\Security_Protocol*
    - C:\**\XKnqbpzl.txt
</code></pre>
<p><strong>Notebook:</strong></p>
<pre><code>SELECT Fqdn,FullPath,MTime AS ModifiedTime,BTime as CreationTime, Hash,
label(client_id=ClientId, labels="compromised", op="set") // label all systems with detections
FROM source()
</code></pre>
<hr>
<h2><a id="user-content-lets-just-find-cobaltstrike-already" class="anchor" href="#lets-just-find-cobaltstrike-already"></a>Let's just find CobaltStrike already</h2>
<p><strong>Objective:</strong> Leveraging the power of Yara, let's just sweep all processes in memory for signatures matching the popular Cobalt Strike attack tool.</p>
<p><strong>Hunt Artifact:</strong> <code>Windows.Detection.Yara.Process</code></p>
<p>Parameters:</p>
<ul>
<li>Default yara signature is Cobalt Strike</li>
</ul>
<p><strong>Notebook:</strong></p>
<pre><code>SELECT Fqdn, ProcessName, Pid, Rule,
label(client_id=ClientId, labels="cobaltstrike", op="set") // label all systems with detections
FROM source()
</code></pre>
<hr>
<h2><a id="user-content-remediation---quarantine" class="anchor" href="#remediation---quarantine"></a>Remediation - Quarantine</h2>
<p><strong>Objective:</strong> Now that we have a solid grasp on the scope of the intrusion, lets quarantine all impacted systems to prevent further damage.</p>
<p><strong>Hunt Artifact:</strong> <code>Windows.Remediation.Quarantine</code> (run against all systems labeled <code>compromised</code>)</p>
<p><strong>Notebook:</strong> <code>none required</code></p>
<hr>
<h2><a id="user-content-begin-forensics" class="anchor" href="#begin-forensics"></a>Begin Forensics</h2>
<p><strong>Objective:</strong> Now that compromised systems are quarantined, lets pull back forensics data for deeper analysis</p>
<p><strong>Hunt Artifact:</strong> <code>Windows.KapeFiles.Targets</code> (run against all systems labeled <code>compromised</code>)</p>
<p>Paramenters:</p>
<ul>
<li>Kape targets: <code>_SANS_Triage</code></li>
</ul>
<p><strong>Notebook:</strong> <code>none required</code></p>
</article>
  </div>

  </div>
</div>

      </div>
      <div class="gist-meta">
        <a href="https://gist.github.com/ecapuano/daee6f3704273c2c8b527f522c1725db/raw/0eb76db8ad09092c57d2c92b3bbccb02ce8f52aa/handout.md" style="float:right">view raw</a>
        <a href="https://gist.github.com/ecapuano/daee6f3704273c2c8b527f522c1725db#file-handout-md">
          handout.md
        </a>
        hosted with &#10084; by <a href="https://github.com">GitHub</a>
      </div>
    </div>
</div>
</div>]]></content:encoded></item><item><title><![CDATA[So you want to be a SOC Analyst? Intro]]></title><description><![CDATA[A blog series for someone wanting to get a start as a SOC Analyst]]></description><link>https://blog.ecapuano.com/p/so-you-want-to-be-a-soc-analyst-intro</link><guid isPermaLink="false">https://blog.ecapuano.com/p/so-you-want-to-be-a-soc-analyst-intro</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Wed, 22 Feb 2023 03:54:33 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/81c21cbf-87ca-4e77-b1c9-79190f17f8c0_1024x1004.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>UPDATE - 3/11/2025</strong></p><p>Since the original <strong>SYWTBSA</strong> series was published in February 2023, many changes have occurred, leading me to sunset this version in favor of <strong><a href="https://blog.ecapuano.com/p/so-you-want-to-be-a-soc-analyst-20">SYWTBSA 2.0</a></strong>. Key reasons for this decision include:</p><ul><li><p><strong>VMware challenges</strong> following the Broadcom acquisition.</p></li><li><p><strong>Ongoing issues</strong> with inconsistencies in student-built VM environments.</p></li><li><p><strong>Microsoft discontinuing free developer VM downloads.</strong></p></li><li><p><strong>Extensive course updates required</strong>, making it impractical to maintain two versions.</p></li></ul><p>The series is now offered as a <strong>&#8220;pay what you can&#8221;</strong> course, resolving all of these challenges. You can register <a href="https://academy.digitaldefenseinstitute.com/courses/eca7ec1f-22dd-4d1f-b473-7a085facb26a">here</a>, which helps me continue developing and updating the content while providing support to the hundreds of learners who go through it each year.</p><h1>Series Intro</h1><p>Over the years, I&#8217;ve had the fortune of mentoring many up-and-comers trying to get a foothold in the information security space. One of the most common questions I am asked is, <strong>&#8220;What should I do to improve my chances of landing an entry-level SOC analyst job?&#8221;</strong></p><p>My answer to that question has changed over the years as technology and methodology have evolved. Back in the earlier days, when we walked uphill both ways to the SOC, I would&#8217;ve recommended a complex (but very rewarding) process of spinning up a mid-size virtual machine environment complete with a small firewall, (<a href="https://www.pfsense.org/">pfSense</a>), a router (<a href="https://vyos.io/">vyos</a>) one or two Windows hosts, an attack box (<a href="https://www.kali.org/">Kali</a>, etc), network monitoring (<a href="https://arkime.com/">Arkime</a>/<a href="https://suricata.io/">Suricata</a>), and most importantly a log aggregation tool (<a href="https://www.graylog.org/">Graylog</a> or ELK/<a href="https://opensearch.org/">OpenSearch</a>). Once those systems were up and running, then begins the adventure of deploying agents (<a href="https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon">Sysmon</a>, <a href="https://www.elastic.co/beats/">Beats</a>) to generate and ship telemetry to the logging tool. Only then does it make sense to start practicing basic attacks against the Windows hosts in order to observe the telemetry and begin &#8220;detecting&#8221; threats. Just the lab build alone was a many-hour endeavor&#8212;it&#8217;s a long road before you&#8217;re actually doing SOC analyst stuff.</p><p>I was (and still am) a big fan of this approach because not only is it how I got my own start (which eventually led to the creation of <a href="https://opensoc.io/">OpenSOC</a>), but also because there is so much indirect learning that takes place while trying to deploy and configure these systems, routers, firewalls, as well as fun side-quests like troubleshooting log parsers, tuning Sysmon, configuring audit policies, etc. etc. For these reasons and more, I still recommend this approach to anyone lacking general IT knowledge because it will help you gain knowledge needed to be a good security practitioner. If this approach sounds like something that would be beneficial to you, there are plenty of resources across the web to help you setup a test lab for defensive research. A book I have heard great things about is &#8220;<a href="https://www.amazon.com/Building-Virtual-Machine-Labs-Hands/dp/B09GXD7QL8/">Building Virtual Machine Labs: A Hands-On Guide</a>&#8221; by Tony Robinson and you should absolutely check out Jeff McJunkin&#8217;s guide on <a href="https://docs.google.com/presentation/d/1V-mWiyaJ3I6HhXRxH1M5ityWYRqb5PoNHwvWSZaOr_E/edit#slide=id.p">Building Your Own Kickass Home Lab</a>.</p><p>That said, technology has evolved drastically since those days and my new approach to &#8220;quickly getting up to speed for SOC work&#8221; has evolved as well. This series will focus on the new approach I recommend to up-and-comers.</p><p>Let me also clarify that I am not saying &#8220;this is all you need&#8221; &#8212; a strong working knowledge of general IT and some strong entry-level training (such as <a href="https://www.antisyphontraining.com">Antisyphon</a>, <a href="https://www.networkdefense.io">Applied Network Defense</a>, or <a href="https://www.sans.org/">SANS</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>) is a huge plus as well. However, I will say as a hiring manager and infosec startup founder, the direct and indirect skills you will gain with this approach are the ones I am personally looking for in a candidate, above and beyond what letters you put after your name. If you want to know more about what I (and many others) are looking for in a SOC analyst candidate, check out this interview I did with Gerry Auger on his &#8220;Simply Cyber&#8221; webcast: &#8220;<a href="https://www.youtube.com/watch?v=p9RsKDIGKvc">Everything Security Operations Analyst Entry Level</a>.&#8221;</p><h2>Online Course with Cloud-Hosted VMs</h2><p>To get started, head over to <a href="https://blog.ecapuano.com/p/so-you-want-to-be-a-soc-analyst-20">So you want to be a SOC Analyst? 2.0</a> which features a fully cloud-hosted version of the VM, requiring only a remote desktop client to get through this lab series!</p><h2>Lab Sections (1.0, deprecated)</h2><ul><li><p>Part 1 - Set up a small virtualization environment (2 small VMs)</p></li><li><p>Part 2 - Put on your adversary hat, it's time to make (and observe) some noise</p></li><li><p>Part 3 - Emulating an adversary for crafting detections</p></li><li><p>Part 4 - Blocking an attack</p></li><li><p>Part 5 - Tuning false positives</p></li><li><p>Part 6 - Trigger YARA scans with a detection rule</p></li></ul><p>The very awesome <a href="https://www.linkedin.com/in/geraldauger/">Gerry Auger</a> of <a href="https://www.simplycyber.io/">SimplyCyber</a> did a full video walk-through of this series. Now you can follow along each step of the series before trying it yourself. Watch the video below.</p><div id="youtube2-oOzihldLz7U" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;oOzihldLz7U&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/oOzihldLz7U?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>Update, again! Gerry and I did a joint video together where we go through his walk-through video, but with commentary.</p><div id="youtube2-P_Kl2EnF8_A" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;P_Kl2EnF8_A&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/P_Kl2EnF8_A?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.ecapuano.com/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/p/so-you-want-to-be-a-soc-analyst-intro?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.ecapuano.com/p/so-you-want-to-be-a-soc-analyst-intro?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>I mention SANS because it is a solid option, however it is often outside the price range for someone just starting their career. Additional transparency disclaimer, I also <a href="https://www.sans.org/profiles/eric-capuano/">teach</a> for SANS.</p><p></p></div></div>]]></content:encoded></item><item><title><![CDATA[PowerShell Artifact - ConsoleHost_History.txt]]></title><description><![CDATA[A great way to understand adversary PowerShell activity on a system.]]></description><link>https://blog.ecapuano.com/p/powershell-artifact-consolehost_historytxt</link><guid isPermaLink="false">https://blog.ecapuano.com/p/powershell-artifact-consolehost_historytxt</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Thu, 16 Feb 2023 16:47:52 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/941ec4bd-4e69-4a36-9d1e-98b4a9211804_1600x1600.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Since PowerShell 4/5+, we&#8217;ve had a wealth of fantastic detection and forensic artifacts around PowerShell activity, such as Script Block logging and transcripts, which I will expand on in subsequent posts. However, one of the lesser discussed yet still valuable artifacts is the <code>ConsoleHost_History.txt</code> file inside the Users directory containing up to 4096 of the last commands run in a PowerShell console. For my *nix users, it is very similar to the bash_history file.</p><p>While this artifact may seem less informative than Script Block logging and transcripts, you may occaisonally find situations where it is the best artifact you have around PowerShell activity because other more verbose artfacts may simply not be present at all. This is especially true when script block logs/transcripts are either not enabled (very common) or they are maliciously disabled by a threat actor.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Eric&#8217;s Substack! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>The default location for this file is <code>%userprofile%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt</code>. </p><p>It will generally contain up to <strong>4096</strong> commands run by the user that owns this profile, however it is possible to increase this command history with the following command: <code>Set-PSReadlineOption -MaximumHistoryCount 10000</code>.</p><p>One of the first things to consider is that anytime you perform a triage acquisition of a victim system, be sure to include <a href="https://github.com/EricZimmerman/KapeFiles/blob/a4785690cbc0cbd3045737800dbaf11dacd528bc/Targets/Logs/PowerShellConsole.tkape">this location</a>. This isn&#8217;t a file you&#8217;d generally target for consumption into your SIEM, but you can certainly use it for post-compromise analysis as well as proactive threat hunting.</p><p>In a recent IR, we observed suspicious PowerShell activity that aimed to disable things like Micorosft Defender and Script Block logging. Unfortunately, the script blocks were of little use after that point but the commands used to disable Defender were captured by the ConsoleHost_History.txt file.</p><pre><code>Set-MpPreference -DisableRealtimeMonitoring $true
Set-MpPreference -DisableRealtimeMonitoring $true -DisableBehaviorMonitoring $true -DisableArchiveScanning $true -DisableSc $truca-DisableIOAVProtection $true -MAPSReporting Disabled -SubmitSampletrue -MAPSReporting Disabled -SubmitSamplesConsent 2  
Set-MpPreference -DisableRealtimeMonitoring $true -DisableBehaviorue -DisableScriptScanning $tIOAVProtection $trce -MAPSReporting Disabled -SubmitSamplesCE _MAPSReporting Disabled -SubmitSamplesCE _MAPSReporting Disabled -SubmitSamplesConsent 2  </code></pre><p>This provided <a href="https://gist.githubusercontent.com/ecapuano/1c6bd492707114a052915e85f443a832/raw/37a17ba46ab43eebb4440431763597227599bd80/Suspicious_PowerShell_ConsoleHost_History.yar">yara signature</a> material to quickly assess any other systems with similar activity. With this signature we can now quickly scan every system for similar activity, regardless if they were shipping PowerShell logs to the SIEM or not. Now, with a simple yara scan such as one accomplished with <a href="https://velociraptor.velocidex.com/digging-for-files-with-velociraptor-a1c0a21e242b">Velociraptor</a>, we can hunt for unusual PowerShell activity in this file across the fleet.</p><p>Now, it&#8217;s worth noting that ConsoleHost_History can be disabled as well, but this is  less common in my experience. A simple command to accomplish this could be <code>Set-PSReadlineOption -HistorySaveStyle SaveNothing</code>. However, this example would only impact the session it was run in, and history would be re-enabled for subsequent sessions.</p><p>For additional reading, check out this great post: <a href="https://woshub.com/powershell-commands-history/">https://woshub.com/powershell-commands-history/</a></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Eric&#8217;s Substack! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Automatically Revert ESXi VM Snapshot on a Schedule]]></title><link>https://blog.ecapuano.com/p/automatically-revert-esxi-vm-snapshot</link><guid isPermaLink="false">https://blog.ecapuano.com/p/automatically-revert-esxi-vm-snapshot</guid><dc:creator><![CDATA[Eric Capuano]]></dc:creator><pubDate>Wed, 08 Feb 2023 18:44:18 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!lrkf!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c9bc99-8815-431a-8473-21ce5748124c_400x400.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.ecapuano.com/subscribe?"><span>Subscribe now</span></a></p><h2>Why is this useful?</h2><p>Let&#8217;s say you have a VM that you use for unsavory things like malware analysis and you would like to automatically revert it on a scheduled basis. There are many ways to go about this manually, but for my particular use-case, I wanted it done automatically everyday at 3AM. </p><p>While this can be accomplished a few different ways such as <a href="https://communities.vmware.com/t5/ESXi-Discussions/Independent-Persistent-Vs-Independent-Non-Persistent/td-p/2176432">non-persistent disks</a>, I found the snapshot revert method ideal for me because the machine stays up and on at all times except the brief moment the snapshot is being restored.</p><h2>Great, just tell me how to do it!</h2><p>In my example, I am using standalone ESXi 6.7 (no vCenter). There is a VM running that has a single snapshot called &#8220;Clean&#8221;. Of course, one could use the ESXi WebUI to revert the snapshot at will, but in order to get it to revert automatically on a schedule, I scripted up the following tasks in ESXi CLI and created a cronjob.</p><ol><li><p>Snapshot your VM in the WebUI</p></li><li><p>SSH to the ESXi server and run the following commands:</p><ol><li><p>Get your target VM ID with this command: </p><ol><li><p>vim-cmd vmsvc/getallvms</p></li></ol></li><li><p>Learn the snapshot ID of your VM with this command:</p><ol><li><p>vim-cmd vmsvc/get.snapshotinfo [VM_id]</p></li></ol></li><li><p>Create a cronjob that reverts this VM everyday at 3AM (<a href="https://crontab.guru/">customize as neccesary</a>)</p><ol><li><p>Backup existing crontab</p><ol><li><p>cp /var/spool/cron/crontabs/root /var/spool/cron/crontabs/root.old</p></li></ol></li><li><p>Edit running crontab</p><ol><li><p>vi /var/spool/cron/crontabs/root</p></li></ol></li><li><p>Add the new job on the last line, this job runs everyday at 3AM. The 0 at the end is to ensure the VM stays powered on after the snapshot is restored.</p><ol><li><p>*   3   *   *   *   /bin/vim-cmd vmsvc/snapshot.revert [VM_id] [snapshot_id] 0</p></li></ol></li><li><p>Restart cron service (yes, this is a odd way of doing it, but ESXi is weird like that)</p><ol><li><p>PID=$(cat /var/run/crond.pid)</p><p>echo "Old cron PID was $PID"</p><p>kill $PID</p><p>/usr/lib/vmware/busybox/bin/busybox crond<br>PID=$(cat /var/run/crond.pid)</p><p>echo "NEW cron PID is $PID"</p></li></ol></li><li><p>And you&#8217;re set! Your VM will now revert to the snapshot everyday at 3AM.</p></li></ol></li></ol></li></ol><p></p><p>Ok so now your VM will revert to this snapshot everyday at 3AM, but what happens if you create a new snapshot and want the cron to use the new snapshot ID? Luckily, I crafted a little script that will ensure that your latest snapshot ID is always used by the cron. </p><p><strong>NOTE</strong>: This script only works if there is <strong>ONE snapshot</strong> for the VM. Multiple snapshots will break it.</p><p>The script:</p><pre><code>#/bin/bash
# NOTE: This script only works if there is ONE snapshot for the VM.
# Multiple snapshots will break it.

# BE SURE TO CHANGE VM_id TO YOUR VM's ID!
VM_id=33

# get snapshot ID for VM
SNAPSHOTID=$(vim-cmd vmsvc/get.snapshotinfo $VM_id | grep id | egrep -o '[0-9]+')

# edit cron to reflect new snapshot id

sed -ri "s/$VM_id [0-9]+ 0/$VM_id $SNAPSHOTID 0/" /var/spool/cron/crontabs/root

# restart crond
PID=$(cat /var/run/crond.pid)
echo "Old cron PID was $PID"
kill $PID
/usr/lib/vmware/busybox/bin/busybox crond
PID=$(cat /var/run/crond.pid)
echo "NEW cron PID is $PID"
echo "New crontab contents:"
cat /var/spool/cron/crontabs/root
</code></pre><p>Now that we have a script that can automatically update the crontab when a new snapshot ID exists, we can use another cronjob to make sure this happens before the snapshot revert happens.</p><ol><li><p>Edit running crontab</p><ol><li><p>vi /var/spool/cron/crontabs/root</p></li></ol></li><li><p>Add the new job on the last line, you want this job to run before the revert job runs. This job runs everyday at 2AM.</p><ol><li><p>*   2   *   *   *   /path_to_above_script.sh</p></li></ol></li><li><p>Restart cron service</p><ol><li><p>PID=$(cat /var/run/crond.pid)</p><p>echo "Old cron PID was $PID"</p><p>kill $PID</p><p>/usr/lib/vmware/busybox/bin/busybox crond<br>PID=$(cat /var/run/crond.pid)</p><p>echo "NEW cron PID is $PID"</p></li></ol></li><li><p>And you&#8217;re set! Your VM will now revert to the snapshot everyday at 3AM, even if you delete and recreate a new snapshot!</p></li></ol><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.ecapuano.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Eric&#8217;s Substack! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item></channel></rss>