<?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 Rcegan on Medium]]></title>
        <description><![CDATA[Stories by Rcegan on Medium]]></description>
        <link>https://medium.com/@rcegan?source=rss-f71d5147d0f2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*POgU0oox9Cpm172oTgrghg.jpeg</url>
            <title>Stories by Rcegan on Medium</title>
            <link>https://medium.com/@rcegan?source=rss-f71d5147d0f2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 06:44:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rcegan/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[Implementing Detection as Code as a multi-platform MSSP]]></title>
            <link>https://detect.fyi/implementing-detection-as-code-as-a-multi-platform-mssp-6518cc5289b4?source=rss-f71d5147d0f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/6518cc5289b4</guid>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[detection-as-code]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <dc:creator><![CDATA[Rcegan]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 08:30:41 GMT</pubDate>
            <atom:updated>2026-11-03T00:15:43.941Z</atom:updated>
            <content:encoded><![CDATA[<p>What was once considered to be a niche within a niche, Detection as Code has become a very popular method of managing detection rules across your SIEM environment. Seeing Detection as Code pipelines become commonplace has been incredibly heartening to watch over the last few years, as it brings with it very tangible benefits — it removes the risk of configuration drift, allows for unit testing and strict style guides through CI/CD, and automated deployments. With AI in the picture, the benefits multiply massively with huge efficiency boosts in terms of writing and tuning rules, using those rules for threat hunting, and more.</p><p>I’ve spent a long time tracking the evolution of Detection as Code in the Detection Engineering space in my last few years as a security engineer at an MSSP. I’ve tried many different approaches to implementing DaC in a way that could truly scale, and scale in a way that could function cross-platform, as we support not one but <strong>four</strong> platforms simultaneously! However, I found very few online discussing how they were dealing with the complexities that arise from dealing with this kind of environment. This article intends to address this use-case and hopefully help fill that gap.</p><p>First and foremost, a lot of the initial inspiration came from the incredible work done by NVISO Labs on their <a href="https://blog.nviso.eu/series/detection-engineering-practicing-detection-as-code/">Detection Engineering: Practicing Detection-as-Code — NVISO Labs</a> series of blogs. Many of the design decisions taken were inspired heavily by concepts outlined in this series, a lot of which will be readily apparent as I dig into the design principles.</p><h3>The Approach</h3><p>The number one consideration when it comes to implementing DaC is managing the downstream consumers of our detections. During the design phase, I played with a couple different methodologies for managing code:</p><ul><li>Specific git branches for different environments</li><li>Monorepo vs. Multiple repos per client with submodules</li></ul><p>Multiple branches seemed like a good idea initially, but it’s really not what branches are designed for. Keeping branches synced up with rules is untenable, and the same kinds of issues presented themselves when it came to managing multiple repositories. It also led to valuable context being spread across different folders rather than being centralised in one place.</p><p>The best and simplest approach I settled on was the same as NVISO’s — organising detection content into ‘Content Packs’ — JSON definitions that group detections up based on a similar purpose. We typically group detections based on their underlying log source, but other content packs cover particular attack stories or are customer-agnostic (e.g. the ‘Baseline’ content pack, a group of detections that all customers receive). This allowed for the simplest and best use for Git which was to keep the ‘main’ branch as production, and put work in progress detection rules behind ‘feature’ branches and gate any merge behind CI/CD tests.</p><p>In-line with NVISO, a typical content pack looks something like:</p><pre>{<br>  &quot;platform&quot;: &quot;sentinel&quot;,<br>  &quot;description&quot;: &quot;Contains detections relating to Azure and Azure resource deployment and modification. Most detections require AzureActivity logs or other common tables.&quot;, <br>  &quot;content&quot;: [<br>    &quot;detections/Sentinel/azure/Rare subscription-level operations in Azure&quot;,<br>    &quot;detections/Sentinel/azure/Suspicious Resource Deployment&quot;,<br>    &quot;detections/Sentinel/ueba/First time Azure Custom Script or Run command deployment&quot;,<br>    &quot;detections/Sentinel/azure/Mass secret retrieval from Azure Key Vault&quot;,<br>    ...<br>  ]<br>}</pre><p>Once I had settled on the concept of content packs for managing which rules are deployed to who, it completely opened the door for all kinds of use-cases, and is how we deploy specific sets of detections to specific environments. With content packs, the Detection Engineering team can seamlessly add detections onto a new or existing content pack and ship it out the door to all environments who need it.</p><p>Content packs simplify the deployment process massively by controlling everything through a singular JSON file. Each customer is tracked individually through this file, and it specifies the platforms they have, and what content packs they should receive.</p><pre>...<br>&quot;content-packs&quot;: [<br>    &quot;sentinel-baseline&quot;,<br>    &quot;sentinel-azure&quot;,<br>    &quot;sentinel-defenderxdr&quot;,<br>    &quot;sentinel-active-directory&quot;,<br>    &quot;sentinel-platform-alerts&quot;,<br>    &quot;sentinel-monitored-domains&quot;<br>  ],<br>...j</pre><p>Some customers may combine different SIEM and EDR platforms. Our configuration allows for mix and matching of content packs and platforms, with specific CI/CD pipelines that kick in for each. Detection as Code ensures each environment receives <strong>exactly</strong> the same detection rule, no matter what.</p><p>Detections are stored as discrete files in native formats. For Sentinel, that’s JSON ARM templates, for Splunk it’s .conf files, etc. Each file is kept within a simple file structure:</p><pre>detections /<br>  sentinel/<br>	active-directory/<br>	aws/<br>	azure/<br>		Cloud Resource Deletion Time Anomaly.json<br>	... <br>  splunk/<br>	active-directory/<br>	aws/<br>	azure/<br>		Cloud Resource Deletion Time Anomaly.json<br>	...</pre><p>While working with the native files is not the most intuitive thing to a human, we’ve been able to build a toolchain that simplifies the process of managing and editing these rules which has allowed us to bypass many of the issues others run into — compiling pseudo-code into detection rules, generating rule metadata at deployment time, etc. We found that for our purposes, just storing the actual raw rule itself provided all the same benefits. With an AI agent in the picture, editing a JSON file is no issue at all.</p><h3>But what about Sigma and Cross-Platform rules?</h3><p>I decided early on to de-scope pseudo-code from the codebase altogether and rely on actual detection artifacts. Personally, I prefer to use Sigma rules as reference material rather than as a piece of code to be translated off of directly. While there are some automated tools that have gotten decently good at this, in 2026 it’s much quicker and accurate to throw an AI agent at that task instead. AI agents can also create the requisite metadata around the rule itself, further reducing the need for these tools.</p><p>Managing cross-platform rules is indeed trickier without a shared piece of pseudo-code. But again, with AI agents being such a massive part of the detection development lifecycle, maintaining changes between multiple query languages and platforms and accounting for each nuance is shockingly easy. This has been one of the biggest enablers of this particular Detection as Code implementation.</p><h3>What about documentation?</h3><p>Each rule is stored alongside a markdown file in the same folder. The markdown file contains:</p><ul><li>The rule description</li><li>A technical description explaining how the rule works</li><li>Blindspots, gaps, and special SOC considerations</li><li>Other bespoke info aligned to our SOC team</li></ul><p>This doco is stored as code and is linted and checked as part of the PR process. This ensures documentation is always updated in lockstep with the rule. The documentation is then rendered in our custom frontend (more on that later) and synced into Confluence at deployment time.</p><p>For more information on writing good documentation, I would point you to <a href="https://medium.com/detect-fyi/the-structure-and-taxonomy-of-a-detection-knowledge-base-abe415a1ee81?sharedUserId=rcegan">this article</a> I wrote a couple years ago on the subject.</p><h3>Deployment Workflow</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e6u-6Da9VD_UzfCAFZaslg.png" /></figure><p>Pictured above is a high level diagram describing the deployment workflow. It’s not overly complicated — work is done on a new branch with simple tests run locally pre-commit to prevent any stupid mistakes slipping through. There, a PR is raised, where a much more complex validation pipeline is executed.</p><p>The validation pipeline:</p><ul><li>Identifies the changes based on file type and platform (modified version of NVISO’s logic)</li><li>Routes the change to the relevant platform validators</li><li>Checks metadata and style against dozens of custom tests</li><li>Remotely runs queries against lab environments</li><li>Stages the rules in a lab environment to test the deployment will succeed in production</li><li>And more 😉</li></ul><p>Assuming the tests pass and the senior Detection Engineer is happy, the PR can be merged, where it is then checked into the main branch. The deployer will pick up the change if it’s part of a content pack, and any customer subscribed to that pack will receive that rule.</p><p>In instances where the rule already exists and the platform supports it, the deployer will update the rule in-place rather than create a new one. For Splunk deployments, rules are tarred and uploaded to remote storage for retrieval and installation by other automated steps outside the scope of this article.</p><h3>The Detection Engineering Toolchain</h3><p>To support testing, we also have the capability to run searches against any environment from the DaC repository. This initially started as a way to manually test detection rules prior to deployment, but quickly grew to become a full-blown agent harness, fully capable of orchestrating long and detailed threat hunts fully autonomously. We then built integrations into threat intelligence products, custom skills, and other bespoke API tools that could empower an engineer or an AI agent to carry out full SOC and IR investigations completely.</p><p>One of the other concepts I built was the idea of a <strong>data map</strong>. A data map is essentially a CSV inventory of all the tables going into an environment, alongside an event count. This data map is generated once daily per environment. For each table, an equivalent schema markdown file is generated, along with an entry added to an index.md file. This schema is not auto-generated, but rather hand curated with the MITRE data components it provides, the SIEM field it maps to, the fields in the table, and a section for analysts to make notes.</p><pre>---<br>type: logsource<br>platform: sentinel<br>mitre_datacomponent_name:<br>  - Cloud Service Modification<br>  - Instance Creation<br>  - Instance Deletion<br>  - Instance Modification<br>  - Cloud Service Enumeration<br>  - Cloud Service Disable<br>mitre_datacomponent_id:<br>  - DC0069<br>  - DC0076<br>  - DC0081<br>  - DC0073<br>  - DC0083<br>  - DC0090<br>mitre_logsource_name: azure:activity<br>siem_logsource_name: AzureActivity<br>---<br># Context<br>Entries from the Azure Activity log that provides insight into any subscription-level or management group level events that have occurred in Azure. Source: https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/azureactivity<br><br># Suggested Queries<br>## Check for ...<br>```kql<br>AzureActivity<br>| where TimeGenerated &gt; ago(1d)<br>...<br>```<br><br># Schema<br>| Field Name | Data Type | Description |<br>|------------|-----------|-------------|<br>| _ResourceId | string | A unique identifier for the resource that the record is associated with |<br>| ActivityStatus | string |  |<br>...</pre><p>This concept was inspired by a post on the blog <a href="https://blog.cauchy.org/blog/detection-validation">Cauchy</a> which discussed a workflow for automatically maintaining documentation on each sourcetype in Splunk. We’ve expanded the scope to include Sentinel and the various other platforms we support, with the overlay of MITRE data components for downstream reporting.</p><h3>Detection Development Efficiencies</h3><p>Bringing all development into one repository has significantly decreased the time it takes to develop, test and deploy new rules. With an AI agent in the mix, an almost fully autonomous development process can be achieved:</p><ol><li>A CTI agent intakes a piece of CTI and synthesises it into potential detection opportunities.</li><li>A detection agent for each platform with knowledge of each platform’s major log sources and style can enumerate the repository for similar detections and common query patterns.</li><li>The detection agent can autonomously test the rules against live staging environments and adjust for any syntax errors or false positives it may turn up.</li><li>The final output is generated onto a new branch ready for a detection engineer to review and put finishing touches on.<br> This also has implications in other areas of the SOC, such as smooth integration into automated threat hunting (<a href="https://github.com/Nebulock-Inc/agentic-threat-hunting-framework">ATHF</a>) and much more. Internally, I maintain a heavily modified fork of ATHF that runs on the toolchain discussed in this article for producing timely threat hunts.</li></ol><h3>Potential Pitfalls</h3><p>In this kind of environment, ensuring mistakes don’t slip through the validation phase is absolutely critical, as the potential impact is now <em>much</em> larger. For this reason, QA needs to be rigorously implemented. Some of the methods we utilise:</p><ul><li>Branch protection</li><li>Linting tests</li><li>Automated staging against representative lab environments</li><li>Required Approvers</li><li>CI/CD security scanning</li><li>Robust secret management for agents</li><li>Agent sandboxing<br> It’s also important that, if you choose to adopt a similar practice, you go through the effort of hand-selecting the rules you want to manage as code. There is an element of “wiping the slate clean” involved where we decided which rules we’d keep, and which rules offered little value (or just weren’t worth the time to update). It was then a very long and arduous process to manually transition each environment onto the new ruleset without compromising on detection capability.</li></ul><h3>The Detection Engineering Frontend</h3><p>One of the many benefits AI has given us is the ability to create bespoke applications for specific purposes. Detection as Code is wonderful but not everyone likes engaging with a Git repository and raw markdown (especially when you want to open up to non-technical folks). Thus, the need for a frontend was born.</p><p>Below is a fictionalised version of the ‘Detection Grid’, the part of the app which SOC analysts interface with for viewing rules. Here they can filter the list down, view alert stats (plugged into live ITSM data), and view the content packs a detection belongs to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rW8Vo_sTtI7giw0ZxZairw.png" /></figure><p>A rule may be drilled down into to reveal its metadata and documentation, alongside a summary of how the alert is typically closed and the reasoning behind each closure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bu48H09HCO--HMDQbcR89w.png" /><figcaption>The metadata of a rule and alert volume stats.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*0GfxD-Sb2vsWrV6mBwlxIg.png" /><figcaption>AI generated summary of closure reasons and the documentation section rendered from the markdown file in the DaC repository.</figcaption></figure><p>Of course, a MITRE gap analysis tool is provided as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ik1gibRVYeZzFGo9yKVK8A.png" /><figcaption>By bundling the full MITRE STIX library into your app, you can do all kinds of enrichment on the info within your detection library.</figcaption></figure><p>This is probably only 5% of the capabilities of the platform I’ve built around Detection as Code, but the point is that Detection as Code gives you an organic knowledge base of detection and security information you can build on top of. You can overlay threat hunting, gap analysis, data integrity, reporting, testing and validation and so much more. Detection as Code in 2026 is more than just version control, it’s a fusion centre for your whole SOC.</p><p>I hope this article has given you some reading material and given you some food for thought on where you might take your Detection as Code implementation in the future. A big shoutout to NVISO and Cauchy who directly inspired the design of my particular configuration. Please consider reading them and the other authors on this publication, as without them none of this would have been possible.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6518cc5289b4" width="1" height="1" alt=""><hr><p><a href="https://detect.fyi/implementing-detection-as-code-as-a-multi-platform-mssp-6518cc5289b4">Implementing Detection as Code as a multi-platform MSSP</a> was originally published in <a href="https://detect.fyi/">Detect FYI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Detection via Deception — Using your SIEM as a Free Deception Platform]]></title>
            <link>https://detect.fyi/detection-via-deception-using-your-siem-as-a-free-deception-platform-8ecdd97023d9?source=rss-f71d5147d0f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ecdd97023d9</guid>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[honeypot]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[deception-technology]]></category>
            <dc:creator><![CDATA[Rcegan]]></dc:creator>
            <pubDate>Sun, 15 Mar 2026 19:31:59 GMT</pubDate>
            <atom:updated>2026-03-15T19:31:59.889Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2UWybn6727j0hs36bzYptQ.png" /></figure><p>Recently there’s been a lot of discussion and hype around the use of deception technology as a defender — and rightly so. Adding deception into your environment comes with swaths of benefits:</p><ul><li>An early indicator that your environment is being targeted</li><li>Warning that an adversary is enumerating users from <em>inside</em> your environment</li><li>Evidence an adversary has already gained a foothold and is attempting to move laterally</li><li>An adversary is actioning their objectives and attempting to collect data from the environment for exfiltration</li></ul><p>But these benefits are all widely understood in 2026. So why are so few organisations implementing it?</p><h3>Misconceptions about implementing Deception technology</h3><p>In my experience working at an MSSP, there’s a strange self-defeating idea that “my environment isn’t complicated enough” to justify setting up honeytokens, or that the business couldn’t possibly keep the existence of honeytokens secret because of their change management processes.</p><p>In reality though, this thinking is actually backwards. Any environment, regardless of it’s size or complexity, can benefit from deception. In fact, smaller environments usually see a <strong>greater proportional return</strong> from deploying honeytokens. If you’re not a large enterprise, it’s true that you may not have access to cutting edge NDR/EDR/SOAR/AI products. But if you don’t, it doesn’t mean we’re completely powerless either. Deception gives us a means to inflict pain and suffering on an adversary with the misfortune to stumble into our network.</p><p>On the topic of keeping the existence of honeytokens secret, we need to consider the organisation’s threat model. There is little need to keep the existence of honeytokens hidden from change managers or management if the most likely threat to hit your organisation is an opportunistic ransomware smash-and-grab (they’re not going to slow down to read your ServiceNow tickets or Confluence pages). That’s not to say you shouldn’t try to keep honeytokens on a “need to know” basis, but nine times out of ten this point is moot compared to the threat detection benefits you gain from using deception. This may seem like an obvious and non-issue to some, but this is a real conversation I’ve had multiple times with antsy customers.</p><p>The biggest and most pervasive misconception though is the idea that in order to utilise deception in your environment, you need to buy a product. And while there are enterprise-grade products available on the market, this idea could not be further from the truth. Thinkst Canary have been providing completely free lures for years that can be placed around your network and raise alerts into the SIEM (or even a Slack chat!) via a webhook. Even still, some customers have resisted integrating tech from yet another vendor. So, we need to get scrappy.</p><h3>The best deception is free deception</h3><p>The SIEM is awesome, and you probably already have one. You hopefully already collect logs from around the network for threat detection. Your SOC should be able to see when an account is accessed via Entra, or by RDP. Your SOC are likely already monitoring these for anomalies. So why don’t we just use the SIEM?</p><p>Using the existing log data we have access to, we can simply <strong>create</strong> our own honeytokens as if we were making these resources for real — user accounts, infrastructure, cloud resources, anything — and tailor our custom detections to check for any activity from those resources. The best part is the cost is <strong>internal</strong> — the only cost to the business is setting it up. But how do we decide what kind of honeytokens we should roll out?</p><h3>Designing honeytokens for your environment</h3><p>When figuring out what honeytokens to use, consider this definition of ‘Deception’ provided to us under NIST Special Publication 800–160, Volume 2, Revision 1:</p><blockquote><em>Mislead, confuse, hide critical assets from, or expose covertly tainted assets to the adversary.</em></blockquote><p>Specifically, for our purpose of cheap and easy threat detection, we want to focus on <strong>misleading</strong> the threat actor. Of course, confusion and tainted assets also helps us by wasting the adversary’s time (and letting us peek at their tradecraft), but at this level of maturity we don’t need to focus too heavily on those objectives. We want some quick wins.</p><p>MITRE maintains a whole framework called <a href="https://engage.mitre.org/">MITRE Engage</a> that gives us loads of resources for planning how we wish to implement our honeytokens. Some of these resources include the <a href="https://engage.mitre.org/learn-more-quad-chart/">deceptive information worksheet</a> which provide a useful mental model for designing each of our honeytokens. With that in mind, let’s create a user account to tip us off when we think someone might be inside our corporate network and attempting to enumerate our users, or is attempting to gain access via Entra ID as a way to ease us into the deception mindset:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*PgiDlwFMZSVsoKMRpxuAWQ.png" /></figure><p>This is a very basic example but it demonstrates the thought process. We want to know if there are signs that our domain is being enumerated because an account that <strong>should never be used</strong> is being interacted with. This can also be combined with other signals like password spraying attempts to understand whether our organisation is being targeted externally.</p><p>Of course, you may wish to <em>spruce up</em> your honeytoken user. Depending on your environment, you may wish to name them like an administrator or service account (or create both!). The best approach to take is to understand the crown jewels of your environment, the core technology and systems that support the organisation, and theme our honeytokens in such a way that an attacker would <strong>deliberately choose</strong> our honeytokens rather than an existing user or resource. These bespoke, tailored honeytokens should be combined with some more <strong>generic</strong> honeytokens planted around on individual systems (such as jumpboxes) as local users and domain accounts for some depth.</p><h3>The Query</h3><p>The below query is a simple example as to how you can approach detecting usage of your honeytokens in Microsoft Sentinel with a straightforward KQL query. You’ll need to deploy a watchlist called ‘Honeytokens’ (if you follow this example verbatim) and populate it with a UPN column called ‘HoneytokenUPN’ and an account name column called ‘HoneytokenAccountName’. You can then populate this watchlist with your honeytoken users.</p><pre>let timeframe = 1h;<br>let HoneytokenLureUPN = _GetWatchlist(&#39;honeytokens&#39;) | project HoneytokenUPN;<br>let HoneytokenLureAccountName = _GetWatchlist(&#39;honeytokens&#39;) | project HoneytokenAccountName;<br>let Honeytoken_EntraUsers =<br>    union SigninLogs, AADNonInteractiveUserSignInLogs<br>    | where TimeGenerated &gt; ago(timeframe)<br>    | project TimeGenerated, Type, ResultType, ResultSignature, Lure = UserPrincipalName, IPAddress, AppDisplayName, IsInteractive, Location, RiskState, UserAgent<br>    | mv-expand Lure_AccountName = split(Lure, &#39;@&#39;, 0) to typeof(string)<br>;<br>let Honeytoken_Onprem_Users_MDI =<br>    union IdentityLogonEvents, IdentityQueryEvents, IdentityDirectoryEvents<br>    | where TimeGenerated &gt; ago(timeframe)<br>    | extend Lure_AccountName = tolower(AccountName)<br>    | extend Lure = tolower(AccountUpn)<br>    | where isempty( Lure_AccountName) == false<br>    | project TimeGenerated, Type, ActionType, Lure, Lure_AccountName, IPAddress<br>;<br>let Honeytoken_Onprem_Users_SecEvents = <br>    SecurityEvent<br>    | where TimeGenerated &gt; ago(timeframe)<br>    | where EventID in (4624, 4625, 4662, 4670, 4740, 5136, 4738, 4761, 4762, 4729, 4725) // smattering of common event IDs - modify and change as you wish<br>    | extend Lure_AccountName = tolower(AccountName)<br>    | project TimeGenerated, Lure_AccountName, Activity, LogonType, IPAddress = IpAddress<br>;<br>union isfuzzy=true Honeytoken_EntraUsers, Honeytoken_Onprem_Users_MDI, Honeytoken_Onprem_Users_SecEvents<br>| where TimeGenerated &gt; ago(timeframe)<br>| where Lure in~ (HoneytokenLureUPN) or Lure_AccountName in~ (HoneytokenLureAccountName)<br>| mv-expand TrimmedName = split(Lure, &#39;@&#39;, 0) to typeof(string)<br>| mv-expand TrimmedSuffix = split(Lure, &#39;@&#39;, 1) to typeof(string)<br>| project-reorder TimeGenerated, Type, Lure, Lure_AccountName</pre><p>The query prepares our various tables for detection by normalising certain key fields like the Lure (our UPN field) and the Lure’s account name for detection across Active Directory and Entra. The results are then combined and suddenly, we can see attempts to access our honeytoken users across our various data sources.</p><p>This query is another basic example, but hopefully it gives you some ideas for how you can begin to operationalise deception within your environment. I recommend adding in another watchlist for your <strong>suppressions</strong>, something you’ll 100% need to add in. Our goal is for our honeytoken detection to <strong>never</strong> trigger — this means filtering out vulnerability scanners and other <em>known</em> processes as much as possible. This allows us to set the severity of the detection appropriately and focus any SOC investigations on the activity itself rather than wondering if it’s a false positive or not.</p><h3>The Next Level</h3><p>This just represents the first level of what’s possible doing deception for free with your SIEM. More sophisticated threats necessitate the need for proptionately more sophisticated lures. At this point, we want to go back to MITRE and align our lures with a real threat actor’s TTPs. If you’re a bank, consider checking out a threat actor who targets banks, collecting their TTPs, and building lures that reflects <em>what they target</em>. If they hunt for shares, build juicy looking shares. If they lurk in mailboxes, leave juicy looking email messages in the CFO’s inbox and alert when it’s opened. The limit is really only your own creativity, and none of it requires buying anything.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ecdd97023d9" width="1" height="1" alt=""><hr><p><a href="https://detect.fyi/detection-via-deception-using-your-siem-as-a-free-deception-platform-8ecdd97023d9">Detection via Deception — Using your SIEM as a Free Deception Platform</a> was originally published in <a href="https://detect.fyi/">Detect FYI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Re-Writing the Playbook — A detection-driven approach to Incident Response]]></title>
            <link>https://detect.fyi/re-writing-the-playbook-a-detection-driven-approach-to-incident-response-5269e2eb33ca?source=rss-f71d5147d0f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/5269e2eb33ca</guid>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[dfir]]></category>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security-operation-center]]></category>
            <dc:creator><![CDATA[Rcegan]]></dc:creator>
            <pubDate>Wed, 15 Oct 2025 09:55:09 GMT</pubDate>
            <atom:updated>2025-10-15T09:55:12.781Z</atom:updated>
            <content:encoded><![CDATA[<h3>Re-Writing the Playbook — A detection-driven approach to Incident Response</h3><p>When was the last time you looked at one of your incident response playbooks?</p><p>“Playbooks” is one of those terms that gets used in a lot of different contexts within cybersecurity. It’s an amorphous word that shifts and changes depending on the audience — If you’re talking to an engineer, they might think of a SOAR automation. If you talk to a CISO, security manager or cyber insurer, you might think of a 180-page monolithic document you paid a very expensive consultant for. If you’re a SOC analyst, it could be literally any one (or combination) of those things.</p><p>One of the key factors when designing a detection is the expected triage response an analyst should have if they need to investigate an alert. Before a detection gets moved to production, we as the detection engineers (in this hypothetical scenario) should be giving the analyst some guidance as to what they should look for. This is to orient your analysts and give them direction, straight from the engineer who designed and published it.</p><p>I work in a big SOC, and so I’m constantly paying attention to how analysts are reacting and responding to the detections we publish for them. Recently, I’ve been dipping my toes into the world of <em>Incident Response</em> by way of designing <em>“Playbooks”</em> an analyst can follow from detection to containment. This is a <strong>managed</strong> SOC environment, so there’s an additional customer dynamic that exists beyond the analyst that needs to be taken into consideration when we build a detection and a set of response actions. There’s more communication channels, more approvals, more sign-offs needed by tech and non-tech folk alike to authorise an analyst (human or agentic) to do anything. This is where my involvement in designing and implementing incident response playbooks began, and where I felt we could take advantage of the term “playbook” and its amorphous definitions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*TjB-TOvgtYcnJoOiScRTqg.png" /></figure><p>This tweet by <strong>solst/ICE</strong> highlights a pattern of behaviour I’ve seen play out many times before in enterprise cybersecurity. <em>Company A</em> has paid for playbook development by a four-letter acronym consultancy. The compliance people are happy, the leadership team feel assured, and the technical teams are left with a monolithic document (or multiple) that act as the <strong>official incident response plan.</strong> All good, right?</p><p>These plans are then swiftly forgotten about and never seen by another human until the next cyber audit occurs (or until they’re ejected from the building the second a real incident occurs, assuming anyone remembers they still exist). Clearly, there is a need for businesses to have defined incident response playbooks. They should be tabletopped and tested. But, they need to be <em>actionable</em> to really stick — and the majority I’ve seen flat out are just not.</p><p>I want to highlight an approach to doing incident response playbooks that I believe can be solved by applying a Detection Engineering lens to the problem — a structure (if you can call it that) that could spark some inspiration for your own detection engineering and incident response teams.</p><h3>The Approach</h3><p>I’d like to introduce to you what I have begun calling “The Incident Response Defense Diamond™️” (Patent pending).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KF_MGk9xY-Jf7ahZ7a-WgA.png" /><figcaption>I am not an artist.</figcaption></figure><p>The diamond is comprised of 4 major layers — The Compliance layer, High Level Procedures, Detection Response Plans, and Detailed Response Steps (or as some call them, <strong>Runbooks)</strong>. These sections are divided evenly based on whether they serve primarily <strong>technical</strong> or <strong>non-technical</strong> audiences. The non-technical audience here would be your C-suite, SOC management team, and policy writers. The technical audience would be engineers, analysts, and incident responders.</p><blockquote><em>These technical layers could also be interpreted as </em><strong><em>human</em></strong><em> and </em><strong><em>non-human</em></strong><em> layers. A human may write the detection response plans, but an agentic AI or SOAR automation could carry out the detailed response steps and report the results to a human analyst.</em></blockquote><h3>The Compliance Layer</h3><p>This layer is optional and exists for the organisations that have a large monolithic document that describes the organisation’s response to cyber incidents holistically. In my experience, these documents tend to be extraordinarily large and focused entirely on satisfying compliance requirements, instead of providing any kind of actual technical guidance. These documents may reference the existence of other non-technical <em>playbooks</em>, or collate them all inside one large document. I find that these playbooks typically get referred to with terms such as:</p><ul><li>High level procedures</li><li>Standard Operating Procedures</li><li>Operations Plans</li></ul><p>If you have any kind of control over what these documents look like, I highly recommend slicing the content out into their own scenario-based (and Defense-Diamond™️approved) “High Level Procedures” (e.g. Phishing, Account Takeover, someone used our cloud for cryptomining, etc). This allows for much greater agility when designing policy and procedure and will lessen the overall documentation-drift and change management needed to keep these policies up to date. Once you’ve done this, this document should be no longer than 10–20 pages, max.</p><h3>High Level Procedures</h3><p>This layer represents probably what most organisations would refer to as their <em>playbooks</em>. These are sets of procedures based around specific scenarios that dictate how a business will respond to that kind of threat. These kinds of scenarios, like the compliance layer above, tend to fall into broad categories such as ‘Phishing’ and ‘Ransomware’. In the diamond, these documents are a high-level set of procedures that gets signed off by management, acting as your written contract allowing you to take remedial actions in case of an incident.</p><p>Your phishing playbook, for example, should dictate that we are <em>allowed to disable user accounts, executive or standard user, under any circumstance, at any time, in XYZ systems, for any qualified incident</em>.</p><p>Every individual alert or detection can usually be categorised into one (or more) of these high level procedures. This is because, depending on the severity of an incident, a detection, or series of detections, could require the invocation of multiple procedures to contain and remediate.</p><h3>Detection Response Plans</h3><p>Response plans are where the rubber hits the road and Detection Engineering fully crosses over into Incident Response territory. This is where the detection engineer puts into writing the steps an analyst should take to properly triage and analyse the alert. These response plans should live in a centralised wiki alongside all the other detection metadata, but it can also be bedded into the incident itself as tasks (Splunk ES, Microsoft Sentinel, etc. all support this kind of functionality). Depending on the detection and skill of the engineer writing it, these may be high-level, or incredibly specific:</p><blockquote><em>1. Review the IP addresses ASN and run XYZ query to determine if legitimate.<br>2. Check the user’s history in Entity Behaviour Analytics to determine if other suspicious activity occurred around the alert triggering.<br>3. Revoke the user session (hyperlink to runbook/detailed response steps)</em></blockquote><blockquote>… so on and so forth.</blockquote><p>Depending on the maturity of your SOC, this is a prime section for an analyst to review <em>prior</em> to a detection rule being deployed. After all, SOC analysts are the ones who will be dealing with the detection should it fire, and they (should) know best. By putting these into a wiki, you also gain the benefit of having SOC analysts be able to review and update these sections with additional investigation steps and queries based on learned experience, further enhancing the SOC’s analysis capability. The above example can also highlight use-cases where you can <em>automate</em> repetitive tasks. By being forced to write a response plan for new detections, you’re constantly forced to ask yourself if an action can be automated.</p><h3>Detailed Response Steps (Or, Runbooks)</h3><p>A detailed response step (or runbook) are the micro-detail, technology and client-specific steps required for an analyst to go and carry out an action. It could be osmething as simple as “how to login to a firewall and validate a configuration”, all the way to a collection of common response actions for a particular environment. An example of how simple a single runbook can be is:</p><blockquote>1. Connect to XYZ jumpbox with your XYZ account.<br>2. Login to the customer’s firewall (with a hyperlink)<br>3. Click “Firewall Rules -&gt; Add new rule”<br>4. Fill in the malicious IP address <br>5. Click apply.</blockquote><p>Or you can have a generic collection of runbooks for each client. You may have 10 customers all using Microsoft Defender, but each have their own <em>Playbooks </em>with unique idiosyncracies or rules of engagement. Your detailed response step could say “If the detection appears to be legitimate, initiate the customer’s phishing playbook”, which would then link off to that customer’s set of runbooks for revoking access to a user account.</p><p>This is the real technical nitty-gritty, and as a Detection Engineer, the expectation should be for the platform engineer or Service Delivery function to negotiate these processes separately. Your detection and accompanying response plan should be *generic* and be able to hook into each customer seamlessly, regardless of their individual runbooks.</p><h3>Wrapping Up</h3><p>Detection Engineering is more than a framework for building and deploying detection rules — it’s the fusion center between CTI, Incident Response, SOC analysis, and the defensive goals of the business you’re defending. By enhancing your detection rules with response plans, you can bridge the gap between technical and non-technical teams, creating cohesive, <em>actually useful</em> incident response playbooks that are more than just expensive wastes of paper and laminate.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5269e2eb33ca" width="1" height="1" alt=""><hr><p><a href="https://detect.fyi/re-writing-the-playbook-a-detection-driven-approach-to-incident-response-5269e2eb33ca">Re-Writing the Playbook — A detection-driven approach to Incident Response</a> was originally published in <a href="https://detect.fyi/">Detect FYI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Do you know your Detection Surface?]]></title>
            <link>https://detect.fyi/do-you-know-your-detection-surface-8981289b0d25?source=rss-f71d5147d0f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/8981289b0d25</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[documentation]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <dc:creator><![CDATA[Rcegan]]></dc:creator>
            <pubDate>Mon, 02 Jun 2025 09:00:47 GMT</pubDate>
            <atom:updated>2025-06-02T09:00:47.147Z</atom:updated>
            <content:encoded><![CDATA[<p>Attackers think in graphs, defenders think in… Confluence pages?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*JvX8hJam8kxKhN0nakUtEA.png" /></figure><p>The most common question you’ll be asked by security managers and C-suites as a SIEM or Detection Engineer is guaranteed to be something along the lines of “Can we detect X? How about Y?”. If your answer is anything along the lines of “I’m not sure” or “Maybe?”, we need to talk about Detection Surface.</p><p>Detection surface as a concept is fundamentally intertwined with the <em>attack surface</em> of an organisation. These terms are linked in the sense that they both refer to the <em>possibility</em> that an attack could occur, or the <em>possibility</em> for an organisation to detect something has happened, not that it has or will. Attack surfaces and detection surfaces both live in the theoretical — until they don’t.</p><p>Understanding your Detection Surface follows a similar thinking model to understanding an organisation’s Attack Surface. To know if we can detect a technique, we must first know that the asset exists. And to truly understand the Detection Surface, we must go a step further and understand the <em>data</em> our assets give us. As detection engineers, we need to consider our assets and the data connectors we use to pull the data into our SIEM for analysis.</p><h3>Surprise, this post is about documentation</h3><p>I recently gave a talk at CrikeyCon 2025 on the issues facing SecOps teams when they try to implement Detection Engineering practices in their own environments. The most common question people asked me afterwards was predominantly “How do I know what kind of detections I should be making?” or, to narrow it down some more, how to <em>quantify</em> gaps and close them before a new threat report hits the CISO’s desk.</p><p>In my experience, this ability is dependent on how well we understand our detection surface. And to do that, we need to establish a source of truth.</p><h3>Document all the things</h3><p>Often overlooked and much more often maligned, documentation does not have to be an exercise in speed-running how quickly you can make yourself fall asleep at your desk. Working with customers in an MSSP capacity, time and time again I run into situations where teams are operating entirely out of monolithic “as-built” documents when they need to find information. Even worse, sometimes these documents are out of date by months (or even years), and subject to lengthy approval processes when changes are needed. <strong>This is not ideal.</strong></p><p>SOC operations lends itself well to agile ways of working, and I strongly recommend establishing a source of truth for your team that can be frequently edited and collaborated on. Tools like Confluence, Notion and even options like Docuwiki or a collection of markdown files can go a long way.<br> (I really like TrustedSec’s approach to using Obsidian, detailed in their legendary blog post <a href="https://trustedsec.com/blog/obsidian-taming-a-collective-consciousness">Obsidian, Taming a Collective Unconscious.</a>)</p><h3>The Approach</h3><p>If you’re starting from nothing or you have a collection of pages hanging around, it’s always a good idea to revert back to basics. I recommend going into your SIEM, and dumping a list of all the sourcetypes or tables that have events actively going into them. You can start from the most used data sources and work your way down, if you prefer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*eotoFN2ZXguJNlCxBSQb2Q.png" /><figcaption>Extract from the Microsoft-provided ‘Sentinel Workspace Usage report’.</figcaption></figure><p>There will be an element of platform knowledge required here in knowing what tables/data you should document versus the ones you don’t. Some SIEMs like Splunk have an extra dimension of complexity in this regard when it comes to using apps — in these cases, you may wish to capture a list of apps and then document the sourcetypes that come from them, rather than vice versa. The key point is you need to start to <em>untangle</em> the environment, data source by data source.</p><p>When you’re thinking about how to write out your documentation, ask yourself this hypothetical question: “If this data source breaks at 3am, would I have enough information to fix it?”. By grounding yourself with this question, immediately we understand that the page should be concise, but packed with actionable information.</p><p>Each page should capture:</p><ul><li>Ingestion method (Syslog? API? Event hub? Tailing a file?) — Can also include an app if you’re on Splunk.</li><li>Relevant log collectors and forwarding infrastructure</li><li>An overview of what the data source is</li><li>Context as to why it’s important</li><li>An explanation of the different categories of logs going in. Oftentimes, sourcetypes and tables will have multiple categories of logs coming in at the same time — think of fields like DeviceProduct or EventVendor in a CEF feed. You may find that multiple pages are required.</li><li>A screenshot of the average ingestion volume. This comes in really useful if you’re ever looking for troubleshooting.</li><li>A date tracking the last time the page was reviewed.</li></ul><p>If you go through this process, you should find that you have a comprehensive library of log sources, including the what, how and why behind almost everything going into your SIEM. This is already a fantastic improvement, but how can we translate this into an understanding of our detection surface?</p><h3>Turning your documentation into action</h3><p>In 2023, David Bianco (of Detection Engineering ‘<a href="https://www.sans.org/tools/the-pyramid-of-pain/">Pyramid of Pain</a>’ fame, now working at Splunk) <a href="https://www.splunk.com/en_us/blog/security/peak-threat-hunting-framework.html">introduced us all to the PEAK framework</a>, a new methodology for conducting threat hunts championed by Splunk. PEAK (which stands for <strong>Pr</strong>epare, <strong>E</strong>xecute, and <strong>Ac</strong>t with <strong>K</strong>nowledge — a <em>topical theme</em>) is a wonderful framework for understanding and implementing threat hunts, but the piece that we’re really interested in is a <em>type</em> of hunt David refers to as a <strong>Baseline Hunt.</strong></p><p><a href="https://www.splunk.com/en_us/blog/security/peak-baseline-hunting.html">Baseline Hunting with PEAK</a> acts as an introduction to a new dataset. Baseline threat hunting posits that when we introduce a new set of logs or data into our SIEM, the very first thing we should do is baseline the data — take an opportunity to sit down and really study the data we have available to us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J_j1kIzQhSn1Ju3e1QxOwA.png" /><figcaption>The PEAK baseline hunting process — <a href="https://www.splunk.com/en_us/blog/security/peak-baseline-hunting.html">https://www.splunk.com/en_us/blog/security/peak-baseline-hunting.html</a></figcaption></figure><p>I won’t rehash the entire content of the article, but I really highly recommend taking a moment to read through it and begin these kinds of hunts over your datasets. Understanding everyone has busy lives, especially under-resourced SecOps teams, this process may take a <strong>while</strong>. If you can carve out time in-between responding to tickets and meetings to conduct these hunts, you’ll find that over time, your team’s knowledge of the organisation’s detection surface has improved. Once you get into the cycle of reviewing, writing documentation, and then constantly conducting hunts over that data, the documentation complexity will compound and become incredibly in-depth over a long timeframe.</p><h3>The Next Level</h3><p>For teams that are already mature and are looking for even more ways of operationalising their detection surface knowledge, the <a href="https://github.com/rabobank-cdc/DeTTECT">DeTT&amp;CT community project </a>exists. DeTT&amp;CT allows us to score the quality, consistency, availability and <em>raw coverage</em> of a data source against the MITRE ATT&amp;CK framework. Beyond just having more frameworks in the mix, plotting this kind of data has real benefits when combined with other data dimensions.</p><p>Consider a threat actor’s TTPs — we read in a report that they’re capable of DLL search-order hijacking, and we want to know if we can see it. If we cross-reference against the [EDR Telemetry project](<a href="https://www.edr-telemetry.com/">EDR Telemetry Project — Home</a>), we can see that our EDR is capable of showing us those logs. We can now score that technique as being covered, and overlay those TTPs over our DeTT&amp;CT graph and confirm we do in fact have logs to detect that procedure. Updating and maintaining DeTT&amp;CT does come with some overhead but provides unparalleled levels of understanding when it comes to directly mapping MITRE TTPs to the data we have available.</p><h3>Wrapping Up</h3><p>I hope this post has provided some inspiration you can take back to your own team and start implementing. If you feel overwhelmed, that’s ok, it’s a big job — but you don’t have to do it all at once. All I ask is that you start to pull the thread on your logs — one sourcetype, one table, one app at a time — in six months, you’ll know a lot more than you did now. And in 12, 18, 24 months — you’ll have a full, working understanding of your detection surface. Only then can you confidently respond to the C-suite and say:</p><p><em>“Yes, we have the logs for that.”</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8981289b0d25" width="1" height="1" alt=""><hr><p><a href="https://detect.fyi/do-you-know-your-detection-surface-8981289b0d25">Do you know your Detection Surface?</a> was originally published in <a href="https://detect.fyi/">Detect FYI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[If you’ve ever worked within security engineering or as an analyst producing any kind of output in…]]></title>
            <link>https://detect.fyi/if-youve-ever-worked-within-security-engineering-or-as-an-analyst-producing-any-kind-of-output-in-746b48cb9c8d?source=rss-f71d5147d0f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/746b48cb9c8d</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[itsm]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <dc:creator><![CDATA[Rcegan]]></dc:creator>
            <pubDate>Sun, 29 Dec 2024 11:31:47 GMT</pubDate>
            <atom:updated>2024-12-29T11:31:47.188Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Qualifying Stakeholder Requirements for Detection Development</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*20deMU98iztEDTRuooVlXg.png" /></figure><p>If you’ve ever worked within security engineering or as an analyst producing any kind of output in a business before, you will certainly have dealt with <strong>stakeholder requirements</strong>.</p><p>These requirements might come from a customer, your boss, a coworker, executives, or practically anyone else.</p><p>You would also therefore know that stakeholder requirements come in many different shapes and sizes — sometimes hyper-specific and solvable within an hour or two, or even minutes, if the requirement is well-defined.</p><p>But all too often, requirements are given under-baked or without much detail (<em>“Can you please generate a report on the state of our cybersecurity by the end of this week”</em>, anyone?). To address these challenges, we need to start at the very beginning: refining inputs and managing our backlog effectively.</p><p>For the purposes of this post, we’ll be focusing on the very beginning of a detection development pipeline — the <strong>use case intake process, or, inputs</strong> and the priority review, which I’ll refer to as <strong>true priority</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*omYGU6-86pCBOKMOZzT2bA.png" /><figcaption>Alex Teixeira, <a href="https://detect.fyi/from-intelligence-to-detection-a-workflow-for-integrating-cti-ir-hunting-red-teams-6c16c48538ab">https://detect.fyi/from-intelligence-to-detection-a-workflow-for-integrating-cti-ir-hunting-red-teams-6c16c48538ab</a></figcaption></figure><p>It’s worth noting as well that software development priority frameworks are a subject of study in and of themselves, with large crossovers into intelligence requirements frameworks.</p><p>This post is intended only as a starting point rather than an in-depth method of aligning against a particular set of frameworks, though they should be considered depending on the context of your organisation.</p><h3>Boiling the Ocean</h3><p>In a detection engineering environment, refining stakeholder requirements to their purest, most atomic form can be achieved by implementing barriers a requester must pass-through before the requirement ends up on your desk.</p><p>In your ITSM or form-filling product of choice, these barriers can be enforced via a stakeholder-facing form they need to fill out in order to generate a <strong>ticket</strong> in your DevOps system.</p><p>This will force the user raising the request to think more heavily about exactly what it is they’re asking of you and your team.</p><p>You will find in some situations that requests that would’ve otherwise been emailed or slacked to you may not have been sent at all had the user been forced to clearly articulate what it is they want you to build a detection for.</p><h4>Avoid Side-Channels</h4><p>On that topic, It’s absolutely critical that you <em>avoid</em> encouraging requesters to send your team their requirements via email or slack messages, as this can quickly lead to false expectations and frustration on both sides when work isn’t done quickly.</p><p>Users should <strong>always</strong> be redirected to your form or customer service portal to ensure uniformity and proper development scheduling. It’s ITSM 101, but it holds true for detection development and bears repeating.</p><h3>Building the form</h3><p>What kind of information <em>should</em> we be expecting of our requesters, then? We need to ensure that we account for a wide array of potential stakeholders and thus avoid asking for highly technical information up front. Consider the broad groups of users in your business that may be raising requests to Detection Engineering. For example:</p><ul><li>Account/Service Delivery Managers (for MSSPs with multiple customer SIEMs)</li><li>Internal Cyber team — SOC analysts, penetration testers, consultants and third-parties</li><li>Cyber Threat Intel — Via a vendor or internal CTI analyst</li><li>Executive leadership (It is worth noting that these requests are often filtered through via managers, and thus won’t be raised directly by an executive themselves. Understanding this is covered below in the ‘Sources and References’ section)</li></ul><p>An executive will raise a request from a very different perspective than that of a SOC analyst and vice versa.</p><p>You need to account for the possibility of the request being something as simple as “Do we have coverage over the things I read in this news report?”, or as complex as a CTI briefing pertaining to a specific intrusion set or threat actor.</p><p>The form you’ll use then to gather these requirements is highly subjective, but you can start by musing on these requirements in order to generate a request.</p><h4>Stakeholder Requirement</h4><p>This one might seem obvious, but it’s worth asking the user raising the detection request what it actually is they want you to detect. Is it a TTP from a report they read? Do they want to make sure you have a particular IOC ingested in the SIEM/TIP? Do they wish to validate coverage against a particular group, and therefore receive a report?</p><p>It is very important to get this answer from the stakeholder <strong>first</strong> as it will quickly tell you whether you have a detection on your hands or whether the request needs to be redirected to another team.</p><h4>Subjective Priority</h4><p>We’re referring to this as the ‘subjective priority’ because it’s how important the request is to the <em>stakeholder</em> but not necessarily to the detection engineering team. Is this an urgent request that needs to be done by the end of the day, or end of the week? Is it a critical gap from a penetration test or something they read about?</p><p>The subjective priority is important to understand as it provides us a key insight we’ll need later to figure out the <strong>true priority</strong> of the request, which is the priority given to the detection when the request is ready for development. By asking the requester what the priority is, we are gauging how quickly they wish for some kind of outcome.</p><h4>Sources and References</h4><p>The source of the request, as given by the stakeholder. This context helps the detection engineers understand and weigh the true priority by letting us know where the information came from.</p><p>For example, a critical finding in a penetration test that went undetected or request for information by executive leadership, versus a blog post somebody read on LinkedIn.</p><p>How you determine which one to prioritise first is up to your team and organisation’s goals, but broadly speaking, you can assume which one of these requests may be more urgent.</p><h3>Qualifying the Requirement — Concocting the ‘True Priority’</h3><p>Now that the request has been generated, how do we qualify these requirements and graduate them into real, actionable engineering requirements?</p><p>Re-iterating the disclaimer from above about aligning against priority and intelligence frameworks, you can consider the below aspects when creating your own workflow.</p><h4>Sanity Check</h4><p>Is there enough information here? Does the requirement make sense for detection engineering? Would the request be better served by another team? <a href="https://detect.fyi/the-dotted-lines-between-threat-hunting-and-detection-engineering-94fa0f7f62ce">Might this serve better as a threat hunt hypothesis</a>, rather than a repeatable and testable detection? Perhaps the requirement could be better handled as a SOC playbook. Ask yourself these fundamental questions first before proceeding, and don’t hesitate to come back to the requester with a request for more info if there isn’t enough. It’s important that the sanity check weeds these gaps in info out early to prevent friction later on.</p><h4>Viability</h4><p>Do we have the data available to us to reproduce the TTPs from the requirement? Can we produce the report or dashboard being requested? If not, is the detection requirement still good? If it is, and the true priority is high, engage with your SIEM engineers to understand whether the data can be onboarded and the potential cost implications of doing so (breaking down departmental silos!).</p><h4>Relevancy</h4><p>Employing aspects of Cyber Threat Intelligence, it’s important to gauge the relevancy of the detection being raised. For example, a request for a detection against Russian AI 0-days probably are not worth dwelling upon for very long. You can also use threat-modelling frameworks like MITRE ATT&amp;CK to understand whether the TTPS behind the request are already covered, or whether mitigations and detections in-place <em>earlier</em> in the killchain could sufficiently detect or even prevent the behaviour.</p><h3>Arriving at True Priority</h3><p>At this point, you should have enough information to arrive at the true priority of a detection requirement. You should be able to answer all the below questions</p><ul><li>How quickly do we need to develop this detection in context of all the other work currently going on? Does this work need to take priority over something else being worked upon, or can it wait?</li><li>How complex is the detection going to be? Will it require significant time to test and develop, or will it only take a few hours? Particularly important if timesheets and billable work is a KPI.</li><li>Is the data we have consistent enough to detect the activity if we did create the detection?</li><li>And if you’re in an MSSP, can the detection realistically be deployed to multiple environments or even multiple SIEMs?</li></ul><p>This will allow you to accurately set the priority of the detection in your backlog and schedule it in for development.</p><p>Hopefully this can help others understand how to better prioritise detection development work! Working in an MSSP, it has taken oddly a long time to fully wrap my head around this work, particularly when it comes to many customers across many SIEMs. If you wish to discuss further with me, leave a comment or feel free to DM me on Twitter at @rcegann or chat via LinkedIn. If anyone has any experience building something similar or particularly aligning against Intelligence priority frameworks, I’d love to hear from you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=746b48cb9c8d" width="1" height="1" alt=""><hr><p><a href="https://detect.fyi/if-youve-ever-worked-within-security-engineering-or-as-an-analyst-producing-any-kind-of-output-in-746b48cb9c8d">If you’ve ever worked within security engineering or as an analyst producing any kind of output in…</a> was originally published in <a href="https://detect.fyi/">Detect FYI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Zero to Expert level Detection Engineering with Elastic’s Maturity Model]]></title>
            <link>https://detect.fyi/from-zero-to-expert-level-detection-engineering-with-elastics-maturity-model-bc230107741e?source=rss-f71d5147d0f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc230107741e</guid>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[elastic]]></category>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <dc:creator><![CDATA[Rcegan]]></dc:creator>
            <pubDate>Sat, 05 Oct 2024 06:51:52 GMT</pubDate>
            <atom:updated>2024-10-05T06:51:52.738Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the biggest hurdles for a burgeoning detection engineer is convincing your business that you <em>need</em> detection engineering.</p><p>Whether you’re part of an MSSP or an internal SOC, the need for a professional and structured detection engineering program increases exponentially as you onboard more customers or integrate more systems into your SOC tooling.</p><p>Alert fatigue from floods of false positives and poorly documented alerts are the silent killers of a SOC team and detection engineering seems like the obvious answer.</p><p>But how do we convince the business? By what metrics can we measure our own success and justify our role? This is where Elastic’s <strong>Detection Engineering Behavior Maturity Model</strong> (or, DEBMM) comes into play.</p><h3>Getting Aligned</h3><p>In order to run a successful detection engineering program, you need a set of metrics with which you can measure success.</p><p>Without any key indicators, the business has no idea if the team is functioning, and critically, if they’re receiving any return on investment.</p><p>By aligning your efforts with a framework your team will have a means with which to measure and track success, whilst simultaneously offering the opportunity of strengthening alignment to existing established frameworks like NIST and ISO 27001 (both of which have sections specifically relating to <em>detection</em> and <em>response</em>).</p><p>In early September 2024, Elastic published the first release of what they call the <a href="https://www.elastic.co/security-labs/elastic-releases-debmm">DEBMM: Detection Engineering Behavior Maturity Model.</a></p><p>What Elastic have done here is all the hard work for us by laying out a tiered and continuous maturity model that you can directly measure your detection engineering program against.</p><p>This is done via tiers, each of which supported by prescriptive <em>quantitative</em> and <em>qualitative</em> measures that serve as practical indicators that you’re heading in the right direction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*ryrEllOrsTGskuL74vaz8g.png" /><figcaption>Image courtesy of Elastic: <a href="https://www.elastic.co/security-labs/elastic-releases-debmm">https://www.elastic.co/security-labs/elastic-releases-debmm</a></figcaption></figure><h3>Diving into the DEBMM</h3><p>The DEBMM at a high level offers a flexible, non-linear tiered approach to maturity scaling from tier 0 through to tier 5.</p><p>Below is a summary of each tier and the general gist, but you should make a point to read the full definitions in the Elastic blogpost <a href="https://www.elastic.co/security-labs/elastic-releases-debmm">here</a>. They go into far more depth than I am capable of putting here.</p><ul><li><strong>Tier 0</strong> represents the beginning state in which there is little to no formalised detection engineering process of any kind. <br>There’s no documentation, rules are deployed without planning or stakeholder consultation, and things are generally considered to be <em>cowboy.</em> Most SOCs will look like tier 0.</li><li><strong>Tier 1</strong> is the next level up and focuses primarily on establishing a defined ruleset. A defined ruleset should, at this maturity, be fully documented, have 5–10 rules per data source, and cover a good chunk of MITRE ATT&amp;CK techniques for each of those data sources. <br>It’s also around about this point that version control is introduced and detections are tested end-to-end before they end up in production.</li><li><strong>Tier 2</strong> focuses on gap analysis processes, and the non-stop tuning of false positives. This tier requires that not only do you have a defined and documented ruleset, but that you’re constantly reviewing the performance of each rule and any gaps (in data and in MITRE coverage). <br>A team running at tier 2 should have end to end processes for developing, testing and deploying rules, but spend the time to centrally monitor the status of their rules. Tech stack and analyst investments may need to be made to support these functions at this tier.</li><li><strong>Tier 3</strong> begins to put a heavy focus on <em>threat emulation</em> by advocating for triaging false negatives — alerts that failed to detect real (or simulated) threats. Repeated external validation by a red team becomes critical, and the results should be fed into the continuous improvement and tuning lifecycle of the ruleset. <br>Detection engineers should be looking closely at the threat landscape and leveraging <em>threat intelligence</em> to inform detection development efforts.</li><li><strong>Tier 4</strong>, the final level, enters the realm of automated remediation, automated detection deployment processes, and seamless integration across tools and platforms. To reach tier 4, the detection engineering program needs to be regularly engaging threat hunters and CTI analysts as part of day to day operations (it is named the <strong>‘Expert’</strong> tier for a reason).</li></ul><p>The best part about the DEBMM is that this isn’t a linear progression. Depending on your organisation and limitations (be it technical, personnel, or otherwise), you can pick and choose aspects of different tiers depending on the capabilities available to you.</p><p>For example, your team might lack the personnel to complete regular threat hunts or lack the budget for investing in advanced automation tooling. These constraints won’t stop you from reaching tier 2 levels of consistent tuning and rule documentation.</p><p>You can pick and choose the goals that best suit your organisation’s requirements and build out the other capabilities over time. By utilising the guidelines for stakeholder communication, you now have a method not just for building a successful detection engineering team, but for communicating your successes to the business.</p><p>As detection engineering continues to grow, so do the supporting frameworks and tools around it. Elastic have done a fantastic job establishing a guided methodology, something that, until recently, felt very underbaked in the community. I have no doubt that as adoption continues to increase, so will the ability to establish maturity quicker, and more cheaply.</p><p><em>Disclaimer: I have no relation or ties to Elastic — I just think their work is really cool.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc230107741e" width="1" height="1" alt=""><hr><p><a href="https://detect.fyi/from-zero-to-expert-level-detection-engineering-with-elastics-maturity-model-bc230107741e">From Zero to Expert level Detection Engineering with Elastic’s Maturity Model</a> was originally published in <a href="https://detect.fyi/">Detect FYI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Structure and Taxonomy of a Detection Knowledge Base]]></title>
            <link>https://detect.fyi/the-structure-and-taxonomy-of-a-detection-knowledge-base-abe415a1ee81?source=rss-f71d5147d0f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/abe415a1ee81</guid>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[documentation]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[blue-team]]></category>
            <dc:creator><![CDATA[Rcegan]]></dc:creator>
            <pubDate>Thu, 09 May 2024 09:53:34 GMT</pubDate>
            <atom:updated>2024-05-09T09:53:34.199Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the most critical aspects of a detection engineering program is the documentation. <strong>Without documentation, your SOC is flying blind</strong>, and are likely to triage the alert inefficiently by spending time looking at the wrong data, or at worst, misinterpreting the detection altogether and making incorrect conclusions in their triage.</p><p>It’s our job as the detection engineers to <strong>ensure that each detection is thoroughly documented</strong> and classified to support the analysts, as well as aide us in answering questions from the business with confidence when it comes to coverage.</p><p>In this article I’ll discuss picking a knowledge base platform, or, if that’s not an option, hopefully provide some ideas as to how you can adapt your own platform to suit the task.</p><p>I’ll then dive into the structure of the individual knowledge base articles themselves, and provide tips about the metadata you should use and how they can help you, followed by the kinds of things you should be writing for each detection.</p><h3>Establishing your Knowledge Base</h3><p>If you have the luxury of picking a knowledge base platform for your detection engineering program, then consider yourself lucky! Many do not have a choice, having to shape their articles around the monolithic platform their organization has already chosen.</p><p>For that reason, I’m going to talk in general terms as much as possible to accommodate the most amount of platforms, and you can adapt the layout and configuration of your articles to match the capabilities of your platform accordingly.</p><p>Your platform at a minimum should support kind of labeling or tagging. This will allow you to assign a label to an article and then use a filter or search to find articles that share that label. This feature is included in almost every platform I’ve encountered, and will be the mechanism for how we classify and organise our detections. If you’re using Confluence, this is how you’re going to have to do it until Confluence databases comes out!</p><p>If you get to pick a platform, I’d highly recommend <a href="https://www.notion.so/">Notion</a>.</p><p>Notion is a note-taking app that uses databases and filtered views as the primary method of organising data.</p><p>We will be able to create just about any kind of metadata we want, and be able to filter it however want as well. Notion also supports best in class enterprise support with features like SSO and real time collaboration, making it highly scalable to large teams.</p><p>I’ll be using the free version of Notion in my personal instance for the upcoming examples.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*UEw27SK9vOwbKsCN2ZsgAA.jpeg" /></figure><p><strong>Note:</strong> when picking a platform, you should pick something that includes integrations with your ticketing system of choice as well as your codebase. Many platforms support at least Github and Jira.</p><p>I’ll be approaching the rest of this article from a Confluence/Notion perspective, but if you are using a platform that supports any of these kinds of features, you shouldn’t have any issues setting up something similar.</p><p>You only might start to run into issues when building complicated filtered views later on down the track.</p><h3>A Single Source of Truth</h3><p>At the outset, it’s important to talk to your team and establish the knowledge base as the single source of truth.</p><p>Documentation <em>must</em> be centralised as much as possible, because when things start to leak into other platforms or formats, content becomes unfindable and unmanageable.</p><p>When that happens, your SOC will struggle to trust the content in your knowledge base. It is imperative that everyone stays on the same page and knows where to look.</p><h3>Creating a Metadata Schema</h3><p>When writing articles for your detections, knowing what metadata you want to use is key. I’ll provide some examples, but before that, think about the use-cases you might encounter as a detection engineer.</p><p>For example, what if you want to see all your detections under the ‘Exfiltration’ MITRE tactic? What if you want to narrow that down to detections that apply to Sharepoint? Or GCP? Or both? What if you want to filter those detections to a specific platform, like Splunk? Or detections that are already deployed or in development?</p><p>These are the kinds of questions you need to ask yourself when establishing a metadata structure for your articles.</p><p>Typically, detections tend to all have the same required metadata elements across any platform or use-case. We can say with relative certainty that at a minimum you should include:</p><ul><li>The title of the detection</li><li>The criticality/severity of the detection (The severity that dictates the SLA with which your SOC should respond and triage the detection)</li><li>MITRE Mapping, to at least the Tactic and Technique level</li><li>Creation date</li><li>Last updated date<br>These will give you a solid base to work upon for more basic SOC environments, or environments where you’re not supporting many platforms. This is ideal for small, internal SIEM environments.</li></ul><p>For more advanced SOCs, or SOCs where you’re looking at a breadth of customers and platforms, you might also want to consider having fields for:</p><ul><li>The platform(s) the detection applies to</li><li>The customers who have this detection</li><li>The data source the detection applies to (More on this later — does your KB platform support backlinking etc. etc.)</li><li>A link to the relevant ticket from your Detection Engineering workflow</li></ul><p>With all of these fields, you should be armed with the metadata you need to not only accurately filter your detections, but also get holistic insights into your coverage from multiple perspectives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*XYyGbUJpmELCX4dVhGkBEg.png" /><figcaption>An example of how this might look in a platform like Notion.</figcaption></figure><h3>Writing up Detections</h3><p>This is another section where a lot of it is going to come down to you and your team’s personal preferences. You might prefer something more simplistic, maybe something more detailed, or even opt for a detection-as-code approach where you define everything in YAML. But, nonetheless, there are a few core sections that I feel are necessary for a useful detection article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*FBtafdu6TgNmJDda7Z1tUw.png" /></figure><h3>The Description</h3><p>A concise description of what it is you’re actually trying to detect is pivotal since you’re commonly writing for a couple different audiences. You’re writing primarily for your SOC analysts doing the triage, and ensuring you’re on the same page about what’s going on in the alert.</p><p>You’re also writing for the client or your internal management who might be looking at reports and escalations that come through. Ensuring everyone can understand what you’re trying to detect is an art in and of itself, but nonetheless, this field is an essential for most SIEMs and consequently your knowledge base article.</p><p>As an example, I’ll reference a detection that is available in Microsoft Sentinel’s template gallery: <em>Azure AD Role Management Permission Grant.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*RsIlMFd4LkIj9pSCQlrWpw.png" /></figure><blockquote>Identifies when the Microsoft Graph RoleManagement.ReadWrite.Directory (Delegated or Application) permission is granted to a service principal.<br>This permission allows an application to read and manage the role-based access control (RBAC) settings for your company’s directory.<br>An adversary could use this permission to add an Azure AD object to an Admin directory role and escalate privileges.</blockquote><p>This is a great description for a couple reasons:</p><ol><li>Clearly tells the reader exactly what is going on. A specific Graph permission has been granted to a Service Principal.</li><li>It lets the reader know exactly what that permission can allow that Service Principal to do, informing the analyst’s next investigation steps.</li><li>Provides an example of how an adversary may use it in the context of a wider compromise.</li><li>The author of this detection also originally includes URLs linking to further documentation. I’ve trimmed them for the sake of readability, but this can be a good strategy if you have other pages that can add context and background to the underlying activity.</li></ol><p>In most cases, I recommend you keep the same description between your knowledge base article and the built-in description in your SIEM alert. This keeps thing the same and will lessen any potential confusion.</p><h3>False Positives &amp; Blindspots</h3><p>One thing that every detection engineer needs to be cognisant of when deploying alerts into production environments is the potential for <em>False Positives</em>.</p><p>These should be quantified and forecasted as much as possible during the development phase, and the results of that should be written up here. You’ll want analysts to be able to refer to this section during triage to clarify what could be potentially going on in the environment to trigger a false positive.</p><p>By including ‘Blindspots’, you can also elaborate on the gaps your detection might have. You might have a very deliberate scope, or are targeting a very specific sub-technique in MITRE, and this is something you might wish to inform the analysts of.</p><h3>Remediation (Containment, Eradication, etc. etc.)</h3><p>Remediation is the section where you’ll actually put rubber to the road and give the analysts some investigation steps. Just like everything else in this section, the format is going to vary wildly depending on your SOC &amp; SIEM configuration.</p><p>But at a high level, I’d look at including some combination of:</p><ul><li>A list of places an analyst can go to investigate further</li><li>It might be a particularly section in an EDR/XDR portal</li><li>Queries that can be used to drilldown further</li><li>Links to playbooks or other relevant pre-defined processes that may be relevant, e.g. if it’s an Execution-based detection, you might link off to a separate piece of documentation that shows how and when to invoke an incident response procedure for containing that endpoint.</li></ul><h3>Query</h3><p>Oftentimes it’s useful to include the query in your documentation itself. If possible, it’s best to embed the query from your codebase within the page. This way, if the query is ever changed or updated, it’ll always be up to date in the documentation too.</p><h3>Wrapping Up</h3><p>Hopefully this has given you some ideas on where to start when building out a knowledge base of your own.</p><p>When I started building systems like these, I struggled to find any solid resources, so hopefully this helps fill the gap.</p><p>If you have any questions or just want to chat, feel free to reach out to myself on <a href="https://www.linkedin.com/in/regan-carey-507544168/">LinkedIn</a> or on Twitter via <a href="https://twitter.com/rcegann">@rcegann</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abe415a1ee81" width="1" height="1" alt=""><hr><p><a href="https://detect.fyi/the-structure-and-taxonomy-of-a-detection-knowledge-base-abe415a1ee81">The Structure and Taxonomy of a Detection Knowledge Base</a> was originally published in <a href="https://detect.fyi/">Detect FYI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Recently I’ve been connecting up all my different home lab services to Discord as a central…]]></title>
            <link>https://rcegan.medium.com/recently-ive-been-connecting-up-all-my-different-home-lab-services-to-discord-as-a-central-67ab4a477d7f?source=rss-f71d5147d0f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/67ab4a477d7f</guid>
            <category><![CDATA[azure-sentinel]]></category>
            <category><![CDATA[microsoft-sentinel]]></category>
            <category><![CDATA[microsoft-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[siem]]></category>
            <dc:creator><![CDATA[Rcegan]]></dc:creator>
            <pubDate>Sat, 02 Mar 2024 07:19:29 GMT</pubDate>
            <atom:updated>2024-03-02T07:19:29.479Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Sending Pretty Sentinel Alerts to Discord with Webhooks</strong></h3><p>Recently I’ve been connecting up all my different home lab services to Discord as a central notification hub using the easy Webhook integrations provided when you create a new server. I wanted to start connecting my Sentinel lab alerts to this Discord, and so I created a logic app to do this.</p><p>First, you’ll need to create a Discord server and create an integration. You can find out [how to do that here.](<a href="https://www.svix.com/resources/guides/how-to-make-webhook-discord/">https://www.svix.com/resources/guides/how-to-make-webhook-discord/</a></p><p>Shoutout to <a href="https://gist.github.com/Birdie0/78ee79402a4301b1faf412ab5f1cdcf9">this article</a> for the inspiration and from which I derived most of the format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*dZAnhhiXkozCmIYs1Q8jLw.png" /></figure><p>The logic app is simple and creates a nice looking notification message. It has the following features:</p><ul><li>Dynamic colouring based on incident severity</li><li>Links to incident</li><li>Links to your Sentinel workspace</li></ul><p>Things I’d like to add later on:</p><ul><li>Dynamically change the link to the workspace based on alert provider (e.g. link to Defender if the alert came from Defender)</li><li>Parse entities nicely and add to the description of the notification</li><li>Shorten the URL to the Sentinel incident</li><li>Account for incidents with multiple alerts so it doesn’t multiple notifications for the same incident</li></ul><h3>Breaking down the Logic App</h3><p>You can safely skip the ‘Base Module’ from MSTAT. I just add it in as habit, it’s not currently used in my logic app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*j9rYKYPdkT1ufmDRvyF-eg.png" /></figure><p>First we set some variables:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*KOUZqHNt0KIXkdN23JACYg.png" /></figure><p>Then I convert the timezone to Brisbane:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*MUZLIadiy5F07810UGXZGQ.png" /></figure><p>Set our Variables (not pictured is the P4 step):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NN221BYLCZ1gXnq70aob6Q.png" /></figure><p>And send the POST to our Discord webhook:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*SlLdedRH9n4pvjHD-yRx7A.png" /></figure><p>You can find the HTML POST request <a href="https://github.com/rcegan/Rcegan-Sentinel-Lab/tree/main/Logic%20Apps/Discord%20Webhook%20Notifications">on Github.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67ab4a477d7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Joy of Using Excalidraw for Everything]]></title>
            <link>https://rcegan.medium.com/the-joy-of-using-excalidraw-for-everything-816283e33e5c?source=rss-f71d5147d0f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/816283e33e5c</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[notetaking]]></category>
            <category><![CDATA[brainstorming]]></category>
            <category><![CDATA[obsidian]]></category>
            <category><![CDATA[security-engineering]]></category>
            <dc:creator><![CDATA[Rcegan]]></dc:creator>
            <pubDate>Sat, 17 Feb 2024 04:12:25 GMT</pubDate>
            <atom:updated>2024-02-17T04:12:25.222Z</atom:updated>
            <content:encoded><![CDATA[<p>As a heavy Obsidian user, I’ve come to rely on for it many of my day to day tasks. As a security engineer, I’m regularly having to create diagrams for all kinds of purposes; system diagrams, process flowcharts, incident response playbooks, or architectural designs. Obsidian luckily has the perfect tool for the job: Excalidraw.</p><p>Excalidraw is a drawing plugin that integrates neatly within Obsidian and lets you freely mock-up charts and diagrams of all kinds without the burdens of grids or snapped grids. Aiming to provide a whiteboard-esque experience, Excalidraw embraces the messy and chaotic nature of brainstorming ideas and doesn’t lock you into a right and wrong way of doing things. It hands you some shapes and arrows, and lets you have at it.</p><figure><img alt="A basic diagram created in Excalidraw demonstrating a basic Command and Control (C2) architecture." src="https://cdn-images-1.medium.com/max/942/1*HcBcnqq4DcHIPBsiOY54GA.png" /><figcaption>A basic diagram created in Excalidraw.</figcaption></figure><p>If you want to use it in a standalone web application, you have that option. But as I mentioned earlier, if you’re big on Obsidian, you gain the ability to do a whole lot more. Features like linking pages within drawings, embedding images, videos and even entire web pages, unlocks a canvas, almost ‘Miro’ way of working.</p><p>I’ve field-tested Excalidraw heavily, and even shared preliminary designs/mock-ups with customers straight from it, often with a good response to the gritty, hand-written aesthetic. It’s truly one of the most versatile drawing applications I’ve ever used (better than Draw.io for whiteboarding, IMO) and I just wanted to share that.</p><p>If any of this sounds interesting to you, I highly recommend watching Zsolt’s series about Excalidraw called <a href="https://www.youtube.com/playlist?list=PL6mqgtMZ4NP3eRqCpNfipGGFNQZHlB4tv">‘Visual Thinking’</a>. Excalidraw can be installed as an Obsidian plugin straight from the app if you’d like to give it a spin.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=816283e33e5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why you shouldn’t deploy the Azure Monitor Agent on Client Devices, and the Cost of Closing…]]></title>
            <link>https://rcegan.medium.com/why-you-shouldnt-deploy-the-azure-monitor-agent-on-client-devices-and-the-cost-of-closing-06b7934eac87?source=rss-f71d5147d0f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/06b7934eac87</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[defender-for-endpoint]]></category>
            <category><![CDATA[microsoft-sentinel]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Rcegan]]></dc:creator>
            <pubDate>Wed, 07 Feb 2024 05:39:08 GMT</pubDate>
            <atom:updated>2024-02-07T05:39:08.224Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Why you shouldn’t deploy the Azure Monitor Agent on Client Devices, and the Cost of Closing Detection Gaps</strong></h3><p>In one of my blogs a very long time ago, I wrote about <a href="https://medium.com/@rcegan/file-creation-logging-in-defender-for-endpoint-is-weird-91dba3e1fd2c">some discrepancies I found in the Defender file creation events</a> in Microsoft Sentinel. At the time, I wanted to augment these file events with something more reliable like Sysmon, that would allow me to ingest high-fidelity events without any kind of filtering or event dropping by Microsoft. I turned to Olaf Hartong’s template for augmenting MDE events, which provided an opportunity to see what the experience was like for deploying the Azure Monitor Agent (AMA) to regular Windows clients. This proved to be an interesting but ultimately bad time for a number of reasons, and also ended up leading me down a somewhat philosophical path about the pros and cons of ingesting and paying for tons of data. This post is mainly about Microsoft Sentinel, but if you have a cloud SIEM that costs by the gigabyte, you might be interested.</p><p><strong>TL;DR:</strong> Use a live response script to grab Windows events off the disk when you need them, or a tool like <a href="https://docs.velociraptor.app/">Velociraptor</a> to interrogate them remotely on-demand. Don’t try ingesting this many events at scale in Sentinel unless you have infinite money (It’s probably still not worth it).</p><p><strong>TL;DR;er:</strong> Would I recommend doing this? No, It’s a massive headache. Is it useful? To someone, maybe. Is it required? Almost certainly not.</p><h3>Goodbye Log Analytics Agent!</h3><p>With the Log Analytics Agent being <a href="https://azure.microsoft.com/en-au/updates/were-retiring-the-log-analytics-agent-in-azure-monitor-on-31-august-2024/">phased out this year</a>, Microsoft wants all its customers to switch from LA/MMA/OMS to AMA (Which hasn’t confused any customer at any point, ever, I’m sure). This comes with one massive caveat; AMA is currently <a href="https://learn.microsoft.com/en-us/azure/azure-monitor/agents/agents-overview#install-the-agent-and-configure-data-collection">only supported</a> on <em>Azure</em> or <em>Azure Arc managed</em> resources. This leaves a conspicuous gap for resources that either aren’t managed in Azure, or are regular client devices. However, Microsoft do have a solution for this admittedly niche use-case.</p><h3>The Process</h3><p>What we need to do is this: we’ll need to create a new Data Collection Rule (DCR) and configure it to pick up our Sysmon events like you might a regular Azure server. Typically this involves creating the rule in the DCR wizard, assigning it to a resource, telling it what to pick, and away you go. This time though, we don’t have a resource to point it to. In fact, our AAD joined (they must be hybrid or AAD joined for this to work by the way) devices are completely absent in the wizard.</p><p>That is because we need to create a ‘Monitored Object’ as a stand-in for <em>all</em> client devices. This monitored object can ONLY be created at a tenant-level scope, and thus requires tenant-admin level <em>permissions</em> to create. Already, our first snag for major production environments — <em>change control.</em></p><p>Once we’ve successfully got that past the change board, we’ll then need to associate our data collection rule against that monitored object in order for it to reflect back to the client device. These devices also require you to actually push AMA to them via some mechanism.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3p1PlLU7x7b_WRxYLLtxdw.png" /><figcaption>The architecture of our monitored object and data collection rules, courtesy of Microsoft.</figcaption></figure><h3>Creating the Monitored Object</h3><p>As mentioned above, you do in fact need <em>tenant-admin</em> level permissions to create the monitored object. Once you’ve got these permissions, you can decide whether you want to use a PowerShell script or an API request to create the object as outlined in <a href="https://learn.microsoft.com/en-us/azure/azure-monitor/agents/azure-monitor-agent-windows-client#create-and-associate-a-monitored-object">this section</a> of the Docs.</p><h3>Caveats</h3><p>This is a niche use-case for many environments already, and Microsoft’s lack of features supporting it is reflective of that nicheness. You cannot:</p><ul><li>Change configuration options like Proxy configurations without a full reinstall of the agent</li><li>Update the agent without a full reinstall</li><li>Deploy to a non-joined device. No on-prem AD here!<br>This ultimately makes the process less than desirable from an IT SecOps point of view. You have a fleet of clients running an agent that cannot be managed directly, nor an agent that you can patch easily. You’re also sacrificing granularity as to what DCRs are applied to which device — it’s either all or none of them, thanks to the monitored object being applied at the tenant scope.</li></ul><h3>An Argument against AMA + Sysmon for Endpoints</h3><p>That leads me to the hot-take section of the post. Does all of this effort pay off? Is it actually worth your teams time? I would say no, but bear with me.</p><p>Presuming you are a primarily Microsoft consumer running Sentinel and other Microsoft security products like Microsoft Defender, you would already have the option of ingesting all of the Advanced Hunting telemetry directly into Sentinel, and likely already are doing so. These events, [while flawed](<a href="https://medium.com/falconforce/microsoft-defender-for-endpoint-internals-0x03-mde-telemetry-unreliability-and-log-augmentation-ec6e7e5f406f">Microsoft Defender for Endpoint Internals 0x03 — MDE telemetry unreliability and log augmentation | by Olaf Hartong | FalconForce | Medium</a>), are often enough to cover most custom detections and threat hunting requirements on their own while also being fairly optimised from an ingestion and retention POV, even at massive scale. Sysmon on the other hand, without an extremely tuned config (more tuned than even Olaf’s MDE augment configuration), has a very good chance of nuking your costs for <em>not that much</em> additional benefit.</p><p>I’d also argue that collecting Windows Events (the other use-case for Azure Monitor Agent on clients) is not worth it either, for similar ingestion and cost-related reasons. If your organisation has the headroom for more ingestion, consider adding in network logging and ensuring you’re capturing events from as many kinds as devices as possible.</p><h3>An Argument for AMA + Sysmon for Critical Endpoints</h3><p>Not all devices are created equal of course. You might have a tier of servers that are critical, and thus require that extra level of detection capability. You might be doing some detection layering and desire those more granular events because the servers Sysmon is installed on are highly desirable targets. But in that case, you already have the option to install AMA on them through Arc or Azure directly! You can also manage these machines much more granularly without worrying about creating a tenant-wide monitored object.</p><h3>An Argument for Neither</h3><p>MDE filters out and drops events from the SIEM. That much we know is true. You will never get every instance of every event across every category of log in Sentinel or the Advanced Hunting pane — the bandwidth costs for Microsoft are just too large. So how do you address the gap?</p><p>Personally, I advocate for an in-between measure of installing Sysmon, deploying an MDE augment configuration <strong>or</strong> a fully featured one depending on the criticality of the endpoint, and configuring policies to retain that log for as long as possible locally on each machine. This means that you can build proactive detections using MDE’s dataset, and should the time come for a deeper investigation, you can pull those events off the box when you need them. This can be done forensically, through defender’s live response feature, or third party tooling like Velociraptor. While I’ll never say no to more data, we want <em>good</em> data. By ingesting millions of Sysmon events from a fleet of endpoints, you’re using up your ‘new log source’ budget for data that just isn’t going to be all that useful all the time.</p><p>While I was writing this, Microsoft had an outage that resulted in the raw telemetry not being available in Sentinel or Advanced Hunting. This is obviously a big issue, and a trade-off you inadvertently make when relying on any kind of SaaS. If you are <em>particularly</em> risk averse, that might be reason enough to roll out AMA and collect Sysmon events!</p><h3>Closing Thoughts</h3><p>To circle it all back around to AMA again, I hope this has given you some insights into not only the “how and why” of deploying AMA to all your clients, but also the “if”. Detection layering, not just the use-cases themselves but also the underlying data sources is an important point of discussion and isn’t often talked about enough when dealing with massive environments. I would encourage you to have a read of the <a href="https://github.com/tsale/EDR-Telemetry">EDR Telemetry</a> project, and seeing for yourself if the telemetry you’re getting is enough for your detection needs.</p><p>If you’re in that small minority of orgs who simply must have reliable event ingestion at any cost, AMA is there for you. Kinda. See above 😉.</p><h3>References:</h3><ul><li><a href="https://www.notion.so/Sysmon-Olaf-Hartong-Pre-Generated-Configs-88d7e03a094041bd96e8babeedbc10d1">Sysmon Olaf Hartong — Pre-Generated Configs</a></li><li><a href="https://www.notion.so/Test-out-MDE-Augment-Sysmon-Config-81b957f8509a458eb95934548088d060">Test out ‘MDE Augment’ Sysmon Config</a></li><li><a href="https://learn.microsoft.com/en-us/azure/azure-monitor/agents/azure-monitor-agent-windows-client">Set up the Azure Monitor agent on Windows client devices — Azure Monitor | Microsoft Learn</a></li><li><a href="https://github.com/tsale/EDR-Telemetry">https://github.com/tsale/EDR-Telemetry</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=06b7934eac87" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>