Windows SIP WinVerifyTrust Failed Trust Validation


Description

The following analytic detects failed trust validation attempts using Windows Event Log - CAPI2 (CryptoAPI 2). It specifically triggers on EventID 81, which indicates that "The digital signature of the object did not verify." This detection leverages the CAPI2 Operational log to identify instances where digital signatures fail to validate. Monitoring this activity is crucial as it can indicate attempts to execute untrusted or potentially malicious binaries. If confirmed malicious, this activity could allow attackers to bypass security controls and execute unauthorized code, leading to potential system compromise.

Query · spl

`capi2_operational` EventID=81 "The digital signature of the object did not verify."
  | xmlkv UserData_Xml
  | stats count min(_time) as firstTime max(_time) as lastTime
    BY Computer, UserData_Xml
  | rename Computer as dest
  | `windows_sip_winverifytrust_failed_trust_validation_filter`

Implementation guide

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 81. Review the following gist for additional enabling information.

Known false positives

  • False positives may be present in some instances of legitimate binaries with invalid signatures. Filter as needed.

Analyst notes

Known false positives: False positives may be present in some instances of legitimate binaries with invalid signatures. Filter as needed.

Raw source Windows SIP WinVerifyTrust Failed Trust Validation · SPL
Esc
Published by splunk/security_content ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
name: Windows SIP WinVerifyTrust Failed Trust Validation
id: 6ffc7f88-415b-4278-a80d-b957d6539e1a
version: 9
creation_date: '2023-10-10'
modification_date: '2026-05-13'
author: Michael Haag, Splunk
status: production
type: Anomaly
description: The following analytic detects failed trust validation attempts using Windows Event Log - CAPI2 (CryptoAPI 2). It specifically triggers on EventID 81, which indicates that "The digital signature of the object did not verify." This detection leverages the CAPI2 Operational log to identify instances where digital signatures fail to validate. Monitoring this activity is crucial as it can indicate attempts to execute untrusted or potentially malicious binaries. If confirmed malicious, this activity could allow attackers to bypass security controls and execute unauthorized code, leading to potential system compromise.
data_source:
    - Windows Event Log CAPI2 81
search: |-
    `capi2_operational` EventID=81 "The digital signature of the object did not verify."
      | xmlkv UserData_Xml
      | stats count min(_time) as firstTime max(_time) as lastTime
        BY Computer, UserData_Xml
      | rename Computer as dest
      | `windows_sip_winverifytrust_failed_trust_validation_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 81. Review the following gist for additional enabling information.
known_false_positives: False positives may be present in some instances of legitimate binaries with invalid signatures. Filter as needed.
references:
    - https://attack.mitre.org/techniques/T1553/003/
    - https://specterops.io/wp-content/uploads/sites/3/2022/06/SpecterOps_Subverting_Trust_in_Windows.pdf
    - https://github.com/gtworek/PSBits/tree/master/SIP
    - https://github.com/mattifestation/PoCSubjectInterfacePackage
    - https://pentestlab.blog/2017/11/06/hijacking-digital-signatures/
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$") | 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: 7d
      latest_offset: "0"
intermediate_findings:
    entities:
        - field: dest
          type: system
          score: 20
          message: Failed trust validation via the CryptoAPI 2 on $dest$ for a binary.
analytic_story:
    - Subvert Trust Controls SIP and Trust Provider Hijacking
asset_type: Endpoint
mitre_attack_id:
    - T1553.003
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint
tests:
    - name: True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1553.003/sip/capi2-operational.log
          source: XmlWinEventLog:Microsoft-Windows-CAPI2/Operational
          sourcetype: XmlWinEventLog
      test_type: unit

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.