Skip to content

docs: draft phase 2 detection specs for REP-011, REP-016, REP-020 - #122

Merged
404SecNotFound merged 1 commit into
mainfrom
claude/detection-specs-phase2
Nov 10, 2026
Merged

404SecNotFound merged 1 commit into
mainfrom
claude/detection-specs-phase2

Conversation

@404SecNotFound

Copy link
Copy Markdown
Owner

Summary

Roadmap 2026-09 item 8, phase 2 covers the parser-only techniques, whose specs must state most sharply what a green result does not prove. This is a draft PR on purpose. The roadmap calls for human-authored specs. Each file carries a Status row saying it is machine-drafted and not final until you rewrite or sign it. It also has a "Review notes for the owner" section listing every judgment call I made.

Every threshold is tied to a catalog preset or to a measured plan (20 seeds at each preset), and the drafts use the same format as REP-001.md.

Spec Detection What it needs or flags
REP-011.md (NDR-ATO-010) Implied speed between consecutive successful VPN logins per duser The four country tags are fictional and carry no coordinates, so the lab supplies a distance table. The draft derives the distance each preset needs to exceed 900 km/h from the measured gap between logins (1800, 600, 225 s, so more than 450, 150, 56.25 km). No foil exists, by contract.
REP-016.md (NDR-C2-015) Distinct failing second-level names per host, NXDOMAIN share, and mean label entropy Thresholds sit between the measured attack (lowest seed mean entropy 3.02) and the trickle (2.13).
REP-020.md (NDR-C2-019) Organisation-wide first-seen registered domain, reached by few hosts The draft says plainly the technique cannot be cleanly run in a lab today, and gives no lab command.

Two findings, recorded and pinned, not fixed

  1. REP-020 has a lab problem, measured on 20 seeds at each preset.

    • Every history name is itself queried once by one host, exactly like a new name.
    • First contact follows the history within 2 to 18 seconds.
    • No known name is ever queried again afterwards.

    So a SIEM that has not seen the history fires on all 200 to 800 history names. A rule cannot learn and then start evaluating in that gap. A plain "any query after time T" rule also scores as well as real novelty logic. A fix would be an engine change: a configurable pause, plus known-name traffic in the window. That's your call.

  2. REP-016's benign trickle is 12 NXDOMAIN-only records at every preset (alternating wpad/isatap, mean entropy 2.13 on every seed). Its NXDOMAIN share is 1.0, higher than the attack's, so the share clause does not separate it; count and entropy do. The 2026-10-07 catalog review treated a non-scaling count ceiling as a separable feature elsewhere.

test_rep020_spec_lab_problem_still_holds and test_rep016_spec_trickle_description_still_holds pin both findings to the engine. If either is fixed, they turn red and the spec text must be rewritten rather than left describing a problem that is gone.

Verification

  • tests/test_detection_specs.py: 17 pass. The generic header guard now covers all four specs (rule id, use case, exact ATT&CK set, transferability), and three new citation guards tie each draft's numbers to the catalog presets.
  • Positive controls, each observed red, then restored:
    • a wrong preset in each draft (601 s, 200 x 5 = 1000, | medium | 400 |) failed its citation guard;
    • a 13-record trickle in the engine failed the REP-016 finding guard on all three presets;
    • a re-queried known name in REP-020's window failed the REP-020 finding guard.
  • tests/test_ci_paths_filter.py green (detection specs trigger CI). ruff and black clean. No mid-sentence colons or typographic dashes in the drafts' prose.

Documentation impact

  • docs/detection-specs/REP-011.md, REP-016.md, REP-020.md: new drafts.

  • docs/detection-specs/README.md: three index rows marked (draft). The technique count went from 27 to 31, which was stale. A dated note says the drafts are not the human-authored references the README describes until their Status row changes.

  • CHANGELOG.md Unreleased.

  • Unaffected: docs/roadmap-2026-09.md. Its 2026-10-19 note says item 8 is phase 1 only, and that stays true until you sign these. Code, vendor references and the runbook are also unaffected.

  • Maintained documentation changed alongside the behavior, or unaffected surfaces are explained above.

  • CHANGELOG.md records the operator-visible change.

  • Historical decision records were preserved or received a dated addendum.

  • Documentation claims were checked against the implemented behavior.

Scope boundary

  • The false-positive sections are labelled [Inference], from general practice, and are not measured here.
  • PAN-OS and Check Point field names are [Unverified], as in the vendor references.
  • Nothing here observes a rule fire; the launch gate in CLAUDE.md is unchanged.

Generated by Claude Code

Roadmap item 8, phase 2. Each spec is marked as a machine draft for the
owner to rewrite or sign, lists its judgment calls, and ties every
threshold to a measured plan or a catalog preset. Guards check each
draft's cited presets.

Two findings are recorded in the drafts and pinned to the engine by
tests, not fixed here. REP-016's benign trickle is 12 NXDOMAIN-only
records at every preset. REP-020 cannot be cleanly run in a lab: its
history names are themselves first contacts, first contact follows
within seconds, and no known name is re-queried afterwards.

Positive controls: a wrong preset in each draft, a 13-record trickle and
a re-queried known name each turned the matching guard red.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtL63gY2LQZtZwgNwDM8vs
@404SecNotFound
404SecNotFound marked this pull request as ready for review November 10, 2026 18:37
@404SecNotFound
404SecNotFound merged commit b2b4bed into main Nov 10, 2026
13 checks passed
404SecNotFound pushed a commit that referenced this pull request Nov 10, 2026
Brings in #132 (already on this branch as two commits, identical tree) and
#122 (phase 2 detection specs). No conflict in content.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HbjsVBv8HQSQkAds6W5Y1v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants