{
  "model_id": "SOC.087",
  "name": "Mass File Deletion (rm -rf)",
  "description": "rm command with -rf flag targeting root or home directory — ransomware or destructive attack.",
  "threshold": 0.9,
  "evaluations": [
    {
      "name": "Rm",
      "type": "comparison",
      "left": "event.raw.comm",
      "operator": "==",
      "right": "rm",
      "weight": 4
    },
    {
      "name": "Force",
      "type": "comparison",
      "left": "event.raw.cmdline",
      "operator": "LIKE",
      "right": "%-rf%",
      "weight": 5
    },
    {
      "name": "Target",
      "type": "logical",
      "operator": "OR",
      "operands": [
        "Root",
        "Home"
      ],
      "weight": 5
    },
    {
      "name": "Logic",
      "type": "logical",
      "operator": "AND",
      "operands": [
        "Rm",
        "Force",
        "Target"
      ],
      "weight": 5
    },
    {
      "name": "Root",
      "type": "comparison",
      "left": "event.raw.cmdline",
      "operator": "LIKE",
      "right": "% /%",
      "weight": 5
    },
    {
      "name": "Home",
      "type": "comparison",
      "left": "event.raw.cmdline",
      "operator": "LIKE",
      "right": "%/home/%",
      "weight": 4
    }
  ],
  "actions": [
    {
      "type": "emit_alert",
      "reason": "Mass file deletion detected — possible ransomware."
    },
    {
      "type": "request_kill",
      "reason": "Kill rm process immediately."
    }
  ],
  "mitre_tactics": [
    "Impact"
  ],
  "mitre_techniques": [
    "T1485"
  ],
  "severity": "critical",
  "observables": [
    "event.actor.exe",
    "event.actor.user"
  ]
}
