Detection rules › Sigma
Program Executed Using Proxy/Local Command Via SSH.EXE
Detect usage of the "ssh.exe" binary as a proxy to launch other programs.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth | T1218 System Binary Proxy Execution |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 1 | Process creation |
Rule body yaml
title: Program Executed Using Proxy/Local Command Via SSH.EXE
id: 7d6d30b8-5b91-4b90-a891-46cccaf29598
status: test
description: Detect usage of the "ssh.exe" binary as a proxy to launch other programs.
references:
- https://lolbas-project.github.io/lolbas/Binaries/Ssh/
- https://github.com/LOLBAS-Project/LOLBAS/pull/211/files
- https://gtfobins.github.io/gtfobins/ssh/
- https://man.openbsd.org/ssh_config#ProxyCommand
- https://man.openbsd.org/ssh_config#LocalCommand
author: frack113, Nasreddine Bencherchali
date: 2022-12-29
modified: 2025-10-16
tags:
- attack.stealth
- attack.t1218
logsource:
category: process_creation
product: windows
detection:
selection_parent:
# ParentCommandLine: '"C:\Windows\System32\OpenSSH\sshd.exe" -R'
ParentImage: 'C:\Windows\System32\OpenSSH\sshd.exe'
selection_cli_img:
- Image|endswith: '\ssh.exe'
- Product: 'OpenSSH for Windows'
- Hashes|contains:
- 'IMPHASH=55b4964d29aad5438b9e950052dbbbc0'
- 'IMPHASH=334d66c33503ccbf647c15b47c27eef4'
- 'IMPHASH=27b0da080ef92afb37983d30d839141e'
- 'IMPHASH=977eb4c263d384e47daa0712d34713ab'
- 'IMPHASH=3eaadce9ae43d5a918bb082065815c3b'
- 'IMPHASH=980fe6cf0d996ab1eedf877222e722aa'
- 'IMPHASH=5f959422308ac3d721010d66647e100e'
- 'IMPHASH=a49aaa3d03d1cd9c8dc7fca60f7f480b'
- 'IMPHASH=dd335f759b6d5d6a8382b71dd9d65791'
selection_cli_flags:
- CommandLine|contains: 'ProxyCommand='
- CommandLine|contains|all:
- 'PermitLocalCommand=yes'
- ' LocalCommand'
condition: selection_parent or all of selection_cli_*
falsepositives:
- Legitimate usage for administration purposes
level: medium
Stages and Predicates
Stage 0: condition
selection_parent or all of selection_cli_*Stage 1: selection_parent
selection_parent:
ParentImage: 'C:\Windows\System32\OpenSSH\sshd.exe'
Stage 2: selection_cli_img
selection_cli_img:
- Image|endswith: '\ssh.exe'
- Product: 'OpenSSH for Windows'
- Hashes|contains:
- 'IMPHASH=55b4964d29aad5438b9e950052dbbbc0'
- 'IMPHASH=334d66c33503ccbf647c15b47c27eef4'
- 'IMPHASH=27b0da080ef92afb37983d30d839141e'
- 'IMPHASH=977eb4c263d384e47daa0712d34713ab'
- 'IMPHASH=3eaadce9ae43d5a918bb082065815c3b'
- 'IMPHASH=980fe6cf0d996ab1eedf877222e722aa'
- 'IMPHASH=5f959422308ac3d721010d66647e100e'
- 'IMPHASH=a49aaa3d03d1cd9c8dc7fca60f7f480b'
- 'IMPHASH=dd335f759b6d5d6a8382b71dd9d65791'
Stage 3: selection_cli_flags
selection_cli_flags:
- CommandLine|contains: 'ProxyCommand='
- CommandLine|contains|all:
- 'PermitLocalCommand=yes'
- ' LocalCommand'
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
CommandLine | match |
|
Hashes | match |
|
Image | ends_with |
|
ParentImage | eq |
|
Product | eq |
|