{
  "model_id": "SOC.052",
  "name": "Bash History Cleared",
  "description": "bash_history file deleted, truncated, or symlinked to /dev/null — attacker trying to hide commands.",
  "threshold": 0.8,
  "evaluations": [
    {
      "name": "HistEvent",
      "type": "comparison",
      "left": "event.type",
      "operator": "IN",
      "right": [
        "file.remove",
        "file.critical.write"
      ],
      "weight": 3
    },
    {
      "name": "HistFile",
      "type": "comparison",
      "left": "event.raw.path",
      "operator": "LIKE",
      "right": "%.bash_history%",
      "weight": 5
    },
    {
      "name": "Logic",
      "type": "logical",
      "operator": "AND",
      "operands": [
        "HistEvent",
        "HistFile"
      ],
      "weight": 5
    }
  ],
  "actions": [
    {
      "type": "emit_alert",
      "reason": "Bash history tampered — attacker hiding command trail."
    }
  ],
  "mitre_tactics": [
    "Defense Evasion"
  ],
  "mitre_techniques": [
    "T1070.003",
    "T1562.006"
  ],
  "severity": "high",
  "observables": [
    "event.raw.path",
    "event.actor.user"
  ]
}
