Every level, in the open
SOC Field
5 worlds · 53 levels · 5 bosses
SOLUTION HIDDENTeachers see answer keys in the classroom.
Work like a SOC analyst on real-shaped logs: KQL and SPL, alert triage, hunts across auth, web and DNS, Sigma rules, incident response. Honest note: Sentinel, Splunk and SOAR consoles are commercial, so kql, spl, lucene, sigma and soar are SIMs that teach the model.
Guided levels show the command first. Alone levels give the goal only. Bosses and exams are timed.
Jump to a world
World 1Query Desk
15 levelsYour first seat in the SOC: ask the logs questions in the two languages every SIEM job uses, KQL and SPL, then turn a question into a saved rule.
Level 1: Tables and pipes
Objective: Peek at the auth table, then count its events and tell Kern the number.
A SIEM keeps every log event in a searchable table. In Microsoft Sentinel's language, KQL, you name a table and pipe it through operators: hidden shows five rows, and hidden counts them. Each | hands the result of the left side to the right side.
Commands taught
kqlsiem-tablesLevel 2: Keep only some rows
Objective: Filter the auth table three ways: by result, by user, and with not-equals.
where keeps the rows that match a test and drops the rest. The test has a column, an operator and a value: result == "failure". In KQL == means equals, != means not equals, and text values go in double quotes. You add it with a pipe, like take and count.
Commands taught
where-filtersLevel 3: The other dialect
Objective: Show five failed logins with spl, then count all failed logins and tell Kern the number.
Splunk's language, SPL, starts with a search: spl 'index=auth result=failure' picks the index (the table) and keeps events where result is failure. Then pipes work like KQL: | head 5 keeps five, | stats count counts. Same logs, different words.
Commands taught
splspl-searchLevel 4: SPL search terms
Objective: Search the auth index with a bare word, a field=value term, and a wildcard.
In SPL the filter is not a command: it is the first part of the search, written after index=auth. A bare word matches anywhere in an event. field=value matches one column. A * is a wildcard that matches any ending. Words next to each other must all match.
Commands taught
spl-searchLevel 5: OR, NOT and counting by
Objective: Combine terms with OR and NOT, then count events per user.
Terms next to each other are ANDed: all must match. Write OR (capital letters) between two terms to accept either, and NOT before a term to remove matches. Then stats count by FIELD makes one row per value of FIELD, with how many events it had.
Commands taught
spl-searchstats-summarizeLevel 6: KQL filter words
Objective: Use startswith, and, not(...) and distinct in KQL.
where understands more than ==. startswith matches the beginning of a text. and, or, not(...) combine tests. distinct lists each different value once. Try each on its own before level 3 mixes them.
Commands taught
where-filtersLevel 7: Only what matters
Objective: Service accounts (names start with svc) keep failing logins from an address outside the company (not 10.x). Find that address.
KQL filters with where: where user startswith "svc" and result == "failure" (also has, in, !=, or, not). SPL filters in the search itself: user=svc* result=failure NOT src_ip=10.* (* is a wildcard, NOT removes matches).
Commands taught
where-filtersLevel 8: Count it, three ways
Objective: Find the address with the most failed logins in KQL, SPL and SQL, then tell Kern which one it is.
Same question, three dialects: who failed the most? KQL: summarize count() by src_ip. SPL: stats count by src_ip. SQL (you know it from sqlite3): SELECT src_ip, COUNT(*) FROM auth GROUP BY src_ip. Different words, one idea: group the rows, count each group.
Commands taught
stats-summarizerosettaLevel 9: Sort and top
Objective: Rank users by event count in KQL (sort, then top) and SPL (sort, head).
Counting gives you a table; ranking tells you what to look at. KQL: sort by n desc orders biggest first; top 3 by n keeps the biggest three in one step. SPL: sort -count puts the biggest first, head 3 keeps three. Note take 3 is NOT the top three: it is any three.
Commands taught
sort-topLevel 10: Biggest first
Objective: A laptop sent far more data out than any other. Which host in the web table received the most bytes in total (sum of bytes_out)? Tell Kern the host.
To rank, sum then sort. KQL: summarize total = sum(bytes_out) by host | top 1 by total (top N keeps the biggest N). SPL: stats sum(bytes_out) as total by host | sort -total | head 1. Biggest first, then keep a few.
Commands taught
sort-topLevel 11: Time ranges and buckets
Objective: Filter the last six hours, bucket events by time, and do both in SPL.
Logs are time-stamped, so you can ask about a window or a bucket. ago(6h) is six hours before now (the newest event). bin(ts, 1h) rounds times down to the hour, so count() by bin(ts, 1h) counts per hour. SPL: earliest=-6h and timechart span=1h count.
Commands taught
time-bucketsLevel 12: What time was it?
Objective: Failed logins spiked in one hour of the day. Find the hour of the peak and tell Kern its number (kern 03 means 03:00-03:59).
Attacks happen at a moment. bin rounds a time down to a bucket: KQL summarize count() by bin(ts, 1h) counts per hour; SPL timechart span=1h count (or bin span=1h _time | stats count by _time) does the same. Then rank the buckets to find the peak.
Commands taught
time-bucketsLevel 13: Make your own column
Objective: One machine asks DNS for a strange, very long random domain. With spl, find the domain with the longest name and tell Kern the domain.
Compute a new field per event: SPL eval n=len(query), KQL extend n = strlen(query). Then rank it. Attackers' tools often leave weird values: a domain 28 letters long, random, is a strong sign of malware calling home (a DGA). Spot it by measuring length.
Commands taught
eval-extendLevel 14: Save the rule
Objective: Save a rule in ~/soc/rules/brute.kql (or brute.spl) that returns every src_ip with 10 or more FAILED logins, one row per address.
A query becomes a detection rule when it is saved and run on new data: it must match a PATTERN (10 or more failures from one address), never a hard-coded address. kql -f FILE (or spl -f FILE) runs a saved query; this level re-runs yours on today's logs and a hidden second day.
Commands taught
saved-rulesLevel 15: Breach at the VPN
Objective: An account was taken over. Find the attacker's address, the peak hour of its attack, the account it broke into, and where that account sent its data.
A brute-force that worked: many failures from one address, then a success from the same address, then data leaving. Chain your queries: address, then time, then account, then destination.
World 2Alert Queue
9 levelsWork a real-shaped SIEM alert queue: read alerts, pivot into the raw logs, decide true or false positive, escalate what worked and tune what cries wolf.
Level 16: The alert table
Objective: Look at the alerts table, count it by severity, then find which rule raised the most high-severity alerts.
An alert is a saved query that fired, stored in a table like any log: rule_id and rule, severity (low to critical), level (a number), the entities (src_ip, user, host) and the MITRE technique. You query it with the same kql and spl.
Commands taught
alert-anatomyLevel 17: The case console
Objective: Open the queue, read alert A-1001, close it as a known job, then close A-1002 as a false positive.
soar is the case console (like Sentinel incidents or Splunk SOAR): list, show ID, close ID DISPOSITION "reason". tp = malicious, fp = the rule fired on the wrong thing, btp = real but allowed (a known job), always with a reason.
Commands taught
soardispositionsLevel 18: Trust, then verify
Objective: Two brute-force alerts. Pivot each one into auth, escalate the one that worked, close the one that failed.
An alert is a claim: pivot its src_ip into the raw auth table and check whether a success followed the failures. Success: soar escalate ID "note"; failures only: a real attack that failed, so close it as tp.
Commands taught
pivotLevel 19: Group the queue
Objective: Group the queue by rule, count distinct hosts per rule, and find the rule that touches the most hosts.
Forty alerts are rarely forty problems. Group them: count() per rule shows the loud rules, dcount(host) (SPL: dc(host)) counts how many DIFFERENT hosts each rule fired on. A rule with 25 alerts on one host is one noisy machine; a rule with 6 alerts on 6 hosts is spreading.
Commands taught
dcount-dcLevel 20: Known good
Objective: Six alerts. Read the notes, pivot where you need to, and empty the queue with the right dispositions (close or escalate each one).
Triage is subtraction with evidence. Read ~/soc/notes first: known jobs and approved changes turn alerts into btp. A long but normal name fools the DGA rule: fp. A brute force with a success: escalate. Every alert leaves the queue with a disposition and a reason.
Commands taught
dispositionsLevel 21: The other console
Objective: Alert A-4001 is a brute force. In SPL, find how many different accounts its address tried, and tell Kern the number.
Same pivot, Splunk dialect: index=auth src_ip=ADDRESS, then | stats dc(user) counts the different accounts the address tried. Many accounts from one address is password spraying; many tries on one account is classic brute force.
Commands taught
pivotdcount-dcLevel 22: Tune the noise
Objective: Save ~/soc/rules/r100.kql (or .spl): every src_ip with 10 or more failed logins, never the approved scanner in notes/pentest.txt.
Tune a rule without blinding it: exclude exactly the approved source (src_ip != "198.51.100.77" in KQL, NOT src_ip=198.51.100.77 in SPL), then count failures per src_ip, 10 or more. Graded on today and a hidden day.
Commands taught
tuningLevel 23: Eight alerts, eight minutes
Objective: Eight alerts in the queue. Close or escalate every one with the right disposition before the timer ends.
Speed with evidence. Notes explain the known jobs, travel and approved scans (btp). A long but normal name fooling the DGA rule is fp. A brute force with no success is tp (close it). A brute force followed by a success is escalated.
Commands taught
dispositionsLevel 24: Night queue
Objective: Twelve alerts after midnight. Find the account that was really taken over, escalate its alert, and close everything else correctly.
The whole tier-1 loop under pressure: group the queue, subtract the known, pivot the claims into raw logs, escalate the one that worked, close the rest with reasons.
World 3Hunting Grounds
10 levelsHunt without an alert: follow clues through auth, web and DNS with union, join, lookups, regex and Lucene, and catch beacons, web shells and tunnels.
Level 25: Every table at once
Objective: Follow one address through auth, web and dns with union, then count it per table.
union reads several tables as one (union auth, web, dns), so a where on src_ip finds the address in every log. withsource=table adds a column naming each row's table, so you can count per table.
Commands taught
union-joinLevel 26: Two tables, one answer
Objective: Enrich web traffic with the asset list, find who owns a machine that touched a bad domain, then find a device that is not in the list at all.
join glues rows that share a value: web | join kind=inner (assets) on src_ip adds host, owner and criticality. kind=inner keeps matches; kind=leftanti keeps rows with NO match, like devices nobody registered.
Commands taught
union-joinLevel 27: SPL lookups
Objective: Enrich DNS and web events with the asset CSV, then find the host behind a bad domain.
Splunk enriches from CSV files: | lookup assets.csv ip AS src_ip OUTPUT host owner (ip is the CSV column, src_ip the event field, OUTPUT the columns to add). | join src_ip [search index=assets] glues a second search.
Commands taught
lookup-rexunion-joinLevel 28: Cut the URL
Objective: Split web URLs into path and parameters with rex and extract, then find the page that runs commands.
SPL rex pulls a piece out of a string with a named group: | rex field=url "^(?<path>[^?]*)" (everything before the ?). KQL: extend path = extract("^([^?]*)", 1, url).
Commands taught
lookup-rexLevel 29: Lucene in the search bar
Objective: Search auth and web with Lucene: a field, AND, NOT, a range, then count the failed logins from outside.
The OpenSearch and Wazuh search bar speaks Lucene: field:value, AND, OR, NOT, * wildcards and ranges field:[low TO high]; two terms with nothing between them mean OR. Here: lucene [-c] INDEX 'QUERY'.
Commands taught
luceneLevel 30: The heartbeat
Objective: Find the domain only one machine asks for, again and again, then name the machine.
A beacon is malware calling home on a timer: one machine asking for one rare domain all day, while normal domains have many clients. summarize clients = dcount(src_ip), n = count() by query | where clients == 1 finds it.
Commands taught
beaconingLevel 31: Front door
Objective: Someone runs commands on web01 through a page. Find the page that answers cmd= requests with status 200 and tell Kern its path.
A web shell is a page an attacker uploaded so they can run commands through the web server. Its trail: an upload, then requests to the new page with a command parameter, answered with status 200. Scanners that hit the same name and get 404 are noise.
Commands taught
lookup-rexLevel 32: Who leaked?
Objective: One machine sent a lot of data to a domain no other machine uses. Tell Kern that machine's host name.
Exfiltration hides in normal uploads. Sum bytes_out per source and destination; a big total to a domain that nobody else uses is the one. Then join the asset list so the ticket names a machine, not an address.
Commands taught
union-joinbeaconingLevel 33: Whispers in the DNS
Objective: Data is leaking through DNS. Find the base domain, the machine sending it, and the account logged in on that machine.
DNS tunneling smuggles data inside query names: long random labels under one base domain, often TXT queries, from one machine. Measure the names (strlen), group by the base domain, then follow the machine into auth.
Commands taught
beaconingLevel 34: The Mask's trail
Objective: Hypothesis: a Mask has an implant that beacons out, used a service account from a laptop, and sent data out. Prove each step and name it.
A threat hunt: start from a hypothesis, test it in the data, follow each answer to the next table. Beacon (dns) -> machine (assets) -> account misuse (auth) -> where the data went (web).
World 4Rule Forge
10 levelsWrite detections once and ship them everywhere: Sigma rules converted to KQL, SPL and Lucene, SIEM thresholds, tuning filters and ATT&CK tags.
Level 35: One rule, every SIEM
Objective: Validate a ready-made Sigma rule, convert it to KQL and SPL, run both, and tell Kern how many events it matches.
Sigma is a YAML format for detections (logsource, detection, condition, level, tags). sigma check RULE validates it; sigma convert -t kusto|splunk|lucene RULE prints it in that SIEM's language, which you save with > and run with kql -f or spl -f.
Commands taught
sigmaLevel 36: Write the detection
Objective: Write your first detection block onto a rule header with printf, check and convert it, then twist the modifier and count what it matches.
detection: holds named selections (sel:) of field|modifier: value lines that must ALL match, plus a condition: line. Modifiers: |contains, |startswith, |endswith, |re, |cidr, |all; none means equals, ignoring case; indent 4 and 8 spaces.
Commands taught
sigma-modifiersLevel 37: Lists and filters
Objective: Read the converted brute-force rule part by part, convert it to KQL and SPL, and count what it matches.
A list under a field means ANY value (vpn OR ssh); the condition combines blocks: selection and not filter_scanner. The kusto converter writes equals as =~ (ignore case), a list as in~ (...) and not as not(...).
Commands taught
sigma-conditionLevel 38: The threshold
Objective: Turn the brute-force Sigma rule into a scheduled rule: convert it, add a threshold of 10 failures per address, and prove it on a day it has never seen.
Sigma says WHICH events match; the threshold is the SIEM's job: KQL | summarize n = count() by src_ip | where n >= 10, SPL | stats count by src_ip | where count >= 10. sed -i 's/$/ TEXT/' FILE appends TEXT to the line.
Commands taught
detection-thresholdLevel 39: The Lucene target
Objective: Convert two rules to Lucene, run them in the search bar SIM, and see how the converter escapes a path.
For Wazuh, OpenSearch and Elastic, convert with -t lucene. Lucene needs special characters escaped with a backslash: ../ becomes ..\/ and spaces become \ (backslash space). The converter does it for you. Run the result with lucene INDEX "$(sigma convert -t lucene RULE)".
Commands taught
sigmaluceneLevel 40: Your first rule
Objective: Write rules/webshell.yml: a Sigma rule matching web requests whose url contains cmd= and got status 200 (graded on today and a hidden day).
A rule from scratch: header (cp rules/web.head.yml), detection block (printf ... >>), sigma check, then test it. Every field in one selection must match. The web shell: url contains cmd= AND status is 200 (scanners that guess a name get 404).
Commands taught
sigma-modifiersLevel 41: Tags and level
Objective: Give the web shell rule its ATT&CK tags, raise its level to critical, and check it.
level (informational, low, medium, high, critical) sets the alert severity; tags link the rule to MITRE ATT&CK: attack.persistence is the tactic, attack.t1505.003 the web shell technique. sigma check refuses bad levels and tags.
Commands taught
mitre-tagsLevel 42: Tune the Sigma
Objective: rules/brute.yml fires on the approved pentest scanner (notes/pentest.txt). Add a filter for exactly that address and use it in the condition.
Tuning a Sigma rule: add a filter block (filter_scanner:, src_ip: THE.ONE.ADDRESS) and change the condition to selection and not filter_scanner. Exclude exactly the approved address, never its whole range. Graded by converting your rule and running it on today and a hidden day.
Commands taught
sigma-conditiontuningLevel 43: Three dialects
Objective: The SOC runs Splunk and the Wazuh dashboard. Convert rules/traversal.yml into rules/trav.spl and rules/trav.lucene.
One Sigma rule, one file per SIEM: sigma convert -t splunk RULE > FILE.spl for Splunk, sigma convert -t lucene RULE > FILE.lucene for the Wazuh/OpenSearch search bar. Each file is graded by running it.
Commands taught
sigmaLevel 44: Tomorrow's spray
Objective: Write rules/spray.yml and rules/spray.kql that catch one address failing on 5 or more different accounts, never the scanner (graded on a hidden day too).
Detection engineering end to end: a Sigma rule for the events (failures, minus the approved scanner), converted, then a SIEM threshold that describes the behaviour. Password spraying = one address, MANY different accounts: dcount(user), not count().
World 5War Room
9 levelsRun the incident when a rule fires for real: timeline, scope, containment backed by evidence, the back door, and the report.
Level 45: The timeline
Objective: Build the attacker's timeline across auth and web, save it, then find first seen and the moment of compromise.
A timeline is every attacker event, oldest first: union the tables, filter the address, sort by ts asc, and save it with > for the team. summarize first = min(ts), last = max(ts) gives first seen and last seen.
Commands taught
soc-timelineLevel 46: Scope it
Objective: Find every machine that asked for the C2 domain, count them, and name the most critical one.
Scoping asks how far it spread: start from one indicator (the C2 domain), find every machine that touched it, and rank them by criticality with the assets table. A laptop and a domain controller are different incidents.
Commands taught
ir-scopeLevel 47: Containment
Objective: Block the attacker, disable the stolen account, isolate the laptop, then block the second address named in the ticket.
Containment stops the bleeding: soar block-ip ADDRESS (firewall), soar disable-user NAME (account), soar isolate HOST (EDR); hidden lists them and soar undo ID reverses one. In this SIM the actions are recorded, never run.
Commands taught
soc-containmentsoarLevel 48: Exactly enough
Objective: Find the attacker (the address with failures then a success), the stolen account and its laptop, and contain exactly those three.
Over-containment is an incident too: isolating the domain controller breaks the company. Contain exactly what the evidence proves (address, account, laptop) and undo anything extra with soar undo ID.
Commands taught
soc-containmentLevel 49: The report
Objective: Write the incident report line by line: attacker, account, first seen, containment and root cause.
The report is one fact per line, 'Label: value', each backed by a query: Attacker IP, Account, First seen, Containment, Root cause. echo 'Label: value' >> case/report.md appends a line (> would erase the file).
Commands taught
ir-reportLevel 50: Who else?
Objective: The ticket says the attacker got into one account. Find the OTHER account it logged in to and tell Kern.
Never assume the first victim is the only one. The ticket names one account; the logs may hold another success from the same address. Query every success from the attacker, then compare with the ticket.
Commands taught
ir-scopeLevel 51: The back door
Objective: The attacker made itself an account. Find it, tell Kern, and disable it.
Attackers leave persistence: a new account they can come back with. Compare who logs in now with who should exist (notes/accounts.txt lists the real ones); a new name logging in from the stolen laptop is the back door. Disable it too.
Commands taught
soc-containmentLevel 52: Time to detect
Objective: How many minutes passed between the attacker's first event and the first alert? Tell Kern the number of minutes.
Time to detect runs from the attacker's first event to the first alert about it. Get both with union withsource=table auth, alerts | where src_ip == "X" | summarize first = min(ts) by table, then subtract.
Commands taught
ir-reportLevel 53: The night the fires went out
Objective: Run the incident: find the attacker, the stolen account and the C2 domain, contain exactly what the evidence proves, and write the report.
The whole incident: identify (attacker, account), scope (the infected laptop and its C2 domain), contain exactly (block, disable, isolate), report the facts.
For teachers
Use these levels with a class
SOLUTION HIDDEN Teachers see answer keys in the classroom.