VeriKQL by Kaushik Saha

KQL Mastery Path · by Kaushik Saha

One SOC shift, six alerts

You are the analyst on shift at Contoso. Six alerts come in, and each one is solved with one new KQL idea on the real Microsoft Sentinel tables. By the end, you will see they were one attack.

Start with the toolkitKnow the basics? Go to Level 1

  1. Level 0

    Your toolkit

    Before the shift, learn the commands you'll use

    nine cards · about three minutes each

    1. 0.1Look at the data
    2. 0.2Filter rows
    3. 0.3Match text
    4. 0.4Put rows in order
    5. 0.5Work with time
    6. 0.6Count and group
    7. 0.7Add columns and reuse values
    8. 0.8Combine tables
    9. 0.9Open nested fields
  2. Level 1

    Read the logs

    Alert A user reports a strange sign-in prompt

    take · project · where · sort · top · has

    1. 1.1Meet SigninLogs
    2. 1.2Find the failures
    3. 1.3Newest first
    4. 1.4Follow one user
    5. 1.5Level 1 bug hunt
  3. Level 2

    Count and compare

    Alert Spray or brute force?

    summarize · count · dcount · bin

    1. 2.1Count by address
    2. 2.2How many users?
    3. 2.3Filter the groups
    4. 2.4When did it happen?
    5. 2.5Level 2 bug hunt
  4. Level 3

    Did they get in?

    Alert Failures, then a success

    countif · let · arg_max · bin

    1. 3.1Failures and successes
    2. 3.2The moment they got in
    3. 3.3Last seen
    4. 3.4The detection
    5. 3.5Level 3 bug hunt
  5. Level 4

    Same user, two countries

    Alert Impossible travel

    dynamic columns · tostring · time arithmetic · geo_distance_2points

    1. 4.1Where were they?
    2. 4.2Two countries
    3. 4.3How fast?
    4. 4.4Impossible travel
    5. 4.5Level 4 bug hunt
  6. Level 5

    What did they touch?

    Alert After the break-in

    between · make_set · parse_json · mv-expand

    1. 5.1After the break-in
    2. 5.2Unusual apps
    3. 5.3How MFA was passed
    4. 5.4High-risk sign-ins
    5. 5.5Level 5 bug hunt
  7. Level 6

    Is this one incident?

    Alert Six alerts, one attacker

    join · union · ATT&CK · analytics rule

    1. 6.1The email
    2. 6.2The role grant
    3. 6.3One timeline
    4. 6.4Name it and ship it
    5. 6.5Case closed

How it works

  • Level 0 comes first: nine short cards that explain each command, with an example and its result. Every command is also in the command reference.
  • Levels 1 to 6 use those commands on real alerts. Each mission takes about five minutes.
  • Every query on a page is checked by VeriKQL with Microsoft's own parser, and its result is shown on the course's sample data. You don't need a workspace.
  • Each mission ends with a task: write your own query in the box and check it.
  • Each level ends with a bug hunt and a clue about the incident.

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.