Skip to content

Commit ede80f4

Browse files
authored
Merge pull request #3257 from nterl0k/nterl0k-t1219-rmm-update-2
Nterl0k - T1219 - RMM Detection for Registry locations.
2 parents d2592c5 + 55d4936 commit ede80f4

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Detect Remote Access Software Usage Registry
2+
id: 33804986-25dd-43cf-bb6b-dc14956c7cbc
3+
version: 1
4+
date: '2024-11-21'
5+
author: Steven Dick
6+
status: production
7+
type: Anomaly
8+
description: The following analytic detects when a known remote access software is added to common persistence locations on a device within the environment. Adversaries use these utilities to retain remote access capabilities to the environment. Utilities in the lookup include AnyDesk, GoToMyPC, LogMeIn, TeamViewer and much more. Review the lookup for the entire list and add any others.
9+
data_source:
10+
- Sysmon EventID 12
11+
- Sysmon EventID 13
12+
search: '| tstats `security_content_summariesonly` latest(Registry.process_guid) as process_guid count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where (Registry.registry_path="*\\Microsoft\\Windows\\CurrentVersion\\Run*" OR (Registry.registry_path="*\\SYSTEM\\CurrentControlSet\\Services\\*" AND Registry.registry_value_name="ImagePath")) by Registry.dest Registry.user Registry.registry_path Registry.registry_value_name Registry.registry_value_data Registry.registry_key_name
13+
| `drop_dm_object_name(Registry)`
14+
| `security_content_ctime(firstTime)`
15+
| `security_content_ctime(lastTime)`
16+
| rex field=registry_value_data "(\")?.+\\\(?<file_name_1>[^\"=]+\.[^\" ]{1,5})(\")?"
17+
| rex field=registry_value_data "(?<file_name_2>[^\.]+\.[^\" ]{1,5}$)"
18+
| eval file_name = coalesce(file_name_1,file_name_2)
19+
| lookup remote_access_software remote_utility AS file_name OUTPUT isutility, description as signature, comment_reference as desc, category
20+
| search isutility = TRUE
21+
| `remote_access_software_usage_exceptions`
22+
| `detect_remote_access_software_usage_registry_filter`'
23+
how_to_implement: The detection is based on data that originates from Endpoint Detection and Response (EDR) agents. These agents are designed to provide security-related telemetry from the endpoints where the agent is installed. To implement this search, you must ingest logs that contain the file path, file name, and the user that created the file. These logs must be processed using the appropriate Splunk Technology Add-ons that are specific to the EDR product. The logs must also be mapped to the `Registry` node of the `Endpoint` data model. Use the Splunk Common Information Model (CIM) to normalize the field names and speed up the data modeling process. The "exceptions" macro leverages both an Assets and Identities lookup, as well as a KVStore collection called "remote_software_exceptions" that lets you track and maintain device-based exceptions for this set of detections.
24+
known_false_positives: Known or approved applications used by the organization or usage of built-in functions. Known false positives can be added to the remote_access_software_usage_exception.csv lookup to globally suppress these situations across all remote access content
25+
references:
26+
- https://attack.mitre.org/techniques/T1219/
27+
- https://thedfirreport.com/2022/08/08/bumblebee-roasts-its-way-to-domain-admin/
28+
- https://thedfirreport.com/2022/11/28/emotet-strikes-again-lnk-file-leads-to-domain-wide-ransomware/
29+
drilldown_searches:
30+
- name: View the detection results for - "$dest$" and "$user$"
31+
search: '%original_detection_search% | search dest = "$dest$" user = "$user$"'
32+
earliest_offset: $info_min_time$
33+
latest_offset: $info_max_time$
34+
- name: View risk events for the last 7 days for - "$dest$" and "$user$"
35+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$","$user$") starthoursago=168 | 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)`'
36+
earliest_offset: $info_min_time$
37+
latest_offset: $info_max_time$
38+
- name: Investigate registry changes on $dest$
39+
search: '| from datamodel:Endpoint.Registry| search dest=$dest$ registry_path=$registry_path$'
40+
earliest_offset: $info_min_time$
41+
latest_offset: $info_max_time$
42+
tags:
43+
analytic_story:
44+
- Insider Threat
45+
- Command And Control
46+
- Ransomware
47+
- Gozi Malware
48+
- CISA AA24-241A
49+
asset_type: Endpoint
50+
confidence: 50
51+
impact: 50
52+
message: A process for a known remote access software [$signature$] was detected on $dest$
53+
mitre_attack_id:
54+
- T1219
55+
observable:
56+
- name: dest
57+
type: Hostname
58+
role:
59+
- Victim
60+
- name: user
61+
type: User
62+
role:
63+
- Victim
64+
- name: registry_path
65+
type: Other
66+
role:
67+
- Attacker
68+
- name: signature
69+
type: Other
70+
role:
71+
- Attacker
72+
product:
73+
- Splunk Enterprise
74+
- Splunk Enterprise Security
75+
- Splunk Cloud
76+
required_fields:
77+
- _time
78+
- Registry.dest
79+
- Registry.user
80+
- Registry.registry_path
81+
- Registry.registry_value_name
82+
- Registry.registry_value_data
83+
- Registry.registry_key_name
84+
risk_score: 25
85+
security_domain: endpoint
86+
manual_test: This detection uses A&I lookups from Enterprise Security.
87+
tests:
88+
- name: True Positive Test
89+
attack_data:
90+
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1219/screenconnect/screenconnect_sysmon.log
91+
source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
92+
sourcetype: XmlWinEventLog

0 commit comments

Comments
 (0)