ID | Technique | Tactic |
---|---|---|
T1553.003 | SIP and Trust Provider Hijacking | Defense Evasion |
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.
Search
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 | Supported App |
---|---|---|---|---|
Windows Event Log CAPI2 81 | Windows | 'xmlwineventlog' |
'XmlWinEventLog:Microsoft-Windows-CAPI2/Operational' |
N/A |
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
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 |
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 |
References
-
https://specterops.io/wp-content/uploads/sites/3/2022/06/SpecterOps_Subverting_Trust_in_Windows.pdf
-
https://github.com/mattifestation/PoCSubjectInterfacePackage
-
https://pentestlab.blog/2017/11/06/hijacking-digital-signatures/
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: 2