Reads pre-shaped session aggregates from TaggerEvent.payload and emits techniques per Appendix A behavior tables. Per-rule predicates dispatch on match.kind (lifter:behavioral_<name>); the lifter holds its own RuleIndex watching the same RuleStore as the engine, so disable / clip / TTL state reaches lifter-bound rules through the same atomic-swap path. R0032/R0036/R0037/R0040 YAMLs had over-escaped regex strings (\\ instead of \\) — fixed in place. Factory wired so default get_tagger() returns CompositeTagger with BehavioralLifter shipped; remaining three lifters (E.3.10-E.3.12) land in subsequent commits. E.2.6 contract preserved via TolerantTagger: empty payload steady-state yields [] with zero ERROR records. Disabled / clipped / expired state verified.
23 lines
532 B
YAML
23 lines
532 B
YAML
rule_id: R0037
|
|
rule_version: 1
|
|
name: k8s_service_account_token
|
|
description: |
|
|
Reading /api/v1/namespaces/*/secrets or /var/run/secrets/k8s.io/
|
|
serviceaccount/token — kube SA harvest.
|
|
applies_to:
|
|
- session
|
|
- http_request
|
|
match:
|
|
kind: lifter:behavioral_k8s_sa_token
|
|
paths:
|
|
- '/api/v1/namespaces/[^/]+/secrets'
|
|
- '/var/run/secrets/kubernetes\.io/serviceaccount'
|
|
emits:
|
|
- tactic: TA0006
|
|
technique_id: T1552
|
|
sub_technique_id: T1552.007
|
|
confidence: 0.95
|
|
evidence_fields:
|
|
- matched_path
|
|
- namespace
|