VeriKQL by Kaushik Saha

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

Level 2 bug hunt

Alert Spray or brute force? · Idea fix it

Commands here project · where · != · count · summarize · dcount · all commands

Briefing

A colleague wants a list of noisy addresses. Their query has two problems, and one of them is the most common summarize mistake. The checker finds both.

SigninLogs
| where ResultType != "0"
| summarize Failures = count(), Users = dcount(UserPrincipleName) by IPAddress
| where Failures > 5
| project IPAddress, Failures, Users, AppDisplayName
✗ Broken on purpose2 problems: KS142 on line 3, KS142 on line 5

Hint: after summarize, only the columns it made are left: IPAddress, Failures and Users.

Your turn

Fix the query so it compiles and shows each noisy address with its failures and users.

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

Show one answer
SigninLogs
| where ResultType != "0"
| summarize Failures = count(), Users = dcount(UserPrincipalName) by IPAddress
| where Failures > 5
| project IPAddress, Failures, Users
✓ Verified by VeriKQLKusto.Language 12.4.1 · bundle 2026.10.29

Result on the sample · 2 rows

IPAddressFailuresUsers
198.51.100.231212
203.0.113.4581

Check your own query

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

Level 2 cleared

2

Level 2 clue · pinned to the incident

Two attacks, not one. At 07:40 198.51.100.23 sprayed 12 users once each and never got in. At 08:14 203.0.113.45 went after Alex Morgan alone: eight failures. Did the brute force get in?

You can now count, count different values, filter groups and bucket time. Level 3 asks the question every incident turns on: did they get in?

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.