{
  "model_id": "SOC.065",
  "name": "Sudo Failed Repeatedly",
  "description": "Five or more sudo authentication failures from the same user — password guessing for escalation.",
  "threshold": 0.7,
  "evaluations": [
    {
      "name": "SudoFail",
      "type": "comparison",
      "left": "event.type",
      "operator": "==",
      "right": "auth.sudo.failed",
      "weight": 3
    },
    {
      "name": "FailCount",
      "type": "aggregation",
      "aggregation": "COUNT",
      "field": "event.actor.user",
      "weight": 4
    },
    {
      "name": "FiveOrMore",
      "type": "comparison",
      "left": "@FailCount",
      "operator": "\u003e=",
      "right": 5,
      "weight": 5
    },
    {
      "name": "Logic",
      "type": "logical",
      "operator": "AND",
      "operands": [
        "SudoFail",
        "FiveOrMore"
      ],
      "weight": 5
    }
  ],
  "actions": [
    {
      "type": "emit_alert",
      "reason": "Repeated sudo failures for {event.actor.user} — possible privesc attempt."
    }
  ],
  "mitre_tactics": [
    "Credential Access",
    "Privilege Escalation"
  ],
  "mitre_techniques": [
    "T1110"
  ],
  "severity": "high",
  "observables": [
    "event.actor.user"
  ]
}
