Proxy Execution via Windows OpenSSH
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.
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 attempts to execute commands via proxy using the Windows OpenSSH client. This may indicate an attempt to bypass
11application control via trusted windows binaries.
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 Windows OpenSSH"
28note = """## Triage and analysis
29
30### Investigating Proxy Execution via Windows OpenSSH
31
32### Possible investigation steps
33
34- Review the ssh 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/Ssh/"]
54risk_score = 73
55rule_id = "8cd49fbc-a35a-4418-8688-133cc3a1e548"
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 process.name : ("ssh.exe", "sftp.exe") and
76 process.command_line : ("*Command=*powershell*", "*schtasks*", "*Command=*@echo off*", "*Command=*http*", "*Command=*mshta*", "*Command=*msiexec*",
77 "*Command=*cmd /c*", "*Command=*cmd.exe*", "*Command=\"cmd /c*", "*LocalCommand=scp*&&*", "*LocalCommand=?scp*&&*", "*Command=*script*")
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 Windows OpenSSH
Possible investigation steps
- Review the ssh 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
- Potential Remote Install via MsiExec
- Proxy Execution via Console Window Host
- Script Execution via Microsoft HTML Application
- Suspicious Microsoft HTML Application Child Process
- Attempt to Install Kali Linux via WSL