{
  "technique_id": "T1202",
  "name": "Indirect Command Execution",
  "priority": "high",
  "status": "draft",
  "version": "0.1.0",
  "last_reviewed": "2026-07-23",
  "generated_by": "SOC Response Atlas by Basyrix",
  "tactics": [
    "Stealth"
  ],
  "platforms": [
    "Windows"
  ],
  "summary": "Adversaries may abuse utilities that allow for command execution to bypass security restrictions that limit the use of command-line interpreters. Various Windows utilities may be used to execute commands, possibly without invoking [cmd](https://attack.mitre.org/software/S0106)...",
  "soc_recommendation": "Investigate Indirect Command Execution activity in the context of Stealth: confirm scope, affected host/identity, and whether it matches expected administrative behaviour before deciding this is benign.",
  "d3fend_mappings": [
    {
      "id": "D3-NTA",
      "name": "Network Traffic Analysis",
      "relationship": "detect",
      "practical_action": "Monitor for Network Traffic Analysis indicators relevant to this technique.",
      "tooling": [
        "Sentinel",
        "Defender for Endpoint"
      ]
    }
  ],
  "investigation_steps": {
    "microsoft": [
      "Review Defender for Endpoint / Defender XDR alerts and timeline for the affected host or identity.",
      "Check Sentinel analytics rules and incidents correlated with this technique.",
      "Review Entra ID sign-in and audit logs if the technique involves an identity or cloud resource."
    ],
    "generic": [
      "Confirm whether the observed indirect command execution activity matches expected administrative or application behaviour.",
      "Identify the host, account, or resource where the activity occurred and its business criticality.",
      "Check for related alerts before and after this activity to reconstruct the broader intrusion timeline.",
      "Real detection reference: \"Proxy Execution via Console Window Host\" -- Identifies abuse of the Console Window Host (conhost.exe) to execute commands via proxy. This behavior is used as a defense evasion technique to blend-in malicious activity with legitimate Windows software."
    ]
  },
  "evidence_to_collect": [
    "Host or resource affected",
    "Account or identity involved",
    "Timestamp of the activity",
    "Related process, file, or network artifact",
    "Any preceding or follow-on alerts"
  ],
  "response_actions": [
    {
      "name": "Contain the affected host or account",
      "category": "Containment",
      "risk": "Medium",
      "automation_safe": false,
      "approval_required": true,
      "tool": "Defender for Endpoint / Entra ID",
      "notes": "Requires approval -- confirm malicious intent before isolating a host or disabling an account."
    },
    {
      "name": "Collect and preserve evidence",
      "category": "Investigation",
      "risk": "Low",
      "automation_safe": true,
      "approval_required": false,
      "tool": "Defender for Endpoint",
      "notes": "Safe -- read-only evidence collection."
    }
  ],
  "queries": {
    "kql": [
      {
        "name": "Starting point for T1202",
        "description": "Generic starting query -- tune to the specific data source relevant to this technique.",
        "query": "DeviceEvents\n| where TimeGenerated > ago(24h)\n| where ActionType has \"<tune to T1202>\""
      }
    ],
    "spl": [],
    "esql": [
      {
        "name": "fcd16fe8-eb29-42b3-8aee-6c9ad777a2f6 — Proxy Execution via Console Window Host",
        "description": "(EQL) Identifies abuse of the Console Window Host (conhost.exe) to execute commands via proxy. This behavior is used as a defense evasion technique to blend-in malicious activity with legitimate Windows software. (Source: Elastic's official detection-rules repository (Elastic License v2).)",
        "query": "process where host.os.type == \"windows\" and event.type == \"start\" and\n process.name : \"conhost.exe\" and process.args : \"--headless\" and\n  process.command_line : (\n    \"*powershell*\", \"*cmd *\", \"*cmd.exe *\", \"*script*\", \"*mshta*\", \"*curl *\", \"*curl.exe *\", \"*^*^*^*\",\n    \"*.bat*\", \"*.cmd*\", \"*schtasks*\", \"*@SSL*\", \"*http*\", \"* \\\\\\\\*\", \"*.vbs*\", \"*.js*\", \"*mhsta*\"\n  ) and\n  not (\n    /* Winget-AutoUpdate via ServiceUI */\n    process.parent.executable : \"?:\\\\Program Files\\\\winget-autoupdate*\\\\serviceui.exe\" or\n    /* Winget-AutoUpdate notification via Task Scheduler */\n    (\n      process.parent.executable : \"?:\\\\Windows\\\\System32\\\\svchost.exe\" and process.parent.args : \"-s\" and\n      process.parent.args : \"Schedule\" and process.command_line : \"*WAU-Notify.ps1*\"\n    ) or\n    /* Windows OpenSSH console host — SSH-specific detection handled by 8cd49fbc-a35a-4418-8688-133cc3a1e548 */\n    process.parent.executable : (\n      \"?:\\\\Windows\\\\System32\\\\OpenSSH\\\\sshd.exe\",\n      \"?:\\\\Windows\\\\System32\\\\OpenSSH\\\\sshd-session.exe\",\n      \"?:\\\\Program Files\\\\OpenSSH*\\\\sshd.exe\",\n      \"?:\\\\Program Files\\\\OpenSSH*\\\\sshd-session.exe\"\n    )\n  )"
      },
      {
        "name": "8cd49fbc-a35a-4418-8688-133cc3a1e548 — Proxy Execution via Windows OpenSSH",
        "description": "(EQL) Identifies attempts to execute commands via proxy using the Windows OpenSSH client. This may indicate an attempt to bypass application control via trusted Windows binaries. (Source: Elastic's official detection-rules repository (Elastic License v2).)",
        "query": "process where host.os.type == \"windows\" and event.type == \"start\" and process.name : (\"ssh.exe\", \"sftp.exe\") and\n  process.command_line : (\n    \"*Command=*powershell*\", \"*schtasks*\", \"*Command=*@echo off*\", \"*Command=*http*\",\n    \"*Command=*mshta*\", \"*Command=*msiexec*\", \"*Command=*cmd /c*\", \"*Command=*cmd.exe*\",\n    \"*Command=\\\"cmd /c*\", \"*LocalCommand=scp*&&*\", \"*LocalCommand=?scp*&&*\", \"*Command=*script*\"\n  )"
      }
    ]
  },
  "automation": {
    "safe": [
      "Add recommendation as Sentinel incident comment.",
      "Run enrichment queries.",
      "Create ServiceNow SecOps task."
    ],
    "approval_required": [
      "Contain or disable the affected host/account.",
      "Any change to production configuration."
    ]
  },
  "escalation_criteria": [
    "Indirect Command Execution activity observed on a privileged account or critical system.",
    "Activity follows or precedes other suspicious behaviour in the same investigation.",
    "Automated triage cannot confidently rule out malicious intent."
  ],
  "false_positive_considerations": [
    "Legitimate administrative or maintenance activity matching this pattern.",
    "Approved security testing or red team exercise.",
    "Known benign software producing similar telemetry."
  ],
  "confluence": {
    "title": "T1202 - Indirect Command Execution Response Guidance",
    "labels": [
      "mitre",
      "attack",
      "d3fend",
      "secops",
      "basyrix"
    ],
    "sections": [
      "summary",
      "d3fend_mappings",
      "investigation_steps",
      "response_actions",
      "queries",
      "automation",
      "escalation_criteria",
      "false_positive_considerations"
    ]
  }
}