<?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[Detection Engineering Weekly: Field Manual]]></title><description><![CDATA[The Detection Engineering Field Manual is a series of "quick-hit" posts about Detection Engineering, Security Engineering and Incident Response. 

These posts serve as a resource for security engineers to understand and orient the field of Detection quickly, and stem from years of practice and interviewing 100s of security people into my teams and organizations.]]></description><link>https://www.detectionengineering.net/s/field-manual</link><image><url>https://substackcdn.com/image/fetch/$s_!AUx7!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcd903e6-9e5e-44d3-9850-fcce9802e5a1_1024x1024.png</url><title>Detection Engineering Weekly: Field Manual</title><link>https://www.detectionengineering.net/s/field-manual</link></image><generator>Substack</generator><lastBuildDate>Tue, 07 Apr 2026 10:21:35 GMT</lastBuildDate><atom:link href="https://www.detectionengineering.net/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Zack 'techy' Allen]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[detectionengineering@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[detectionengineering@substack.com]]></itunes:email><itunes:name><![CDATA[Zack Allen]]></itunes:name></itunes:owner><itunes:author><![CDATA[Zack Allen]]></itunes:author><googleplay:owner><![CDATA[detectionengineering@substack.com]]></googleplay:owner><googleplay:email><![CDATA[detectionengineering@substack.com]]></googleplay:email><googleplay:author><![CDATA[Zack Allen]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[What are Composite Detections?]]></title><description><![CDATA[Atomic Detection rules are critical building blocks for a detection engineering function.]]></description><link>https://www.detectionengineering.net/p/what-are-composite-detections</link><guid isPermaLink="false">https://www.detectionengineering.net/p/what-are-composite-detections</guid><dc:creator><![CDATA[Zack Allen]]></dc:creator><pubDate>Wed, 07 Jan 2026 01:48:22 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Wz8G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e2972d8-c1cf-40f3-ba82-564d376cf15f_2119x1400.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a href="https://www.detectionengineering.net/p/field-manual-4-what-are-atomic-detection">Atomic Detection rules</a> are critical building blocks for a detection engineering function. They provide visibility into singular event or indicator-based threat activity within an environment. The rules are narrow in scope and generally lack context for the blue teamer&#8217;s environment and the threat actor performing the malicious action. For example, an atomic detection rule can inspect Administrator logon activity in a cloud environment and generate an alert whenever an Administrator logs in. This captures malicious admin compromises (high recall), but also triggers on every legitimate admin login (low precision), flooding analysts with false positives.</p><p>This tradeoff also works in the opposite direction on the precision-recall spectrum. A detection engineer can deploy an atomic rule that is so precise it becomes brittle. It may never generate an alert because the fields it tries to capture are so specific that they offer low operational value.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.detectionengineering.net/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">The Detection Engineering Field Manual is a series dedicated to sharing knowledge and my experience building, operating and scaling a detection engineering organization at a F500 tech company. Please like and subscribe if you find this series useful!</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 answer to combat these types of detections is to increase the context around the attack itself. This means capturing more threat activity to group atomic detections together, as well as increasing the context of the environment to differentiate benign and malicious activity. Composite detections, also known as correlated or stateful detections, increase the context and, therefore, complexity of writing and maintaining the rule.</p><p>This field manual post covers (ha!) the pros and cons of composite detection rules and begins to explore strategies to expand context around threat activity.</p><h2><strong>Detection Engineering Interview Questions:</strong></h2><ul><li><p>What is the MITRE ATT&amp;CK?</p></li><li><p>What is a composite detection rule?</p></li><li><p>Explain a threat activity scenario where a composite detection rule helps reduce false positives?</p></li><li><p>How do composite rules increase operational complexity for a detection engineer?</p></li></ul><h2>MITRE ATT&amp;CK</h2><p>MITRE ATT&amp;CK (pronounced &#8220;MY-ter AT-ack&#8221;) is <em>the</em> industry standard for modeling threat activity. According to their <a href="https://attack.mitre.org/">main website</a>:</p><p>&#8220;MITRE ATT&amp;CK&#174; is a globally-accessible knowledge base of adversary tactics and techniques based on real-world observations. The ATT&amp;CK knowledge base is used as a foundation for the development of specific threat models and methodologies in the private sector, in government, and in the cybersecurity product and service community.&#8221;</p><p>There is no modern detection engineering and incident response without MITRE ATT&amp;CK. It serves as a lexicon for security engineers across red and blue teams to standardize on how a specific attack occurs and the telemetry it generates.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LK6v!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa732cc20-757d-4b20-8c38-790de5d5f80a_2208x1102.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LK6v!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa732cc20-757d-4b20-8c38-790de5d5f80a_2208x1102.png 424w, https://substackcdn.com/image/fetch/$s_!LK6v!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa732cc20-757d-4b20-8c38-790de5d5f80a_2208x1102.png 848w, https://substackcdn.com/image/fetch/$s_!LK6v!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa732cc20-757d-4b20-8c38-790de5d5f80a_2208x1102.png 1272w, https://substackcdn.com/image/fetch/$s_!LK6v!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa732cc20-757d-4b20-8c38-790de5d5f80a_2208x1102.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LK6v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa732cc20-757d-4b20-8c38-790de5d5f80a_2208x1102.png" width="1456" height="727" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a732cc20-757d-4b20-8c38-790de5d5f80a_2208x1102.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:727,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:694335,&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://www.detectionengineering.net/i/183742455?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa732cc20-757d-4b20-8c38-790de5d5f80a_2208x1102.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_!LK6v!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa732cc20-757d-4b20-8c38-790de5d5f80a_2208x1102.png 424w, https://substackcdn.com/image/fetch/$s_!LK6v!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa732cc20-757d-4b20-8c38-790de5d5f80a_2208x1102.png 848w, https://substackcdn.com/image/fetch/$s_!LK6v!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa732cc20-757d-4b20-8c38-790de5d5f80a_2208x1102.png 1272w, https://substackcdn.com/image/fetch/$s_!LK6v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa732cc20-757d-4b20-8c38-790de5d5f80a_2208x1102.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><em>Tactics</em> are along the X axis and represent the stages an attacker traverses to achieve an objective, such as exfiltrating sensitive data, deploying ransomware, or causing a denial-of-service attack. Ransomware deployment is the end goal, but it requires a lot of steps to achieve that impact. For example, getting access to a victim machine, laterally moving to a domain controller, collecting secrets and cracking administrator passwords, and finally finding a way to deploy the ransomware.</p><p>The <em>Techniques</em> are the Y-axis under each <em>Tactic</em>. Techniques are the <em>how:</em> specific methods adversaries use within each tactic to achieve their objective. For example, <em><a href="https://attack.mitre.org/techniques/T1135/">Network Share Discovery</a></em> under <em>Discovery</em> is used by attackers to find interesting files, folders and target machines connected to the current machine. They can leverage this to perform <em>Collection</em> of sensitive information and perform <em>Lateral Movement</em> to a higher privileged victim machine.</p><p>The beauty of MITRE ATT&amp;CK is that it directly contradicts the adage &#8220;attackers only need to be right once, defenders have to be right 100% of the time.&#8221; Each technique listed above has associated telemetry, detection opportunities, and some even have threat groups that leverage the documented techniques.</p><h3>What does this have to do with Composite Detections?</h3><p>In my last post on Atomic Detections, I talked about how Atomic Detection rules <a href="https://www.detectionengineering.net/i/181689763/atomic-detections-lack-context">lack context</a>. These rules can use threat intelligence, such as malicious IP addresses, to generate alerts, but those IP addresses can be rotated, making the rule very noisy. So you wouldn&#8217;t want to write that rule unless it existed in the same window where the IP address remains malicious.</p><p>On a separate Atomic Detection rule, a detection engineer can write a rule to alert on <em>Network Share Discovery</em>. This is an obvious choice from my example before: the next logical step after <em>Network Share Discovery</em> is <em>Lateral Movement</em>. We want to detect that, right?</p><p>The problem here, again, becomes context. What if a legitimate process, such as a File Search or Data Backup tool, performs Network Discovery? You generate an alert, block the activity, and just killed productivity or a critical business process for one of your users. Does this mean you need to painstakingly investigate every <em>Network Discovery</em> alert? You could, but you would burn out, and the operational costs would be too high.</p><p>This is where Composite Detections can help, and where MITRE ATT&amp;CK enables context via <em>chains of events</em>. By correlating <em>Network Share Discovery</em> with subsequent L<em>ateral Movement</em> attempts, we filter out benign activity and surface actual threats.</p><h2>Composite Detections Tell a Story</h2><p>Let&#8217;s continue to challenge the adage &#8220;attackers only need to be right once, defenders have to be right 100% of the time.&#8221; We know that writing one Atomic Detection rule can be noisy. So what if you write two? What if you write these rules across every single path along MITRE ATT&amp;CK, under every Tactic? You would have high recall, but terrible precision, and a flurry of alerts that can&#8217;t discern between benign and malicious activity.</p><p>Let&#8217;s look at an example from our previous post on Atomic Detection Rules:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eN8C!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba7d5b1a-b2ca-4381-9293-904f86f317b5_1456x1090.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eN8C!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba7d5b1a-b2ca-4381-9293-904f86f317b5_1456x1090.png 424w, https://substackcdn.com/image/fetch/$s_!eN8C!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba7d5b1a-b2ca-4381-9293-904f86f317b5_1456x1090.png 848w, https://substackcdn.com/image/fetch/$s_!eN8C!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba7d5b1a-b2ca-4381-9293-904f86f317b5_1456x1090.png 1272w, https://substackcdn.com/image/fetch/$s_!eN8C!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba7d5b1a-b2ca-4381-9293-904f86f317b5_1456x1090.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eN8C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba7d5b1a-b2ca-4381-9293-904f86f317b5_1456x1090.png" width="1456" height="1090" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ba7d5b1a-b2ca-4381-9293-904f86f317b5_1456x1090.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1090,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:421698,&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://www.detectionengineering.net/i/183742455?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba7d5b1a-b2ca-4381-9293-904f86f317b5_1456x1090.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_!eN8C!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba7d5b1a-b2ca-4381-9293-904f86f317b5_1456x1090.png 424w, https://substackcdn.com/image/fetch/$s_!eN8C!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba7d5b1a-b2ca-4381-9293-904f86f317b5_1456x1090.png 848w, https://substackcdn.com/image/fetch/$s_!eN8C!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba7d5b1a-b2ca-4381-9293-904f86f317b5_1456x1090.png 1272w, https://substackcdn.com/image/fetch/$s_!eN8C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba7d5b1a-b2ca-4381-9293-904f86f317b5_1456x1090.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><p>In this scenario, the Atomic Detection rule fires on administrator login activity. We are only looking at the event and ignoring sourceIP, timestamp, and location. These can help tell the story, but the story stops on the singular event. You could write some additional enrichment to tell the story that:</p><ul><li><p>The Admin is logging in from a risky location, let&#8217;s say outside the U.S. for the sake of example</p></li><li><p>The Admin is logging in past business hours</p></li></ul><p>But these enrichment points can also be part of legitimate business activity. This is where <em>context</em> comes into play.</p><p>Let&#8217;s say you have two other rules that capture potential threat activity of an Administrator creating a second account and attaching an Administrator policy or profile to it. It&#8217;s riskier (it&#8217;s further along the ATT&amp;CK chain), but it lacks context. But what if you <em>combine the threat scenarios</em> and create a story?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Wz8G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e2972d8-c1cf-40f3-ba82-564d376cf15f_2119x1400.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Wz8G!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e2972d8-c1cf-40f3-ba82-564d376cf15f_2119x1400.png 424w, https://substackcdn.com/image/fetch/$s_!Wz8G!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e2972d8-c1cf-40f3-ba82-564d376cf15f_2119x1400.png 848w, https://substackcdn.com/image/fetch/$s_!Wz8G!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e2972d8-c1cf-40f3-ba82-564d376cf15f_2119x1400.png 1272w, https://substackcdn.com/image/fetch/$s_!Wz8G!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e2972d8-c1cf-40f3-ba82-564d376cf15f_2119x1400.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Wz8G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e2972d8-c1cf-40f3-ba82-564d376cf15f_2119x1400.png" width="1456" height="962" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5e2972d8-c1cf-40f3-ba82-564d376cf15f_2119x1400.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:962,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:211828,&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://www.detectionengineering.net/i/183742455?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e2972d8-c1cf-40f3-ba82-564d376cf15f_2119x1400.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_!Wz8G!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e2972d8-c1cf-40f3-ba82-564d376cf15f_2119x1400.png 424w, https://substackcdn.com/image/fetch/$s_!Wz8G!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e2972d8-c1cf-40f3-ba82-564d376cf15f_2119x1400.png 848w, https://substackcdn.com/image/fetch/$s_!Wz8G!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e2972d8-c1cf-40f3-ba82-564d376cf15f_2119x1400.png 1272w, https://substackcdn.com/image/fetch/$s_!Wz8G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e2972d8-c1cf-40f3-ba82-564d376cf15f_2119x1400.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>Here&#8217;s the story: an Administrator account gets compromised, and an attacker runs a script to log in to your AWS portal automatically. They are smart cookies and believe in another adage, &#8220;two is one, and one is none,&#8221; and create a second account to achieve <em>Persistence</em> on your account. They then leverage their Administrator privileges to attach an Administrator policy. Smart, if you reset the original Administrator password, they have a backdoor back into your environment!</p><p>By combining the three scenarios via the following rule, in pseudocode:</p><pre><code><code>if user contains 'admin'
AND CreateUser action is called
AND AttachUserPolicy is called and the Policy = 'Admin'
THEN alert
</code></code></pre><p>You&#8217;ve told your SIEM quite a compelling story to look out for, and it found it!</p><p>There are some key questions from the above rule, and they emerge from the other data I&#8217;ve omitted from my diagram:</p><ul><li><p>What is a legitimate amount of time between logging on and calling CreateUser?</p></li><li><p>Is calling CreateUser then attaching an Administrator policy malicious?</p></li><li><p>Does this Admin typically CreateUser and attach policies?</p></li></ul><p>These questions are what adds complexity and cost to writing and maintaining a ruleset. So, a detection engineer must weigh the cost of this complexity versus the cost of false positives from Atomic rules.</p><p>In this specific Composite rule, we used <em>Windowing</em>. Windowing is a technique in which we capture activity in time windows and assume that any Composite detection that captures events within that window must be the result of threat activity. The rule assumes that if an Administrator account logs in, creates a secondary account, and attaches a privileged policy to it, it must be malicious. This reduces false positives by:</p><ul><li><p>Combining three Atomic rules into one rule</p></li><li><p>Creates a story where these three actions together means something malicious is happening, or requires investigation</p></li><li><p>Assumes threat actors will try to do this quickly as their access may be revoked within a few minutes</p></li></ul><h1>Stories increase complexity</h1><p>I linked a chart in my previous post about the trade-off between context, operational cost and false-positive reduction.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RXfy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8f0457-3940-457e-8998-c745b8a0c5fd_1240x754.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RXfy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8f0457-3940-457e-8998-c745b8a0c5fd_1240x754.png 424w, https://substackcdn.com/image/fetch/$s_!RXfy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8f0457-3940-457e-8998-c745b8a0c5fd_1240x754.png 848w, https://substackcdn.com/image/fetch/$s_!RXfy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8f0457-3940-457e-8998-c745b8a0c5fd_1240x754.png 1272w, https://substackcdn.com/image/fetch/$s_!RXfy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8f0457-3940-457e-8998-c745b8a0c5fd_1240x754.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RXfy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8f0457-3940-457e-8998-c745b8a0c5fd_1240x754.png" width="1240" height="754" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cb8f0457-3940-457e-8998-c745b8a0c5fd_1240x754.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:754,&quot;width&quot;:1240,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:162951,&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://www.detectionengineering.net/i/183742455?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8f0457-3940-457e-8998-c745b8a0c5fd_1240x754.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_!RXfy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8f0457-3940-457e-8998-c745b8a0c5fd_1240x754.png 424w, https://substackcdn.com/image/fetch/$s_!RXfy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8f0457-3940-457e-8998-c745b8a0c5fd_1240x754.png 848w, https://substackcdn.com/image/fetch/$s_!RXfy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8f0457-3940-457e-8998-c745b8a0c5fd_1240x754.png 1272w, https://substackcdn.com/image/fetch/$s_!RXfy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb8f0457-3940-457e-8998-c745b8a0c5fd_1240x754.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><p>In this <em>Windowed Composite Detection Case</em>, there are several costs that detection engineers incur:</p><ul><li><p>Does my SIEM technology support Windowing?</p></li><li><p>Does the combination of these detection rules capture the threat activity that I want? For example, should I <em>also</em> have a separate atomic rule for CreateUser to catch persistence attempts that don&#8217;t fit the 5 minute window? This can lead to false negatives if you only rely on composite rules.</p></li><li><p>Does the window period give me the best value? If I increase it to 15 minutes, what costs do I incur on server usage, indexing and other infrastructure components?</p></li></ul><p>I will say that Detection Engineers I&#8217;ve hired, worked with, and spoken with at other companies spend as much time researching cost trade-offs as they do performing pure security research. This is the <em>Engineering</em> component of threat detection, and to me, these types of problems are what make the field exciting. You are part security researcher, part engineer, and part data scientist!</p><h1>Conclusion</h1><p>Composite detections shift detection engineers&#8217; focus to reduce false positives by creating stories of attack chains. MITRE ATT&amp;CK is the de facto industry standard for documenting how an attacker progresses through a breach to achieve an objective. Detection engineers can use ATT&amp;CK to build atomic and composite rules to capture threat activity.</p><p>Atomic rules lack context by design, but when combined with other atomic rules via composite detections, you can start building a story of an attack. This story is the context you want to decide on whether you should investigate an alert. This story also reduces false positives by capturing the logical progression an attacker may take in your environment, and reduces the likelihood of alerting on benign activity.</p><p>The complexity of creating and maintaining composite detections stems from technological capabilities, such as windowing, as well as the hidden costs of assumptions made by the detection engineer. For example, combining three distinct events into a composite detection may miss other alerting scenarios within those events, leading to a false negative.</p><p>In the next Field Manual post, we'll explore different alerting mechanisms for composite and atomic detections outside of windowing.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.detectionengineering.net/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">The Detection Engineering Field Manual is a series dedicated to sharing knowledge and my experience building, operating and scaling a detection engineering organization at a F500 tech company. Please like and subscribe if you find this series useful!</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[What are Atomic Detection Rules?]]></title><description><![CDATA[The first and last rules you'll likely write :)]]></description><link>https://www.detectionengineering.net/p/field-manual-4-what-are-atomic-detection</link><guid isPermaLink="false">https://www.detectionengineering.net/p/field-manual-4-what-are-atomic-detection</guid><dc:creator><![CDATA[Zack Allen]]></dc:creator><pubDate>Mon, 15 Dec 2025 14:55:16 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!zCTS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d88706-a3f6-431a-9ee3-a51740802591_720x405.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the last post, we discussed the tradeoffs in designing effective rules. Detection efficacy captures the needs of the consumer of your detection rules, because the persona can be more concerned with missing an alert (false negative) or having too many alerts that don&#8217;t matter (false positives).</p><p>Finding attacks is the core value proposition of what detection engineers do, and it&#8217;s what makes this field technically challenging. Although difficult, this work has an art and aesthetic that is hard to find anywhere else in security. This is because you aren&#8217;t solving a machine-to-machine problem, but a human-to-human problem, and the other human is unwilling to cooperate with you. To me, detection engineering and blue teaming, overall, are studies of behavior.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.detectionengineering.net/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">Detection Engineering Weekly 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 post, we&#8217;ll begin looking at how rules detect threat activity through atomic detections.</p><h2><strong>Detection Engineering Interview Questions:</strong></h2><ul><li><p>What is the Pyramid of Pain?</p></li><li><p>What is an atomic detection rule?</p></li><li><p>Compare and contrast scenarios where an atomic detection rule can be effective or ineffective.</p></li><li><p>What is environmental context?</p></li></ul><h2>David Bianco&#8217;s Pyramid of Pain</h2><p>Some attacks generate telemetry that is easy to identify as an attacker on your system or networks. Many attacks, however, require logic that depends on telemetry availability, environmental context, index windows of logs arriving at the SIEM, and understanding of attacker tradecraft or <em>behavior</em>.</p><p>Much as detection engineers must consider operational costs when writing rules, threat actors incur costs when carrying out attacks. This cost-versus-cost battle helps frame attack and defense so you can impose as much cost as possible on an attacker&#8217;s operations, so they&#8217;re in so much pain they deem a tactic or technique not worth their time. This is where the &#8220;Pyramid of Pain&#8221; by David Bianco becomes a valuable exercise for security teams.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zCTS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d88706-a3f6-431a-9ee3-a51740802591_720x405.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zCTS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d88706-a3f6-431a-9ee3-a51740802591_720x405.png 424w, https://substackcdn.com/image/fetch/$s_!zCTS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d88706-a3f6-431a-9ee3-a51740802591_720x405.png 848w, https://substackcdn.com/image/fetch/$s_!zCTS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d88706-a3f6-431a-9ee3-a51740802591_720x405.png 1272w, https://substackcdn.com/image/fetch/$s_!zCTS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d88706-a3f6-431a-9ee3-a51740802591_720x405.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zCTS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d88706-a3f6-431a-9ee3-a51740802591_720x405.png" width="592" height="333" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/26d88706-a3f6-431a-9ee3-a51740802591_720x405.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:405,&quot;width&quot;:720,&quot;resizeWidth&quot;:592,&quot;bytes&quot;:47624,&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://www.detectionengineering.net/i/181689763?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d88706-a3f6-431a-9ee3-a51740802591_720x405.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_!zCTS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d88706-a3f6-431a-9ee3-a51740802591_720x405.png 424w, https://substackcdn.com/image/fetch/$s_!zCTS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d88706-a3f6-431a-9ee3-a51740802591_720x405.png 848w, https://substackcdn.com/image/fetch/$s_!zCTS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d88706-a3f6-431a-9ee3-a51740802591_720x405.png 1272w, https://substackcdn.com/image/fetch/$s_!zCTS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26d88706-a3f6-431a-9ee3-a51740802591_720x405.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><figcaption class="image-caption"><a href="https://detect-respond.blogspot.com/2013/03/the-pyramid-of-pain.html">https://detect-respond.blogspot.com/2013/03/the-pyramid-of-pain.html</a></figcaption></figure></div><p>At its core, the Pyramid of Pain challenges defenders to focus on imposing as much pain on attackers. As you traverse the pyramid, operational cost to your efforts increases, but the amount of pain you cause to an attacker also increases. Each layer of the Pyramid represents an operational complexity for the threat actor to consider when staging an attack. The <em>ideal state</em> of detection is at the top: if you detect Tools executing in your environment, your detections are more robust because the order and context of the tool&#8217;s execution become irrelevant.</p><p>The best state is under &#8220;Tactics, Techniques and Procedures&#8221; (TTPs). This layer focuses on the behavioral aspect an attack. If you detect <em>behavior</em> of an attack, every layer below the pyramid become less relevant in your detection (for the most part), and the detection is robust enough to catch changes in Tools, Artifacts, Domains, IP addresses and hashes.</p><p>Imagine this: you write a rule that helps detect a known Command-and-control (C2) server you read from a blog post. You deploy that rule and it doesn&#8217;t find anything. Great, you aren&#8217;t compromised, and you&#8217;ll have great coverage for the future if there is a compromise.</p><p>Here&#8217;s the problem: threat actors are well aware that we find C2 servers, build rules, share with the community and blog about them. A C2 server is typically either an <em>IP Address</em> or a <em>Domain</em>. Have you ever rented a droplet on Digital Ocean, or bought a domain from Namecheap? You can spend a few dollars to rent more droplets or buy new domains. This requires minimal pain on the threat actor&#8217;s side, and defenders no longer block your new C2 server until it is discovered again.</p><p>Even worse, the IP address you wrote a rule for is now leased to a benign client, and it is now alerting on benign traffic, causing pain to you and your team.</p><p>So, how effective is your detection rule now? Not too effective! This is because detecting on a singular value, such as an IP address or a domain, is an <em>Atomic Detection</em>. Atomic Detections are narrowly defined rules that detect activity at a point in time with little to no context. Let&#8217;s dive into them in the next section.</p><h2>Atomic Detections Lack Context</h2><p>Atomic Detections are tactical in nature. They may seem precise in practice, but because they lack context from the environment and incur little pain for attackers, they become brittle and prone to false positives. As soon as an attacker changes their infrastructure or flips one bit in a new build of their malware, which changes the cryptographic hash value, your rule diminishes in quality.</p><p>Atomic Detections also exist for computer or network activity. The point here is that ignoring context in an environment, such as rules that don&#8217;t evaluate time signatures, environmental context, or regular activity, makes atomic rules risky to deploy. </p><p>Let&#8217;s look at a basic alerting example with Amazon AWS Administrator login activity.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!In5x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfa046-c812-462e-ba64-b2d232fd87ad_1814x1358.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!In5x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfa046-c812-462e-ba64-b2d232fd87ad_1814x1358.png 424w, https://substackcdn.com/image/fetch/$s_!In5x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfa046-c812-462e-ba64-b2d232fd87ad_1814x1358.png 848w, https://substackcdn.com/image/fetch/$s_!In5x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfa046-c812-462e-ba64-b2d232fd87ad_1814x1358.png 1272w, https://substackcdn.com/image/fetch/$s_!In5x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfa046-c812-462e-ba64-b2d232fd87ad_1814x1358.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!In5x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfa046-c812-462e-ba64-b2d232fd87ad_1814x1358.png" width="1814" height="1358" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/20bfa046-c812-462e-ba64-b2d232fd87ad_1814x1358.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1358,&quot;width&quot;:1814,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:200698,&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://www.detectionengineering.net/i/181689763?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fece84ba1-b221-4062-95cf-d62ccd22c15f_2234x1358.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_!In5x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfa046-c812-462e-ba64-b2d232fd87ad_1814x1358.png 424w, https://substackcdn.com/image/fetch/$s_!In5x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfa046-c812-462e-ba64-b2d232fd87ad_1814x1358.png 848w, https://substackcdn.com/image/fetch/$s_!In5x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfa046-c812-462e-ba64-b2d232fd87ad_1814x1358.png 1272w, https://substackcdn.com/image/fetch/$s_!In5x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfa046-c812-462e-ba64-b2d232fd87ad_1814x1358.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><p>The rule is in purple and <em>only</em> alerts on Log activity where the user field value is <code>admin</code>. The SIEM correctly identities the user field containing <code>admin</code> three times . The 11AM alert is a true positive: the administrator credentials were compromised. The other two are false positives, indicating normal administrative work. To make things worse, the compromised login was during normal business hours. </p><p>So how do you differentiate between the three alerts?</p><p>You differentiate them by spending incident response cycles investigating each one. Now imagine 100s or 1000s of these being generated. The atomic rule strategy doesn&#8217;t work because there is little to no context on the event.</p><p>The same thing can be said for IP-based C2 alerting.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qaHX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b380ba0-c0bd-4963-b3f0-29bdf7fecb10_1780x1358.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qaHX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b380ba0-c0bd-4963-b3f0-29bdf7fecb10_1780x1358.png 424w, https://substackcdn.com/image/fetch/$s_!qaHX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b380ba0-c0bd-4963-b3f0-29bdf7fecb10_1780x1358.png 848w, https://substackcdn.com/image/fetch/$s_!qaHX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b380ba0-c0bd-4963-b3f0-29bdf7fecb10_1780x1358.png 1272w, https://substackcdn.com/image/fetch/$s_!qaHX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b380ba0-c0bd-4963-b3f0-29bdf7fecb10_1780x1358.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qaHX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b380ba0-c0bd-4963-b3f0-29bdf7fecb10_1780x1358.png" width="1780" height="1358" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1b380ba0-c0bd-4963-b3f0-29bdf7fecb10_1780x1358.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1358,&quot;width&quot;:1780,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:211809,&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://www.detectionengineering.net/i/181689763?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec34413c-778c-4bc5-9e9c-14fe51783869_2234x1358.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_!qaHX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b380ba0-c0bd-4963-b3f0-29bdf7fecb10_1780x1358.png 424w, https://substackcdn.com/image/fetch/$s_!qaHX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b380ba0-c0bd-4963-b3f0-29bdf7fecb10_1780x1358.png 848w, https://substackcdn.com/image/fetch/$s_!qaHX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b380ba0-c0bd-4963-b3f0-29bdf7fecb10_1780x1358.png 1272w, https://substackcdn.com/image/fetch/$s_!qaHX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b380ba0-c0bd-4963-b3f0-29bdf7fecb10_1780x1358.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 this example, the detection engineer wrote an atomic detection rule for a known C2 IP address. Perhaps they read a blog some time around December 10 and added it quickly to find exposure. Log 1 enters the SIEM; the rule checks the destination field and generates a true-positive alert. </p><p>Fantastic! Let&#8217;s keep the rule!</p><p>The C2 was removed by the leasing company that owns it on December 11 due to the blog post. On January 15, a content delivery network leases an IP address, and network traffic logs flow through the SIEM, triggering an alert. Each subsequent network log afterward is a false positive.</p><p>The context from both of the graphs above is under the <code>UNUSED</code> field in the purple box. Associated domains, timestamps and physical location are all useful fields to add into the atomic rule to increase robustness of the rule and remove false positives. It would make sense, then, to start including all of these in your detection rule. Detection engineers need to understand the relationship between detection context and cost.</p><h3>Imposing cost on ourselves</h3><p>As we progress the Pyramid of Pain and add context to your ruleset, the cost increases. Cost can depend on time, resources, maintenance, or the technology needed to add context, such as threat intelligence. The following graph tries to explain this causal relationship:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LTDl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f27b81-b6ec-4dc2-a444-1d8aac5320a3_1240x754.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LTDl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f27b81-b6ec-4dc2-a444-1d8aac5320a3_1240x754.webp 424w, https://substackcdn.com/image/fetch/$s_!LTDl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f27b81-b6ec-4dc2-a444-1d8aac5320a3_1240x754.webp 848w, https://substackcdn.com/image/fetch/$s_!LTDl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f27b81-b6ec-4dc2-a444-1d8aac5320a3_1240x754.webp 1272w, https://substackcdn.com/image/fetch/$s_!LTDl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f27b81-b6ec-4dc2-a444-1d8aac5320a3_1240x754.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LTDl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f27b81-b6ec-4dc2-a444-1d8aac5320a3_1240x754.webp" width="1240" height="754" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/42f27b81-b6ec-4dc2-a444-1d8aac5320a3_1240x754.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:754,&quot;width&quot;:1240,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:23828,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.detectionengineering.net/i/181689763?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d8eb6f9-3bf4-435d-b3b9-596557d12d1a_1338x972.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LTDl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f27b81-b6ec-4dc2-a444-1d8aac5320a3_1240x754.webp 424w, https://substackcdn.com/image/fetch/$s_!LTDl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f27b81-b6ec-4dc2-a444-1d8aac5320a3_1240x754.webp 848w, https://substackcdn.com/image/fetch/$s_!LTDl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f27b81-b6ec-4dc2-a444-1d8aac5320a3_1240x754.webp 1272w, https://substackcdn.com/image/fetch/$s_!LTDl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42f27b81-b6ec-4dc2-a444-1d8aac5320a3_1240x754.webp 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>At the bottom left, you could deploy a rule similar to the examples above. Because the operational cost of matching on a single value is low, the context is low. And because the context is low, the risk for false positives is high. As you add context (move to the right), the cost increases, but the false-positive rate decreases.</p><p>This is why not every rule can be <em>perfectly accurate.</em> There is a cost-benefit tradeoff, as well as information asymmetry from attacker behavior, that detection engineers must consider. The only way a rule can catch all threat activity is to alert on every piece of activity. That seems costly!</p><h3>Conclusion</h3><p>Atomic detection rules generally focus on low-context events or values. They can certainly help a blue team function, such as a SOC or a Detection &amp; Response team, and they have a place in security operations. They risk generating many noisy alerts when the detection engineer fails to account for a threat actor&#8217;s behavioral patterns.</p><p>The Pyramid of Pain and imposing cost are industry-accepted concepts that help contextualize the competing objectives of blue teamers and threat actors. Writing rules to alert on the bottom parts of the pyramid, which primarily involve threat intelligence indicators (IP addresses, domains, hash values), imposes a greater cost on defenders than on threat actors. Defenders impose more pain on threat actors by climbing The Pyramid and writing rules that detect tools and TTPs.</p><p>For the next few parts of this series, I&#8217;ll explain the different ways detection engineers can write rules to capture threat actor behavior and the associated operational complexity.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.detectionengineering.net/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">Detection Engineering Weekly 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[What is Detection Rule Efficacy?]]></title><description><![CDATA[Good rules vs Bad rules]]></description><link>https://www.detectionengineering.net/p/detection-field-manual-3-what-is</link><guid isPermaLink="false">https://www.detectionengineering.net/p/detection-field-manual-3-what-is</guid><dc:creator><![CDATA[Zack Allen]]></dc:creator><pubDate>Fri, 18 Jul 2025 14:28:41 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!iPQP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f1fe58d-160c-48ac-8017-1a35e3a0cf36_1398x824.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>After Issue 2, you should understand that writing, maintaining, and deploying detection rules is a core value proposition for a Detection Engineering team. These rules encapsulate human and machine knowledge in a readable form to issue queries against a security log ingestion and indexing service, typically a SIEM.</p><p>If the SIEM returns results, how do you determine whether it&#8217;s malicious activity or not?</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.detectionengineering.net/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">The Detection Field Manual is a compendium of Detection Engineering concepts distilled from my years of experience in the field, plus reading, analyzing and synthesizing thousands of articles in the subject. Please support me by subscribing so you can get more updates directly in your inbox!</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>Should a SIEM only ever return malicious results? </p><p>How do you design rules so analysts aren&#8217;t wasting time responding to the dreaded &#8220;false positive&#8221;?</p><p>This blog helps answer these questions through the lens of <em>Detection Rule Efficacy</em>.</p><h3><strong>Detection Engineering Interview Questions:</strong></h3><ul><li><p>What are the four types of labels an alert can have &#8212; and what&#8217;s your criteria for assigning each one?</p></li><li><p>What are the tradeoffs of optimizing for TP/TN/FP/FNs?</p></li><li><p>From a Detection Rule Efficacy perspective, what makes a good rule versus a bad rule?</p></li></ul><h1><strong>Security Operations is a Funnel</strong></h1><p>One of the most impactful pieces of security operations work I&#8217;ve ever read is Jared Atkinson&#8217;s research into the &#8220;Funnel of Fidelity&#8221; for alerts - <a href="https://posts.specterops.io/introducing-the-funnel-of-fidelity-b1bb59b04036">link to the post here</a>. </p><p>The basic premise of the Funnel of Fidelity is that security teams have limited capacity based on the number of humans reviewing alerts. For each new alert pushed into the analyst&#8217;s queue, some level of cost is imposed on the analyst as a function of time to investigate that alert. Therefore, as detection engineers, we must consider the fidelity of our alerts in terms of their associated costs.</p><p>Jared&#8217;s post captured this with his concept of the Funnel of Fidelity, and forewarned readers to &#8220;Never clog the Funnel&#8221;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kF6E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74cd796e-a789-4313-bbeb-6fb45ca86b0c_1700x726.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kF6E!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74cd796e-a789-4313-bbeb-6fb45ca86b0c_1700x726.webp 424w, https://substackcdn.com/image/fetch/$s_!kF6E!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74cd796e-a789-4313-bbeb-6fb45ca86b0c_1700x726.webp 848w, https://substackcdn.com/image/fetch/$s_!kF6E!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74cd796e-a789-4313-bbeb-6fb45ca86b0c_1700x726.webp 1272w, https://substackcdn.com/image/fetch/$s_!kF6E!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74cd796e-a789-4313-bbeb-6fb45ca86b0c_1700x726.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kF6E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74cd796e-a789-4313-bbeb-6fb45ca86b0c_1700x726.webp" width="1456" height="622" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/74cd796e-a789-4313-bbeb-6fb45ca86b0c_1700x726.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:622,&quot;width&quot;:1456,&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;: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_!kF6E!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74cd796e-a789-4313-bbeb-6fb45ca86b0c_1700x726.webp 424w, https://substackcdn.com/image/fetch/$s_!kF6E!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74cd796e-a789-4313-bbeb-6fb45ca86b0c_1700x726.webp 848w, https://substackcdn.com/image/fetch/$s_!kF6E!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74cd796e-a789-4313-bbeb-6fb45ca86b0c_1700x726.webp 1272w, https://substackcdn.com/image/fetch/$s_!kF6E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74cd796e-a789-4313-bbeb-6fb45ca86b0c_1700x726.webp 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 Issue 2, while describing the function of detection rules, we explored the idea that these rules help scale human operations, so we aren&#8217;t consistently stuck issuing queries against a SIEM to look for maliciousness. </p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;03cde9af-3199-42b8-8b13-776b7fe0ab10&quot;,&quot;caption&quot;:&quot;The fundamental building block for detecting malicious activity inside an environment is detection rules. Detection Engineering functions, such as a Security Operations Center (SOC) or a Detection and Response team, maintain a ruleset to detect malicious activity within their environment.&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Detection Field Manual #2 - What are Detection Rules?&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:42321300,&quot;name&quot;:&quot;Zack 'techy' Allen&quot;,&quot;bio&quot;:&quot;security research director specializing in detection engineering, cloud security, threat intelligence, linux security and business. NYU Stern MBA Rochester Institute of Technology dad builder and breaker&quot;,&quot;photo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/58e24cfb-026a-4b6c-a6c2-7d61e077a7f5_400x400.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:100}],&quot;post_date&quot;:&quot;2025-07-03T13:20:54.841Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!2HFz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8eb65c6-c5cd-47a8-bae3-13cb9b00f0c4_1596x1128.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://www.detectionengineering.net/p/detection-field-manual-2-what-are-4af&quot;,&quot;section_name&quot;:&quot;Field Manual&quot;,&quot;video_upload_id&quot;:null,&quot;id&quot;:167435526,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:9,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Detection Engineering Weekly&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!o8h0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0a81d34-04e7-4095-88af-0adc2dc81357_1024x1024.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p>We rely on both rules to capture our human intuition and querying services to find logs that may indicate maliciousness. This is the same argument Jared discussed in his post: with limited resources (time to triage alerts and the number of humans triaging them), how can we prevent <em>alert fatigue?</em></p><p>We define <em>alert fatigue</em> as the degradation of human efficacy in triaging alerts, which can result in malicious telemetry bypassing our human investigations, thus leading to a security incident or, worse, a security breach. The concept of the Funnel helps prevent <em>alert fatigue</em> by focusing detection efforts on this cost function; we can&#8217;t do that without understanding the four types of alerts that can reach the &#8220;Triage&#8221; portion of Jared&#8217;s Funnel.</p><h1><strong>Scaling Security Operations is an optimization problem</strong></h1><p>I never really understood the purpose of mathematics through my schooling and college until I realized that most problems in security aren&#8217;t solved, but optimized. A Detection Engineering team focuses on <em>Detection Rule Efficacy</em>, which is the cost function of generating alerts via their rules relative to the capacity they can handle without clogging the funnel.</p><p>To understand <em>Detection Rule Efficacy</em>, you must have a foundational understanding of the four labels in any prediction-based system: True Positives, False Positives, True Negatives and False Negatives. These labels are useful for almost any binary classification system. Don&#8217;t worry, we aren&#8217;t going deep into Statistics or Machine Learning, instead we are going to use these labels as a way to understand the risk of clogging the funnel.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Di7M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20227f23-62b9-48c0-b02f-accd8ca1c22a_512x334.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Di7M!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20227f23-62b9-48c0-b02f-accd8ca1c22a_512x334.png 424w, https://substackcdn.com/image/fetch/$s_!Di7M!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20227f23-62b9-48c0-b02f-accd8ca1c22a_512x334.png 848w, https://substackcdn.com/image/fetch/$s_!Di7M!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20227f23-62b9-48c0-b02f-accd8ca1c22a_512x334.png 1272w, https://substackcdn.com/image/fetch/$s_!Di7M!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20227f23-62b9-48c0-b02f-accd8ca1c22a_512x334.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Di7M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20227f23-62b9-48c0-b02f-accd8ca1c22a_512x334.png" width="512" height="334" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/20227f23-62b9-48c0-b02f-accd8ca1c22a_512x334.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:334,&quot;width&quot;:512,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:70356,&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://www.detectionengineering.net/i/168641940?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20227f23-62b9-48c0-b02f-accd8ca1c22a_512x334.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_!Di7M!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20227f23-62b9-48c0-b02f-accd8ca1c22a_512x334.png 424w, https://substackcdn.com/image/fetch/$s_!Di7M!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20227f23-62b9-48c0-b02f-accd8ca1c22a_512x334.png 848w, https://substackcdn.com/image/fetch/$s_!Di7M!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20227f23-62b9-48c0-b02f-accd8ca1c22a_512x334.png 1272w, https://substackcdn.com/image/fetch/$s_!Di7M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20227f23-62b9-48c0-b02f-accd8ca1c22a_512x334.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>There are two realities to any alert:</p><ul><li><p>What an alert is, such as the traffic or log, is whether it is malicious or benign</p></li><li><p>What we interpreted what the alert was, which is malicious or benign</p></li></ul><p>So, to be explicit on the four labels:</p><ul><li><p><strong>True Positive:</strong> There was malicious traffic, and we labeled (alerted) that traffic as malicious</p></li><li><p><strong>False Positive:</strong> There was benign traffic, and we labeled (alerted) that traffic as malicious</p></li><li><p><strong>False Negative:</strong> There was malicious traffic, and we did not label (alerted) that traffic as malicious</p></li><li><p><strong>True Negative:</strong> There was benign traffic, and we did not label (alerted) that traffic as malicious</p></li></ul><p>In the ideal state, all of our rules alert on true positives and do not alert on true negatives. However, if you recall any of your statistics classes (I certainly didn&#8217;t, but I&#8217;ve read a lot since then), it&#8217;s never that easy. In fact, it&#8217;s <a href="https://en.wikipedia.org/wiki/No_free_lunch_theorem">probably</a> <a href="https://en.wikipedia.org/wiki/Bayes_error_rate">impossible</a> in any classification system. Let me explain.</p><h1>Precision and Recall make our rules Brittle and Broad</h1><p>My favorite way to describe the issues of Detection Efficacy is through Brittle and Broad rules, also coined by <a href="https://posts.specterops.io/detection-spectrum-198a0bfb9302">Jared Atkinson</a>. Broad Rules capture a wide range of malicious telemetry, but are prone to false positives. Brittle Rules capture a particular type of malicious telemetry, but are susceptible to false negatives. In the statistics world:</p><ul><li><p>Brittle Rules measure <strong>Precision</strong>, which is the ratio of TP/TP+FP</p><ul><li><p>It answers the question: <strong>Of the set of alerts, how many are relevant (malicious) events?</strong></p></li></ul></li><li><p>Broad Rules measure <strong>Recall</strong>, which is the ratio of TP/TP+FN</p><ul><li><p>It answers the question: <strong>Of the relevant (malicious) events, how many were alerts?</strong></p></li></ul></li></ul><p>Let&#8217;s get visual with these concepts, shall we?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Gl_S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c80beb4-2c00-4832-a926-0c1347a2dc60_1290x668.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Gl_S!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c80beb4-2c00-4832-a926-0c1347a2dc60_1290x668.png 424w, https://substackcdn.com/image/fetch/$s_!Gl_S!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c80beb4-2c00-4832-a926-0c1347a2dc60_1290x668.png 848w, https://substackcdn.com/image/fetch/$s_!Gl_S!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c80beb4-2c00-4832-a926-0c1347a2dc60_1290x668.png 1272w, https://substackcdn.com/image/fetch/$s_!Gl_S!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c80beb4-2c00-4832-a926-0c1347a2dc60_1290x668.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Gl_S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c80beb4-2c00-4832-a926-0c1347a2dc60_1290x668.png" width="1290" height="668" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5c80beb4-2c00-4832-a926-0c1347a2dc60_1290x668.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:668,&quot;width&quot;:1290,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:144641,&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://www.detectionengineering.net/i/168641940?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c80beb4-2c00-4832-a926-0c1347a2dc60_1290x668.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_!Gl_S!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c80beb4-2c00-4832-a926-0c1347a2dc60_1290x668.png 424w, https://substackcdn.com/image/fetch/$s_!Gl_S!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c80beb4-2c00-4832-a926-0c1347a2dc60_1290x668.png 848w, https://substackcdn.com/image/fetch/$s_!Gl_S!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c80beb4-2c00-4832-a926-0c1347a2dc60_1290x668.png 1272w, https://substackcdn.com/image/fetch/$s_!Gl_S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c80beb4-2c00-4832-a926-0c1347a2dc60_1290x668.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 above visual:</p><ul><li><p>There are 22 logs (N=22)</p></li><li><p>8 logs are malicious</p></li><li><p>14 logs are benign</p></li></ul><p>You deploy a detection rule, and you alert (the decision threshold on the line at the top) on 5 of those malicious logs, and 1 benign log. The <em>Precision</em> (Brittleness) of your rule is calculated as:</p><ul><li><p>5 malicious alerts / (5 malicious alerts + 1 benign alert) = <strong>83%</strong></p></li></ul><p>83% is not bad! For every 100 logs, you alert correctly on 83 of them. But there&#8217;s a catch to this Brittleness. Let&#8217;s calculate the <em>Recall</em> (Broadness) of your rule:</p><ul><li><p>5 malicious alerts / (5 malicious alert + 3 malicious events you missed) = <strong>62.5%</strong></p></li></ul><p>For every 100 <strong>malicious events</strong>, your detection catches about 62 of them. Is that good or bad?</p><p>I&#8217;ll be lame and propose the &#8220;Allen&#8217;s Rule of Detection Efficacy&#8221; (I&#8217;ve always wanted to have something named after me, so give me this one, okay?)</p><blockquote><h3><em>You can&#8217;t have a detection rule that&#8217;s both perfectly precise and fully comprehensive unless you already know the answer.</em></h3></blockquote><p>This is a perfect shoe-in for Atkinson&#8217;s &#8220;Clogging the Funnel&#8221; concept. He never proposed making all of your rules high precision (brittle) or having high recall (broad). He suggested that we consider the efficacy of our rules to avoid overwhelming the SOC. It&#8217;s an optimization issue.</p><p>Detection teams combat this optimization in various ways, including threat and breach emulation, threat hunting, detection-as-code testing, detection tuning, and integrating rules into live traffic, which we&#8217;ll explore later in this series. We have numerous strategies to optimize <em>efficacy</em>, but what does <em>efficacy</em> mean in the context of a good rule?</p><h1>Good Rules Provide Operational Value</h1><p>A SIEM alert is a unit of work for a SOC analyst, a detection and response engineer, and a security engineer. At its minimum value, it&#8217;s a <em>hedge</em> to the downside cost of a security incident. You&#8217;d rather alert and contain a suspicious process that executes malicious code on a company asset than miss the attack, which could lead to a full-scale security breach. So, when you are asked what makes a &#8220;good&#8221; rule versus a &#8220;bad&#8221; rule, it comes down to how much cost are you willing to incur for responding to that alert.</p><p>To drive this point home, let&#8217;s look at a larger population of security events, this time with low precision and high recall:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iPQP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f1fe58d-160c-48ac-8017-1a35e3a0cf36_1398x824.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iPQP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f1fe58d-160c-48ac-8017-1a35e3a0cf36_1398x824.png 424w, https://substackcdn.com/image/fetch/$s_!iPQP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f1fe58d-160c-48ac-8017-1a35e3a0cf36_1398x824.png 848w, https://substackcdn.com/image/fetch/$s_!iPQP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f1fe58d-160c-48ac-8017-1a35e3a0cf36_1398x824.png 1272w, https://substackcdn.com/image/fetch/$s_!iPQP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f1fe58d-160c-48ac-8017-1a35e3a0cf36_1398x824.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iPQP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f1fe58d-160c-48ac-8017-1a35e3a0cf36_1398x824.png" width="1398" height="824" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8f1fe58d-160c-48ac-8017-1a35e3a0cf36_1398x824.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:824,&quot;width&quot;:1398,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:132271,&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://www.detectionengineering.net/i/168641940?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f1fe58d-160c-48ac-8017-1a35e3a0cf36_1398x824.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_!iPQP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f1fe58d-160c-48ac-8017-1a35e3a0cf36_1398x824.png 424w, https://substackcdn.com/image/fetch/$s_!iPQP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f1fe58d-160c-48ac-8017-1a35e3a0cf36_1398x824.png 848w, https://substackcdn.com/image/fetch/$s_!iPQP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f1fe58d-160c-48ac-8017-1a35e3a0cf36_1398x824.png 1272w, https://substackcdn.com/image/fetch/$s_!iPQP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f1fe58d-160c-48ac-8017-1a35e3a0cf36_1398x824.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>At face value, this rule might be deemed a &#8220;bad&#8221; rule. The precision here is 47%, which means that for every 100 alerts, only 47 of them are malicious. That means 53 false positive alerts incur an unnecessary cost on an analyst. The recall is very high: for every 100 malicious events, we catch 94 of them. So, is this a bad rule or not?</p><p>Here are some counterpoints to where this might be a good rule:</p><ul><li><p>The SOC is concerned about missing a specific attack that this rule aims to detect, so they build in the capacity to triage more false positives to ensure they don&#8217;t miss any malicious alerts.</p></li><li><p>The rule is experimental and is being &#8220;baked&#8221; into the operational environment, so false positives are expected and welcomed to help tune the rule (move the orange line)</p></li><li><p>This is a threat hunting rule where precision doesn&#8217;t matter, and the detection engineer wants to cast a wide net to find all kinds of events.</p></li><li><p>The rule has a low criticality marking, or <em>severity</em> (INFO, LOW, MEDIUM, HIGH, CRITICAL). Based on SOC&#8217;s operational context, INFO/LOW/MEDIUMs aren&#8217;t triaged first, and could be used as a <em>signal</em> rather than an <em>alert</em>.</p></li></ul><p>Given the four examples above, it is reasonable to conclude that this rule provides <em>operational value</em> and is a &#8220;good&#8221; rule. As long as you don&#8217;t clog the Funnel of Fidelity, then you should have an efficient security operation, and have more resiliency and flexibility in your set of rules than you would have if you only focused on Brittle rules.</p><h2>Conclusions</h2><p>Detection Efficacy is more than just tuning rules to generate true positives and avoid false positives. Efficacy provides operational value to the detection engineer and their customers, and sometimes that means generating alerts that may not be useful from a pure precision point of view.</p><p>Atkinson&#8217;s <em>Funnel of Fidelity</em> is an excellent way to model how you should run a security operations program. It allows flexibility in your ruleset and encourages conversations outside of the Detection Engineering bubble to understand what matters to your operational teams and the firm as a whole.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.detectionengineering.net/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">The Detection Field Manual is a compendium of Detection Engineering concepts distilled from my years of experience in the field, plus reading, analyzing and synthesizing thousands of articles in the subject. Please support me by subscribing so you can get more updates directly in your inbox!</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[What are Detection Rules?]]></title><description><![CDATA[The fundamental concept behind all blue team operations]]></description><link>https://www.detectionengineering.net/p/detection-field-manual-2-what-are-4af</link><guid isPermaLink="false">https://www.detectionengineering.net/p/detection-field-manual-2-what-are-4af</guid><dc:creator><![CDATA[Zack Allen]]></dc:creator><pubDate>Thu, 03 Jul 2025 13:20:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!2HFz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8eb65c6-c5cd-47a8-bae3-13cb9b00f0c4_1596x1128.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The fundamental building block for detecting malicious activity inside an environment is detection rules. Detection Engineering functions, such as a Security Operations Center (SOC) or a Detection and Response team, maintain a ruleset to detect malicious activity within their environment.</p><p>As we dig deeper into the technical aspects of Detection Engineering, we first need to explore how humans scale their threat expertise into logging systems.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.detectionengineering.net/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">Detection Engineering Field Manual is a series dedicated to educating readers on how the field of detection engineering accelerates modern blue team operations. Consider subscribing to help support my work on this series!</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><h2>Detection Engineering Interview Questions:</h2><ul><li><p>What are detection rules?</p></li><li><p>Why do detection rules matter for a security team?</p></li><li><p>How does SIEM indexing work, and can you provide examples of how a SIEM processes and searches logs?</p></li></ul><h2>There is no rule without telemetry</h2><p>A detection rule at its fundamental level is a search query against a logging system that contains logs. In the security industry, most threat detection teams operate a Security Information and Event Management (SIEM) logging system. Detection teams gather telemetry from Assets in the form of logs and send them to the SIEM.</p><p>Logs are typically generated when an Asset records an Event. In the Operating System world, such as Windows or Linux, an event can be:</p><ul><li><p>A new user is being added to the system.</p></li><li><p>A process or a user created, modified, or deleted a file.</p></li><li><p>A user runs or executes a file that creates a new Process.</p></li></ul><p>Recording everyday activity can be cumbersome, so for threat detection, some events are more desirable than others. For example, Sysinternals&#8217; Sysmon <a href="https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon">records 27 different types of security events</a> that can happen on Windows. Event Tracing for Windows (ETW) providers can range in the <a href="https://github.com/repnz/etw-providers-docs?tab=readme-ov-file">10s of thousands</a>, and you need to subscribe to providers who can provide relevant security events to you.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2HFz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8eb65c6-c5cd-47a8-bae3-13cb9b00f0c4_1596x1128.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2HFz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8eb65c6-c5cd-47a8-bae3-13cb9b00f0c4_1596x1128.png 424w, https://substackcdn.com/image/fetch/$s_!2HFz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8eb65c6-c5cd-47a8-bae3-13cb9b00f0c4_1596x1128.png 848w, https://substackcdn.com/image/fetch/$s_!2HFz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8eb65c6-c5cd-47a8-bae3-13cb9b00f0c4_1596x1128.png 1272w, https://substackcdn.com/image/fetch/$s_!2HFz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8eb65c6-c5cd-47a8-bae3-13cb9b00f0c4_1596x1128.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2HFz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8eb65c6-c5cd-47a8-bae3-13cb9b00f0c4_1596x1128.png" width="1456" height="1029" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a8eb65c6-c5cd-47a8-bae3-13cb9b00f0c4_1596x1128.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1029,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:145807,&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://www.detectionengineering.net/i/167119143?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8eb65c6-c5cd-47a8-bae3-13cb9b00f0c4_1596x1128.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_!2HFz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8eb65c6-c5cd-47a8-bae3-13cb9b00f0c4_1596x1128.png 424w, https://substackcdn.com/image/fetch/$s_!2HFz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8eb65c6-c5cd-47a8-bae3-13cb9b00f0c4_1596x1128.png 848w, https://substackcdn.com/image/fetch/$s_!2HFz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8eb65c6-c5cd-47a8-bae3-13cb9b00f0c4_1596x1128.png 1272w, https://substackcdn.com/image/fetch/$s_!2HFz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8eb65c6-c5cd-47a8-bae3-13cb9b00f0c4_1596x1128.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><p>When a log enters a SIEM, it is stored on disk and typically sent to an &#8220;index.&#8221; An index is a structured search layer built on top of stored logs, allowing for fast lookups by mapping field values (such as domains, IPs, or processes) to logs that contain them.</p><p>For example, in Splunk, if you specify your Assets to send a log to the &#8220;WebApp&#8221; index, it&#8217;ll store those raw logs alongs with some metadata. During indexing, the SIEM parses and enriches each log with structured fields. If that parsing fails, or there are errors on ingestion, some fields may be missing.</p><p>When you search a SIEM, you generally provide an index and a query. The query can contain basic strings, such as <code>google.com</code> , and the SIEM <em>should</em> send relevant logs that contain <code>google.com</code>. But we aren&#8217;t here to do simple things; we are here to find bad guys, so how do you create rules to do so?</p><h2>Rules encapsulate Human knowledge</h2><p>Remember, the primary function of a rule is to store a search query. This search query, when issued against the SIEM, MAY return results. If results are returned, it could be indicative of malicious activity.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!36Sx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3c93a79-ef49-497f-864e-952c2b90ea4d_1238x844.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!36Sx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3c93a79-ef49-497f-864e-952c2b90ea4d_1238x844.png 424w, https://substackcdn.com/image/fetch/$s_!36Sx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3c93a79-ef49-497f-864e-952c2b90ea4d_1238x844.png 848w, https://substackcdn.com/image/fetch/$s_!36Sx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3c93a79-ef49-497f-864e-952c2b90ea4d_1238x844.png 1272w, https://substackcdn.com/image/fetch/$s_!36Sx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3c93a79-ef49-497f-864e-952c2b90ea4d_1238x844.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!36Sx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3c93a79-ef49-497f-864e-952c2b90ea4d_1238x844.png" width="1238" height="844" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e3c93a79-ef49-497f-864e-952c2b90ea4d_1238x844.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:844,&quot;width&quot;:1238,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:125749,&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://www.detectionengineering.net/i/167119143?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3c93a79-ef49-497f-864e-952c2b90ea4d_1238x844.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_!36Sx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3c93a79-ef49-497f-864e-952c2b90ea4d_1238x844.png 424w, https://substackcdn.com/image/fetch/$s_!36Sx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3c93a79-ef49-497f-864e-952c2b90ea4d_1238x844.png 848w, https://substackcdn.com/image/fetch/$s_!36Sx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3c93a79-ef49-497f-864e-952c2b90ea4d_1238x844.png 1272w, https://substackcdn.com/image/fetch/$s_!36Sx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3c93a79-ef49-497f-864e-952c2b90ea4d_1238x844.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><p>The above example shows a simplified workflow on how this works. A Detection Engineer asks the SIEM to send them any logs that contain <code>maliciousdomain.com</code> on <code>index:dns</code>. The SIEM utilizes the index to identify relevant logs, thereby avoiding full storage scans. Once the SIEM and underlying indexing technology find matches, it retrieves them from storage along with the associated metadata.</p><p>But what&#8217;s the problem with this approach? It&#8217;s the human! Here&#8217;s why:</p><ul><li><p>Humans can&#8217;t possibly remember every search query needed to find malicious activity</p></li><li><p>Even if the above bullet were true, if the list is N long, are you going to search N queries for results sequentially?</p></li><li><p>When your query returns a malicious result, do you stop querying to investigate? What if more malicious activity is occurring?</p></li></ul><p>To scale this problem, we store queries associated with threat actor activity as Rules.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!z7Ms!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e278cd-9410-4513-a15b-ad39eccb712c_1632x1004.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!z7Ms!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e278cd-9410-4513-a15b-ad39eccb712c_1632x1004.png 424w, https://substackcdn.com/image/fetch/$s_!z7Ms!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e278cd-9410-4513-a15b-ad39eccb712c_1632x1004.png 848w, https://substackcdn.com/image/fetch/$s_!z7Ms!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e278cd-9410-4513-a15b-ad39eccb712c_1632x1004.png 1272w, https://substackcdn.com/image/fetch/$s_!z7Ms!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e278cd-9410-4513-a15b-ad39eccb712c_1632x1004.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!z7Ms!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e278cd-9410-4513-a15b-ad39eccb712c_1632x1004.png" width="1456" height="896" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/25e278cd-9410-4513-a15b-ad39eccb712c_1632x1004.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:896,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:188434,&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://www.detectionengineering.net/i/167119143?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e278cd-9410-4513-a15b-ad39eccb712c_1632x1004.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_!z7Ms!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e278cd-9410-4513-a15b-ad39eccb712c_1632x1004.png 424w, https://substackcdn.com/image/fetch/$s_!z7Ms!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e278cd-9410-4513-a15b-ad39eccb712c_1632x1004.png 848w, https://substackcdn.com/image/fetch/$s_!z7Ms!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e278cd-9410-4513-a15b-ad39eccb712c_1632x1004.png 1272w, https://substackcdn.com/image/fetch/$s_!z7Ms!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25e278cd-9410-4513-a15b-ad39eccb712c_1632x1004.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><p>In the simplified example above, a ruleset is a set of rules built by a Detection Engineer. A querying service retrieves the set of rules and executes the queries within it.</p><p>Detection rules can execute on a fixed schedule (e.g., every 5 or 30 minutes) or in near real-time as logs are ingested. This varies by the SIEM technology the organization uses.</p><p>The same steps happen in the SIEM; if the query contains valid search parameters, such as an index that exists, it&#8217;ll look for it in storage. Once retrieved, results are sent to the analyst. This can be an alert if results are available, or it can be nothing if no results are found.</p><h2>Conclusion</h2><p>Understanding why rules matter as a scaling mechanism for a security team is an essential concept in threat detection. Encapsulating human knowledge inside dozens to hundreds of detection rules helps relieve analysts of the operational burden of searching for malicious activity. Additionally, it frees up analysts so they can orient themselves, tune their knowledge, and share it with others.</p><p>A SIEM is a critical component to many blue team functions, and seeing how logs are stored in a technology that can ingest logs, perform fast searches, and present other necessary metadata makes finding threat actor activity nearly instantaneous.</p><p>No system is perfect, though, and in the upcoming issues we&#8217;ll be studying types of rules (with some real-world examples) and comparing and contrasting alerting strategies.</p><p>Stay tuned!</p><h3>Icon attribution</h3><p><a href="https://www.flaticon.com/free-icon/log_1960242?term=log&amp;page=1&amp;position=1&amp;origin=search&amp;related_id=1960242">https://www.flaticon.com/free-icon/log_1960242?term=log&amp;page=1&amp;position=1&amp;origin=search&amp;related_id=1960242</a></p><p><a href="https://www.flaticon.com/free-icon/database-storage_2906206?term=database&amp;related_id=2906206">https://www.flaticon.com/free-icon/database-storage_2906206?term=database&amp;related_id=2906206</a></p><p><a href="https://www.flaticon.com/free-icon/index_6639076?term=index&amp;page=1&amp;position=1&amp;origin=search&amp;related_id=6639076">https://www.flaticon.com/free-icon/index_6639076?term=index&amp;page=1&amp;position=1&amp;origin=search&amp;related_id=6639076</a></p><p><a href="https://www.flaticon.com/free-icon/user_456212?term=user&amp;page=1&amp;position=1&amp;origin=search&amp;related_id=456212">https://www.flaticon.com/free-icon/user_456212?term=user&amp;page=1&amp;position=1&amp;origin=search&amp;related_id=456212</a></p><p><a href="https://www.flaticon.com/free-icon/prescription_4864896?term=rule&amp;page=1&amp;position=25&amp;origin=search&amp;related_id=4864896">https://www.flaticon.com/free-icon/prescription_4864896?term=rule&amp;page=1&amp;position=25&amp;origin=search&amp;related_id=4864896</a></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.detectionengineering.net/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">Detection Engineering Field Manual is a series dedicated to educating readers on how the field of detection engineering accelerates modern blue team operations. Consider subscribing to help support my work on this series!</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[What is a Detection Engineer?]]></title><description><![CDATA[Why does Detection Engineering matter to a security org?]]></description><link>https://www.detectionengineering.net/p/detection-engineering-field-manual</link><guid isPermaLink="false">https://www.detectionengineering.net/p/detection-engineering-field-manual</guid><dc:creator><![CDATA[Zack Allen]]></dc:creator><pubDate>Fri, 20 Jun 2025 12:06:14 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%2F01362c1d-7df2-493f-975a-a95cd92b19c0_2590x1163.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The purpose of this post is to describe the role of a Detection Engineer in cybersecurity. Instead of diving deep into things you've probably heard of, such as Rules, Alerting, False Positives, or Threat Hunting, I wanted to take a step back and describe the <em>Why</em> of a Detection Engineer.</p><p>In my opinion, without understanding the context of where this field fits into a broader cybersecurity strategy, you won't necessarily understand what it takes to be successful.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.detectionengineering.net/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">Every week, I read, watch and listen to all the Detection Engineering content so you can consume it all in 10 minutes. Subscribe and get a weekly digest of the latest and greatest in threat detection engineering!</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>Still, by the end of this post, whether you are a seasoned professional or want to break into the field, you should have a good idea of how a Detection Engineer can help bolster security operations teams big and small.</p><h3>So what is a Detection Engineer?</h3><p>Detection Engineering is a relatively new name for a concept that has evolved over decades in cybersecurity. Blue teaming has been a core tenet in cybersecurity defense and has remained largely unchanged in its function for the business. When you are concerned about threat actors attempting to gain malicious access to your network, you want a blue team to defend against such an attack.</p><p>A Detection Engineer works in defense alongside a broader blue team, but with a special focus on detecting when a threat actor infiltrates and moves within a network. You may read or hear this in other terms, such as &#8220;Threat Detection&#8221;. This infiltration can be the result of any number of attacks, such as:</p><ul><li><p>Phishing for credentials and logging into an internal email client</p></li><li><p>A user downloads a malicious file to their device after searching for a "pirated" version of the software</p></li><li><p>A corporate device listening on the Internet has a vulnerability that a threat actor exploits</p></li></ul><p>Once the attacker is "in," that's where Detection come into play. Each of the three scenarios I listed contains three parts: An asset, an attack, and a circumvented control. A Detection Engineer should know:</p><ul><li><p>The <strong>assets</strong> they are tasked to protect</p></li><li><p>The set of <strong>controls</strong> on that asset</p></li><li><p>The <strong>attack surface</strong> once that control is <strong>bypassed</strong></p></li></ul><p>The best way I like to explain Detection is through the broader lens of the NIST Cybersecurity Framework (CSF) model.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rvKG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9650b70-f29c-436a-b3de-ef55513dbfd6_4629x4462.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rvKG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9650b70-f29c-436a-b3de-ef55513dbfd6_4629x4462.png 424w, https://substackcdn.com/image/fetch/$s_!rvKG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9650b70-f29c-436a-b3de-ef55513dbfd6_4629x4462.png 848w, https://substackcdn.com/image/fetch/$s_!rvKG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9650b70-f29c-436a-b3de-ef55513dbfd6_4629x4462.png 1272w, https://substackcdn.com/image/fetch/$s_!rvKG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9650b70-f29c-436a-b3de-ef55513dbfd6_4629x4462.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rvKG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9650b70-f29c-436a-b3de-ef55513dbfd6_4629x4462.png" width="1456" height="1403" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c9650b70-f29c-436a-b3de-ef55513dbfd6_4629x4462.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1403,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:387907,&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://www.detectionengineering.net/i/166341887?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9650b70-f29c-436a-b3de-ef55513dbfd6_4629x4462.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_!rvKG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9650b70-f29c-436a-b3de-ef55513dbfd6_4629x4462.png 424w, https://substackcdn.com/image/fetch/$s_!rvKG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9650b70-f29c-436a-b3de-ef55513dbfd6_4629x4462.png 848w, https://substackcdn.com/image/fetch/$s_!rvKG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9650b70-f29c-436a-b3de-ef55513dbfd6_4629x4462.png 1272w, https://substackcdn.com/image/fetch/$s_!rvKG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9650b70-f29c-436a-b3de-ef55513dbfd6_4629x4462.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>At the core of any cybersecurity function, you'll be operating in a series of states and functions within the above model.</p><ul><li><p>Identify: what assets do we own, and who owns them internally?</p></li><li><p>Protect: What controls do we have in place to protect those assets?</p></li><li><p>Detect: How do we detect when a threat actor circumvents our controls?</p></li><li><p>Respond: How quickly can we respond, contain, and eradicate the threat we detected?</p></li><li><p>Recover: How do we become operational and return to Identify, Protect, Detect, and Respond?</p></li><li><p>Govern: How healthy is our program?</p></li></ul><p>The modern Detection Engineer primarily focuses on the "Detect" function within NIST CSF. There are cases where a team is small, and the Detection Engineering team is under "DART," Detection and Response Team, so you'll mostly see them operating in these two phases of the lifecycle. There are cases where a Detection Engineer is part of a large security organization and delivers their detections to a Security Operations Center.</p><h3>How does a Detection Engineer, well, detect?</h3><p>The primary objective that any Detection Engineer should concern themselves with is: when control fails, what is the fastest way to Detect malicious activity? I like to think that malicious cyber activity adheres almost perfectly to <a href="https://en.wikipedia.org/wiki/Locard%27s_exchange_principle">Locard's Exchange Principle</a>:</p><p><em>"Every Contact Leaves a Trace."</em></p><p>There is no detection without telemetry. Telemetry is data generated by the assets you've identified in the "Identify" phase of the NIST CSF. This telemetry is a record, or trace, according to Locard, of activity and is typically in <em>Logs.</em></p><p>Every Detection Engineer should understand that there is <em>no Detection without Telemetry.</em></p><p>If there is no detection without telemetry, then <em>there is no telemetry without assets</em>. A Detection Engineer is a specialist in obtaining, understanding, and integrating asset data and its associated telemetry to facilitate Detection and Response. In the context of the NIST CSF, you can see how the state of "Blue Team" affects how Detect &amp; Response functions. I call these states "Loops".</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RK2c!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01362c1d-7df2-493f-975a-a95cd92b19c0_2590x1163.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RK2c!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01362c1d-7df2-493f-975a-a95cd92b19c0_2590x1163.png 424w, https://substackcdn.com/image/fetch/$s_!RK2c!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01362c1d-7df2-493f-975a-a95cd92b19c0_2590x1163.png 848w, https://substackcdn.com/image/fetch/$s_!RK2c!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01362c1d-7df2-493f-975a-a95cd92b19c0_2590x1163.png 1272w, https://substackcdn.com/image/fetch/$s_!RK2c!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01362c1d-7df2-493f-975a-a95cd92b19c0_2590x1163.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RK2c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01362c1d-7df2-493f-975a-a95cd92b19c0_2590x1163.png" width="1456" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/01362c1d-7df2-493f-975a-a95cd92b19c0_2590x1163.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:225575,&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://www.detectionengineering.net/i/166341887?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01362c1d-7df2-493f-975a-a95cd92b19c0_2590x1163.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_!RK2c!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01362c1d-7df2-493f-975a-a95cd92b19c0_2590x1163.png 424w, https://substackcdn.com/image/fetch/$s_!RK2c!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01362c1d-7df2-493f-975a-a95cd92b19c0_2590x1163.png 848w, https://substackcdn.com/image/fetch/$s_!RK2c!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01362c1d-7df2-493f-975a-a95cd92b19c0_2590x1163.png 1272w, https://substackcdn.com/image/fetch/$s_!RK2c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01362c1d-7df2-493f-975a-a95cd92b19c0_2590x1163.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><ul><li><p>Loop 1 is the ideal state. A blue team function understands the assets in their environment and implements controls to eliminate classes of attacks and vulnerabilities.</p></li><li><p>Loop 2 serves as a hedge against the failure of Loop 1. You may have the best lock on a door, but if the attacker has a sledgehammer, you'd want to set up security cameras and an alarm system as a hedge against that sledgehammer. This is the value proposition of what we do in Detection Engineering</p></li><li><p>Loop 3 is executed only when Containment fails to mitigate the adverse impact of a threat on the business in a meaningful way. These learnings should feed back into Loop 1 &amp; 2</p></li></ul><p><strong>My advice to Blue Teams:</strong> Stay in Loop 1 as much as possible, exit Loop 2 as quickly as possible, and use Loop 3 to learn as much as possible.</p><p>The beautiful thing about Detection Engineering is that you have the opportunity to influence every aspect of the Blue team's function, as listed above, and virtually every part of the business. You can dive deep into a class of assets or threats, or you can span the Loop spectrum to make sure you can bolster controls, identify new assets, or learn from your gaps to create a better detection function.</p><h3>How does one become a detection engineer?</h3><p>As the leader of an organization with nearly 50 Detection Engineers, Responders, Threat Intelligence Researchers, and Security Researchers, I am frequently asked this question. Like in most of security, no one path guarantees a destination. There are subjects and technical concepts that I'll be exploring deeply in this series to help you move in the direction of a Detection Engineer.</p><p>That being said, I've personally reviewed 1000s of resumes applying to Detection roles in my org. I've personally interviewed hundreds of people for these roles and designed interview loops and panels with my organization to identify what we consider a "Detection Engineer" for my firm. So I have some thoughts:</p><ul><li><p>A Detection Engineer is comfortable with coding. At best, they can ship production-grade code, and at a minimum, they are comfortable with building basic and deploying microservices to perform security tasks</p></li><li><p>Detection Engineers have deep security expertise in one or more areas. I typically only care about them being good at one of those areas, because the skills it took to become an expert are transferrable to other areas. Areas included but not limited to:</p><ul><li><p>Operating System Security</p></li><li><p>Cloud Infrastructure Security</p></li><li><p>Computer Networking Security</p></li><li><p>Red Teaming and Pentesting</p></li><li><p>Security Incident Response</p></li><li><p>SOC Analysts</p></li><li><p>Threat Intelligence</p></li></ul></li><li><p>Detection Engineers have a <em>customer mindset</em> and want to collaborate to solve hard security problems. Since they primarily focus on Loop 2, they want to return to Loop 1 as quickly as possible. So that could mean they:</p><ul><li><p>Work closely with an IT team to understand their asset inventory</p></li><li><p>Inform the vulnerability management team how attackers are exploiting current vulnerabilities to bypass controls</p></li><li><p>Design the perfect alert experience for SOC analysts that are precise, actionable, and not false positive prone</p></li><li><p>Automate hunting and containment tasks for incident response so they can move to Containment as fast as possible</p></li></ul></li></ul><h3>Conclusion</h3><p>Detection Engineering is an exciting and rapidly evolving field that I've had the pleasure of seeing form since I started in security in 2012. Businesses and organizations are adding more products, assets, and functionality to their day-to-day operations, which means the attack surface grows linearly with these additions.</p><p>If you want to be a detection engineer, your job is to understand the fundamental truth of organizational growth and utilize your expertise, relationships, and curiosity to scale your blue team in tandem with that growth.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.detectionengineering.net/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">Every week, I read, watch and listen to all the Detection Engineering content so you can consume it all in 10 minutes. Subscribe and get a weekly digest of the latest and greatest in threat detection engineering!</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></channel></rss>