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.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2025/08/21"
 3integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
 4maturity = "production"
 5updated_date = "2025/08/21"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10Identifies abuse of the Console Window Host (conhost.exe) to execute commands via proxy. This behavior is used as a defense
11evasion technique to blend-in malicious activity with legitimate Windows software.
12"""
13from = "now-9m"
14index = [
15    "endgame-*",
16    "logs-crowdstrike.fdr*",
17    "logs-endpoint.events.process-*",
18    "logs-m365_defender.event-*",
19    "logs-sentinel_one_cloud_funnel.*",
20    "logs-system.security*",
21    "logs-windows.forwarded*",
22    "logs-windows.sysmon_operational-*",
23    "winlogbeat-*",
24]
25language = "eql"
26license = "Elastic License v2"
27name = "Proxy Execution via Console Window Host"
28note = """## Triage and analysis
29
30### Investigating Proxy Execution via Console Window Host
31
32### Possible investigation steps
33
34- Review the conhost child processes and the parent process to identify the initial vector.
35- Identify the user account that performed the action and whether it should perform this kind of action.
36- Investigate other alerts associated with the user/host during the past 48 hours.
37- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.
38- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.
39
40### False positive analysis
41
42- This is a dual-use tool, meaning its usage is not inherently malicious. Analysts can dismiss the alert if the administrator is aware of the activity, no other suspicious activity was identified.
43
44### Response and Remediation
45
46- Initiate the incident response process based on the outcome of the triage.
47- Isolate the involved host to prevent further post-compromise behavior.
48- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
49- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
50- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
51- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
52"""
53references = ["https://lolbas-project.github.io/lolbas/Binaries/Conhost/"]
54risk_score = 73
55rule_id = "fcd16fe8-eb29-42b3-8aee-6c9ad777a2f6"
56severity = "high"
57tags = [
58    "Domain: Endpoint",
59    "OS: Windows",
60    "Use Case: Threat Detection",
61    "Tactic: Defense Evasion",
62    "Data Source: Elastic Endgame",
63    "Data Source: Elastic Defend",
64    "Data Source: Windows Security Event Logs",
65    "Data Source: Microsoft Defender for Endpoint",
66    "Data Source: Sysmon",
67    "Data Source: SentinelOne",
68    "Data Source: Crowdstrike",
69    "Resources: Investigation Guide",
70]
71timestamp_override = "event.ingested"
72type = "eql"
73
74query = '''
75process where host.os.type == "windows" and event.type == "start" and
76 process.name : "conhost.exe" and process.args : "--headless" and
77  process.command_line : ("*powershell*", "*cmd *", "*cmd.exe *", "*script*", "*mshta*", "*curl *", "*curl.exe *", "*^*^*^*", "*.bat*", "*.cmd*", "*schtasks*", "*@SSL*", "*http*", "* \\\\*", "*.vbs*", "*.js*", "*mhsta*")
78'''
79
80
81[[rule.threat]]
82framework = "MITRE ATT&CK"
83[[rule.threat.technique]]
84id = "T1202"
85name = "Indirect Command Execution"
86reference = "https://attack.mitre.org/techniques/T1202/"
87
88
89[rule.threat.tactic]
90id = "TA0005"
91name = "Defense Evasion"
92reference = "https://attack.mitre.org/tactics/TA0005/"

Triage and analysis

Investigating Proxy Execution via Console Window Host

Possible investigation steps

  • Review the conhost child processes and the parent process to identify the initial vector.
  • Identify the user account that performed the action and whether it should perform this kind of action.
  • Investigate other alerts associated with the user/host during the past 48 hours.
  • Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.
  • Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.

False positive analysis

  • This is a dual-use tool, meaning its usage is not inherently malicious. Analysts can dismiss the alert if the administrator is aware of the activity, no other suspicious activity was identified.

Response and Remediation

  • Initiate the incident response process based on the outcome of the triage.
  • Isolate the involved host to prevent further post-compromise behavior.
  • Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
  • Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
  • Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
  • Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).

References

Related rules

to-top