Detection Engineering Maturity
While "WTF" might seem like an unusual acronym, WTF" in this context is a slightly irreverent and informal way to refer to Detection Engineering Maturity. The "WTF" version is more likely to be encountered in casual conversations, blog posts, or social media discussions among security professionals. It's a bit of industry jargon that reflects the sometimes humorous and unconventional nature of the cybersecurity field.
it's gaining traction in the cybersecurity world to represent Detection Engineering Maturity. It's a way to assess and improve an organization's ability to detect and respond to threats. There isn't one definitive but here's a breakdown of the key concepts and common elements:
While Security Automation is going in the direction of low-code/no-code, Detection Engineering is heading toward a much more code-centric model. This is where Detection as Code (DaC) comes into play—a methodology where detection logic is managed like software code.
The rise of DaC can be traced to the increasing complexity of cybersecurity threats. Traditional signature-based or rule-based detection methods became inadequate in the face of modern, sophisticated attacks. Security teams needed detection systems that were not only highly customizable but also scalable and version-controlled—hence the move toward treating detection rules as code.
What is Detection Engineering
Detection-as-Code is a new way of finding threats. Instead of using old-fashioned rules or special languages, it uses code that is easy to change, understand, and grow. This code is often written in popular languages like Python. This means security teams can create custom solutions for their unique needs, making them better prepared for any challenge.
It's a critical function within a Security Operations Center (SOC), enabling analysts to detect malicious activity that bypasses traditional security controls. By applying engineering principles and leveraging threat intelligence, detection engineers create and refine detection rules, automate analysis, and improve the overall efficiency of threat detection.
Detection engineering fosters collaboration with other security teams, such as incident response, red teams, and purple teams. It provides valuable insights to incident responders by delivering high-fidelity alerts with actionable context, enabling faster and more effective response to security incidents. Collaboration with red and purple teams helps validate and improve detection rules through simulated attacks and adversarial testing. Furthermore, detection engineering helps the business understand its security challenges by providing metrics and reporting on detection coverage, effectiveness, and areas of improvement. This data-driven approach enables informed decision-making and helps justify budget allocation for security investments.
Detection engineering maturity refers to the level of sophistication and effectiveness of an organisations threat detection program. A mature program goes beyond simply relying on out-of-the-box security tools and alerts. It involves a proactive and continuous process of developing, testing, and refining detection rules and processes to identify and respond to increasingly sophisticated attacks.
The core pillars are
a) Detection-as-code,
b) Incident Response
c) Detection logic and infrastructure itself.
Detection-as-Code:
Traditional approaches to threat detection often involve manually creating and managing detection rules within security tools like SIEMs and EDRs. This can be time-consuming, error-prone, and difficult to scale. Detection-as-code DaC) offers a more modern and efficient approach by applying software engineering principles to threat detection.
Detection-as-Code, which applies software engineering principles to the creation and management of threat detection logic. It highlights two key aspects:
1. Agile Processes:
2. Code Reuse:
Industry guidelines on Engineering Process and Principles for implementing Detection-as-Code
Detection-as-Code:
Key Practices:
The Core Idea:
DaC treats detection logic (e.g., SIEM queries, EDR rules, Yara rules) as code, allowing you to manage, test, and deploy them using the same rigor and discipline as software development. This means leveraging version control, automated testing, and continuous integration/continuous delivery (CI/CD) pipelines to ensure the quality and reliability of your detection rules.logic definition and maturity' is one more practice and benefit that needs to be accounted With multiple team's collaboration, there will different ideas and the logic would differ based on scenario, industry, geo-politics, etc.
Benefits of Detection-as-Code:
Practical Implementation:
Example:
Imagine you have a detection rule for identifying suspicious login attempts. With DaC, you would:
Detection-as-code is a powerful approach that can significantly improve the efficiency, accuracy, and scalability of your threat detection program. By applying software engineering principles, you can create a more robust and resilient security posture.
Incident Response Optimisation
Effective threat detection should always consider the impact on incident responders (IR). By focusing on the IR experience, organisations can ensure that detection logic is relevant, actionable, and contributes to efficient incident response. The importance of considering the Incident Response (IR) team's experience when developing and managing security alerts.
It highlights two key areas:
1. Alert Documentation & Context:
2. Alert Fidelity, Monitoring & Maintenance:
There needs to be a collaboration between detection engineers and incident responders to ensure that alerts are valuable, actionable, and contribute to a successful security program. The emphasis should be on robust detection logic and infrastructure for effective threat detection. It highlights two key areas:
3.Log Visibility & Timeliness:
4.MITRE ATT&CK:
Having comprehensive log visibility, timely data, and a threat-informed approach to detection logic to ensure a strong security posture. The team needs to optimize the relationship between detection engineering (creating alerts) and incident response (handling those alerts) for a more effective security process.
Here's how: -
Detection & Incident Response Relationship:
Automated Resolution by the User:
Example: A Slackbot could be used to guide users through simple remediation steps or to gather more information about an alert.
A strong partnership between detection and response teams to ensure that alerts are meaningful, actionable, and contribute to a more efficient and effective security operation.
The next steps build on IR focusing on validating and refining detection logic to ensure it effectively identifies and responds to threats. It emphasizes two key areas:
Purple Teaming:
Benefits:
Threat Intelligence:
Purple teaming directly addresses the need to validate that alerts are actionable and provide sufficient context for the incident response team. Purple teaming helps ensure that your log visibility and data sources are adequate for detecting real-world attacks. It also reinforces the importance of integrating threat intelligence into your detection strategy.
Overall, the importance of continuous testing and refinement of detection logic to maintain an effective security posture. By combining purple teaming with threat intelligence, organizations can proactively identify weaknesses and improve their ability to detect and respond to evolving threats.
Key Principles:
Benefits of Focusing on the IR Experience:
By prioritizing the incident response experience, organizations can optimize their detection efforts, reduce alert fatigue, and empower their IR teams to respond to threats more effectively.
Detection Logic and Infrastructure
Effective threat detection relies on a robust infrastructure and well-defined detection logic. To achieve this, organisations need to strategically align their data sources, prioritize detection development, and continuously validate their capabilities.
Key Considerations:
Benefits of Optimization:
By strategically managing data sources, prioritising detection development, and continuously validating capabilities, organisations can build a robust and effective threat detection program.
Key Components of a Mature Detection Engineering Program at a high level
People:
a) Dedicated Detection Engineering Team: A dedicated team with specialised skills in threat hunting, security analysis, and data science.
b) Collaboration: Strong collaboration between security teams, IT operations, and threat intelligence providers.
The Human Element
Specialised Skillsets: A mature detection engineering team needs a blend of skills:
a) Threat Hunters: Proactively search for threats that evade existing security controls. They need strong analytical skills, knowledge of attacker tactics, and the ability to think like an adversary.
b) Security Analysts: Investigate alerts and incidents, perform root cause analysis, and develop detection rules. They need deep technical knowledge of security tools, operating systems, and network protocols.
c) Data Scientists: Apply data science techniques to analyze security data, identify patterns, and develop advanced detection models. They need expertise in machine learning, statistical analysis, and data visualization.
Collaboration is Key: Detection engineering isn't a solo endeavor. Effective teams foster collaboration with:
a) IT Operations: Share knowledge about the IT environment, system configurations, and normal network behavior.
b) Threat Intelligence Providers: Obtain up-to-date information about emerging threats, attacker tactics, and indicators of compromise (IOCs).
c) Incident Response Teams: Share information about incidents and attacks to improve detection rules and prevent future occurrences.
Process:
a) Defined Detection Strategy: A clear strategy aligned with the organization's risk profile and threat model.
b) Formalised Workflow: A structured process for developing, testing, deploying, and maintaining detection rules.
c) Continuous Improvement: Regular review and tuning of detection rules based on threat intelligence, incident response feedback, and performance metrics.
Structure and Continuous Improvement
Defining a Detection Strategy:
Formalised Workflow:
Continuous Improvement:
Maturity Levels:
Many frameworks define maturity levels, often ranging from ad-hoc and reactive to proactive and optimized. Here's a common example:
Benefits of a Mature Detection Engineering Program:
Assessing Your Detection Engineering Maturity:
To assess your organisations detection engineering maturity, consider the following questions:
Tool stack to measure include but not limited to
a) Security Information and Event Management (SIEM): Collects and analyzes security logs from various sources, providing a centralized platform for threat detection and monitoring.
b) Endpoint Detection and Response (EDR): Monitors endpoint activity to detect and respond to malicious behavior.
c) Network Traffic Analysis (NTA): Analyzes network traffic to identify suspicious patterns and anomalies.
d) Threat Intelligence Platforms (TIPs): Provide access to curated threat intelligence feeds, IOCs, and vulnerability information.
e) Security Orchestration, Automation, and Response (SOAR): Automates security tasks, such as alert triage, incident response, and threat intelligence enrichment.
f) User and Entity Behavior Analytics (UEBA): Detects anomalies in user and entity behavior to identify insider threats and compromised accounts.
Detection Engineering Maturity is a critical concept, and understanding its nuances is essential for CISOs. Here's a deeper dive with more specific examples and considerations:
Detecting a Ransomware Attack
Let's say your organization wants to improve its detection of ransomware attacks. Here's how a mature detection engineering approach might look:
Key Takeaway: Detection engineering maturity is an ongoing journey, not a destination. By continuously investing in people, processes, and technology, organizations can build a robust detection program that effectively protects against today's sophisticated cyber threats.
Metrics are crucial for assessing and improving Detection Engineering Maturity.
These are a set of metrics to measure the effectiveness of a detection engineering program, specifically focusing on detection performance and the maturity of detection-as-code practices.
Detection Performance Metrics:
Detection-as-code Metrics:
These metrics are crucial for several reasons:
Here's a sample breakdown of key metrics, categorized by area, with some basic examples:
1. Detection Coverage:
2. Detection Accuracy:
Metric: True Positive Rate (TPR) - the percentage of actual threats that are correctly identified. Example: "Our detection rules have a true positive rate of 95% for malware infections."
Metric: False Positive Rate (FPR) - the percentage of benign events that are incorrectly flagged as threats.Example: "Our false positive rate for account lockout alerts is 2%."
Metric: Alert Triage Efficiency - the time it takes to triage and investigate security alerts.Example: "Security analysts can triage 90% of alerts within 30 minutes."
3. Detection Efficiency:
Metric: Mean Time to Respond (MTTR) - the time it takes to respond to and remediate a detected threat.Example: "Our average time to respond to a critical vulnerability is 2 hours."
Metric: Automation Coverage - the percentage of detection and response tasks that are automated.Example: "70% of our alert triage process is automated through SOAR playbooks."
Metric: Number of detection rules created per analyst per month.Example: "Each detection engineer creates an average of 5 new detection rules per month."
4. Threat Hunting Effectiveness:
Metric: Number of proactive threat hunts conducted per month.Example: "The threat hunting team conducts 4 proactive threat hunts per month."
Metric: Number of new threats or vulnerabilities discovered through threat hunting.Example: "Threat hunting activities identified 2 previously unknown malware variants in the past quarter."
Metric: Time spent on threat hunting activities.Example: "Security analysts dedicate 20% of their time to proactive threat hunting."
5. Continuous Improvement:
Metric: Number of detection rules updated or improved per month.Example: "We update or improve an average of 10 detection rules per month based on new threat intelligence and incident response feedback."
Metric: Frequency of detection rule reviews and tuning.Example: "All detection rules are reviewed and tuned at least quarterly."
Metric: Number of lessons learned documented and implemented from security incidents.Example: "We documented 5 key lessons learned from a recent phishing campaign and implemented changes to our detection rules and user awareness training."
Important Considerations:
By honestly assessing your current maturity level, you can identify areas for improvement and develop a roadmap for building a more robust and effective detection engineering program.
References
A big thanks to Sujit T. for contributing to the above article.
Thanks to Krishna Balakrishnan (BKP) for conceptualising and giving practical inputs to make this a success.
A detailed version of the detection-engineering-maturity-matrix can be found at - https://detectionengineering.io/
Other references
Senior Manager, EY GDS | CISSP | Cyber Security Enthusiast | Cyber Resilience | Threat Detection and Response | TVM | Incident Response | Views are Personal
6moInsightful and detailed.
Well articulated Prakash Krishnan ! Future is DaaC which optimizes the current model to more metrics driven and reusable code driven modelling and hunting approach ..
Entrepreneur, Digital Architecture Thought Leader, Business Regulatory Compliance, Information Security & Risk Management Champion
7moFantastic job outlining and illustrating key nuances of detection engineering. Your attention to detail is phenomenal. Great post, keep it up!