Try in Splunk Security Cloud

Description

The following analytic detects the extraction of authentication certificates using Windows Event Log - CAPI2 (CryptoAPI 2). It leverages EventID 70, which is generated when a certificate's private key is acquired. This detection is significant because it can identify potential misuse of certificates, such as those extracted by tools like Mimikatz or Cobalt Strike. If confirmed malicious, this activity could allow attackers to impersonate users, escalate privileges, or access sensitive information, posing a severe risk to the organization's security.

  • Type: Anomaly
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2024-05-16
  • Author: Michael Haag, Splunk
  • ID: 905d5692-6d7c-432f-bc7e-a6b4f464d40e

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1649 Steal or Forge Authentication Certificates Credential Access
Kill Chain Phase
  • Exploitation
NIST
  • DE.AE
CIS20
  • CIS 10
CVE
1
2
3
4
5
6
7
`capi2_operational` EventCode=70 
| xmlkv UserData_Xml 
| stats count min(_time) as firstTime max(_time) as lastTime by Computer, UserData_Xml 
| rename Computer as dest 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `windows_steal_authentication_certificates_cryptoapi_filter`

Macros

The SPL above uses the following Macros:

:information_source: windows_steal_authentication_certificates_cryptoapi_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time
  • Computer
  • UserData_Xml

How To Implement

To implement this analytic, one will need to enable the Microsoft-Windows-CAPI2/Operational log within the Windows Event Log. Note this is a debug log for many purposes, and the analytic only focuses in on EventID 70. Review the following gist for additional enabling information.

Known False Positives

False positives may be present in some instances of legitimate applications requiring to export certificates. Filter as needed.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
24.0 30 80 Certificates were exported via the CryptoAPI 2 on $dest$.

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

Reference

Test Dataset

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range

source | version: 2