VeriKQL by Kaushik Saha

Level 6 · Is this one incident? · Mission 5 of 5 · by Kaushik Saha

Case closed

Alert Six alerts, one attacker · Idea fix it

Commands here distinct · where · == · join · kind=inner · all commands

Briefing

The incident report needs one query that ties the email to the sign-ins. A colleague's version won't compile: a table name and a column name are each one letter wrong.

EmailEvent
| where SenderIPv4 == "203.0.113.45"
| join kind=inner (SigninLogs | where ResultType == "0") on $left.SenderIPv4 == $right.IPAdress
| distinct RecipientEmailAddress, UserPrincipalName
✗ Broken on purpose2 problems: KS204 on line 1, KS142 on line 3

Your turn

Fix the query so it compiles and shows who the phish went to, and which account its sender then signed in as.

Paste the query into the box, check it and fix what the checker reports. Then compare with one answer.

Show one answer
EmailEvents
| where SenderIPv4 == "203.0.113.45"
| join kind=inner (SigninLogs | where ResultType == "0") on $left.SenderIPv4 == $right.IPAddress
| distinct RecipientEmailAddress, UserPrincipalName
✓ Verified by VeriKQLKusto.Language 12.4.1 · bundle 2026.10.29

Result on the sample · 2 rows

RecipientEmailAddressUserPrincipalName
alex.morgan@contoso.comalex.morgan@contoso.com
priya.nair@contoso.comalex.morgan@contoso.com

Check your own query

The broken query is in the box: check it, fix what the checker reports and check it again.

Level 6 cleared: case closed

6

Level 6 clue · pinned to the incident

One incident. A phishing email from 203.0.113.45 at 07:55; the same address guessed Alex Morgan's password from 08:14, wore down MFA and got in at 08:20:36; then PowerShell, the Azure portal, a second address and, at 09:40, Global Administrator. The spray at 07:40 was a separate attempt that never got in.

You read a table, counted and compared, found the moment of entry, proved impossible travel, followed the attacker inside, and joined three tables into one incident with a rule to catch the next one.

Want to go deeper?

You have finished the KQL Mastery Path: nine command cards and six alerts on real Microsoft Sentinel tables. Levels 7 to 12 are coming: the same incident on the endpoint, with the Defender XDR tables (DeviceProcessEvents, DeviceNetworkEvents, DeviceLogonEvents), decoding commands, time series, ASIM and the advanced joins.

I'm interested in Levels 7 to 12I want to go deeper

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.