Agent Foskett Academy • Microsoft Sentinel • Module 7 • Lesson 70

Lesson 70 — The Complete Advanced Threat Hunting Investigation

Bring together the full threat-hunting workflow: form a hypothesis, verify telemetry, investigate identity and endpoint changes, correlate network clues, and produce a defensible final case report.

Module 7 — Advanced Threat Hunting and Investigation • Capstone case
Agent Foskett Microsoft Sentinel complete advanced threat hunting investigation
What you will learn

Investigate a multi-stage case without confusing suspicious signals with proven attacker activity.

✓ Define scope and test log coverage
✓ Investigate authentication and privileges
✓ Correlate persistence and network evidence
✓ Write an evidence-backed case conclusion

Agent Foskett case file — The midnight maintenance account

A privileged account signs in outside its usual hours. Shortly afterward, a Windows host records a new scheduled task, a privileged group membership change and outbound traffic to an unfamiliar destination. Are these events connected? Agent Foskett must establish an evidence-backed timeline and test an alternative explanation: an approved emergency maintenance operation.

Learning objectives

  • Build a scoped, falsifiable advanced threat-hunting hypothesis.
  • Verify table availability, collection coverage and retention before interpreting results.
  • Investigate sign-ins, privilege changes and persistence indicators using KQL.
  • Correlate Windows, Microsoft Entra and network observations cautiously.
  • Map observed behaviour to MITRE ATT&CK only where supported.
  • Deliver a concise case report with confidence, limitations and next actions.

The investigation hypothesis

Hypothesis: an unauthorized actor used a privileged identity, established persistence and contacted an external system. Alternatives: approved administrative work, endpoint management software, scheduled updates or unrelated events. A matching timestamp or username is a lead—not proof of a single attack chain.

The end-to-end hunting method

Define scope → validate sources → collect candidate evidence → enrich with context → correlate by stable identifiers → test competing explanations → assess confidence → document findings. Preserve original timestamps and record the timezone used in the report.

Know your data sources

These examples target SecurityEvent, SigninLogs, AuditLogs and CommonSecurityLog in Microsoft Sentinel Logs. Each table requires an appropriate connector and collection configuration. Defender XDR DeviceProcessEvents and DeviceNetworkEvents belong to Defender advanced hunting unless exposed through supported integration. Do not assume cross-product tables exist in every workspace.

Evidence sources and limitations

SourceUseful evidenceImportant limitation
SecurityEventWindows logons, privileged sessions, group and task changesEvent IDs depend on auditing and collection
SigninLogsMicrosoft Entra sign-in attempts and resultsCloud identity does not by itself prove host activity
AuditLogsDirectory and role-management activityPayloads may require record-specific inspection
CommonSecurityLogNetwork device events from supported CEF sourcesField meaning varies by vendor and parser
Defender XDREndpoint processes and network connectionsUse the correct hunting interface and permissions

Start with an evidence inventory

Record the investigation window, affected identities, hostnames, expected logging sources and approved maintenance windows. A zero-result query may mean absent telemetry, not absent attacker activity. Validate ingestion before drawing negative conclusions.

KQL hunt 1 — Verify Windows evidence coverage

Sentinel Logs — Windows coverage
SecurityEvent
| where TimeGenerated >= ago(7d)
| where EventID in (4624, 4672, 4698, 4702, 4697, 4728, 4732, 4756)
| summarize Events = count(), Hosts = dcount(Computer),
            LastSeen = max(TimeGenerated) by EventID
| order by EventID asc

Confirm expected host and event coverage before relying on the remaining hunts.

Authentication is the opening clue

Look for a change from the account’s normal sign-in pattern: new location, unusual time, repeated failures followed by success, or unfamiliar device context. Sign-in anomalies should be checked against travel, VPN egress, service accounts and known administrative workflows.

KQL hunt 2 — Review Entra sign-in outcomes

Sentinel Logs — Entra sign-in review
SigninLogs
| where TimeGenerated >= ago(7d)
| summarize Attempts = count(), Failures = countif(ResultType != "0"),
            FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated)
    by UserPrincipalName, IPAddress
| where Attempts >= 2
| order by Failures desc, Attempts desc

ResultType 0 commonly indicates success; verify the event details and account baseline before labeling an IP suspicious.

Privilege changes require actor context

Windows event 4672 reports special privileges assigned to a new logon and is not, by itself, evidence that privileges were escalated. Group membership events such as 4728, 4732 and 4756 are stronger leads for membership changes, but require the group, target member, actor and approval context.

KQL hunt 3 — Triage privileged group changes

Sentinel Logs — group membership changes
SecurityEvent
| where TimeGenerated >= ago(7d)
| where EventID in (4728, 4732, 4756)
| project TimeGenerated, Computer, EventID,
          Account, Activity, EventData
| order by TimeGenerated desc
| take 250

Inspect EventData for actor, member and group context; do not assume all changes were unauthorized.

Persistence is a separate question

Scheduled task events 4698 and 4702 can indicate task creation or modification, but neither proves that the task executed. Inspect task details and corroborate execution with appropriate process or task operational telemetry. Legitimate endpoint agents routinely create tasks.

KQL hunt 4 — Inspect task and service changes

Sentinel Logs — persistence-related changes
SecurityEvent
| where TimeGenerated >= ago(7d)
| where EventID in (4698, 4702, 4697)
| project TimeGenerated, Computer, EventID,
          Account, Activity, EventData
| order by TimeGenerated desc
| take 250

Event 4697 concerns service installation; System event 7045 requires collection of the System channel and may reside in another table.

Network communication needs a baseline

Outbound traffic to an uncommon destination can be a useful lead, but business applications, cloud services and security tools may also generate recurring connections. Check source and destination context, protocol, volume, timing and any available endpoint process attribution.

KQL hunt 5 — Summarise outbound network destinations

Sentinel Logs — CEF network destinations
CommonSecurityLog
| where TimeGenerated >= ago(24h)
| where isnotempty(DestinationIP)
| summarize Connections = count(),
            FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated)
    by SourceIP, DestinationIP, DestinationPort
| order by Connections desc
| take 100

Requires a supported CEF data source. Frequent traffic is not automatically command-and-control; check device semantics and baseline.

Correlate carefully across tables

Use timestamps, normalized hostnames, device identifiers, account identities, source IPs and correlation IDs where available. Do not equate a public IP in a cloud sign-in with a local device IP without supporting context. Account names and timestamps alone can produce false joins.

Build the investigation timeline

01 SUSPICIOUS SIGN-IN OBSERVED ↓ 02 WINDOWS LOGON / PRIVILEGE CONTEXT ↓ 03 GROUP OR TASK CHANGE IDENTIFIED ↓ 04 EXECUTION / NETWORK EVIDENCE CHECKED ↓ 05 APPROVED CHANGE AND OWNER VERIFIED ↓ 06 CONFIDENCE, GAPS AND OUTCOME RECORDED

This is an investigative sequence, not an assertion that every stage occurred or shares one cause.

Map behaviour to MITRE ATT&CK

Candidate mappings might include Valid Accounts (T1078), Account Manipulation (T1098), Scheduled Task/Job (T1053), and Application Layer Protocol (T1071). Apply a technique only when observed behaviour supports its definition. A logon, task or network connection does not automatically establish malicious use of that technique.

Separate fact, inference and unknown

CategoryExample
Observed factA 4732 event reports a local group membership addition on a named host
InferenceThe change may have increased the target account’s access
UnknownWhether the change was authorized and later used

Keeping these categories separate prevents a plausible story from becoming an unsupported incident verdict.

Evaluate competing explanations

For each lead, check approved changes, software deployment records, privileged access management logs, endpoint ownership and normal service behavior. Ask what observation would disprove the original hypothesis. Escalate based on corroboration and organizational policy—not on the number of ATT&CK labels assigned.

Preserve investigation quality

Use read-only, time-bounded queries. Retain original record identifiers and raw evidence where policy permits. Note missing tables, time skew, result limits and schema assumptions. Coordinate any containment or remediation through the incident response process.

Case file resolution — The midnight maintenance account

Agent Foskett verifies that the privileged group change and scheduled task were recorded during an approved emergency maintenance window. The task was created by an authorized deployment system. The unfamiliar network destination belonged to the vendor’s update service, but endpoint process attribution was unavailable. The unusual Entra sign-in remained unexplained and was referred for identity-team validation.

Conclusion: a unified intrusion chain was not established. The administrative changes were supported by change records; the sign-in anomaly remained an open investigative lead. The final report distinguishes those outcomes instead of forcing a single verdict.

Hands-on lab — Complete the investigation

  1. Choose a permitted test environment and a seven-day investigation window.
  2. Confirm which required tables are available and record coverage gaps.
  3. Run the five hunts and identify candidate records.
  4. Inspect original event payloads and record stable identifiers.
  5. Build a timeline without assuming causality.
  6. Check change approvals and document two alternative explanations.
  7. Map only supported behaviours to MITRE ATT&CK.
  8. Write a case report with evidence, confidence, gaps and next steps.

Knowledge check

  1. Why must telemetry coverage be verified before a zero-result query is interpreted?
  2. Why does Windows event 4672 not prove privilege escalation?
  3. What additional evidence could prove a scheduled task executed?
  4. Why can matching timestamps produce misleading correlations?
  5. What distinguishes a supported ATT&CK mapping from a speculative one?
  6. How should unresolved leads appear in the final report?

Final investigation report template

Scope: timeframe, identities, hosts and data sources. Hypothesis: suspected activity and alternatives. Observed evidence: record IDs, timestamps, actors and affected assets. Analysis: correlations and counter-evidence. ATT&CK: supported mappings only. Confidence: high, medium or low with rationale. Limitations: missing logs and unresolved questions. Disposition: close, monitor or escalate under policy.

Operational quality checklist

  • Opening HTML comment and lesson metadata match Lesson 70.
  • Queries are read-only and use explicit time windows.
  • Table names and connector prerequisites are stated.
  • Line numbers align with each KQL line.
  • Facts, hypotheses and unknowns are separated.
  • Conclusions preserve alternative explanations.
  • Navigation links only to published lessons.

Agent Foskett takeaway

A complete threat hunt is not the longest list of suspicious events. It is the clearest account of what the evidence supports, what it contradicts and what remains unknown.

The Logs Already Knew.

Lesson 70 complete — Module 7 investigation capstone finished!
You can now conduct and report an end-to-end Sentinel threat hunt with explicit evidence, uncertainty and next steps.
Sentinel Academy Home

Related Agent Foskett learning

Review ATT&CK mapping and evidence correlation before your next investigation.

Continue learning

Module 7 — Advanced Threat Hunting and Investigation • Lesson 10 of 10 — Module complete.