Level 6 · Is this one incident? · Mission 3 of 5 · by Kaushik Saha
One timeline
Alert Six alerts, one attacker · Idea union · strcat
Commands here project · where · == · in · sort by · tostring · union · all commands
Briefing
The SOC lead wants the whole story on one page: every event from the attacker's addresses, from any table, in order.
One idea: union stacks rows from several tables
Each table's rows are shaped into the same columns, then stacked and sorted:
union
(EmailEvents | where SenderIPv4 in ("203.0.113.45", "203.0.113.77")
| project TimeGenerated, Source = "Email", What = Subject, Who = RecipientEmailAddress, From = SenderIPv4),
(SigninLogs | where IPAddress in ("203.0.113.45", "203.0.113.77")
| project TimeGenerated, Source = "Sign-in", What = strcat(AppDisplayName, " (", ResultType, ")"),
Who = UserPrincipalName, From = IPAddress),
(AuditLogs | where tostring(InitiatedBy.user.ipAddress) in ("203.0.113.45", "203.0.113.77")
| project TimeGenerated, Source = "Directory", What = OperationName,
Who = tostring(TargetResources[0].userPrincipalName), From = tostring(InitiatedBy.user.ipAddress))
| sort by TimeGenerated asc
Result on the sample · 16 rows
| TimeGenerated | Source | What | Who | From |
|---|---|---|---|---|
| 2026-06-10 07:55:12 | Action required: overdue invoice INV-20931 | alex.morgan@contoso.com | 203.0.113.45 | |
| 2026-06-10 07:55:14 | Action required: overdue invoice INV-20931 | priya.nair@contoso.com | 203.0.113.45 | |
| 2026-06-10 08:14:02 | Sign-in | Office 365 Exchange Online (50126) | alex.morgan@contoso.com | 203.0.113.45 |
| 2026-06-10 08:15:10 | Sign-in | Office 365 Exchange Online (50126) | alex.morgan@contoso.com | 203.0.113.45 |
| 2026-06-10 08:16:31 | Sign-in | Office 365 Exchange Online (50126) | alex.morgan@contoso.com | 203.0.113.45 |
| 2026-06-10 08:17:05 | Sign-in | Office 365 Exchange Online (50126) | alex.morgan@contoso.com | 203.0.113.45 |
| 2026-06-10 08:18:41 | Sign-in | Office 365 Exchange Online (50126) | alex.morgan@contoso.com | 203.0.113.45 |
| 2026-06-10 08:19:12 | Sign-in | Office 365 Exchange Online (50126) | alex.morgan@contoso.com | 203.0.113.45 |
| 2026-06-10 08:19:44 | Sign-in | Office 365 Exchange Online (500121) | alex.morgan@contoso.com | 203.0.113.45 |
| 2026-06-10 08:20:09 | Sign-in | Office 365 Exchange Online (500121) | alex.morgan@contoso.com | 203.0.113.45 |
| 2026-06-10 08:20:36 | Sign-in | Office 365 Exchange Online (0) | alex.morgan@contoso.com | 203.0.113.45 |
| 2026-06-10 08:24:10 | Sign-in | Microsoft Graph PowerShell (0) | alex.morgan@contoso.com | 203.0.113.45 |
| 2026-06-10 09:02:41 | Sign-in | Azure Portal (0) | alex.morgan@contoso.com | 203.0.113.45 |
| 2026-06-10 09:08:19 | Sign-in | Office 365 SharePoint Online (0) | alex.morgan@contoso.com | 203.0.113.77 |
| 2026-06-10 09:40:15 | Directory | Add member to role | alex.morgan@contoso.com | 203.0.113.77 |
| 2026-06-10 09:58:44 | Sign-in | Azure Storage (0) | alex.morgan@contoso.com | 203.0.113.77 |
The whole incident, in order: the phish at 07:55, the brute force from 08:14, the denied prompts and the way in at 08:20:36, PowerShell, the Azure portal, the change of address, the role grant at 09:40 and Azure Storage at 09:58.
strcat joins text together: here the app and its result code.
Your turn
Build the same timeline for Priya Nair, the other phishing recipient. Did the attacker get into her account?
Write it in the box below and check it. Then compare with one answer; others can be right too.
Show one answer
union
(EmailEvents | where RecipientEmailAddress == "priya.nair@contoso.com"
| project TimeGenerated, Source = "Email", What = Subject, From = SenderIPv4),
(SigninLogs | where UserPrincipalName == "priya.nair@contoso.com"
| project TimeGenerated, Source = "Sign-in", What = strcat(AppDisplayName, " (", ResultType, ")"), From = IPAddress)
| where From in ("203.0.113.45", "203.0.113.77", "198.51.100.23")
| sort by TimeGenerated asc
Result on the sample · 2 rows
| TimeGenerated | Source | What | From |
|---|---|---|---|
| 2026-06-10 07:40:48 | Sign-in | Office 365 Exchange Online (50126) | 198.51.100.23 |
| 2026-06-10 07:55:14 | Action required: overdue invoice INV-20931 | 203.0.113.45 |
Check your own query
Write your query for the task above and check it against the real schema.
Debrief
One timeline, three tables, one attacker. The spray at 07:40 came from another address and never got in; nothing on the sample ties it to this attacker, and a careful report says so. Next: name each step, and ship a rule.
All data on this page is sample data, made up for this course. The IP addresses come from ranges reserved for documentation, and the people and the company are fictional.
Mission by Kaushik Saha. Every query checked with Microsoft.Azure.Kusto.Language 12.4.1 against schema bundle 2026.10.29; every result computed on the course's sample with Kusto-Loco 1.4.9, an open-source KQL engine (credits). The story's clock reads 12:00 UTC on 10 June 2026.