KQL practice on realistic attack logs

Write Kusto (KQL) queries against fictional Sentinel and Defender logs. Graded instantly, in your browser.

SigninLogs14 columns
  • TimeGenerated datetime
  • UserPrincipalName string
  • UserDisplayName string
  • AppDisplayName string
  • ClientAppUsed string
  • IPAddress string
  • Location string
  • LocationDetails dynamic
  • ResultType string
  • ResultDescription string
  • ConditionalAccessStatus string
  • AuthenticationRequirement string
  • RiskLevelDuringSignIn string
  • RiskState string

Sample rows

First 3 rows of SigninLogs
TimeGeneratedUserPrincipalNameUserDisplayNameAppDisplayNameClientAppUsedIPAddressLocationLocationDetailsResultTypeResultDescriptionConditionalAccessStatusAuthenticationRequirementRiskLevelDuringSignInRiskState
2026-06-08T12:00:14Ztereza.cerna@kestrelbay.exampleTereza CernaSharePoint OnlineMobile Apps and Desktop clients198.51.100.10CZ{"city":"Prague","state":"Hlavni mesto Praha","countryOrRegion":"CZ","geoCoordinates":{"latitude":50.0755,"longitude":14.4378}}0notAppliedsingleFactorAuthenticationnonenone
2026-06-08T12:00:34Zzuzana.kratochvilova@kestrelbay.exampleZuzana KratochvilovaMicrosoft TeamsMobile Apps and Desktop clients198.51.100.10CZ{"city":"Prague","state":"Hlavni mesto Praha","countryOrRegion":"CZ","geoCoordinates":{"latitude":50.0755,"longitude":14.4378}}0notAppliedsingleFactorAuthenticationnonenone
2026-06-08T12:01:10Zmichal.ruzicka@kestrelbay.exampleMichal RuzickaOfficeHomeBrowser198.51.100.10CZ{"city":"Prague","state":"Hlavni mesto Praha","countryOrRegion":"CZ","geoCoordinates":{"latitude":50.0755,"longitude":14.4378}}0notAppliedsingleFactorAuthenticationnonenone
Engine idlenow() = 2026-06-15 12:00:00Z

Next up

The next free exercises
#ExerciseSeverityTypeTablesState
02Complete the query: brute force against a servermediumCompleteSecurityEvent, SC-200: Detect threats by using the Microsoft Sentinel platform
03Spot impossible travel: two countries in one hourmediumWriteSigninLogs, SC-200: Configure detections
04Size up a password spray from one IPeasyWriteSigninLogs, SC-200: Detect threats by using the Microsoft Sentinel platform
05Complete the query: did the password spray work?easyCompleteSigninLogs, SC-200: Investigate Microsoft 365 activities to identify threats
06Failed sign-ins by client app, most firsteasyWriteSigninLogs, SC-200: Detect threats by using the Microsoft Sentinel platform
07Which account names did the attacker try?easyWriteSecurityEvent, SC-200: Detect threats by using the Microsoft Sentinel platform