Repository navigation
fix(sigma): act on the #351 detection review — /identity anchored, three filter_ci stubs, 4698 LOLBins gated - #359
Merged
Merged
Conversation
…ree filter_ci stubs, 4698 LOLBins gated (#351) The weekly review found no coverage holes and ten scoping calls. Each was checked against the rule body, the gates and the fixtures. Seven adopted, two documented as stated blind spots, four sub-proposals declined in the rule bodies so they are not re-proposed next cycle. What each change would have missed, or stops missing: - linux/ssh_private_key_read: `name|contains: '/identity'` matched every read under a directory named identity* (~/identity-service/config.yml) - a standing FP stream on a high rule. Now '/.ssh/identity'. The TN fixture gains that exact near-miss, which the old value fired on. - cloudflare/cloudflare_api_token_created, terraform/tfc_token_backdoor, gitlab/gitlab_token_backdoor: bare `condition: selection` while every folder sibling carried a DEPLOY-REQUIRED filter_ci, on actions the IaC provider performs on every apply. Each gets the sibling's stub, a _ci_suppressed manifest row and a README deploy-time row. aws_login_profile_created declined in-rule (actor != target is the triage criterion; medium is a triage surface). - cloud/entra_illicit_consent_grant: comment + falsepositives record that the unanchored TargetResources allowlist hides a grant to a different app whenever a sanctioned id appears anywhere in the event, and name the Sentinel paths to anchor on. - lateral_movement/rdp_hijack_tscon_4688: declined, reworded. The review read the arms the other way round - the /dest: arm is channel-independent and deliberately not Image-pinned; the Sysmon-only arm is the no-/dest interactive form. - persistence/scheduled_task_suspicious_4698: \regsvr32.exe and \rundll32.exe fired at high as bare substrings. They now require a co-occurring attacker-controlled target (URL/scriptlet, UNC, user-writable dir); mshta stays bare. Two traps written into the block: a bare 'http' matches the <Task xmlns="http://..."> root of every real 4698 and would have collapsed the AND (synthetic fixtures omit the root; the new TN carries it), and a UNC prefix is '\\\\' because \ is Sigma's escape. Neither LOLBin had a fixture before; three TPs and two TNs added. - lateral_movement/passthehash_4624_fanout: filter_machine stated as a coverage decision (captured machine-account hash reuse never reaches the count) and why Sigma cannot narrow it. - impact/service_stop_burst: ' stop' -> ' stop ' on the net/sc arms (the anchor the protected-services sibling uses); a bare ' stop' also matched ' stopped' and padded the distinct-CommandLine burst. Cmdlet anchoring declined in-rule (piped `| Stop-Service` has no trailing target). Precedence allowlist row re-traced. - impact/account_access_removal_4725: declined in-rule - 4724 pooled on purpose; the bulk forced reset that trips it is filter_identity_admins' job. - registry/harbor_image_pushed_trusted_tag: retitled "Harbor artifact push or tag create (supply-chain triage surface)" to match the logic. File name and pairing unchanged. - google_workspace/gws_external_mail_forwarding: verified against the Reports API appendix; service: user_accounts is correct. Recorded in a logsource comment. Ledger: 124 rules, 0 added. coverage-layer.json, COVERAGE.md and HTPX-COVERAGE.md unchanged; all three SIEM forms regenerated. Checks run locally: sigma check, make drift, make methodology, make validation-gates, make test, make attack-tags, make htpx, run-cloud-validation (47/47), run-sigma-validation 123/123 (zircolite v3.7.6, with pysigma-backend-sqlite pinned to 2.0.0 locally because the committed constraints file does not resolve since #354 - a pre-existing red gate, not touched here). The three new 4698 TPs and two TNs were also run one event at a time: all three fire, both stay silent, and the rooted TN fires the moment '>http' is loosened to 'http'. make markdown skipped - no npx on this host; the README rows are padded to the header widths by hand. Closes #351 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Legacy identity matching remains substring-based, and the new LOLBin positives are not independently enforced by CI.
2 open findings
What changed in this PR
Refines Sigma detection scoping and false-positive handling following review #351.
Changes:
- Anchors or gates noisy SSH, scheduled-task, and service-stop detections.
- Adds CI suppression stubs and validation fixtures for three token rules.
- Documents accepted blind spots/declines and regenerates SIEM outputs.
| File | Description |
|---|---|
CHANGELOG.md |
Records review outcomes. |
detections/README.md |
Expands deployment checklist. |
detections/sigma/cloud/aws_login_profile_created.yml |
Documents declined IaC filter. |
detections/sigma/cloud/entra_illicit_consent_grant.yml |
Documents allowlist blind spot. |
detections/sigma/cloudflare/cloudflare_api_token_created.yml |
Adds CI actor filter. |
detections/sigma/gitlab/gitlab_token_backdoor.yml |
Adds automation actor filter. |
detections/sigma/google_workspace/gws_external_mail_forwarding.yml |
Documents service verification. |
detections/sigma/impact/account_access_removal_4725.yml |
Explains event pooling. |
detections/sigma/impact/service_stop_burst.yml |
Tightens stop-command matching. |
detections/sigma/lateral_movement/passthehash_4624_fanout.yml |
Documents machine-account blind spot. |
detections/sigma/lateral_movement/rdp_hijack_tscon_4688.yml |
Clarifies rule arms and channels. |
detections/sigma/linux/ssh_private_key_read.yml |
Narrows legacy identity matching. |
detections/sigma/persistence/scheduled_task_suspicious_4698.yml |
Gates LOLBins on suspicious targets. |
detections/sigma/registry/harbor_image_pushed_trusted_tag.yml |
Retitles the triage rule. |
detections/sigma/terraform/tfc_token_backdoor.yml |
Adds pipeline actor filter. |
detections/siem/elastic/rules.generated.lucene |
Regenerates Elastic queries. |
detections/siem/splunk/savedsearches.generated.conf |
Regenerates Splunk searches. |
detections/siem/splunk-precedence-allowlist.tsv |
Revalidates precedence behavior. |
detections/siem/sentinel/rules.generated.kql |
Regenerates Sentinel queries. |
docker/validation/fixture-provenance.tsv |
Records fixture provenance. |
docker/validation/sigma-cloud-manifest.tsv |
Registers CI-suppression cases. |
docker/validation/sigma-fixtures/cloud/cloudflare_api_token_created_ci_tn.jsonl |
Adds Cloudflare CI negative. |
docker/validation/sigma-fixtures/cloud/gitlab_token_backdoor_ci_tn.jsonl |
Adds GitLab CI negative. |
docker/validation/sigma-fixtures/cloud/tfc_token_backdoor_ci_tn.jsonl |
Adds TFC CI negative. |
docker/validation/sigma-fixtures/linux_ssh_key_read_tn.jsonl |
Adds identity-directory near-miss. |
docker/validation/sigma-fixtures/scheduled_task_4698.jsonl |
Adds LOLBin positives. |
docker/validation/sigma-fixtures/scheduled_task_4698_tn.jsonl |
Adds rooted benign task negatives. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…e can run (#351) The "sigma rules fire on synthetic event logs" job on this PR dies at pip install: ResolutionImpossible, because the committed constraints pin pysigma-backend-sqlite 2.1.0 (the backend's pySigma-2 release) beside pysigma==1.5.1. #354 bumped it alone and the job has been red on main since, with 0/123 rows executed — so the three new 4698 true positives and two true negatives in this PR could not be proven on CI. Same one-line pin #360 and #361 carry; the full rationale and the Renovate cap live there, and this line merges identically under either. Verified: a fresh venv built from this file resolves (pysigma 1.5.1, backend 2.0.0) and run-sigma-validation.sh passes 123/123 from it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… LOLBin case its own row (#351) Two review findings on #359, both right: - ssh_private_key_read: '/.ssh/identity' under name|contains still took ~/.ssh/identity-service/config.yml while the description claimed an exact match. The SSHv1 key is now selection_legacy with name|endswith, ORed with the id_* list under the shared key term. That makes the Splunk form `(a) OR (b) NOT (filter)`, so the binding is traced in splunk-precedence-allowlist.tsv: key gates both branches and the reader/pubkey filter covers both. Proven by a single-event row (tar reading /root/.ssh/identity) and two near-misses on the TN (identity-service/ inside and outside .ssh/). - scheduled_task_suspicious_4698: the three LOLBin true positives sat in the aggregate TP file, which passes when ANY event fires - the existing 21 already did, so the new arms could go silent unnoticed. Each is now its own single-event row (lolbin-userdir, -scriptlet, -unc) against a dedicated LOLBin TN file carrying the real <Task xmlns> root. The aggregate files go back to what they held before. run-sigma-validation.sh 127/127 (zircolite v3.7.6); drift, methodology, validation-gates and tests green. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Gerrrt
added a commit
that referenced
this pull request
Oct 14, 2026
#359 applied the same pysigma-backend-sqlite==2.0.0 pin with a placeholder comment pointing at this PR for the full account; this keeps the pin and the full header paragraph and drops the placeholder. Both CHANGELOG entries stay, this PR's first. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What & why
Acts on the weekly detection review in #351: seven findings adopted, two recorded as stated blind spots, four sub-proposals declined in the rule bodies so they are not re-proposed next cycle. No coverage holes were found; every change is a scoping or FP-balance call, verified against the rule body, the gates and the fixtures before being taken.
Per rule, what each change would have missed (full detail in the commit and the CHANGELOG entry):
linux/ssh_private_key_read—name|contains: '/identity'matched every read under anidentity*directory. The SSHv1 key now has its ownname|endswith: '/.ssh/identity'selection (acontainswould still take~/.ssh/identity-service/), proven by a single-event manifest row; the TN fixture gains both near-misses. The new(a or b) and not fshape is traced in the Splunk precedence allowlist.cloudflare/cloudflare_api_token_created,terraform/tfc_token_backdoor,gitlab/gitlab_token_backdoor— shippedcondition: selectionwhile every folder sibling carried aDEPLOY-REQUIREDfilter_cion an action the IaC provider performs on every apply. Each gets the sibling's stub, a_ci_suppressedmanifest row and a deploy-time README row.cloud/aws_login_profile_createddeclined in-rule.cloud/entra_illicit_consent_grant— comment +falsepositivesnow say the unanchored allowlist can hide a grant to a different app, and name the Sentinel paths to anchor on. Comment-only.lateral_movement/rdp_hijack_tscon_4688— declined and reworded: the review read the two arms the other way round. Logic unchanged.persistence/scheduled_task_suspicious_4698—\regsvr32.exe/\rundll32.exewere bare substrings athigh; they now require a co-occurring attacker-controlled target (URL/scriptlet, UNC, user-writable dir),mshtastays bare. Two traps found on the way and written into the block: a barehttpmatches the<Task xmlns="http://…">root of every real 4698 (the synthetic fixtures omit the root, so no gate saw it; the new TN carries it), and a UNC prefix is'\\\\'because\is Sigma's escape. First fixtures ever for either LOLBin, each as its own single-event manifest row with a dedicated TN file, because an aggregate TP passes when any event fires.lateral_movement/passthehash_4624_fanout—filter_machinestated as a coverage decision, with why Sigma cannot narrow it.impact/service_stop_burst—' stop'→' stop 'on the net/sc arms (the sibling's anchor); cmdlet anchoring declined in-rule; precedence allowlist row re-traced.impact/account_access_removal_4725— 4724 pooling declined in-rule.registry/harbor_image_pushed_trusted_tag— retitled to match the logic; file name and pairing unchanged.google_workspace/gws_external_mail_forwarding— verified against the Reports API appendix;service: user_accountsis correct, recorded in a comment.Which layer does this belong to?
core/— that tree is vendored fromdotfiles-core and is overwritten on
the next sync. Identical-everywhere config is fixed upstream.
ID=gate) belong in the matchingOS repo, not here. Changes with the analyst →
defense/,detections/.If you touched a detection
make driftgreen — the generated artifacts (COVERAGE.md,coverage-layer.json, the SIEM deploy forms) are regenerated, not hand-edited.These are byte-compared in CI; a stale one reads as an unrelated red gate.
make methodologygreen —DEFENSE-METHODOLOGY.mdstill describes the rulesthat exist, and the README's gate list still matches
sigma.yml.make validation-gatesgreen — the new rule has validation coverage, and anynew fixture has provenance.
make attack-tags; needs the network).filter_*rule changed: it still has a true negative.Environment data never enters this repo
from a live estate. Fixtures are synthetic or vendor-documented — see
docker/validation/check-fixture-provenance.sh.Checks
make lintgreen (pinned shellcheck +bash -n/zsh -n+ markdownlint) — markdownlint not run locally (nonpxon the host); the three new README deploy rows and the extended Entra row are padded to the header width by hand (all 25 rows measure 434 chars). No shell changed.make testgreen (196 passed)make htpxgreen;HTPX-COVERAGE.md,coverage-layer.jsonandCOVERAGE.mdunchanged (no tag, stem or count moved)run-cloud-validation.sh47/47, including the three new_ci_suppressedrowsrun-sigma-validation.sh127/127 against zircolite v3.7.6: the three 4698 LOLBin cases and the legacy ssh key are their own rows, so each fires on its own; the rooted LOLBin TN fires the moment'>http'is loosened to'http'(checked by hand).Notes
sigma rules fire on synthetic event logs) failed on the first push atpip installwith ResolutionImpossible: the committedzircolite-constraints.txthas pinnedpysigma-backend-sqlite2.1.0 (a pySigma-2 release) besidepysigma==1.5.1since ci(deps): update dependency pysigma-backend-sqlite to v2.1.0 #354, red onmainever since. The second commit carries the same one-line2.0.0pin that ci(deps): pin pysigma-backend-sqlite back to 2.0.0, cap it in Renovate (main is red) #360 / fix(validation): pin pysigma-backend-sqlite back to 2.0.0 — 2.1.0 nee… #361 carry (full rationale and the Renovate cap live there; the line merges identically under either), so this PR's new fixtures can be proven on CI. A fresh venv built from the committed file resolves and passes 123/123 locally.account_access_removal_4725's correlation document gets nomodified:— no correlation document in the corpus carries one.Closes #351
🤖 Generated with Claude Code