Detect Remote Access Software Usage Registry


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.

Query · spl

| tstats `security_content_summariesonly`
  count min(_time) as firstTime
        max(_time) as lastTime
        latest(Registry.process_guid) as process_guid

FROM datamodel=Endpoint.Registry WHERE

(
    Registry.registry_path="*\\Microsoft\\Windows\\CurrentVersion\\Run*"
    OR
    (
        Registry.registry_path="*\\SYSTEM\\CurrentControlSet\\Services\\*"
        Registry.registry_value_name="ImagePath"
    )
)
(
    [
        | inputlookup remote_access_software
        | search file_name!=""
        | eval file_name="*".file_name."*"
        | rex mode=sed field=file_name "s/\*\*/\*/g"
        | rename file_name as Registry.registry_value_data
        | table Registry.registry_value_data
    ]
    OR
    [
        | inputlookup remote_access_software
        | search file_path!=""
        | eval file_path="*".file_path."*"
        | rex mode=sed field=file_path "s/\*\*/\*/g"
        | rename file_path as Registry.registry_value_data
        | table Registry.registry_value_data
    ]
)

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)`

| rex field=registry_value_data "(?i)(?:^|\x5c)(?<file_name>[^\x5c/\x27\x22]+\.\w{2,5})\b"
| rex field=registry_value_data "(?i)(?<file_path>\w:\x5c(?:[^\x5c/\x27\x22]+\x5c)+[^\x5c/\x27\x22]+\.\w{2,5})\b"

| lookup local=t remote_access_software file_name OUTPUT app as name_signature, category as name_category, reference as name_reference, description as name_description
| lookup local=t remote_access_software file_path OUTPUT app as path_signature, category as path_category, reference as path_reference, description as path_description
| eval signature=coalesce(nullif(name_signature, ""), path_signature),
       category=coalesce(nullif(name_category, ""), path_category),
       reference=coalesce(nullif(name_reference, ""), path_reference),
       description=coalesce(nullif(name_description, ""), path_description)

| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`

| `remote_access_software_usage_exceptions`

| `detect_remote_access_software_usage_registry_filter`

Implementation guide

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.

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

Analyst notes

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

Raw source Detect Remote Access Software Usage Registry · SPL
Esc
Published by splunk/security_content ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
name: Detect Remote Access Software Usage Registry
id: 33804986-25dd-43cf-bb6b-dc14956c7cbc
version: 15
creation_date: '2024-12-28'
modification_date: '2026-10-19'
author: Steven Dick, Onur Mustafa Erdogan, Splunk
status: production
type: Anomaly
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.
data_source:
    - Sysmon EventID 13
search: |-
    | tstats `security_content_summariesonly`
      count min(_time) as firstTime
            max(_time) as lastTime
            latest(Registry.process_guid) as process_guid

    FROM datamodel=Endpoint.Registry WHERE

    (
        Registry.registry_path="*\\Microsoft\\Windows\\CurrentVersion\\Run*"
        OR
        (
            Registry.registry_path="*\\SYSTEM\\CurrentControlSet\\Services\\*"
            Registry.registry_value_name="ImagePath"
        )
    )
    (
        [
            | inputlookup remote_access_software
            | search file_name!=""
            | eval file_name="*".file_name."*"
            | rex mode=sed field=file_name "s/\*\*/\*/g"
            | rename file_name as Registry.registry_value_data
            | table Registry.registry_value_data
        ]
        OR
        [
            | inputlookup remote_access_software
            | search file_path!=""
            | eval file_path="*".file_path."*"
            | rex mode=sed field=file_path "s/\*\*/\*/g"
            | rename file_path as Registry.registry_value_data
            | table Registry.registry_value_data
        ]
    )

    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)`

    | rex field=registry_value_data "(?i)(?:^|\x5c)(?<file_name>[^\x5c/\x27\x22]+\.\w{2,5})\b"
    | rex field=registry_value_data "(?i)(?<file_path>\w:\x5c(?:[^\x5c/\x27\x22]+\x5c)+[^\x5c/\x27\x22]+\.\w{2,5})\b"

    | lookup local=t remote_access_software file_name OUTPUT app as name_signature, category as name_category, reference as name_reference, description as name_description
    | lookup local=t remote_access_software file_path OUTPUT app as path_signature, category as path_category, reference as path_reference, description as path_description
    | eval signature=coalesce(nullif(name_signature, ""), path_signature),
           category=coalesce(nullif(name_category, ""), path_category),
           reference=coalesce(nullif(name_reference, ""), path_reference),
           description=coalesce(nullif(name_description, ""), path_description)

    | `security_content_ctime(firstTime)`
    | `security_content_ctime(lastTime)`

    | `remote_access_software_usage_exceptions`

    | `detect_remote_access_software_usage_registry_filter`
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.
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
references:
    - https://attack.mitre.org/techniques/T1219/
    - https://thedfirreport.com/2022/08/08/bumblebee-roasts-its-way-to-domain-admin/
    - https://thedfirreport.com/2022/11/28/emotet-strikes-again-lnk-file-leads-to-domain-wide-ransomware/
drilldown_searches:
    - name: View the detection results for - "$dest$" and "$user$"
      search: '%original_detection_search% | search dest = "$dest$" user = "$user$"'
      earliest_offset: $info_min_time$
      latest_offset: $info_max_time$
    - name: View risk events for the last 7 days for - "$dest$" and "$user$"
      search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$","$user$") | 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)`'
      earliest_offset: 7d
      latest_offset: "0"
    - name: Investigate registry changes on $dest$
      search: '| from datamodel:Endpoint.Registry| search dest=$dest$ registry_path=$registry_path$'
      earliest_offset: $info_min_time$
      latest_offset: $info_max_time$
intermediate_findings:
    entities:
        - field: dest
          type: system
          score: 20
          message: Known remote access software [$signature$] was detected on [$dest$] by [$user$], via the registry path [$registry_path$].
        - field: user
          type: user
          score: 20
          message: Known remote access software [$signature$] was detected on [$dest$] by [$user$], via the registry path [$registry_path$].
threat_objects:
    - field: registry_path
      type: registry_path
    - field: signature
      type: signature
analytic_story:
    - Insider Threat
    - Command And Control
    - Ransomware
    - Gozi Malware
    - CISA AA24-241A
    - Remote Monitoring and Management Software
    - Seashell Blizzard
    - Cactus Ransomware
    - Scattered Spider
    - Scattered Lapsus$ Hunters
asset_type: Endpoint
mitre_attack_id:
    - T1219
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint
tests:
    - name: True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1219/screenconnect/screenconnect_sysmon.log
          source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
          sourcetype: XmlWinEventLog
      description: PORTED MANUAL TEST - This detection uses A&I lookups from Enterprise Security.
      test_type: experimental

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.