VeriKQL by Kaushik Saha

Level 2 · Count and compare · Mission 4 of 5 · by Kaushik Saha

When did it happen?

Alert Spray or brute force? · Idea bin · ago

Commands here where · != · and / or · sort by · ago · bin · count · summarize · all commands

Briefing

You know there were two attacks. For the incident timeline, you need when each one ran.

One idea: bin puts times into buckets

bin(TimeGenerated, 15m) rounds each time down to its quarter hour, so summarize counts per quarter hour and per address:

SigninLogs
| where TimeGenerated > ago(6h) and ResultType != "0"
| summarize Failures = count() by bin(TimeGenerated, 15m), IPAddress
| where Failures > 1
| sort by TimeGenerated asc
✓ Verified by VeriKQLKusto.Language 12.4.1 · bundle 2026.10.29

Result on the sample · 3 rows

TimeGeneratedIPAddressFailures
2026-06-10 07:30:00198.51.100.238
2026-06-10 07:45:00198.51.100.234
2026-06-10 08:15:00203.0.113.457

The spray fills the 07:30 and 07:45 buckets: one burst from 07:40 to 07:47. The brute force fills the 08:15 bucket (its first try, at 08:14, sits alone in the 08:00 bucket). The two attacks were half an hour apart.

Your turn

Count all sign-ins, failed or not, in 30-minute buckets over the shift, oldest first.

Write it in the box below and check it. Then compare with one answer; others can be right too.

Show one answer
SigninLogs
| where TimeGenerated > ago(6h)
| summarize SignIns = count() by bin(TimeGenerated, 30m)
| sort by TimeGenerated asc
✓ Verified by VeriKQLKusto.Language 12.4.1 · bundle 2026.10.29

Result on the sample · 9 rows

TimeGeneratedSignIns
2026-06-10 07:30:0018
2026-06-10 08:00:0030
2026-06-10 08:30:0021
2026-06-10 09:00:0023
2026-06-10 09:30:0023
2026-06-10 10:00:0019
2026-06-10 10:30:001
2026-06-10 11:00:004
2026-06-10 11:30:002

Check your own query

Write your query for the task above and check it against the real schema.

Debrief

Two bursts, two addresses, half an hour apart, and Alex in both. Last step of Level 2: fix a broken query.

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.