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
Result on the sample · 3 rows
| TimeGenerated | IPAddress | Failures |
|---|---|---|
| 2026-06-10 07:30:00 | 198.51.100.23 | 8 |
| 2026-06-10 07:45:00 | 198.51.100.23 | 4 |
| 2026-06-10 08:15:00 | 203.0.113.45 | 7 |
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
Result on the sample · 9 rows
| TimeGenerated | SignIns |
|---|---|
| 2026-06-10 07:30:00 | 18 |
| 2026-06-10 08:00:00 | 30 |
| 2026-06-10 08:30:00 | 21 |
| 2026-06-10 09:00:00 | 23 |
| 2026-06-10 09:30:00 | 23 |
| 2026-06-10 10:00:00 | 19 |
| 2026-06-10 10:30:00 | 1 |
| 2026-06-10 11:00:00 | 4 |
| 2026-06-10 11:30:00 | 2 |
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.