| ID | Technique | Tactic |
|---|---|---|
| T1012 | Query Registry | Discovery |
| T1048 | Exfiltration Over Alternative Protocol | Exfiltration |
Detection: Cisco Secure Endpoint - Registry Hive Export And Rclone Transfer
Description
This analytic detects a Windows registry hive export alert followed by an rclone copy command naming the exact exported file, by correlating Cisco Secure Endpoint Behavioral Protection alerts. The current evidence includes a SOFTWARE-hive example; that hive is less specific to credential theft than SAM, SECURITY, or SYSTEM. The artifact relationship warrants investigation as a potential collection and transfer attempt, but a command does not prove a remote copy completed. Review the hive, destination, account, and prevention action. The APDE hive alert may quarantine the exported file in Protect mode, so a later copy command need not have read the file.
Search
1`cisco_secure_endpoint`
2event_type="Threat Detection"
3
4
5| `cisco_secure_endpoint_extract_bp_fields`
6
7
8| where sig_id IN ("20211119002713","20240715190623")
9
10
11| spath path=bp_data.details.matched_activity.events{0}.process:start.cmd_line output=process_command
12
13
14| spath path=bp_data.details.matched_activity.events{0}.process:start.args{} output=process_args
15
16| eval rclone_index=mvfind(process_args,"(?i)^(copy
17|sync)$"),
18 rclone_source=mvindex(process_args,rclone_index+1),
19 rclone_target=mvindex(process_args,rclone_index+2)
20
21
22| spath path=bp_data.details.matched_activity.events{1}.file:create.path output=created_path
23
24
25| spath path=bp_data.details.matched_activity.events{1}.file:create.name output=created_name
26
27
28| eval stage=if(sig_id="20211119002713","export","transfer"),
29 export_file=case(stage="export",lower(created_path."\\".created_name),
30 stage="transfer",lower(rclone_source)),
31 hive_key=if(stage="export",mvindex(process_args,2),null()),
32 remote_target=if(stage="transfer",rclone_target,null()),
33 event_time=tonumber(timestamp)+tonumber(timestamp_nanoseconds)/1000000000
34
35
36| where isnotnull(endpoint_guid)
37 AND isnotnull(export_file)
38 AND isnotnull(event_time)
39 AND (stage="export" OR isnotnull(remote_target))
40
41
42| sort 0 endpoint_guid export_file event_time
43
44| streamstats last(eval(if(stage="export",event_time,null()))) as export_time
45 last(eval(if(stage="export",hive_key,null()))) as prior_hive_key
46 last(eval(if(stage="export",process_command,null()))) as export_command
47 by endpoint_guid export_file
48
49| where stage="transfer" AND isnotnull(export_time)
50 AND event_time>=export_time AND event_time-export_time<=900
51
52| eval hive_key=prior_hive_key, transfer_command=process_command,
53 firstTime=export_time, lastTime=event_time,
54 user=coalesce(user,"unknown")
55
56| dedup endpoint_guid export_file export_time
57
58
59| table dest user endpoint_guid hive_key export_file remote_target
60 export_command transfer_command firstTime lastTime
61
62| `security_content_ctime(firstTime)`
63
64| `security_content_ctime(lastTime)`
65
66| `cisco_secure_endpoint___registry_hive_export_and_rclone_transfer_filter`
Data Source
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| Cisco Secure Endpoint Behavioral Protection Threat Detection | Other | 'cisco:se' |
'not_applicable' |
Macros Used
| Name | Value |
|---|---|
| security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
| search bp_engine=apde | |
| spath path=bp_data.details.sig_id output=sig_id | |
| spath path=computer.connector_guid output=endpoint_guid | |
| spath path=computer.hostname output=dest | |
| spath path=bp_data.details.matched_activity.events{0}.process:start.user.name output=user | |
| spath path=bp_data.details.matched_activity.events{0}.registry:set.user.name output=registry_user | |
| spath path=bp_data.details.matched_activity.events{0}.file:create.user.name output=file_user | |
| eval user=coalesce(user,registry_user,file_user) | |
| spath path=bp_data.audit output=bp_audit | |
| spath path=bp_data.details.actions{}.action output=bp_action | |
| spath path=bp_data.details.actions{}.status output=bp_action_status | |
| eval bp_response=case(bp_audit="true","audit mode",isnotnull(bp_action_status),mvjoin(bp_action,", "),true(),"no action reported")` | |
| cisco_secure_endpoint___registry_hive_export_and_rclone_transfer_filter | search * |
cisco_secure_endpoint___registry_hive_export_and_rclone_transfer_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 Finding (Notable) | No |
| Creates Intermediate Finding (Risk Event) | Yes |
Implementation
This search requires Cisco Secure Endpoint Behavioral Protection Threat Detection alerts, which include event_type="Threat Detection".
This search uses an input macro named cisco_secure_endpoint.
We strongly recommend that you specify your environment-specific configurations (index, source, sourcetype, etc.) for Cisco Secure Endpoint Behavioral Protection Threat Detection alerts.
Replace the macro definition with configurations for your Splunk environment.
The cisco_secure_endpoint_extract_bp_fields macro extracts the common signature, endpoint, actor, and prevention-response fields used by this search.
The search also uses a post-filter macro designed to filter out known false positives.
The logs are to be ingested using the Cisco Security Cloud App for Splunk (https://splunkbase.splunk.com/app/7404).
In Protect mode, a Behavioral Protection response can kill or quarantine an earlier stage, so this search requires each later alert to have actually appeared. Review bp_data.audit and bp_data.details.actions in the source events before concluding that a task registered, a process completed, or a transfer succeeded. The included audit-mode fixtures verify alert correlation, not survival of an enforced prevention action.
Known False Positives
Approved backup or migration software may export a registry hive and copy it with rclone. Verify the hive, destination, transfer outcome, operator, and change record. The rclone alert reports process start and does not alone prove receipt.
Associated Analytic Story
Intermediate Findings
| Message | Entity Field | Entity Type | Risk Score |
|---|---|---|---|
| Registry hive export $export_file$ followed by an rclone copy command naming it on $dest$ | dest | system | 20 |
Threat Objects
| Field | Type |
|---|---|
| transfer_command | command |
| export_command | command |
| export_file | file_path |
References
Detection Testing
| Test Type | Status | Dataset | Source | Sourcetype |
|---|---|---|---|---|
| Validation | ✅ Passing | N/A | N/A | N/A |
| Unit | ✅ Passing | Dataset | not_applicable |
cisco:se |
| Integration | ✅ Passing | Dataset | not_applicable |
cisco:se |
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: 1