MSAZ-342 · Lesson 6 of 12 · 20 min

Hunting with the MITRE ATT&CK framework

▶ Video coming soon A video version of this lesson is on the way.

Every hunting query in Sentinel carries MITRE ATT&CK tactics and techniques, every analytics rule does too, and the Defender portal's incident pages label alerts with them. On Thursday, November 12, the morning before the clinic, Nadia asked Ama a question she could not yet answer: of the things an attacker might do at Harrow & Finch, which ones would the SOC see? The afternoon session was meant to use the framework to answer it, and to turn the answer into a short list of hunts and rules for the winter. At 10:02 that morning the alert that lesson 12 follows fired, the session was postponed, and this lesson's coverage review was finished on Friday, November 13.

What MITRE ATT&CK is

MITRE ATT&CK is a public knowledge base, maintained by the not-for-profit MITRE Corporation, that describes how real attackers behave, based on reported incidents. It is organized as a matrix. Columns are tactics, the attacker's goals at each stage, such as initial access, persistence or exfiltration. Each tactic contains techniques, the ways of achieving that goal, and many techniques have sub-techniques. Each technique has an identifier, a description, known examples, the data sources that can reveal it, and suggested detections and mitigations. The Enterprise matrix covers Windows, macOS, Linux, cloud, identity and network environments; separate matrices cover mobile and industrial control systems.

For defenders, the value of ATT&CK is a shared vocabulary. When an alert says Valid Accounts, a rule says Email Forwarding Rule and a hunt says Steal Web Session Cookie, analysts in different teams, vendors and tools mean the same things. It also turns 'are we protected?' into a series of concrete questions: for this technique, do we collect the data that would show it, do we have a rule that would alert on it, and when did someone last hunt for it?

Some ATT&CK tactics and the techniques the SOC had already met. The Enterprise matrix has fourteen tactics in all.
TacticAttacker goalExample technique seen at Harrow & Finch in 2026
Initial AccessGet into the networkPhishing: Spearphishing Link (the October and November kits)
ExecutionRun codeUser Execution: Malicious File (the label utility)
PersistenceKeep accessAccount Manipulation: Device Registration; Email Forwarding Rule
Defense EvasionAvoid detectionHide Artifacts: Email Hiding Rules; Indicator Removal
Credential AccessSteal credentialsAdversary-in-the-Middle; Steal Web Session Cookie
DiscoveryLearn the environmentAccount Discovery (seen in the penetration test)
Lateral MovementMove between systemsUse Alternate Authentication Material
CollectionGather dataEmail Collection
ExfiltrationTake data outExfiltration Over Web Service
ImpactDisrupt or destroyNone observed in 2026

The names in the table are ATT&CK's own. They describe what the attacker achieved and what the defender can observe, not how to do it, and that is how this course uses them.

How Sentinel and Defender use ATT&CK

In Sentinel, analytics rules and hunting queries are tagged with tactics and techniques by their authors. The hunting page can group queries by tactic, with icons for each and a Techniques column and filter, so a hunter can pick every query for, say, credential access and run them together. Sentinel also has a MITRE ATT&CK page that shows the matrix with each technique coloured by how many active rules and available queries cover it, and lets you simulate the coverage that templates you have not yet turned on would add. In the Defender portal, alerts and incidents show the techniques their detections map to, which helps an analyst see where in an attack the alert falls.

Coverage views count rules, not detection quality. A technique coloured as covered may be covered by a rule that never fires because its data source is missing, or by a rule so noisy it is always closed without a look. Nadia's warning was to read coverage as 'we have something written for this', and to check the something.

A simplified matrix of six tactic columns: Initial Access, Persistence, Defense Evasion, Credential Access, Collection, Exfiltration. Each column has three or four technique cells shaded in three levels: dark for an active rule tested with real data, medium for a rule or hunting query but not tested, light for no coverage. Credential Access has two dark cells; Exfiltration has only light cells.
A coverage view of selected techniques, shaded by how well the SOC can see them.

Building a coverage review

Ama built Harrow & Finch's first coverage review on November 13. She did not try to cover the whole matrix. Following advice in MITRE's own guidance and in Microsoft's, she chose the techniques that mattered most to this organization: the ones already seen in 2026, the ones listed for the threat actors in the Defender threat analytics reports that mentioned retail, and the ones the penetration test had used. That gave 24 techniques. For each she recorded three things: whether the data source that would reveal it was collected, whether an active rule covered it, and whether it had been hunted for in the last 90 days.

Python Example · Counting coverage for ten of the reviewed techniques and listing the gaps.
# technique: (data collected, active rule tested, hunted in last 90 days)
review = {
    "Phishing: Spearphishing Link":       (True,  True,  True),
    "Adversary-in-the-Middle":            (True,  True,  True),
    "Steal Web Session Cookie":           (True,  False, True),
    "Email Forwarding Rule":              (True,  True,  True),
    "Email Hiding Rules":                 (True,  False, True),
    "Device Registration":                (True,  True,  False),
    "Valid Accounts: Cloud Accounts":     (True,  True,  True),
    "User Execution: Malicious File":     (True,  True,  True),
    "Exfiltration Over Web Service":      (False, False, False),
    "Use Alternate Authentication Material": (True, False, False),
}
n = len(review)
data = sum(v[0] for v in review.values())
rule = sum(v[1] for v in review.values())
hunt = sum(v[2] for v in review.values())
print(f"{n} techniques: data for {data}, tested rule for {rule}, hunted for {hunt}")
print("Gaps, in order of what to fix first:")
for t, (d, r, h) in review.items():
    if not d:
        print("  no data      ->", t)
for t, (d, r, h) in review.items():
    if d and not r:
        print("  no rule      ->", t)
Output
10 techniques: data for 9, tested rule for 6, hunted for 7
Gaps, in order of what to fix first:
  no data      -> Exfiltration Over Web Service
  no rule      -> Steal Web Session Cookie
  no rule      -> Email Hiding Rules
  no rule      -> Use Alternate Authentication Material

What this code does

Ten techniques from the review each have three yes-or-no answers: is the data collected, is there a tested rule, and has anyone hunted for it recently. The program counts the yeses and then lists the gaps in priority order, missing data first, because without data neither a rule nor a hunt can work, then techniques with data but no rule. Exfiltration over web services is the biggest gap, and three techniques need rules.

The full review of 24 techniques found 20 with data, 15 with a tested rule and 17 hunted in the last 90 days. The missing data was mostly network egress detail: the firewalls sent session logs, but nothing showed how much data each session carried to cloud storage services, which is what Exfiltration Over Web Service needs. Sunil added it to the January plan with the Azure Firewall summary rule from lesson 5.

Hypothesis-driven hunting

ATT&CK also gives hunts their structure. A hypothesis names a technique, a reason to think it might be happening and the evidence that would confirm or rule it out. The SANS Institute, MITRE and vendors including Microsoft describe variations of the same loop: state the hypothesis, collect and query the data, analyse the results, and act, which includes writing a rule so the next occurrence does not need a hunt.

A hunting hypothesis written against an ATT&CK technique.
Part of the hypothesisExample from November 12
TechniqueSteal Web Session Cookie, under Credential Access
Why we think it may be happeningThe phishing kit is an adversary-in-the-middle kit that captures session cookies; two accounts were targeted after November 3
What we would seeA successful sign-in with no multifactor prompt that reuses a session begun somewhere else; in sign-in logs, one session ID seen from two countries
Where the data isEntraIdSignInEvents and SigninLogs, especially the session and authentication requirement columns
What would rule it outNo sign-ins from new addresses that reuse an existing session in the last 14 days
Hunting for one sign-in session used from more than one country, a sign of a stolen session cookie.
SigninLogs
| where TimeGenerated > ago(14d)
| where ResultType == "0"
| extend SessionId = tostring(SessionId)
| where isnotempty(SessionId)
| summarize IPs = make_set(IPAddress, 10), Countries = make_set(Location, 10),
            First = min(TimeGenerated), Last = max(TimeGenerated)
            by UserPrincipalName, SessionId
| where array_length(Countries) > 1

The query groups successful sign-ins by user and session and keeps sessions seen from more than one country. A legitimate session can change address when a laptop moves from office to home, but rarely changes country within hours. Nadia ran it at 09:50 on November 12 while preparing the clinic's warm-up. It returned nothing for the previous 14 days. At 10:02 the new-country-then-MFA-change rule fired for the contractor's account, and when Ama reran the same query at 10:20 it returned one row. Lesson 12 picks up from there.

From threat intelligence to technique

Most hunts do not start from the matrix. They start from something someone read: a threat analytics report in the Defender portal, a bulletin from the Canadian Centre for Cyber Security or the US Cybersecurity and Infrastructure Security Agency, or a note from a retail information-sharing group. Each of those usually lists indicators, such as addresses, domains and file hashes, and the techniques the actor used. Indicators expire quickly. Attackers change hosting addresses within days, so a hunt that searches only for a list of addresses finds yesterday's attack. Techniques last longer, because changing how an attack works is expensive. Ama learned to do both: search for the indicators once, back as far as the data allows, then write the hunt against the technique so it still works after the indicators change.

The phishing kit is a good example. The kit's hosting addresses from October were useful for the hunt in lesson 5, but by November the kit had moved to new ranges. The session query above does not mention any address. It looks for the behaviour the technique produces, a session used from two countries, so it caught the November activity without knowing where it would come from.

Indicators expire; techniques and actor profiles last longer.
Starting pointLastsHunt it by
Indicator (address, domain, hash)Days to weeksA one-off search back through retained data, then a watchlist or threat intelligence match rule
TechniqueMonths to yearsA behavioural query tied to the ATT&CK technique, kept as a hunting query or a rule
Actor profileYearsThe set of techniques the actor uses, reviewed in the coverage matrix

Mapping your own rules and queries

Every custom rule and hunting query should be tagged when it is written, and the tags should be honest: the technique the query actually detects, not every technique it might be related to. Over-tagging makes the coverage view look better and tells the truth less. Ama used a simple test from Nadia: if this query returned a row, which single technique would I write in the incident notes? That technique is the tag; a second one is allowed only if the query really detects both.

Worked problem

Choosing the next three hunts

From the coverage review, these techniques have data but no tested rule: Steal Web Session Cookie, Email Hiding Rules and Use Alternate Authentication Material. Threat analytics reports for retail list the first two as common. The penetration test used the third. The SOC has time for three hunts in December. Which should they be, and what should each produce?

Show solution
  1. Rank by likelihood and impact: the session cookie technique was used against Harrow & Finch this month and leads to mailbox access, so it comes first.
  2. Email Hiding Rules was seen in October and is cheap to hunt with the inbox rule query from lesson 3, so it comes second.
  3. Use Alternate Authentication Material was used by the penetration testers, who had permission; it matters, but the controls the test recommended (MSAZ-340) are already being put in place, so it comes third.
  4. Each hunt should end with a decision: a scheduled or NRT rule if the query is precise enough, or a documented reason why not and a date to hunt again.
  5. Update the coverage review after each hunt so the matrix shows the change.

Answer: Hunt for session cookie theft, then email hiding rules, then alternate authentication material, and close each with a tested rule or a dated reason.

Common mistakes

  • MistakeTreat a coloured cell in the coverage view as proof of detection.

    InsteadCoverage counts rules and queries; check that the data exists and the rule has been tested.

  • MistakeTry to cover every technique in the matrix.

    InsteadPrioritize techniques seen in your environment, by your threat actors and in your tests.

  • MistakeTag a query with every technique it might relate to.

    InsteadTag the technique the query actually detects.

  • MistakeEnd a hunt with findings only.

    InsteadEnd it with a rule, a recorded decision or a date to hunt again.

Summary and key terms

  • MITRE ATT&CK organizes real attacker behaviour into tactics (goals) and techniques (methods), with data sources and detections for each.
  • Sentinel tags rules and hunting queries with tactics and techniques, groups queries by tactic and shows coverage on the MITRE ATT&CK page.
  • Coverage counts what is written; check data, testing and recent hunting for each technique.
  • Choose techniques that matter to your organization and review data, rules and hunts for each.
  • Write hypotheses against techniques: why it may be happening, what you would see, where the data is and what would rule it out.
MITRE ATT&CK
A public knowledge base of attacker behaviour organized as tactics and techniques.
Tactic
An attacker's goal at a stage of an attack, such as persistence or exfiltration.
Technique
A way of achieving a tactic, with an ATT&CK identifier and description.
Sub-technique
A more specific form of a technique.
Coverage
The techniques for which a SOC has active rules or hunting queries.
Hypothesis
A testable statement about attacker activity that a hunt sets out to confirm or rule out.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. What is the difference between a tactic and a technique?

    Show answer

    A tactic is the goal; a technique is a way of achieving it.

  2. Why did Exfiltration Over Web Service have no coverage?

    Show answer

    The firewall logs did not show how much data sessions carried to cloud storage, so the data source was missing.

  3. What did the session query look for?

    Show answer

    One sign-in session used from more than one country, a sign of a stolen session cookie.

  4. How should a query be tagged?

    Show answer

    With the technique it actually detects.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz