CredCoerce sends RPC calls to a target Windows system that cause it to initiate an outbound authentication attempt to a path you control. You capture or relay the resulting credentials with a listener such as Responder or ntlmrelayx. This technique is commonly used in internal penetration tests to move laterally or escalate privileges.
Synopsis
Parameters
Hostname or IP address of the target system to coerce.
UNC path or resource path to embed in the RPC call. The target system will attempt to access this path, triggering an outbound authentication to the host in the path (e.g.,
\\attacker-ip\share).Options
One or more coercion techniques to attempt. Use
* to try all available techniques. See the table below for all supported values.Output format:
Freeform, Raw, Table, List, Csv, Tsv, Json.Override the SPN used during authentication.
SOCKS5 proxy endpoint (
host:port).Coercion techniques
All available techniques use the MS-EFSR (Encrypting File System Remote) RPC interface.| Technique | Interface | Description |
|---|---|---|
* | — | Attempt all available techniques |
Efs.OpenFile | MS-EFSR | Call EfsRpcOpenFileRaw with the victim path |
Efs.EncryptFile | MS-EFSR | Call EfsRpcEncryptFileSrv with the victim path |
Efs.DecryptFile | MS-EFSR | Call EfsRpcDecryptFileSrv with the victim path |
Efs.QueryUsersOnFile | MS-EFSR | Call EfsRpcQueryUsersOnFile with the victim path |
Efs.QueryRecoveryAgents | MS-EFSR | Call EfsRpcQueryRecoveryAgents with the victim path |
Efs.RemoveUsersFromFile | MS-EFSR | Call EfsRpcRemoveUsersFromFile with the victim path |
Efs.AddUsersToFile | MS-EFSR | Call EfsRpcAddUsersToFile with the victim path |
Efs.FileKeyInfo | MS-EFSR | Call EfsRpcFileKeyInfo with the victim path |
Efs.DuplicateEncryptionInfoFile | MS-EFSR | Call EfsRpcDuplicateEncryptionInfoFile with the victim path |
Efs.AddUsersToFileEx | MS-EFSR | Call EfsRpcAddUsersToFileEx with the victim path |
Efs.FileKeyInfoEx | MS-EFSR | Call EfsRpcFileKeyInfoEx with the victim path |
Efs.GetEncryptedFileMetadata | MS-EFSR | Call EfsRpcGetEncryptedFileMetadata with the victim path |
Efs.SetEncryptedFileMetadata | MS-EFSR | Call EfsRpcSetEncryptedFileMetadata with the victim path |
Efs.EncryptFileExSrv | MS-EFSR | Call EfsRpcEncryptFileExSrv with the victim path |
Authentication
Credentials
Credentials
Kerberos
Kerberos
Examples
Start a credential listener
On your attacker machine, start a listener to capture or relay credentials:
Coerce authentication with all EFS techniques
LUMON-FS1) attempts to authenticate to \\attacker-ip\share, which your listener captures.Common usage patterns
NTLM relay to LDAP for privilege escalation
NTLM relay to LDAP for privilege escalation
Coerce a domain controller or privileged machine to authenticate to an LDAP relay, which can be used to add privileges:
- Start
ntlmrelayxtargeting LDAP on another domain controller. - Run
CredCoerceagainst the victim machine with a path pointing to your relay listener. - The relay authenticates to LDAP on your behalf and performs the privileged operation.
Capturing machine account hashes
Capturing machine account hashes
When the target is a computer account (rather than a user), the outbound authentication uses the machine account credentials. These Net-NTLM hashes can be cracked offline or relayed to services that accept machine account authentication.