| ID | Technique | Tactic |
|---|---|---|
| T1112 | Modify Registry | Defense Evasion |
Detection: Windows Routing and Remote Access Service Registry Key Change
Description
This analytic identifies the modification of the Windows RemoteAccess Registry Entry. This technique can be used by malware, adversaries, threat actors and red teamers to gain persistence on a system by tampering with the key to add a custom DLL to be loaded. This technique was also observed to be used by Gh0st RAT malware. Upon seeing this behavior, it is recommended to review the system services events especially the remote access services.
Search
1
2| tstats `security_content_summariesonly`
3 count min(_time) as firstTime
4 max(_time) as lastTime
5
6FROM datamodel=Endpoint.Registry WHERE
7
8Registry.registry_path="*\\Services\\RemoteAccess\\RouterManagers\\Ip*"
9Registry.action=modified
10
11by Registry.action Registry.dest Registry.process_guid
12 Registry.process_id Registry.registry_hive
13 Registry.registry_path Registry.registry_key_name
14 Registry.registry_value_data Registry.registry_value_name
15 Registry.registry_value_type Registry.status
16 Registry.user Registry.vendor_product
17
18
19| `drop_dm_object_name(Registry)`
20
21| `security_content_ctime(firstTime)`
22
23| `security_content_ctime(lastTime)`
24
25| `windows_routing_and_remote_access_service_registry_key_change_filter`
Data Source
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| Sysmon EventID 13 | 'XmlWinEventLog' |
'XmlWinEventLog:Microsoft-Windows-Sysmon/Operational' |
Macros Used
| Name | Value |
|---|---|
| security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
| windows_routing_and_remote_access_service_registry_key_change_filter | search * |
windows_routing_and_remote_access_service_registry_key_change_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 successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the Endpoint datamodel in the Registry node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.
Known False Positives
There are legitimate reasons for changing this registry key/value. Investigate the change and its source and apply appropriate filters as needed.
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message:
Routing and Remote Access Service registry key [$registry_path$] was modified with the value [$registry_value_data$] by [$user$] on [$dest$].
| Risk Object | Risk Object Type | Risk Score | Threat Objects |
|---|---|---|---|
| dest | system | 20 | registry_path |
References
-
https://malpedia.caad.fkie.fraunhofer.de/details/win.ghost_rat
-
https://www.sentinelone.com/blog/the-curious-case-of-gh0st-malware/
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: 1