EXPLORE
← Back to Explore
splunk_escuAnomaly

Windows Steal Authentication Certificates CryptoAPI

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.

MITRE ATT&CK

Detection Query

`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`

Author

Michael Haag, Splunk

Created

2026-03-10

Data Sources

Windows Event Log CAPI2 70

Tags

Windows Certificate ServicesHellcat Ransomware
Raw Content
name: Windows Steal Authentication Certificates CryptoAPI
id: 905d5692-6d7c-432f-bc7e-a6b4f464d40e
version: 8
date: '2026-03-10'
author: Michael Haag, Splunk
status: production
type: Anomaly
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.
data_source:
    - Windows Event Log CAPI2 70
search: |-
    `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`
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.
references:
    - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-vista/cc749296(v=ws.10)
drilldown_searches:
    - name: View the detection results for - "$dest$"
      search: '%original_detection_search% | search  dest = "$dest$"'
      earliest_offset: $info_min_time$
      latest_offset: $info_max_time$
    - name: View risk events for the last 7 days for - "$dest$"
      search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$") starthoursago=168  | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
      earliest_offset: $info_min_time$
      latest_offset: $info_max_time$
rba:
    message: Certificates were exported via the CryptoAPI 2 on $dest$.
    risk_objects:
        - field: dest
          type: system
          score: 20
    threat_objects: []
tags:
    analytic_story:
        - Windows Certificate Services
        - Hellcat Ransomware
    asset_type: Endpoint
    mitre_attack_id:
        - T1649
    product:
        - Splunk Enterprise
        - Splunk Enterprise Security
        - Splunk Cloud
    security_domain: endpoint
tests:
    - name: True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1649/atomic_red_team/capi2-operational.log
          source: XmlWinEventLog:Microsoft-Windows-CAPI2/Operational
          sourcetype: XmlWinEventLog