ssh.exe
Ssh.exe is the OpenSSH compatible client can be used to connect to Windows 10 (build 1809 and later) and Windows Server 2019 devices.
Paths
c:\windows\system32\OpenSSH\ssh.exe
Commands
Execute
Executes specified command on host machine. The prompt for password can be eliminated by adding the host's public key in the user's authorized_keys file. Adversaries can do the same for execution on remote machines.
Use case: Execute specified command, can be used for defense evasion.
Privileges: User
ssh localhost "{CMD}"
Execute
Executes specified command from ssh.exe
Use case: Performs execution of specified file, can be used as a defensive evasion.
Privileges: User
ssh -o ProxyCommand="{CMD}" .
Detection
- Sigma: https://github.com/SigmaHQ/sigma/blob/c04bef2fbbe8beff6c7620d5d7ea6872dbe7acba/rules/windows/process_creation/proc_creation_win_lolbin_ssh.yml
- IOC: Event ID 4624 with process name C:\Windows\System32\OpenSSH\sshd.exe.
- IOC: command line arguments specifying execution.