{
  "model_id": "SOC.043",
  "name": "SSH AuthorizedKeys ForceCommand",
  "description": "authorized_keys entry containing a 'command=' restriction — used by attackers to limit what their backdoor key can run (stealth).",
  "threshold": 0.7,
  "evaluations": [
    {
      "name": "KeyAdd",
      "type": "comparison",
      "left": "event.type",
      "operator": "==",
      "right": "sshkey.added",
      "weight": 3
    },
    {
      "name": "HasCommand",
      "type": "comparison",
      "left": "event.raw.entry",
      "operator": "LIKE",
      "right": "%command=%",
      "weight": 5
    },
    {
      "name": "Logic",
      "type": "logical",
      "operator": "AND",
      "operands": [
        "KeyAdd",
        "HasCommand"
      ],
      "weight": 5
    }
  ],
  "actions": [
    {
      "type": "emit_alert",
      "reason": "SSH key with embedded command= restriction — investigate."
    }
  ],
  "mitre_tactics": [
    "Persistence"
  ],
  "mitre_techniques": [
    "T1098"
  ],
  "severity": "high",
  "observables": [
    "event.actor.user"
  ]
}
