{
  "model_id": "SOC.077",
  "name": "Connection Via Tor",
  "description": "Outbound connection to a Tor directory or relay — anonymised C2 channel.",
  "threshold": 0.8,
  "evaluations": [
    {
      "name": "Conn",
      "type": "comparison",
      "left": "event.type",
      "operator": "==",
      "right": "network.connection.established",
      "weight": 3
    },
    {
      "name": "TorPort",
      "type": "comparison",
      "left": "event.raw.remote_port",
      "operator": "==",
      "right": 9001,
      "weight": 4
    },
    {
      "name": "OrTor",
      "type": "logical",
      "operator": "OR",
      "operands": [
        "TorPort",
        "TorPort2"
      ],
      "weight": 5
    },
    {
      "name": "Logic",
      "type": "logical",
      "operator": "AND",
      "operands": [
        "Conn",
        "OrTor"
      ],
      "weight": 5
    },
    {
      "name": "TorPort2",
      "type": "comparison",
      "left": "event.raw.remote_port",
      "operator": "==",
      "right": 9030,
      "weight": 4
    }
  ],
  "actions": [
    {
      "type": "emit_alert",
      "reason": "Tor connection detected — anonymised traffic."
    }
  ],
  "mitre_tactics": [
    "Command and Control"
  ],
  "mitre_techniques": [
    "T1090",
    "T1071"
  ],
  "severity": "high",
  "observables": [
    "event.raw.remote_ip"
  ]
}
