// reference · query patterns

KQL Pattern Bank
the boring 70%, documented

Auto-extracted from every KC7 lab writeup — each tagged @bank query gets promoted here with its source lab attached. Write the investigation once; the reference builds itself.

16
patterns banked
5
categories
9
ATT&CK techniques
2
source labs
auto-generated from vault · last lab 2026-08-10
KC7 Security Analyst I badge
KC7 Foundation · Pathway Complete
Security Analyst I
Indicators of compromise, investigative hypotheses, structured KQL analysis — every lab below is a step on this pathway
verify badge ↗
// investigations
// reference · extracted patterns
filter
PTN-009 email chains

Characterise a phishing sender

Email
| where recipient == "sonia_gose@valdoriantimes.news"
| where subject contains "apply"
banked from A Scandal in Valdoria T1566.002
PTN-010 email chains

Pivot recipient to click

OutboundNetworkEvents
| where src_ip == "10.10.0.3"
| where url contains "promotionrecruit"
banked from A Scandal in Valdoria T1566.002
PTN-022 process

Trace a downloaded file to disk

FileCreationEvents
| where hostname == "UL0M-MACHINE"
| where filename == "Valdorian_Times_Editorial_Offer_Letter.docx"
banked from A Scandal in Valdoria T1204.002
PTN-006 timeline / pivot

Window around an indicator

FileCreationEvents
| where hostname == "UL0M-MACHINE"
| where timestamp >= datetime(2024-01-05 10:24:04+00:00) and timestamp < datetime(2024-01-05 10:34:04+00:00)
banked from A Scandal in Valdoria — technique
PTN-023 process

Find processes spawned by a malicious script

ProcessEvents
| where hostname == "UL0M-MACHINE"
| where process_commandline contains "hacktivist_manifesto.ps1"
banked from A Scandal in Valdoria T1059.001
PTN-024 c2 / beaconing

Confirm a tunnel tool's connection details

ProcessEvents
| where hostname == "UL0M-MACHINE"
| where process_commandline contains "plink"
banked from A Scandal in Valdoria T1572
PTN-025 process

Enumerate discovery commands in an attack window

ProcessEvents
| where hostname == "UL0M-MACHINE"
| where parent_process_name == "cmd.exe"
| where timestamp >= datetime(2024-01-06) and timestamp <= datetime(2024-01-07)
banked from A Scandal in Valdoria T1033
PTN-026 process

Search network events by filename substring

ProcessEvents
| where hostname == "A37A-DESKTOP"
| where process_name == "cmd.exe"
banked from A Scandal in Valdoria — technique
PTN-027 exfiltration

Detect archive-then-upload exfil via process commands

ProcessEvents
| where hostname == "A37A-DESKTOP"
| where process_name == "cmd.exe"
banked from A Scandal in Valdoria T1560.001
PTN-031 process

Review process activity on a host during an incident window

ProcessEvents
| where hostname == "AMFB-MACHINE"
| where timestamp between (datetime(2024-06-17) .. datetime(2024-06-18))
| sort by timestamp desc
PTN-033 c2 / beaconing

Pivot a malicious domain to its hosting infrastructure

PassiveDns
| where domain == "secure-health-access.com"
| distinct ip