Unsecured Credentials: Private Keys T1552.004
Tactic: Credential Access
Adversaries may search for private key certificate files on compromised systems for insecurely stored credentials. Private cryptographic keys and certificates are used for authentication, encryption/decryption, and digital signatures. Common key and certificate file extensions include: .key, .pgp, .gpg, .ppk., .p12, .pem, .pfx, .cer, .p7b, .asc.
Events covered
9 catalog events are tagged with this technique by at least one rule.
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 1 | Process creation |
| Sysmon | Event ID 11 | FileCreate |
| Security-Auditing | Event ID 4624 | An account was successfully logged on. |
| Security-Auditing | Event ID 4625 | An account failed to log on. |
| Security-Auditing | Event ID 4648 | A logon was attempted using explicit credentials. |
| Security-Auditing | Event ID 4662 | An operation was performed on an object. |
| Security-Auditing | Event ID 4688 | A new process has been created. |
| CertificateServicesClient-Lifecycle-System | Event ID 1007 | A certificate has been exported. |
| PowerShell | Event ID 4104 | Creating Scriptblock text (MessageNumber of MessageTotal). |
Authoring guide
Patterns shared across the 28 rules above: which fields they filter on, what specific values they look for, and what they exclude. The catalog normalizes field names across vendors so Sigma's Image, Elastic's process.name, and Splunk's process_name collapse into one row. Each rule contributes at most once per row.
Fields filtered most (38 distinct)
The fields most rules look at when detecting this technique. The How column shows the operators authors use (eq, wildcard, regex_match, match) and how often each appears. Sample values are concrete examples to start from, not an exhaustive list.
Top indicator values (274 distinct)
Specific (field, operator, value) combinations the rules check for, ranked by how many rules under this technique use each one. The Corpus reach column counts how many rules across the entire catalog (any technique) check the same combination. High numbers point to widely-used indicators that are likely noisy on their own; combine them with another condition for useful signal. Blank means the combination is specific to rules under this technique. Click a value to expand the rules under this technique that use it.
Exclusions (97 distinct)
Field/operator/value combinations excluded by rules under this technique (top-level not() clauses), sorted by how many rules exclude each. These are the false-positive paths the community has learned to filter out. A new rule that ignores the high-count entries here will likely fire on the same noisy paths. Click a value to expand the rules under this technique that exclude it.
Rules under this technique
Every rule in the catalog tagged with this technique, grouped by vendor. Click a rule title for its full predicates, exclusions, and indicators.
Sigma 7 rules
- Certificate Exported Via PowerShell
- Certificate Exported Via PowerShell - ScriptBlock
- Cisco Crypto Commands
- DPAPI Backup Keys And Certificate Export Activity IOC
- PFX File Creation
- PowerShell Get-Process LSASS
- Private Keys Reconnaissance Via CommandLine Tools
Elastic 10 rules
- Access to a Sensitive LDAP Attribute
- Attempted Private Key Access
- AWS EC2 CreateKeyPair by New Principal from Non-Cloud AS Organization
- Creation or Modification of Domain Backup DPAPI private key
- Google Workspace Drive Encryption Key(s) Accessed from Anonymous User
- Kubelet Certificate File Access Detected via Defend for Containers
- Potential Privilege Escalation via Linux DAC permissions
- Private Key Searching Activity
- Sensitive Keys Or Passwords Search Detected via Defend for Containers
- Suspicious CertUtil Commands
Splunk 6 rules
- Linux Auditd Find Ssh Private Keys
- Linux Auditd Private Keys and Certificate Enumeration
- Windows Export Certificate
- Windows PowerShell Export Certificate
- Windows PowerShell Export PfxCertificate
- Windows Private Keys Discovery
Kusto 1 rule
YARA-L 3 rules
- ADFS DKM Key Access
- GCP Service Account Key Used From Multiple Countries
- Google Workspace Encryption Key File Accessed By An Anonymous User