Expert · Threat intelligence and frameworks · topic 39 of 43 · 35 min
Using frameworks in detection and threat hunting
Explanation
From framework to practice
Knowing ATT&CK IDs does not stop attacks. What helps is using the framework to answer practical questions: Which techniques matter most for us? Which of them can we detect today? Where are the gaps? Did our new rule really work?
Detection engineering
Detection engineering is the work of designing, testing and maintaining detection rules. A typical cycle:
- Choose a technique to cover, based on threat intelligence (for example T1059.001 PowerShell, used by groups targeting your sector).
- Check data: do we collect the logs needed (Sysmon process creation, PowerShell script block logging)?
- Write the rule, and tag it with the ATT&CK technique.
- Test it safely, ideally by simulating the behaviour in a lab or approved test.
- Tune false positives, document the response steps, and deploy.
- Review regularly: is it still firing correctly?
Sigma: rules you can share
Sigma is an open, generic format for detection rules written in YAML. A Sigma rule can be converted into the query language of many SIEMs (Splunk SPL, Sentinel KQL, Elastic and others). Here is a rule for the Office-spawns-PowerShell pattern:
title: Office Application Spawning PowerShell
status: experimental
logsource:
product: windows
category: process_creation
detection:
selection:
ParentImage|endswith:
- '\winword.exe'
- '\excel.exe'
Image|endswith: '\powershell.exe'
condition: selection
level: high
tags:
- attack.execution
- attack.t1059.001Measuring coverage
Coverage means: of the techniques we care about, how many do we have a working detection for? Teams often show this as a heat map on the ATT&CK matrix (MITRE's free ATT&CK Navigator tool can draw one). Coverage is a guide, not a score to game: one weak rule does not mean a technique is truly covered.
priority = {"T1566.001", "T1059.001", "T1053.005", "T1003", "T1021.001", "T1486", "T1490"}
rules = {"Office spawns PowerShell": "T1059.001", "Shadow copy deletion": "T1490", "New scheduled task": "T1053.005"}
covered = priority & set(rules.values())
print(f"{len(covered)}/{len(priority)} covered:", sorted(covered))
print("Gaps:", sorted(priority - covered))Threat hunting
Threat hunting is proactively searching for attackers that existing rules have missed, instead of waiting for alerts. A good hunt starts with a hypothesis based on intelligence and ATT&CK, for example: "If an attacker used valid accounts with RDP for lateral movement (T1078, T1021.001), we will see logon type 10 events between workstations, which our staff never do." The hunter queries the SIEM, investigates anything odd, and turns useful queries into new detection rules.
Purple teaming
In a purple-team exercise, attackers (red team) and defenders (blue team) work together. With written approval and a clear scope, the red team safely performs a technique in the company's own environment, and the blue team checks whether the logs and alerts appear. Gaps are fixed on the spot. Open-source test libraries exist for this, but they must only be run in approved test environments.
Common mistakes
- Colouring the ATT&CK matrix green without testing that rules fire.
- Writing rules for data you do not collect.
- Hunting with no hypothesis, just browsing logs.
- Running attack simulations on production systems without approval.
Need help?
Stuck on a word or an idea? Search this course, or every course, and jump straight to the explanation or a worked question.
Try:
Watch the lesson
Using frameworks in detection and threat hunting · 1/7
Frameworks help when they drive daily work: priorities, gaps and testing.
Prefer a video by a teacher? Find free videos on “detection engineering sigma rules MITRE ATT&CK coverage threat hunting” on YouTube ↗
In real life: Closing a gap before it mattered
A SOC at a Bengaluru fintech mapped its 60 rules to ATT&CK and compared them with techniques used by groups targeting financial services. It found no detection for T1490 (deleting shadow copies), which ransomware gangs do minutes before encrypting. The detection engineer wrote a rule, tested it in the lab, and deployed it. Three months later, the rule fired on a compromised server, and the team isolated it before encryption began.
Practice (0/3 done)
What is the first step of a good threat hunt?
Write coverage(priority, rules) where priority is a set of technique ids and rules is a dict of rule name → technique id. Return a tuple (percent, gaps): percent is the share of priority techniques with at least one rule, rounded to a whole number, and gaps is a sorted list of uncovered priority techniques. If priority is empty, return (100, []).
Write one hunt plan: a hypothesis linked to an ATT&CK technique, the data sources needed, a query idea (in plain words or SPL/KQL), what "suspicious" would look like, and what you would do with the results.
Quick quiz
Read more (free)
Related help
Before this, learn
This topic builds on these. If something here feels new, open them first.
Related topics
- Threat intelligence and indicators of compromiseThreat intelligence and frameworks · same module
- Career paths in cyber securityCareers and certifications
- Building a home lab and a portfolioCareers and certifications
- Logging and monitoring in the cloudCloud security basics
- SIEM and alert triageLogs, SIEM and incident response
- Logging, threat detection and incident responseCloud Computing (AWS, Azure, Google Cloud) · Cloud security and compliance
Questions people ask about this
Open a question to see the answer and why. The first ones are this topic's own quiz, so try the quiz above before you peek.
What is Sigma?
Answer: An open, generic format for SIEM detection rules
Sigma rules are written in YAML and converted to many SIEM query languages.
Why tag detection rules with ATT&CK technique IDs?
Answer: To measure coverage and find gaps against priority techniques
Tags let you map and measure what you can detect.
What makes purple teaming legitimate?
Answer: Written approval, a clear scope and red and blue teams working together
Authorised, scoped and collaborative.
A technique is marked "covered" but the rule was never tested. What is the risk?
Answer: The rule may never fire, giving false confidence
Coverage must be tested, not assumed.
Threat hunting differs from alert triage because it…
Answer: Proactively looks for attackers that rules have missed
Hunting is proactive and hypothesis-driven.
What does T1566 represent in ATT&CK?Related
What is the most common first job title for beginners in Indian security teams?Related
Answer: SOC analyst (L1)
MSSPs and in-house SOCs hire many L1 analysts.
What does MTTD measure?Related
Answer: Average time to detect an attack
Mean time to detect: lower is better.
Which type of intelligence is a board-level report on ransomware trends?Related
Answer: Strategic
Strategic intelligence supports long-term, high-level decisions.
Pass the quiz (60% or more) or mark this topic as done when you are ready.
Your progress is saved on this device only.
Next steps
- This is the last topic of “Threat intelligence and frameworks”. The module exam comes next.
- Module 9 exam: Threat intelligence and frameworks · 12 questions · 20 min, without help. 4 topics of this module still to finish first.
- Then the next module, Careers and certifications. 43 topics left in the course before the final exam.