{
  "model_id": "SOC.023",
  "name": "PAM Configuration Modified",
  "description": "Pluggable Authentication Modules config changed — attackers modify PAM to capture credentials or backdoor auth.",
  "threshold": 0.8,
  "evaluations": [
    {
      "name": "Write",
      "type": "comparison",
      "left": "event.type",
      "operator": "==",
      "right": "file.critical.write",
      "weight": 4
    },
    {
      "name": "PamPath",
      "type": "comparison",
      "left": "event.raw.path",
      "operator": "LIKE",
      "right": "/etc/pam.d/%",
      "weight": 5
    },
    {
      "name": "Logic",
      "type": "logical",
      "operator": "AND",
      "operands": [
        "Write",
        "PamPath"
      ],
      "weight": 5
    }
  ],
  "actions": [
    {
      "type": "emit_alert",
      "reason": "PAM configuration modified — verify the change."
    }
  ],
  "mitre_tactics": [
    "Initial Access",
    "Credential Access"
  ],
  "mitre_techniques": [
    "T1556"
  ],
  "severity": "high",
  "observables": [
    "event.raw.path"
  ]
}
