VeriKQL by Kaushik Saha

Benchmark v1 · 2026-10-25 · pre-registered

Does VeriKQL make AI-written KQL better?

The same model, Claude Sonnet 5.5, wrote 70 Microsoft Sentinel and Defender XDR detection requests, three times each: once alone, and once with VeriKQL's tools. Microsoft's own parser scored every final query. The method and the pass mark were fixed and approved before anything ran, and the result is published as it stands.

Pre-registered verdict: Did not pass

This is the first run. The second, v2, ran on 2026-10-27 after the fixes v1 pointed to, under a new pre-registration, and passed. Read v2.

The headline

Compiles and binds against the real schemahigher is better
Claude alone86.2%Claude + VeriKQL97.6%Claude alone86.2%Claude + VeriKQL97.6%
Invents a table, column or functionlower is better
Claude alone6.7%Claude + VeriKQL0.0%Claude alone6.7%Claude + VeriKQL0.0%
83%of failing runs removed: 13.8% failed alone, 2.4% with VeriKQL (post hoc)
0.0%invented names with VeriKQL, in 210 runs
$17.43for all 420 detections, 924 model calls

The verdict

Pre-registered ruleNeededGotMet
Compile-and-bind liftat least +20 points+11.4 points (86.2% → 97.6%)no
Invented namesat most half of Claude alone6.7% → 0.0%yes

Both rules had to hold. The second did; the first didn't, so v1 does not pass.

Is "did not pass" a mistake? No. It is the rule applied as written. The +20 bar was set on 2026-10-06, before Claude alone had been measured on these cases. Claude alone then compiled 86.2% of the time, so no tool could have added more than 13.8 points. VeriKQL added +11.4 of them. Moving the bar after seeing the result would make the benchmark worthless, so v1 keeps it. v2 was pre-registered with a bar that fits a strong baseline, before it ran (v2's report).

How this result was reached

  1. 2026-10-06 The question and the pass mark were approved: at least +20 points on compile and bind, and invented names at least halved.
  2. 2026-10-23 The 56 public requests were published and the 14 held-out ones kept private. Claude drafted the labels from evidence; the owner reviewed them and made no edits.
  3. 2026-10-23 The pre-registration was approved, pinning the VeriKQL commit, the model and every file's digest.
  4. 2026-10-24 One amendment, before any run: the spending cap went from $150 to $65, to stay under the API account's limit.
  5. 2026-10-24 Run #3 was a check-only pre-flight: it confirmed the pinned files and the API key, and called no model.
  6. 2026-10-24 Run #6 was the benchmark: 420 detections, from 21:42 UTC to 00:17 UTC on 2026-10-25.

Changed before the run, and why. Each was found while building the benchmark, before any result existed:

  • Defender XDR queries are now checked against Defender's own schema, so a correct query using Timestamp isn't marked as failing.
  • ATT&CK agreement no longer counts a sibling sub-technique as a match.
  • Four revoked ATT&CK ids in the labels were replaced by their current ones.
  • No verdict is given unless every case ran for every repeat in both arms.

What was not done. One model was tested, Claude Sonnet 5.5, in both arms; no other model or version was tried. No case was re-run, and nothing was changed after the results came in.

Every dispatch. The run was started six times. Runs #1, #2, #4 and #5 stopped at the typed spending confirmation, before any model was called. Run #3 was the check-only pre-flight. Run #6 is the only one that called a model, and the only result. Nothing was spent outside it.

How to read this report

Case
One written detection request, such as "catch one IP spraying passwords across many accounts". 70 cases: 56 public, and 14 held-out cases kept private so nothing could be tuned to them.
Run
Claude writing one detection for one case. Each case ran 3 times per arm, to smooth out chance: 210 runs per arm, 420 in all.
Arm
One way of working. Alone: the request, then one answer. + VeriKQL: the same model may call VeriKQL to look up tables and check its query, for up to 6 rounds.
Compiles and binds
Microsoft's parser accepts the final query and every table, column, function and type exists in the real schema.
Invents a name
The final query uses a table, column or function that doesn't exist.
Lift
How many percentage points higher the compile rate is with VeriKQL.
Slices
All, public, held-out: slices of the same run, not separate tests. Compare within a row: the headline is all 70 cases.
Post hoc
Worked out after the results were known. Shown, labelled, and never used to change the verdict.

Results, by slice

Compiles and bindsInvents a nameRuns per arm
Alone+ VeriKQLAlone+ VeriKQL
All 70 cases86.2%97.6%6.7%0.0%210
56 public cases84.5%98.2%7.1%0.0%168
14 held-out cases92.9%95.2%4.8%0.0%42

What failed

Public cases only; held-out cases are published as totals.

  • Claude alone: 26 of 168 runs failed: 17 failed to parse or bind, 9 refused: not a plain read-only query. Most common codes: KS142 a name that doesn't exist (12), KS141 a filter that isn't true or false (4), KS002 an unexpected character (3), KS198 an unfinished query (3).
  • Claude + VeriKQL: 3 of 168 runs failed: 3 no query in the answer.
  • KS142 is Microsoft's parser saying a name doesn't refer to any known column, table, variable or function: the invented-column case.

Every failing run with VeriKQL used all 6 rounds and then answered without a query. None was a query that fails to bind.

Secondary metrics

Alone+ VeriKQL
Used the expected tables94.8%93.8%
Named the expected ATT&CK techniques92.5%95.4%

Claude alone is ahead on table choice by about 2 runs in 210, which is within the noise. VeriKQL checks that a query is correct; it doesn't steer the model to particular tables. These metrics compare each query with a label, the expected answer, and the labels were drafted by Claude from evidence and reviewed by the owner. They don't count toward the verdict.

Every public case

Runs that compiled and bound, out of 3, for each arm. Open a case for its request, what it was expected to use, and why any run failed.

Better with VeriKQL (19)

S04Alert when an account authenticates using one of the old, non-interactive sign-in methods that pre-date modern authentication, when that same account …Sentinel2/33/3

Sentinel scheduled rule. Alert when an account authenticates using one of the old, non-interactive sign-in methods that pre-date modern authentication, when that same account has never used that method in the previous month. Build the baseline per user from the last thirty days of their own sign-ins and only fire on a genuinely first-seen method. These legacy paths sidestep conditional access, so a sudden first-time appearance on a given account is what I want.

Expected tables
(SigninLogs or AADNonInteractiveUserSignInLogs)
ATT&CK
T1078.004
Must catch
a sign-in using a legacy client (IMAP, POP, SMTP, ActiveSync, other clients) by an account that hasn't used that client in the previous 30 days

Why runs failed:

  • Claude alone: KS142 (a name that doesn't exist)
S10Alert when someone uses the built-in directory maintenance tool to make a copy of the domain controller's identity database — the install-media trick …Sentinel2/33/3

We collect our Windows endpoint events into Sentinel and run this as a scheduled rule. Alert when someone uses the built-in directory maintenance tool to make a copy of the domain controller's identity database — the install-media trick that lets an attacker carry off every account's password hash to crack offline. This should almost never happen, so even one instance on a domain controller is worth paging on. Give me the controller, the account, and the full command.

Expected tables
(SecurityEvent or DeviceProcessEvents or Event)
ATT&CK
T1003.003
Must catch
ntdsutil run with 'ifm' / 'create full' on a domain controller

Why runs failed:

  • Claude alone: refused: not a plain read-only query
S15I'm hunting the technique where an attacker asks the domain for service access tickets for lots of service accounts so they can crack those passwords …Defender XDR1/33/3

Defender XDR custom detection against our on-premises directory telemetry. I'm hunting the technique where an attacker asks the domain for service access tickets for lots of service accounts so they can crack those passwords offline, and they deliberately request the weakest ticket encryption. Flag an account pulling an unusual number of these tickets, or asking for the weak encryption type, compared with how it normally behaves. Return the requesting account, the targeted service accounts, and the counts.

Expected tables
(IdentityLogonEvents or IdentityQueryEvents or IdentityDirectoryEvents)
ATT&CK
T1558.003
Must catch
one account requesting service tickets for many service accounts, or requesting RC4 encryption, against its own baseline

Why runs failed:

  • Claude alone: KS142 (a name that doesn't exist); KS141 (a filter that isn't true or false)
S18Flag a single account that logs on interactively to an unusually large number of distinct machines in a short span — far more hosts than that account …Sentinel2/33/3

Sentinel scheduled rule over our on-premises authentication data. Flag a single account that logs on interactively to an unusually large number of distinct machines in a short span — far more hosts than that account normally touches — which looks like someone hopping across the network with stolen credentials. Base the threshold on that account's own recent habits. Show the account, the list of hosts, and the window.

Expected tables
(SecurityEvent or IdentityLogonEvents or DeviceLogonEvents)
ATT&CK
T1021
Must catch
one account logging on interactively to many more distinct hosts than its own recent baseline

Why runs failed:

  • Claude alone: KS142 (a name that doesn't exist)
S19I want to catch a single account firing off a burst of directory lookups — enumerating users, groups and their members — at a volume it has never …Defender XDR1/33/3

Defender XDR advanced hunting custom detection on directory telemetry. I want to catch a single account firing off a burst of directory lookups — enumerating users, groups and their members — at a volume it has never shown before, which is how attackers map out the environment before escalating. The key is the first-time spike against that account's own baseline, not the lookups themselves. Return the account, the kinds of lookups, and the counts.

Expected tables
(IdentityQueryEvents)
ATT&CK
T1087.002, T1069.002
Must catch
a first-time spike of user/group/membership directory queries by one account against its own baseline

Why runs failed:

  • Claude alone: KS142 (a name that doesn't exist); KS142 (a name that doesn't exist)
S21Alert whenever a mailbox owner sets up a rule that automatically forwards their incoming mail to an address outside our organisation.Defender XDR2/33/3

Defender XDR custom detection. Alert whenever a mailbox owner sets up a rule that automatically forwards their incoming mail to an address outside our organisation. That's a common way a hijacked account quietly leaks correspondence. Give me the mailbox, the external destination, and when the rule was made.

Expected tables
(CloudAppEvents)
ATT&CK
T1114.003
Must catch
an inbox rule or mailbox setting that forwards or redirects mail to an external address

Why runs failed:

  • Claude alone: refused: not a plain read-only query
S26Catch an internal mailbox that suddenly starts blasting phishing-style messages to a large number of our own colleagues — a volume and spread it has …Sentinel2/33/3

Sentinel scheduled rule. Catch an internal mailbox that suddenly starts blasting phishing-style messages to a large number of our own colleagues — a volume and spread it has never shown before — which is what a freshly hijacked account does to spread sideways. Judge the spike against that sender's own normal internal fan-out, and look for the lookalike or lure-style subjects going to many recipients at once. Return the sender, recipient count, and the window.

Expected tables
(EmailEvents)
ATT&CK
T1534
Must catch
an internal sender's spike in internal recipients versus its own baseline, with lure-style subjects

Why runs failed:

  • Claude alone: KS142 (a name that doesn't exist)
S30Let me know when a long-lived programmatic access key is created for a user account that normally only ever signs in interactively and has no history …Sentinel1/33/3

Sentinel scheduled rule on our AWS account's API call history. Let me know when a long-lived programmatic access key is created for a user account that normally only ever signs in interactively and has no history of using such keys. A new key on an otherwise console-only identity is a classic persistence move. Give me the user, who created the key, and the time.

Expected tables
(AWSCloudTrail)
ATT&CK
T1098.001
Must catch
CreateAccessKey for a user with no prior access-key use (console-only history)

Why runs failed:

  • Claude alone: KS141 (a filter that isn't true or false); KS141 (a filter that isn't true or false)
S33I want to detect temporary credentials that were minted for a compute instance being used from somewhere outside AWS's own network — a strong sign …Sentinel0/31/3

Sentinel scheduled rule over our AWS account's API call history. I want to detect temporary credentials that were minted for a compute instance being used from somewhere outside AWS's own network — a strong sign the instance's role credentials were stolen and are being replayed from the attacker's machine. You'll need to tie the calling identity to an instance role and judge whether the calling address sits outside the provider's ranges. Give me the identity, the source address, and the calls made.

Expected tables
(AWSCloudTrail)
ATT&CK
T1552.005
Must catch
calls by an assumed instance-role identity from a source IP outside AWS ranges

Why runs failed:

  • Claude alone: refused: not a plain read-only query; refused: not a plain read-only query; refused: not a plain read-only query
  • Claude + VeriKQL: no query in the answer; no query in the answer
S40Catch a new sign-in credential or trusted federation being added to an existing application or workload identity — the backdoor move where an …Sentinel2/33/3

Sentinel scheduled rule on Azure control-plane records. Catch a new sign-in credential or trusted federation being added to an existing application or workload identity — the backdoor move where an attacker attaches their own secret to a legitimate app so they can authenticate as it later. Dig into the change detail to pick out the added credential or federation. Give me the app, the principal who changed it, and what was added.

Expected tables
(AuditLogs or AzureActivity)
ATT&CK
T1098.001
Must catch
a new client secret, certificate or federated identity credential added to an existing app or workload identity

Why runs failed:

  • Claude alone: KS107 (a value of the wrong type), KS142 (a name that doesn't exist)
C07Link a user adding a new device to the tenant with that same user, shortly after, pulling an unusually large amount of mail or files down to that new …Sentinel2/33/3

Sentinel scheduled rule. Link a user adding a new device to the tenant with that same user, shortly after, pulling an unusually large amount of mail or files down to that new device. Attackers register their own device and then use it to harvest data, so the two together are worth more than a new-device alert on its own. Correlate on the user and keep them close in time.

Expected tables
(AuditLogs) and (OfficeActivity or CloudAppEvents)
ATT&CK
T1098.005, T1530
Must catch
a user registering a new device, then downloading an unusually large volume of mail or files soon after

Why runs failed:

  • Claude alone: refused: not a plain read-only query
C12Tie temporary instance credentials being used from outside the provider's network to that same identity then sharing a disk snapshot with an external …Sentinel0/33/3

Sentinel scheduled rule over our AWS account's API call history. Tie temporary instance credentials being used from outside the provider's network to that same identity then sharing a disk snapshot with an external account, close together in time. Stolen instance credentials followed by a snapshot handed to an outside account is a theft-then-exfiltration sequence. Correlate by identity and ordering.

Expected tables
(AWSCloudTrail)
ATT&CK
T1552.005, T1537
Must catch
instance-role credentials used from outside AWS, then the same identity sharing a snapshot externally

Why runs failed:

  • Claude alone: refused: not a plain read-only query; refused: not a plain read-only query; refused: not a plain read-only query
C18Tie the root identity creating a new user to that new user then granting itself sweeping permissions and switching off a threat-detection or logging …Sentinel2/33/3

Sentinel scheduled rule over our AWS account's API call history. Tie the root identity creating a new user to that new user then granting itself sweeping permissions and switching off a threat-detection or logging service, all in sequence. Root spawning an identity that immediately arms itself and blinds defences is a deliberate takeover chain. Correlate across the created identity and the ordering of events.

Expected tables
(AWSCloudTrail)
ATT&CK
T1136.003, T1098.003, T1685.002
Must catch
root creating a user, then that user attaching broad permissions to itself and disabling GuardDuty or CloudTrail, in sequence

Why runs failed:

  • Claude alone: KS001 (a string left open), KS002 (an unexpected character), KS005 (a missing bracket or comma), KS142 (a name that doesn't exist), KS198 (an unfinished query)
C20Connect a burst of service-ticket requests aimed at a service account with that targeted service account then authenticating from a host it has never …Defender XDR2/33/3

Defender XDR advanced hunting custom detection. Connect a burst of service-ticket requests aimed at a service account with that targeted service account then authenticating from a host it has never used before and reaching into a file share, soon after. Harvesting a service account's ticket and then seeing that account appear somewhere new is the crack-and-use sequence. Correlate the targeted account across the two phases and the timeline.

Expected tables
(IdentityLogonEvents or IdentityQueryEvents) and (DeviceLogonEvents or IdentityLogonEvents)
ATT&CK
T1558.003, T1078.002
Must catch
a burst of service-ticket requests targeting a service account, then that account authenticating from a new host and accessing a file share

Why runs failed:

  • Claude alone: KS142 (a name that doesn't exist)
A05#StopRansomware: Black BastaSentinel2/33/3

We run Sentinel scheduled rules over our endpoint and server logs. Please write detections for the behaviours in this CISA advisory.

Advisory: #StopRansomware: Black Basta

Expected tables
(SecurityEvent or DeviceProcessEvents or Event)
ATT&CK
T1490, T1685, T1567.002
Must catch
shadow-copy deletion; antivirus or EDR being disabled; a sync tool (e.g. rclone) moving data out

Why runs failed:

  • Claude alone: KS142 (a name that doesn't exist)
A06#StopRansomware: Medusa RansomwareSentinel2/33/3

We use Sentinel scheduled rules. Please write detections for the behaviours in this CISA advisory, targeting our endpoint and server telemetry.

Advisory: #StopRansomware: Medusa Ransomware

Expected tables
(SecurityEvent or DeviceProcessEvents or Event)
ATT&CK
T1219, T1567.002, T1490
Must catch
remote-access tools launched unexpectedly; a sync tool moving data out; shadow-copy deletion

Why runs failed:

  • Claude alone: KS142 (a name that doesn't exist)
A08Russian GRU Targeting Western Logistics Entities and Technology CompaniesSentinel2/33/3

We run Sentinel scheduled rules over our email and identity logs. Please write detections for the behaviours in this CISA advisory.

Advisory: Russian GRU Targeting Western Logistics Entities and Technology Companies

Expected tables
(SigninLogs or AADNonInteractiveUserSignInLogs) and (OfficeActivity)
ATT&CK
T1110.003, T1098.002
Must catch
password spraying against mail accounts; mailbox folder permissions granted to another account

Why runs failed:

  • Claude alone: KS002 (an unexpected character), KS141 (a filter that isn't true or false), KS198 (an unfinished query)
A09#StopRansomware: Interlock RansomwareDefender XDR2/33/3

We hunt with Defender XDR advanced hunting custom detections over endpoint and cloud telemetry. Please write detections for the behaviours in this CISA advisory.

Advisory: #StopRansomware: Interlock Ransomware

Expected tables
(DeviceProcessEvents or DeviceRegistryEvents)
ATT&CK
T1204.004, T1547.001, T1567.002
Must catch
a user-pasted command run from the Run dialog (explorer spawning PowerShell/cmd/mshta); a Run-key persistence entry; a transfer utility pushing data to cloud storage

Why runs failed:

  • Claude alone: KS001 (a string left open), KS002 (an unexpected character), KS005 (a missing bracket or comma), KS198 (an unfinished query)
A10#StopRansomware: Akira RansomwareSentinel2/33/3

We run Sentinel scheduled rules. Please write detections for the behaviours in this CISA advisory, aimed at our endpoint and on-premises identity telemetry.

Advisory: #StopRansomware: Akira Ransomware

Expected tables
(SecurityEvent or DeviceProcessEvents or Event)
ATT&CK
T1136.002, T1558.003, T1490
Must catch
new domain accounts created; service-ticket harvesting; shadow-copy deletion

Why runs failed:

  • Claude alone: KS142 (a name that doesn't exist)

The same (36)

S01I want to catch someone guessing passwords across the whole directory: a single source address that fails to sign in against a lot of different user …Sentinel3/33/3

We run this as a Sentinel scheduled rule. I want to catch someone guessing passwords across the whole directory: a single source address that fails to sign in against a lot of different user accounts inside a short window, with only a handful of tries per account. Surface the source address, the number of distinct accounts it touched, and the time window. Low-and-slow spraying is the pattern we care about, not one account getting hammered.

Expected tables
(SigninLogs or AADNonInteractiveUserSignInLogs)
ATT&CK
T1110.003
Must catch
one source IP with failed sign-ins against many distinct accounts in a short window, few tries per account
S02etween them in the elapsed time.Sentinel3/33/3

As a Sentinel scheduled rule, flag any user who signs in successfully from two locations that are too far apart for the same person to have travelled between them in the elapsed time. Work it out per user from their own successful sign-ins, and ignore the obvious noise from corporate VPN egress points. Show both sign-ins, the places, and how fast they'd have had to move.

Expected tables
(SigninLogs)
ATT&CK
T1078.004
Must catch
two successful sign-ins by the same user whose distance over elapsed time implies impossible speed
S03I'm after multi-factor prompt bombing: a user who gets a rapid burst of repeated authentication approval requests they keep rejecting, and then one …Defender XDR3/33/3

We use Defender XDR advanced hunting custom detections. I'm after multi-factor prompt bombing: a user who gets a rapid burst of repeated authentication approval requests they keep rejecting, and then one finally gets approved. The giveaway is many denials in a few minutes followed by an approval and a completed sign-in from the same attempt. Give me the user, the count of prompts, and the moment it flipped to approved.

Expected tables
(EntraIdSignInEvents or AADSignInEventsBeta)
ATT&CK
T1621
Must catch
many MFA denials or timeouts for one user within minutes, followed by an approved MFA and a successful sign-in
S05Let me know whenever a user registers or joins a brand-new device to our tenant, especially when it happens outside normal working hours.Defender XDR3/33/3

Defender XDR custom detection. Let me know whenever a user registers or joins a brand-new device to our tenant, especially when it happens outside normal working hours. I just want the user, the device that was added, and when. New devices appearing on accounts are worth a quick look because attackers add their own to keep a foothold.

Expected tables
(CloudAppEvents)
ATT&CK
T1098.005
Must catch
a user adding or registering a new device to the tenant, with the device and the time
S06I need to catch a regular (non-admin) user agreeing to give a third-party application broad, standing access to their mailbox and files — the kind of …Defender XDR3/33/3

Defender XDR advanced hunting custom detection. I need to catch a regular (non-admin) user agreeing to give a third-party application broad, standing access to their mailbox and files — the kind of consent that lets an app read data without anyone signing in again. Dig into the permission detail that gets recorded with the consent event, and only flag the sweeping read/read-write scopes, not trivial sign-in-only ones. Return the user, the app, and the permissions granted.

Expected tables
(CloudAppEvents)
ATT&CK
T1528
Must catch
a non-admin user consenting to an app with broad delegated scopes (Mail.Read, Files.Read.All, Mail.ReadWrite, offline_access)
S08Catch when a trusted built-in Windows command-line utility is used to pull a file down from the internet — the classic trick of borrowing a signed …Defender XDR3/33/3

Defender XDR custom detection over our endpoint telemetry. Catch when a trusted built-in Windows command-line utility is used to pull a file down from the internet — the classic trick of borrowing a signed system tool to fetch a payload instead of using a browser. I want the host, the account, the tool, and the command line it ran with.

Expected tables
(DeviceProcessEvents or DeviceNetworkEvents)
ATT&CK
T1105
Must catch
a built-in Windows utility (certutil, bitsadmin, curl, PowerShell download cradles) fetching a URL
S09I want to spot an attempt to read the memory of the Windows process that holds signed-in users' secrets, which is how credentials get scraped off a …Defender XDR3/33/3

Defender XDR advanced hunting custom detection. I want to spot an attempt to read the memory of the Windows process that holds signed-in users' secrets, which is how credentials get scraped off a box. Look for an unusual process opening that protected process or dumping it to disk, and exclude our known backup and AV agents. Return the host, the tool doing it, and the account.

Expected tables
(DeviceEvents or DeviceProcessEvents)
ATT&CK
T1003.001
Must catch
an unusual process opening lsass.exe for memory read, or a tool dumping lsass to disk (procdump, comsvcs MiniDump)
S11Catch an office document application launching a scripting or command interpreter as a child process, but only when that parent-child combination is …Defender XDR3/33/3

Defender XDR custom detection. Catch an office document application launching a scripting or command interpreter as a child process, but only when that parent-child combination is rare across the estate — tune it against what's normal so routine add-ins don't drown it. This is the hallmark of a malicious attachment kicking off the next stage. Include the host, the user, the document app, and what it spawned.

Expected tables
(DeviceProcessEvents)
ATT&CK
T1204.002, T1059
Must catch
an Office app (winword, excel, powerpnt, outlook) spawning cmd, PowerShell, wscript, cscript or mshta, limited to rare parent-child pairs
S13I want new auto-start entries that make a program run every time the machine boots or a user logs on, specifically when the program lives in a …Defender XDR3/33/3

Defender XDR advanced hunting custom detection. I want new auto-start entries that make a program run every time the machine boots or a user logs on, specifically when the program lives in a world-writable temp or download folder rather than a proper install location. Baseline what's normal so you only alert on genuinely new, suspicious auto-start entries. Give the host, the account, the auto-start location, and the target program.

Expected tables
(DeviceRegistryEvents or DeviceFileEvents)
ATT&CK
T1547.001
Must catch
a new Run/RunOnce value or Startup-folder entry pointing to a program in a temp or downloads folder
S17We keep a couple of decoy accounts that no human should ever touch — attractive names, left dormant on purpose.Defender XDR3/33/3

Defender XDR custom detection. We keep a couple of decoy accounts that no human should ever touch — attractive names, left dormant on purpose. Alert the second anything tries to authenticate as one of them or even looks them up in the directory. Any activity at all against those accounts is suspicious, so just give me the decoy account, what happened, and the source.

Expected tables
(IdentityLogonEvents or IdentityQueryEvents)
ATT&CK
T1078.002, T1087.002
Must catch
any authentication as, or directory lookup of, a named decoy account
S22I'm after inbox rules that quietly hide or divert messages — rules that move anything mentioning money, invoices, payments or password resets …Defender XDR3/33/3

Defender XDR advanced hunting custom detection. I'm after inbox rules that quietly hide or divert messages — rules that move anything mentioning money, invoices, payments or password resets straight into an obscure folder, mark them read, or delete them. Attackers do this after a takeover so the real owner never sees the finance thread they're meddling in. Surface the mailbox, the rule's conditions and actions, and the creation time.

Expected tables
(CloudAppEvents)
ATT&CK
T1564.008
Must catch
an inbox rule matching finance or password-reset keywords that moves to an obscure folder, marks read or deletes
S23I want to see phishing that actually landed in people's inboxes and was only yanked back out after the fact by the automatic post-delivery clean-up.Sentinel3/33/3

We run this as a Sentinel scheduled rule. I want to see phishing that actually landed in people's inboxes and was only yanked back out after the fact by the automatic post-delivery clean-up. A cluster of those removals in a short period usually means a phishing wave got through the gateway. Show the subjects, the senders, how many recipients each hit, and the clean-up time.

Expected tables
(EmailPostDeliveryEvents) and (EmailEvents)
ATT&CK
T1566
Must catch
delivered phishing later removed by post-delivery clean-up (ZAP), clustered in a short period, with subjects and senders
S24Hunt for the phishing trick where the only link in a message is buried inside an image of a scannable square code, pushing the victim onto their …Defender XDR3/33/3

Defender XDR advanced hunting custom detection. Hunt for the phishing trick where the only link in a message is buried inside an image of a scannable square code, pushing the victim onto their phone where the destination is hard to inspect. Focus on messages where the link was pulled out of that embedded code, and raise the priority when it's the first time we've ever seen mail from that sending domain. Return the sender, the recipient, and the extracted destination.

Expected tables
(EmailUrlInfo) and (EmailEvents)
ATT&CK
T1566.002
Must catch
messages whose URL was extracted from a QR code, raised when the sender domain is first seen
S25Tell me when someone actually clicked a link in an email that was later judged malicious — the case where protection fired at click time but the user …Defender XDR3/33/3

Defender XDR custom detection. Tell me when someone actually clicked a link in an email that was later judged malicious — the case where protection fired at click time but the user had already gone through, or clicked through the warning. Those are the people most likely already compromised. Give me the user, the link, and the click time.

Expected tables
(UrlClickEvents)
ATT&CK
T1204.001
Must catch
a click on a URL judged malicious where the user went through (allowed or clicked through a warning)
S27Flag an internal user who sends mail to an unusually large number of external recipients in a short burst — the kind of outbound spray that happens …Defender XDR3/33/3

Defender XDR custom detection. Flag an internal user who sends mail to an unusually large number of external recipients in a short burst — the kind of outbound spray that happens when an account is taken over and used to send spam or phishing outward. Keep it simple: the sender, the external recipient count, and the time window.

Expected tables
(EmailEvents)
ATT&CK
T1566
Must catch
an internal sender mailing an unusually large number of external recipients in a short window
S28Alert on any use of the account's root identity — a console sign-in or an API call made as root.Sentinel3/33/3

We ingest our AWS account's API call history into Sentinel and run this as a scheduled rule. Alert on any use of the account's root identity — a console sign-in or an API call made as root. Root should sit unused behind lock and key, so every appearance deserves eyes on it. Give me the account, what action it took, and the source address.

Expected tables
(AWSCloudTrail)
ATT&CK
T1078.004
Must catch
any console sign-in or API call made by the root identity
S32Catch a disk snapshot being shared with an outside account or opened up publicly — the quiet way data gets exfiltrated by handing a copy to …Sentinel3/33/3

Sentinel scheduled rule on our AWS account's API call history. Catch a disk snapshot being shared with an outside account or opened up publicly — the quiet way data gets exfiltrated by handing a copy to attacker-controlled infrastructure rather than copying files out. Dig into the permission change on the snapshot to see who it was shared with. Return the principal, the snapshot, and the external account it was exposed to.

Expected tables
(AWSCloudTrail)
ATT&CK
T1537
Must catch
ModifySnapshotAttribute adding an external account or 'all' to createVolumePermission
S36Catch an unusual principal listing or pulling a batch of secrets or keys out of a secrets vault — especially one that doesn't normally touch that …Sentinel3/33/3

Sentinel scheduled rule on Azure control-plane records. Catch an unusual principal listing or pulling a batch of secrets or keys out of a secrets vault — especially one that doesn't normally touch that vault — which is how stored credentials get harvested for lateral movement. Return the principal, the vault, and the volume of secrets accessed.

Expected tables
(AzureDiagnostics or AzureActivity)
ATT&CK
T1555.006
Must catch
an unusual principal listing or getting many secrets or keys from a vault it doesn't normally use
S37Let me know when a powerful management role — owner- or contributor-level over a whole subscription — is handed to a principal.Sentinel3/33/3

Sentinel scheduled rule over Azure control-plane records. Let me know when a powerful management role — owner- or contributor-level over a whole subscription — is handed to a principal. These grants are rare and high-impact, so each one should be reviewed. Give me who granted it, who received it, the role, and the scope.

Expected tables
(AzureActivity)
ATT&CK
T1098.003
Must catch
a role assignment granting Owner or Contributor at subscription scope
S38Flag a single principal pushing a run-command or custom-script action onto a batch of virtual machines in a short window — running code with high …Sentinel3/33/3

Sentinel scheduled rule on Azure control-plane records. Flag a single principal pushing a run-command or custom-script action onto a batch of virtual machines in a short window — running code with high privilege across many machines through the management layer, which is rare in normal operations and a strong compromise signal. Baseline how often this principal normally does it. Return the principal, the machines touched, and the window.

Expected tables
(AzureActivity)
ATT&CK
T1651
Must catch
one principal running run-command or custom-script extensions on many VMs in a short window versus its own baseline
S39Alert when a network rule is created or changed to expose a remote-administration port straight to the entire internet.Sentinel3/33/3

Sentinel scheduled rule over Azure control-plane records. Alert when a network rule is created or changed to expose a remote-administration port straight to the entire internet. Opening management access to the world is a common misstep attackers go looking for. Return the principal, the rule, the port, and the resource.

Expected tables
(AzureActivity)
ATT&CK
T1686.001
Must catch
an NSG rule created or changed to allow 3389 or 22 from any source (*, 0.0.0.0/0, Internet)
C01Tie together a single user's risky sign-in — one flagged as coming from an unfamiliar place or device — with that same user, shortly afterwards, …Sentinel3/33/3

Sentinel scheduled rule. Tie together a single user's risky sign-in — one flagged as coming from an unfamiliar place or device — with that same user, shortly afterwards, setting up a mailbox rule that forwards their mail somewhere outside the company. The sequence of a shaky sign-in followed quickly by a quiet forwarding rule is a much stronger signal of account takeover than either event alone. Link them by user and keep the window tight.

Expected tables
(SigninLogs or AADUserRiskEvents or SecurityAlert) and (OfficeActivity or CloudAppEvents)
ATT&CK
T1078.004, T1114.003
Must catch
a risky sign-in for a user followed within a short window by that user creating an external forwarding rule
C02I want the full account-takeover chain for one user: a successful sign-in that follows a run of failed password attempts, then that same user …Defender XDR3/33/3

Defender XDR custom detection. I want the full account-takeover chain for one user: a successful sign-in that follows a run of failed password attempts, then that same user registering a new authentication factor, and then consenting to a third-party app with broad data access — all inside a short window. Any one of these is noise; the three in order against the same user is the story. Correlate on the user and the timeline.

Expected tables
(EntraIdSignInEvents or AADSignInEventsBeta) and (CloudAppEvents)
ATT&CK
T1110, T1098.005, T1528
Must catch
failed sign-ins then a success, then a new MFA method registered, then a broad app consent, same user, in order, in a short window
C03Connect a console sign-in by a principal with that same principal, minutes later, creating a new user or minting a new access key.Sentinel3/33/3

Sentinel scheduled rule over our AWS account's API call history. Connect a console sign-in by a principal with that same principal, minutes later, creating a new user or minting a new access key. Fresh identity or key creation right on the heels of an interactive login is how an attacker nails down persistence after getting in. Correlate by principal and time, and show both steps.

Expected tables
(AWSCloudTrail)
ATT&CK
T1136.003, T1098.001
Must catch
a ConsoleLogin followed within minutes by CreateUser or CreateAccessKey by the same principal
C04Link a principal switching off or deleting the API-activity recording with that same principal, afterwards, reaching into object storage and pulling …Sentinel3/33/3

Sentinel scheduled rule on our AWS account's API call history. Link a principal switching off or deleting the API-activity recording with that same principal, afterwards, reaching into object storage and pulling large amounts of data. Blinding the logs and then raiding the data is a deliberate two-step. Correlate by principal across the gap and show the logging change followed by the data access.

Expected tables
(AWSCloudTrail)
ATT&CK
T1685.002, T1530
Must catch
a principal stopping or deleting CloudTrail logging, then later a large volume of S3 GetObject calls
C09Tie a principal receiving a powerful management role to that same principal, soon after, attaching a new sign-in credential to an application or …Sentinel3/33/3

Sentinel scheduled rule over Azure control-plane records. Tie a principal receiving a powerful management role to that same principal, soon after, attaching a new sign-in credential to an application or workload identity. Getting elevated and then planting an app credential to come back later is a deliberate persistence play. Correlate by principal and time.

Expected tables
(AzureActivity) and (AuditLogs)
ATT&CK
T1098.003, T1098.001
Must catch
a principal receiving a powerful role, then the same principal adding a credential to an app soon after
C10Join a compromised internal mailbox that starts sending phishing to colleagues with those recipients then showing fresh sign-ins from unfamiliar …Sentinel3/33/3

Sentinel scheduled rule. Join a compromised internal mailbox that starts sending phishing to colleagues with those recipients then showing fresh sign-ins from unfamiliar places shortly afterward. The chain of one hijacked account seeding internal phishing and new victims lighting up is how these spread through an org. Correlate the internal sender's recipients to subsequent risky sign-ins for those same people.

Expected tables
(EmailEvents) and (SigninLogs or AADUserRiskEvents)
ATT&CK
T1534, T1078.004
Must catch
an internal sender's phishing burst, then risky or unfamiliar sign-ins by its recipients soon after
C13Connect a user being added to a powerful administrative role with that same user, soon after, weakening or disabling one of the tenant's security or …Sentinel3/33/3

Sentinel scheduled rule. Connect a user being added to a powerful administrative role with that same user, soon after, weakening or disabling one of the tenant's security or access-control policies. Freshly elevated and then dismantling a guardrail is exactly what an attacker does to clear the path. Correlate by user and time, showing the elevation then the policy change.

Expected tables
(AuditLogs)
ATT&CK
T1098.003, T1556.009
Must catch
a user added to a powerful directory role, then the same user disabling or weakening a conditional access or security policy soon after
C14Join a spread of lateral logons by one account across several hosts with those same hosts then having their local backup snapshots wiped out, within …Defender XDR3/33/3

Defender XDR custom detection. Join a spread of lateral logons by one account across several hosts with those same hosts then having their local backup snapshots wiped out, within a short window. Credentials spreading and then recovery being destroyed across multiple machines is the run-up to a ransomware detonation. Correlate on the account and the hosts, in order.

Expected tables
(DeviceLogonEvents or IdentityLogonEvents) and (DeviceProcessEvents)
ATT&CK
T1021, T1490
Must catch
one account's lateral logons across several hosts, then those hosts deleting shadow copies, in order
C15Tie a message from an outside sender reaching a user with that same user, shortly after, granting a third-party application broad access to their …Sentinel3/33/3

Sentinel scheduled rule. Tie a message from an outside sender reaching a user with that same user, shortly after, granting a third-party application broad access to their data. A lure landing and then an app consent from the same person within minutes is the consent-phishing pattern. Correlate the recipient to the consenting user and keep the window tight.

Expected tables
(EmailEvents) and (AuditLogs or OfficeActivity or CloudAppEvents)
ATT&CK
T1566.002, T1528
Must catch
an external message reaching a user, then the same user consenting to a broad-scope app within minutes
C16Connect a principal running a script on a virtual machine through the management layer with that same principal then listing or pulling secrets out …Sentinel3/33/3

Sentinel scheduled rule over Azure control-plane records. Connect a principal running a script on a virtual machine through the management layer with that same principal then listing or pulling secrets out of a secrets vault, close together. Executing code on a box and then reaching for stored credentials is a lateral-movement-plus-credential-access chain. Correlate by principal and ordering.

Expected tables
(AzureActivity) and (AzureDiagnostics or AzureActivity)
ATT&CK
T1651, T1555.006
Must catch
a principal running a VM script via the management layer, then listing or reading vault secrets soon after
C17Link an impossible-travel sign-in for a user — two logins too far apart to be the same person — with that same user then sending a burst of mail to …Sentinel3/33/3

Sentinel scheduled rule. Link an impossible-travel sign-in for a user — two logins too far apart to be the same person — with that same user then sending a burst of mail to many external recipients soon after. A suspect sign-in followed quickly by an outbound mail blast is account takeover being put to use. Correlate on the user and time.

Expected tables
(SigninLogs) and (EmailEvents or OfficeActivity)
ATT&CK
T1078.004
Must catch
an impossible-travel sign-in for a user, then a burst of mail to many external recipients from that user
C19Join a workstation where an account's credentials were just scraped from memory with that same workstation then opening a remote-desktop session to a …Defender XDR3/33/3

Defender XDR custom detection. Join a workstation where an account's credentials were just scraped from memory with that same workstation then opening a remote-desktop session to a server using the stolen account. Credential theft on a box followed immediately by a remote hop with that credential is textbook lateral movement. Correlate by host and account, in order.

Expected tables
(DeviceEvents or DeviceProcessEvents) and (DeviceNetworkEvents or DeviceLogonEvents)
ATT&CK
T1003.001, T1021.001
Must catch
lsass credential access on a workstation, then an RDP session from it to a server with the same account
A01Iranian Cyber Actors' Brute Force and Credential Access Activity Compromises Critical Infrastructure OrganizationsSentinel3/33/3

We run our detections as Sentinel scheduled rules. Please write detections for the behaviours described in this CISA advisory. Focus on what we could actually see in our identity, cloud sign-in and endpoint logs.

Advisory: Iranian Cyber Actors' Brute Force and Credential Access Activity Compromises Critical Infrastructure Organizations

Expected tables
(SigninLogs or AADNonInteractiveUserSignInLogs) and (AuditLogs)
ATT&CK
T1110.003, T1621, T1098.005
Must catch
password spraying; MFA prompt bombing; MFA method added or changed after a suspicious sign-in
A02SVR Cyber Actors Adapt Tactics for Initial Cloud AccessSentinel3/33/3

We use Sentinel scheduled rules. Write detections for the cloud-focused behaviours in this CISA advisory, aimed at our identity and cloud control-plane logs.

Advisory: SVR Cyber Actors Adapt Tactics for Initial Cloud Access

Expected tables
(SigninLogs or AADNonInteractiveUserSignInLogs) and (AuditLogs)
ATT&CK
T1110.003, T1098.005
Must catch
spraying of service or dormant accounts; a new device registered after a sign-in
A04PRC State-Sponsored Actors Compromise and Maintain Persistent Access to U.S.Defender XDR3/33/3

We write Defender XDR advanced hunting custom detections over our endpoint and on-premises identity telemetry. Please write detections for the behaviours this CISA advisory describes.

Advisory: PRC State-Sponsored Actors Compromise and Maintain Persistent Access to U.S. Critical Infrastructure

Expected tables
(DeviceProcessEvents)
ATT&CK
T1003.003, T1090.001
Must catch
ntdsutil IFM creation; netsh portproxy configuration

Worse with VeriKQL (1)

S34Flag a single principal racking up a run of permission-denied errors across many different services in a short time — the probing an attacker does to …Sentinel3/32/3

Sentinel scheduled rule on our AWS account's API call history. Flag a single principal racking up a run of permission-denied errors across many different services in a short time — the probing an attacker does to map out what a stolen identity is allowed to do. Return the principal, the count of denials, the services probed, and the window.

Expected tables
(AWSCloudTrail)
ATT&CK
T1580
Must catch
one principal with many AccessDenied/UnauthorizedOperation errors across many services in a short window

Why runs failed:

  • Claude + VeriKQL: no query in the answer

Cost and time

Model callsCostPer detectionSeconds
Claude alone210$6.31$0.03021
Claude + VeriKQL714$11.12$0.05323

With VeriKQL, each round sends the tool results back to the model, so it reads more input. The cost is in the model's tokens; VeriKQL's checks themselves are free.

Method, deviations and provenance

  • 3 of 924 calls were declined by Anthropic's safety system and answered by claude-sonnet-5, all in case S10 with Claude alone. The pre-registration named a different fallback model. They are counted as run.
  • Arm 3, the full Studio pipeline with a reviewer from another vendor, wasn't run. It needs an OpenAI key, and the pre-registration leaves it to a later amendment.
  • The spending cap was lowered from $150 to $65 before the run, by a dated amendment, to stay under the API account's limit.

Approved on 2026-10-23. Code: VeriKQL commit c3e54845d090. The cases and labels were frozen by SHA-256 before the run:

  • heldout_cases: 122eba51d9a4674edf5099e57dc2a688282a78f96f92bb957862b2119d6fd0e7
  • labels: 390e6553bedf1ba170ccadab2e2effc3ab568c9b804d71e3430cf5be7c4e9820
  • public_cases: d0328842a1ded7f5ad48174cae77f4c6643b5686ab68a5102a226715d7764756

The data

For anyone who wants to re-check or re-compute the numbers above: