Detection rules › Splunk

Windows Service Creation Using Registry Entry

Status
production
Severity
low
Group by
TargetObject, computer_name, details, event_type, process_guid, process_id, registry_hive, registry_path, registry_status, registry_value_name, registry_value_type, user, vendor_product
Author
Teoderick Contreras, Splunk, Steven Dick
Source
github.com/splunk/security_content

The following analytic detects the modification of registry keys that define Windows services using reg.exe. This detection leverages Splunk to search for specific keywords in the registry path, value name, and value data fields. This activity is significant because it indicates potential unauthorized changes to service configurations, a common persistence technique used by attackers. If confirmed malicious, this could allow an attacker to maintain access, escalate privileges, or move laterally within the network, leading to data theft, ransomware, or other damaging outcomes.

Known false positives

  • Third party tools may used this technique to create services but not so common.

MITRE ATT&CK coverage

Telemetry coverage

Rule body

name: Windows Service Creation Using Registry Entry
id: 25212358-948e-11ec-ad47-acde48001122
version: 20
creation_date: '2022-02-23'
modification_date: '2026-05-13'
author: Teoderick Contreras, Splunk, Steven Dick
status: production
type: Anomaly
description: The following analytic detects the modification of registry keys that define Windows services using reg.exe. This detection leverages Splunk to search for specific keywords in the registry path, value name, and value data fields. This activity is significant because it indicates potential unauthorized changes to service configurations, a common persistence technique used by attackers. If confirmed malicious, this could allow an attacker to maintain access, escalate privileges, or move laterally within the network, leading to data theft, ransomware, or other damaging outcomes.
data_source:
    - Sysmon EventID 13
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry WHERE (Registry.registry_path="*\\SYSTEM\\CurrentControlSet\\Services*" Registry.registry_value_name = ImagePath) by Registry.action Registry.dest Registry.process_guid Registry.process_id Registry.registry_hive Registry.registry_path Registry.registry_key_name Registry.registry_value_data Registry.registry_value_name Registry.registry_value_type Registry.status Registry.user Registry.vendor_product | `drop_dm_object_name(Registry)` | where isnotnull(registry_value_data) | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `windows_service_creation_using_registry_entry_filter`'
how_to_implement: To successfully implement this search, you need to be ingesting logs with the registry value name, registry path, and registry value data from your endpoints. If you are using Sysmon, you must have at least version 2.0 of the official Sysmon TA. https://splunkbase.splunk.com/app/5709
known_false_positives: Third party tools may used this technique to create services but not so common.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/36d49de4c8b00bf36054294b4a1fcbab3917d7c5/atomics/T1574.011/T1574.011.md
intermediate_findings:
    entities:
        - field: dest
          type: system
          score: 20
          message: A Windows Service was created on a endpoint from $dest$ using a registry entry
analytic_story:
    - SolarWinds WHD RCE Post Exploitation
    - PlugX
    - CISA AA23-347A
    - China-Nexus Threat Activity
    - Windows Persistence Techniques
    - SnappyBee
    - Derusbi
    - Windows Registry Abuse
    - Salt Typhoon
    - Active Directory Lateral Movement
    - Suspicious Windows Registry Activities
    - Crypto Stealer
    - Brute Ratel C4
    - Gh0st RAT
asset_type: Endpoint
mitre_attack_id:
    - T1574.011
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint

Stages and Predicates

Stage 1: tstats

| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry WHERE (Registry.registry_path="*\\SYSTEM\\CurrentControlSet\\Services*" Registry.registry_value_name = ImagePath) by Registry.action Registry.dest Registry.process_guid Registry.process_id Registry.registry_hive Registry.registry_path Registry.registry_key_name Registry.registry_value_data Registry.registry_value_name Registry.registry_value_type Registry.status Registry.user Registry.vendor_product

Stage 2: search

| `drop_dm_object_name(Registry)`

Stage 3: where

| where isnotnull(registry_value_data)

Stage 4: search

| `security_content_ctime(firstTime)`

Stage 5: search

| `security_content_ctime(lastTime)`

Stage 6: search

| `windows_service_creation_using_registry_entry_filter`

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Registry.registry_patheq
  • "*\\SYSTEM\\CurrentControlSet\\Services*" corpus 2 (splunk 2)
field:"registry_path" kind:eq
Registry.registry_value_nameeq
  • ImagePath corpus 4 (elastic 2, splunk 2)
field:"registry_value_name" kind:eq value:"ImagePath"
registry_value_datais_not_null
  • (no value, null check)
field:"Details" kind:is_not_null