Detection: 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.

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

Data Source

Name Platform Sourcetype Source
Windows Event Log CAPI2 81 Windows icon Windows 'xmlwineventlog' 'XmlWinEventLog:Microsoft-Windows-CAPI2/Operational'

Macros Used

Name Value
capi2_operational (source=XmlWinEventLog:Microsoft-Windows-CAPI2/Operational)
windows_sip_winverifytrust_failed_trust_validation_filter search *
windows_sip_winverifytrust_failed_trust_validation_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1553.003 SIP and Trust Provider Hijacking Defense Evasion
KillChainPhase.EXPLOITAITON
NistCategory.DE_AE
Cis18Value.CIS_10

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Risk Event True
This configuration file applies to all detections of type anomaly. These detections will use Risk Based Alerting.

Implementation

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.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message Risk Score Impact Confidence
Failed trust validation via the CryptoAPI 2 on $dest$ for a binary. 64 80 80
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset XmlWinEventLog:Microsoft-Windows-CAPI2/Operational XmlWinEventLog
Integration ✅ Passing Dataset XmlWinEventLog:Microsoft-Windows-CAPI2/Operational XmlWinEventLog

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: GitHub | Version: 3