Detection: Detect Certipy File Modifications
Description
The following analytic detects the use of the Certipy tool to enumerate Active Directory Certificate Services (AD CS) environments by identifying unique file modifications. It leverages endpoint process and filesystem data to spot the creation of files with specific names or extensions associated with Certipy's information gathering and exfiltration activities. This activity is significant as it indicates potential reconnaissance and data exfiltration efforts by an attacker. If confirmed malicious, this could lead to unauthorized access to sensitive AD CS information, enabling further attacks or privilege escalation within the network.
Search
1
2| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem
3 WHERE Filesystem.file_name IN ("*_certipy.zip","*_certipy.txt", "*_certipy.json", "*.ccache")
4 BY Filesystem.action Filesystem.dest Filesystem.file_access_time
5 Filesystem.file_create_time Filesystem.file_hash Filesystem.file_modify_time
6 Filesystem.file_name Filesystem.file_path Filesystem.file_acl
7 Filesystem.file_size Filesystem.process_guid Filesystem.process_id
8 Filesystem.user Filesystem.vendor_product
9
10| `drop_dm_object_name(Filesystem)`
11
12| `security_content_ctime(firstTime)`
13
14| `security_content_ctime(lastTime)`
15
16| `detect_certipy_file_modifications_filter`
Data Source
| Name |
Platform |
Sourcetype |
Source |
| Sysmon EventID 11 |
Windows |
'XmlWinEventLog' |
'XmlWinEventLog:Microsoft-Windows-Sysmon/Operational' |
Macros Used
| Name |
Value |
| security_content_ctime |
convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
| detect_certipy_file_modifications_filter |
search * |
detect_certipy_file_modifications_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
| ID |
Technique |
Tactic |
| T1560 |
Archive Collected Data |
Collection |
| T1649 |
Steal or Forge Authentication Certificates |
Credential Access |
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 Finding (Notable) |
Yes |
| Rule Title |
%name% |
| Rule Description |
%description% |
| Notable Event Fields |
user, dest |
| Creates Intermediate Finding (Risk Event) |
Yes |
TTP detections generate a Finding (Notable) and may generate Intermediate Findings (Risk Events) for associated entities.
Implementation
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints as well as file creation or deletion events.
Known False Positives
No false positives have been identified at this time.
Associated Analytic Story
Finding
| Title |
Entity Field |
Entity Type |
Risk Score |
| Suspicious files $file_name$ related to Certipy detected on $dest$ |
user |
user |
50 |
| Message |
Entity Field |
Entity Type |
Risk Score |
| Suspicious files $file_name$ related to Certipy detected on $dest$ |
dest |
system |
50 |
Threat Objects
| Field |
Type |
| file_name |
file_name |
References
Detection Testing
| Test Type |
Status |
Dataset |
Source |
Sourcetype |
| Validation |
✅ Passing |
N/A |
N/A |
N/A |
| Unit |
✅ Passing |
Dataset |
XmlWinEventLog:Microsoft-Windows-Sysmon/Operational |
XmlWinEventLog |
| Integration |
✅ Passing |
Dataset |
XmlWinEventLog:Microsoft-Windows-Sysmon/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: 12