Detection rules › Splunk
Splunk rules: 2m
Cisco Smart Install Port Discovery and Status
#This analytic detects network traffic to TCP port 4786, which is used by the Cisco Smart Install protocol. Smart Install is a plug-and-play configuration and image-management feature that helps customers to deploy Cisco switches. This protocol has been exploited via CVE-2018-0171, a vulnerability that allows unauthenticated remote attackers to execute arbitrary code or cause denial of service conditions. Recently, Cisco Talos reported that a Russian state-sponsored threat actor called "Static Tundra" has been actively exploiting this vulnerability to compromise unpatched and end-of-life network devices. Monitoring for traffic to this port can help identify potential exploitation attempts or unauthorized Smart Install activity.
Known False Positives
- Legitimate use of Cisco Smart Install may generate traffic to port 4786 within environments that actively use this feature for switch deployment and management. Network administrators might use Smart Install for legitimate device configuration purposes, especially during network deployment or maintenance windows. To reduce false positives, baseline normal Smart Install usage patterns in your environment and consider implementing time-based filtering to alert only on unexpected usage outside of scheduled maintenance periods. Additionally, consider whitelisting known management stations that legitimately use Smart Install.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access |
Rule Body
name: Cisco Smart Install Port Discovery and Status
id: ded9f9d7-edb8-48cf-8b72-1b459eee6785
version: 6
creation_date: '2025-08-21'
modification_date: '2026-05-13'
author: Bhavin Patel, Michael Haag, Splunk
status: production
type: TTP
description: This analytic detects network traffic to TCP port 4786, which is used by the Cisco Smart Install protocol. Smart Install is a plug-and-play configuration and image-management feature that helps customers to deploy Cisco switches. This protocol has been exploited via CVE-2018-0171, a vulnerability that allows unauthenticated remote attackers to execute arbitrary code or cause denial of service conditions. Recently, Cisco Talos reported that a Russian state-sponsored threat actor called "Static Tundra" has been actively exploiting this vulnerability to compromise unpatched and end-of-life network devices. Monitoring for traffic to this port can help identify potential exploitation attempts or unauthorized Smart Install activity.
data_source:
- Splunk Stream TCP
search: |-
| tstats `security_content_summariesonly` count values(All_Traffic.src_ip) as src_ip values(All_Traffic.src_port) as src_port values(All_Traffic.dest_ip) as dest_ip earliest(_time) as firstTime latest(_time) as lastTime FROM datamodel=Network_Traffic
WHERE All_Traffic.dest_port=4786
AND
All_Traffic.transport=tcp
BY All_Traffic.dest_ip All_Traffic.dest_port
| `drop_dm_object_name("All_Traffic")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `cisco_smart_install_port_discovery_and_status_filter`
how_to_implement: To implement this search, you need to be ingesting network traffic data into the Network_Traffic data model. This can be accomplished using Splunk Stream, which captures and indexes network traffic. Specifically, you need to ensure that TCP traffic is being monitored and indexed with the sourcetype "stream:tcp". The search looks for traffic destined to port 4786, which is used by the Cisco Smart Install protocol. For optimal security, organizations should consider blocking this port at their network perimeter to prevent external exploitation attempts. However, monitoring for both external and internal traffic to this port is valuable for detecting potential malicious activity. You may need to modify this search to focus on traffic patterns specific to your environment, such as monitoring only for inbound traffic from external sources or for unexpected internal communications using this protocol.
known_false_positives: Legitimate use of Cisco Smart Install may generate traffic to port 4786 within environments that actively use this feature for switch deployment and management. Network administrators might use Smart Install for legitimate device configuration purposes, especially during network deployment or maintenance windows. To reduce false positives, baseline normal Smart Install usage patterns in your environment and consider implementing time-based filtering to alert only on unexpected usage outside of scheduled maintenance periods. Additionally, consider whitelisting known management stations that legitimately use Smart Install.
references:
- https://blog.talosintelligence.com/static-tundra/
- https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20180328-smi2
- https://github.com/AlrikRr/Cisco-Smart-Exploit
- https://www.exploit-db.com/exploits/44451
finding:
title: Detected network traffic to Cisco Smart Install port (4786) on $dest_ip$. Possible access to Cisco Smart Install.
entity:
field: dest_ip
type: system
score: 50
threat_objects:
- field: src_ip
type: ip_address
analytic_story:
- Scattered Lapsus$ Hunters
- Cisco Smart Install Remote Code Execution CVE-2018-0171
asset_type: Network
cve:
- CVE-2018-0171
mitre_attack_id:
- T1190
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: network
security_domain: network
Stages and Predicates
Stage 1: tstats
| tstats `security_content_summariesonly`
count
values(All_Traffic.src_ip) as src_ip
values(All_Traffic.src_port) as src_port
values(All_Traffic.dest_ip) as dest_ip
earliest(_time) as firstTime
latest(_time) as lastTime
FROM datamodel=Network_Traffic
WHERE All_Traffic.dest_port=4786
AND
All_Traffic.transport=tcp
BY All_Traffic.dest_ip All_Traffic.dest_port
Stage 2: search
| `drop_dm_object_name("All_Traffic")`
Stage 3: search
| `security_content_ctime(firstTime)`
Stage 4: search
| `security_content_ctime(lastTime)`
Stage 5: search
| `cisco_smart_install_port_discovery_and_status_filter`
Indicators
These rows show field, operator, and value matches.
Command Line .cmd Execution (Windows Event Log)
#Adversaries may attempt to manipulate features of their artifacts to make them appear legitimate or benign to users and/or security tools. Masquerading occurs when the name or location of an object, legitimate or malicious, is manipulated or abused for the sake of evading defenses and observation. This may include manipulating file metadata, tricking users into misidentifying the file type, and giving legitimate task or service names. This use case detects the use of cmd.exe /c to execute .cmd files. This technique has been used by BazaLoader to execute malware masquerading as a PDF inside a .zip file
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
References
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
id: '15032.22220'
title: Command Line .cmd Execution
description: 'Adversaries may attempt to manipulate features of their artifacts to
make them appear legitimate or benign to users and/or security tools. Masquerading
occurs when the name or location of an object, legitimate or malicious, is manipulated
or abused for the sake of evading defenses and observation. This may include manipulating
file metadata, tricking users into misidentifying the file type, and giving legitimate
task or service names. This use case detects the use of cmd.exe /c to execute .cmd
files. This technique has been used by BazaLoader to execute malware masquerading
as a PDF inside a .zip file. -- Threat Actor Association: Andariel, APT28, APT40,
APT-K-47/Mysterious Elephant, GoldenJackal, Kimsuky, Rhysida, Sandworm Team, Volt
Typhoon -- Atomics T1036 Test #2 Atomics T1059.003 Test #5'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
"<EventID>4688<" OR Type=Process) "cmd.exe" "/c" ".cmd" | regex process="(?i)cmd.*\s+/c\s+.*?\w+\.cmd"
| table _time, host, user, process, process_*, parent_process, parent_process_*,
user | bin span=1s | stats values(*) as * by _time, host '
techniques:
- execution:command and scripting interpreter:windows command shell
technique_id:
- T1059.003
data_category:
- Windows event logs
- Process command-line parameters
references:
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1036/T1036.md#atomic-test-2---malware-masquerading-and-execution-from-zip-file
- https://twitter.com/ffforward/status/1481672378639912960
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) "cmd.exe" "/c" ".cmd"
Stage 2: regex
| regex process="(?i)cmd.*\s+/c\s+.*?\w+\.cmd"
Stage 3: table
| table _time, host, user, process, process_*, parent_process, parent_process_*, user
Stage 4: bucket
| bin span=1s
Stage 5: stats
| stats values(*) as * by _time, host
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"4688" |
process | regex_match |
| field:"CommandLine" kind:regex_match value:"(?i)cmd.*\s+/c\s+.*?\w+.cmd" |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>4688<" |
| 1 | "cmd.exe" |
| 1 | "/c" |
| 1 | ".cmd" |
Detect Regsvcs Spawning a Process
#The following analytic identifies regsvcs.exe spawning a child process. This behavior is detected using Endpoint Detection and Response (EDR) telemetry, focusing on process creation events where the parent process is regsvcs.exe. This activity is significant because regsvcs.exe rarely spawns child processes, and such behavior can indicate an attempt to bypass application control mechanisms. If confirmed malicious, this could allow an attacker to execute arbitrary code, potentially leading to privilege escalation or persistent access within the environment. Immediate investigation is recommended to determine the legitimacy of the spawned process and any associated suspicious activities.
Known False Positives
- Although unlikely, limited instances of regasm.exe or regsvcs.exe may cause a false positive. Filter based endpoint usage, command line arguments, or process lineage.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
name: Detect Regsvcs Spawning a Process
id: bc477b57-5c21-4ab6-9c33-668772e7f114
version: 15
creation_date: '2021-02-12'
modification_date: '2026-05-13'
author: Michael Haag, Splunk
status: production
type: TTP
description: The following analytic identifies regsvcs.exe spawning a child process. This behavior is detected using Endpoint Detection and Response (EDR) telemetry, focusing on process creation events where the parent process is regsvcs.exe. This activity is significant because regsvcs.exe rarely spawns child processes, and such behavior can indicate an attempt to bypass application control mechanisms. If confirmed malicious, this could allow an attacker to execute arbitrary code, potentially leading to privilege escalation or persistent access within the environment. Immediate investigation is recommended to determine the legitimacy of the spawned process and any associated suspicious activities.
data_source:
- Sysmon EventID 1
- Windows Event Log Security 4688
- CrowdStrike ProcessRollup2
search: |-
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes
WHERE Processes.parent_process_name=regsvcs.exe
BY Processes.action Processes.dest Processes.original_file_name
Processes.parent_process Processes.parent_process_exec Processes.parent_process_guid
Processes.parent_process_id Processes.parent_process_name Processes.parent_process_path
Processes.process Processes.process_exec Processes.process_guid
Processes.process_hash Processes.process_id Processes.process_integrity_level
Processes.process_name Processes.process_path Processes.user
Processes.user_id Processes.vendor_product
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `detect_regsvcs_spawning_a_process_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 process GUID, process name, and parent process. Additionally, you must ingest complete command-line executions. 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 `Processes` 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.
known_false_positives: Although unlikely, limited instances of regasm.exe or regsvcs.exe may cause a false positive. Filter based endpoint usage, command line arguments, or process lineage.
references:
- https://attack.mitre.org/techniques/T1218/009/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.009/T1218.009.md
- https://lolbas-project.github.io/lolbas/Binaries/Regsvcs/
finding:
title: An instance of $parent_process_name$ spawning $process_name$ was identified on endpoint $dest$ by user $user$ typically not normal for this process.
entity:
field: user
type: user
score: 50
intermediate_findings:
entities:
- field: dest
type: system
score: 50
message: An instance of $parent_process_name$ spawning $process_name$ was identified on endpoint $dest$ by user $user$ typically not normal for this process.
threat_objects:
- field: parent_process_name
type: parent_process_name
- field: process_name
type: process_name
analytic_story:
- Suspicious Regsvcs Regasm Activity
- Living Off The Land
- Compromised Windows Host
asset_type: Endpoint
mitre_attack_id:
- T1218.009
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.Processes
WHERE Processes.parent_process_name=regsvcs.exe
BY
Processes.action
Processes.dest
Processes.original_file_name
Processes.parent_process
Processes.parent_process_exec
Processes.parent_process_guid
Processes.parent_process_id
Processes.parent_process_name
Processes.parent_process_path
Processes.process
Processes.process_exec
Processes.process_guid
Processes.process_hash
Processes.process_id
Processes.process_integrity_level
Processes.process_name
Processes.process_path
Processes.user
Processes.user_id
Processes.vendor_product
Stage 2: search
| `drop_dm_object_name(Processes)`
Stage 3: search
| `security_content_ctime(firstTime)`
Stage 4: search
| `security_content_ctime(lastTime)`
Stage 5: search
| `detect_regsvcs_spawning_a_process_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Processes.parent_process_name | eq |
| field:"parent_process_basename" kind:eq value:"regsvcs.exe" |
F5 TMUI Authentication Bypass
#The following analytic detects attempts to exploit the CVE-2023-46747 vulnerability, an authentication bypass flaw in F5 BIG-IP's Configuration utility (TMUI). It identifies this activity by monitoring for specific URI paths such as "/mgmt/tm/auth/user/" with the PATCH method and a 200 status code. This behavior is significant for a SOC as it indicates potential unauthorized access attempts, leading to remote code execution. If confirmed malicious, an attacker could gain unauthorized access, execute arbitrary code, steal data, disrupt systems, or conduct further malicious activities within the network.
Known False Positives
- False positives should be limited to as this is strict to active exploitation. Reduce noise by filtering to F5 devices with TMUI enabled or filter data as needed.
Rule Body
name: F5 TMUI Authentication Bypass
id: 88bf127c-613e-4579-99e4-c4d4b02f3840
version: 9
creation_date: '2023-10-30'
modification_date: '2026-05-13'
author: Michael Haag, Splunk
status: production
type: TTP
description: The following analytic detects attempts to exploit the CVE-2023-46747 vulnerability, an authentication bypass flaw in F5 BIG-IP's Configuration utility (TMUI). It identifies this activity by monitoring for specific URI paths such as "*/mgmt/tm/auth/user/*" with the PATCH method and a 200 status code. This behavior is significant for a SOC as it indicates potential unauthorized access attempts, leading to remote code execution. If confirmed malicious, an attacker could gain unauthorized access, execute arbitrary code, steal data, disrupt systems, or conduct further malicious activities within the network.
data_source:
- Suricata
search: |-
| tstats count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Web
WHERE Web.url IN ("*/mgmt/tm/auth/user/*") Web.http_method=PATCH Web.status=200
BY Web.http_user_agent, Web.status Web.http_method,
Web.url, Web.url_length, Web.src,
Web.dest, sourcetype
| `drop_dm_object_name("Web")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `f5_tmui_authentication_bypass_filter`
how_to_implement: To successfully implement this search you need to be ingesting information on Web traffic that include fields relevant for traffic into the `Web` datamodel.
known_false_positives: False positives should be limited to as this is strict to active exploitation. Reduce noise by filtering to F5 devices with TMUI enabled or filter data as needed.
references:
- https://www.praetorian.com/blog/refresh-compromising-f5-big-ip-with-request-smuggling-cve-2023-46747/
- https://github.com/projectdiscovery/nuclei-templates/blob/3b0bb71bd627c6c3139e1d06c866f8402aa228ae/http/cves/2023/CVE-2023-46747.yaml
finding:
title: Potential CVE-2023-46747 F5 TMUI Authentication Bypass may be occurring against $dest$ from $src$.
entity:
field: dest
type: system
score: 50
threat_objects:
- field: src
type: ip_address
analytic_story:
- F5 Authentication Bypass with TMUI
asset_type: Network
cve:
- CVE-2023-46747
mitre_attack_id: []
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: web
security_domain: endpoint
Stages and Predicates
Stage 1: tstats
| tstats count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Web
WHERE Web.url IN ("*/mgmt/tm/auth/user/*") Web.http_method=PATCH Web.status=200
BY Web.http_user_agent, Web.status Web.http_method,
Web.url, Web.url_length, Web.src,
Web.dest, sourcetype
Stage 2: search
| `drop_dm_object_name("Web")`
Stage 3: search
| `security_content_ctime(firstTime)`
Stage 4: search
| `security_content_ctime(lastTime)`
Stage 5: search
| `f5_tmui_authentication_bypass_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Web.http_method | eq |
| field:"cs-method" kind:eq value:"PATCH" |
Web.status | eq |
| field:"Web.status" kind:eq value:"200" |
Web.url | in |
| field:"c-uri" kind:in value:"*/mgmt/tm/auth/user/*" |
First Time Seen Child Process of Zoom
#The following analytic identifies the first-time execution of child processes spawned by Zoom (zoom.exe or zoom.us). It leverages Endpoint Detection and Response (EDR) data, specifically monitoring process creation events and comparing them against previously seen child processes. This activity is significant because the execution of unfamiliar child processes by Zoom could indicate malicious exploitation or misuse of the application. If confirmed malicious, this could lead to unauthorized code execution, data exfiltration, or further compromise of the endpoint.
Known False Positives
- A new child process of zoom isn't malicious by that fact alone. Further investigation of the actions of the child process is needed to verify any malicious behavior is taken.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
name: First Time Seen Child Process of Zoom
id: e91bd102-d630-4e76-ab73-7e3ba22c5961
version: 11
creation_date: '2020-05-28'
modification_date: '2026-05-13'
author: David Dorsey, Splunk
status: experimental
type: Anomaly
description: The following analytic identifies the first-time execution of child processes spawned by Zoom (zoom.exe or zoom.us). It leverages Endpoint Detection and Response (EDR) data, specifically monitoring process creation events and comparing them against previously seen child processes. This activity is significant because the execution of unfamiliar child processes by Zoom could indicate malicious exploitation or misuse of the application. If confirmed malicious, this could lead to unauthorized code execution, data exfiltration, or further compromise of the endpoint.
data_source:
- Sysmon EventID 1
- Windows Event Log Security 4688
- CrowdStrike ProcessRollup2
search: |-
| tstats `security_content_summariesonly` min(_time) as firstTime max(_time) as lastTime values(Processes.user) as user values(Processes.action) as action values(Processes.dest) as dest values(Processes.original_file_name) as original_file_name values(Processes.parent_process) as parent_process values(Processes.parent_process_exec) as parent_process_exec values(Processes.parent_process_guid) as parent_process_guid values(Processes.parent_process_id) as parent_process_id values(Processes.parent_process_name) as parent_process_name values(Processes.parent_process_path) as parent_process_path values(Processes.process) as process values(Processes.process_exec) as process_exec values(Processes.process_guid) as process_guid values(Processes.process_hash) as process_hash values(Processes.process_integrity_level) as process_integrity_level values(Processes.process_name) as process_name values(Processes.process_path) as process_path values(Processes.user_id) as user_id values(Processes.vendor_product) as vendor_product FROM datamodel=Endpoint.Processes
WHERE (
Processes.parent_process_name=zoom.exe
OR
Processes.parent_process_name=zoom.us
)
BY Processes.process_id Processes.dest
| `drop_dm_object_name(Processes)`
| lookup zoom_first_time_child_process dest as dest process_name as process_name OUTPUT firstTimeSeen
| where isnull(firstTimeSeen) OR firstTimeSeen > relative_time(now(), "`previously_seen_zoom_child_processes_window`")
| `security_content_ctime(firstTime)`
| `first_time_seen_child_process_of_zoom_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 process GUID, process name, and parent process. Additionally, you must ingest complete command-line executions. 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 `Processes` 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.
known_false_positives: A new child process of zoom isn't malicious by that fact alone. Further investigation of the actions of the child process is needed to verify any malicious behavior is taken.
references: []
intermediate_findings:
entities:
- field: user
type: user
score: 20
message: Child process $process_name$ with $process_id$ spawned by zoom.exe or zoom.us which has not been previously on host $dest$
- field: dest
type: system
score: 20
message: Child process $process_name$ with $process_id$ spawned by zoom.exe or zoom.us which has not been previously on host $dest$
threat_objects:
- field: process_name
type: process_name
analytic_story:
- Suspicious Zoom Child Processes
asset_type: Endpoint
mitre_attack_id:
- T1068
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
baselines:
- Previously Seen Zoom Child Processes - Update
- Previously Seen Zoom Child Processes - Initial
Stages and Predicates
Stage 1: tstats
| tstats `security_content_summariesonly`
min(_time) as firstTime
max(_time) as lastTime
values(Processes.user) as user
values(Processes.action) as action
values(Processes.dest) as dest
values(Processes.original_file_name) as original_file_name
values(Processes.parent_process) as parent_process
values(Processes.parent_process_exec) as parent_process_exec
values(Processes.parent_process_guid) as parent_process_guid
values(Processes.parent_process_id) as parent_process_id
values(Processes.parent_process_name) as parent_process_name
values(Processes.parent_process_path) as parent_process_path
values(Processes.process) as process
values(Processes.process_exec) as process_exec
values(Processes.process_guid) as process_guid
values(Processes.process_hash) as process_hash
values(Processes.process_integrity_level) as process_integrity_level
values(Processes.process_name) as process_name
values(Processes.process_path) as process_path
values(Processes.user_id) as user_id
values(Processes.vendor_product) as vendor_product
FROM datamodel=Endpoint.Processes
WHERE (
Processes.parent_process_name=zoom.exe
OR Processes.parent_process_name=zoom.us
)
BY Processes.process_id Processes.dest
Stage 2: search
| `drop_dm_object_name(Processes)`
Stage 3: lookup
| lookup zoom_first_time_child_process dest as dest process_name as process_name OUTPUT
firstTimeSeen
Stage 4: macro (not parsed)
| where isnull(firstTimeSeen)
OR firstTimeSeen > relative_time(now(), "`previously_seen_zoom_child_processes_window`")
Stage 5: search
| `security_content_ctime(firstTime)`
Stage 6: search
| `first_time_seen_child_process_of_zoom_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Processes.parent_process_name | eq |
| field:"parent_process_basename" kind:eq |
Group Policy Editor Execution (PowerShell)
#Adversaries may abuse mmc.exe to proxy execution of malicious .msc files. Microsoft Management Console (MMC) is a binary that may be signed by Microsoft and is used in several ways in either its GUI or in a command prompt. MMC can be used to create, open, and save custom consoles that contain administrative tools created by Microsoft, called snap-ins. These snap-ins may be used to manage Windows systems locally or remotely. MMC can also be used to open Microsoft created .msc files to manage system configuration. For example, mmc gpedit.msc, will open the Group Policy Editor application window. This use case detects gpedit.msc executions.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
References
Telemetry Coverage
Rule Body
id: '32248.57379'
title: Group Policy Editor Execution
description: Adversaries may abuse mmc.exe to proxy execution of malicious .msc files.
Microsoft Management Console (MMC) is a binary that may be signed by Microsoft and
is used in several ways in either its GUI or in a command prompt. MMC can be used
to create, open, and save custom consoles that contain administrative tools created
by Microsoft, called snap-ins. These snap-ins may be used to manage Windows systems
locally or remotely. MMC can also be used to open Microsoft created .msc files to
manage system configuration. For example, mmc gpedit.msc, will open the Group Policy
Editor application window. This use case detects gpedit.msc executions.
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_powershell` ((TERM(EventCode=4103)
OR "<EventID>4103<") OR (TERM(EventCode=4104) OR "<EventID>4104<")) (TERM(gpedit)
OR "gpedit.msc") | table _time, host, user, process, signature_id | bin span=1s
| stats values(*) as * by _time, host '
techniques:
- defense-evasion:system binary proxy execution:mmc
technique_id:
- T1218.014
data_category:
- PowerShell logs
references:
- https://attack.mitre.org/techniques/T1218/014/
- https://www.itechtics.com/enable-gpedit-windows-10-home/
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_powershell` ((TERM(EventCode=4103) OR "<EventID>4103<") OR (TERM(EventCode=4104) OR "<EventID>4104<")) (TERM(gpedit) OR "gpedit.msc")
Stage 2: table
| table _time, host, user, process, signature_id
Stage 3: bucket
| bin span=1s
Stage 4: stats
| stats values(*) as * by _time, host
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>4103<" |
| 1 | "<EventID>4104<" |
| 1 | gpedit |
| 1 | "gpedit.msc" |
Gsuite Outbound Email With Attachment To External Domain
#The following analytic detects outbound emails with attachments sent from an internal email domain to an external domain. It leverages Gsuite Gmail logs, parsing the source and destination email domains, and flags emails with fewer than 20 outbound instances. This activity is significant as it may indicate potential data exfiltration or insider threats. If confirmed malicious, an attacker could use this method to exfiltrate sensitive information, leading to data breaches and compliance violations.
Known False Positives
- network admin and normal user may send this file attachment as part of their day to day work. having a good protocol in attaching this file type to an e-mail may reduce the risk of having a spear phishing attack.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Exfiltration |
Rule Body
name: Gsuite Outbound Email With Attachment To External Domain
id: dc4dc3a8-ff54-11eb-8bf7-acde48001122
version: 9
creation_date: '2021-08-17'
modification_date: '2026-05-13'
author: Teoderick Contreras, Stanislav Miskovic, Splunk
status: production
type: Hunting
description: The following analytic detects outbound emails with attachments sent from an internal email domain to an external domain. It leverages Gsuite Gmail logs, parsing the source and destination email domains, and flags emails with fewer than 20 outbound instances. This activity is significant as it may indicate potential data exfiltration or insider threats. If confirmed malicious, an attacker could use this method to exfiltrate sensitive information, leading to data breaches and compliance violations.
data_source:
- G Suite Gmail
search: |-
`gsuite_gmail` num_message_attachments > 0
| rex field=source.from_header_address "[^@]+@(?<source_domain>[^@]+)"
| rex field=destination{}.address "[^@]+@(?<dest_domain>[^@]+)"
| where source_domain="internal_test_email.com" and not dest_domain="internal_test_email.com"
| eval phase="plan"
| eval severity="low"
| stats values(subject) as subject, values(source.from_header_address) as src_domain_list, count as numEvents, dc(source.from_header_address) as numSrcAddresses, min(_time) as firstTime max(_time) as lastTime
BY dest_domain phase severity
| where numSrcAddresses < 20
| sort - numSrcAddresses
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `gsuite_outbound_email_with_attachment_to_external_domain_filter`
how_to_implement: To successfully implement this search, you need to be ingesting logs related to gsuite having the file attachment metadata like file type, file extension, source email, destination email, num of attachment and etc.
known_false_positives: network admin and normal user may send this file attachment as part of their day to day work. having a good protocol in attaching this file type to an e-mail may reduce the risk of having a spear phishing attack.
references:
- https://www.redhat.com/en/topics/devops/what-is-devsecops
analytic_story:
- Dev Sec Ops
- Insider Threat
asset_type: GSuite
mitre_attack_id:
- T1048.003
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: cloud
security_domain: endpoint
Stages and Predicates
Stage 1: search
`gsuite_gmail` num_message_attachments > 0
Stage 2: rex
| rex field=source.from_header_address "[^@]+@(?<source_domain>[^@]+)"
Stage 3: rex
| rex field=destination{}.address "[^@]+@(?<dest_domain>[^@]+)"
Stage 4: where
| where source_domain="internal_test_email.com" and not dest_domain="internal_test_email.com"
Stage 5: eval
| eval phase="plan"
Stage 6: eval
| eval severity="low"
Stage 7: stats
| stats
values(subject) as subject,
values(source.from_header_address) as src_domain_list,
count as numEvents,
dc(source.from_header_address) as numSrcAddresses,
min(_time) as firstTime
max(_time) as lastTime
BY dest_domain phase severity
Stage 8: where
| where numSrcAddresses < 20
Stage 9: sort
| sort - numSrcAddresses
Stage 10: search
| `security_content_ctime(firstTime)`
Stage 11: search
| `security_content_ctime(lastTime)`
Stage 12: search
| `gsuite_outbound_email_with_attachment_to_external_domain_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
numSrcAddresses | lt |
| field:"numSrcAddresses" kind:lt value:"20" |
num_message_attachments | gt |
| field:"num_message_attachments" kind:gt value:"0" |
source_domain | eq |
| field:"source_domain" kind:eq value:"internal_test_email.com" |
sourcetype | eq |
| field:"sourcetype" kind:eq value:"gsuite:gmail:bigquery" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
dest_domain | eq | internal_test_email.com | excludes:dest_domain field:"dest_domain" value:"internal_test_email.com" |
HTTP_HTTPS Default Security Zone Modified to Local Machine (Windows Event Log)
#Threat actors may Windows Registry to reconfigure the default Internet Zone settings for both HTTP and HTTPS, aligning them with the "My Computer" zone. The effectively grants websites the same level of trust as files and applications locally stored on your machine. This use case detects modifications to Windows registry settings to elevate trust levels for websites, treating them similarly to locally stored files.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Defense Impairment |
References
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
id: '29278.52822'
title: HTTP_HTTPS Default Security Zone Modified to Local Machine
description: Threat actors may Windows Registry to reconfigure the default Internet
Zone settings for both HTTP and HTTPS, aligning them with the "My Computer" zone.
The effectively grants websites the same level of trust as files and applications
locally stored on your machine. This use case detects modifications to Windows registry
settings to elevate trust levels for websites, treating them similarly to locally
stored files.
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
"<EventID>4688<" OR Type=Process) "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet
Settings\\ZoneMap\\ProtocolDefaults" (" http " OR " https ") (" /d " OR "-Value"
OR "0x00000000") | regex process="(?i)HKCU|HKEY_CURRENT_USER|HKLM|HKEY_LOCAL_MACHINE|HKU"
| regex process="(?i)\/d\s+0|\-Value\s+0|0x00000000" | table _time, host, user,
process, process_name, parent_process_name | bin span=1s | stats values(*) as *
by _time, host '
techniques:
- defense-evasion:modify registry
technique_id:
- T1112
data_category:
- Process command-line parameters
- Windows event logs
references:
- https://twitter.com/JAMESWT_MHT/status/1699042827261391247
- https://attack.mitre.org/techniques/T1112/
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\ProtocolDefaults" (" http " OR " https ") (" /d " OR "-Value" OR "0x00000000")
Stage 2: regex
| regex process="(?i)HKCU|HKEY_CURRENT_USER|HKLM|HKEY_LOCAL_MACHINE|HKU"
Stage 3: regex
| regex process="(?i)\/d\s+0|\-Value\s+0|0x00000000"
Stage 4: table
| table _time, host, user, process, process_name, parent_process_name
Stage 5: bucket
| bin span=1s
Stage 6: stats
| stats values(*) as * by _time, host
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"4688" |
process | regex_match |
| field:"CommandLine" kind:regex_match |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>4688<" |
| 1 | "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\ProtocolDefaults" |
| 1 | " http " |
| 1 | " https " |
| 1 | " /d " |
| 1 | "-Value" |
| 1 | "0x00000000" |
Kubernetes Pod Created in Default Namespace
#The following analytic detects the creation of Kubernetes pods in the default, kube-system, or kube-public namespaces. It leverages Kubernetes audit logs to identify pod creation events within these specific namespaces. This activity is significant for a SOC as it may indicate an attacker attempting to hide their presence or evade defenses. Unauthorized pod creation in these namespaces can suggest a successful cluster breach, potentially leading to privilege escalation, persistent access, or further malicious activities within the cluster.
Known False Positives
- No false positives have been identified at this time.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Kubernetes | create-pods: create pods |
Rules Detecting the Same Action
These rules filter on the same operation.
- Azure AKS Attempted User Exec into Pod (Elastic)
- Container With A hostPath Mount Created (Sigma)
- Creation Of Pod In System Namespace (Sigma)
- Direct Interactive Kubernetes API Request by Unusual Utilities (Elastic)
- Exec into Pod (Panther)
- GCP Break-glass Container Workload Deployed (Sigma)
- GCP K8s Pod Attached To Node Host Network (Panther)
- GCP K8S Pod Create Or Modify Host Path Volume Mount (Panther)
Rule Body
name: Kubernetes Pod Created in Default Namespace
id: 3d6b1a81-367b-42d5-a925-6ef90b6b9f1e
version: 10
creation_date: '2023-12-20'
modification_date: '2026-05-13'
author: Patrick Bareiss, Splunk
status: production
type: Anomaly
description: The following analytic detects the creation of Kubernetes pods in the default, kube-system, or kube-public namespaces. It leverages Kubernetes audit logs to identify pod creation events within these specific namespaces. This activity is significant for a SOC as it may indicate an attacker attempting to hide their presence or evade defenses. Unauthorized pod creation in these namespaces can suggest a successful cluster breach, potentially leading to privilege escalation, persistent access, or further malicious activities within the cluster.
data_source:
- Kubernetes Audit
search: |-
`kube_audit` objectRef.resource=pods verb=create objectRef.namespace IN ("default", "kube-system", "kube-public")
| fillnull
| stats count
BY objectRef.name objectRef.namespace objectRef.resource
requestReceivedTimestamp requestURI responseStatus.code
sourceIPs{} stage user.groups{}
user.uid user.username userAgent
verb
| rename sourceIPs{} as src_ip, user.username as user
| `kubernetes_pod_created_in_default_namespace_filter`
how_to_implement: The detection is based on data that originates from Kubernetes Audit logs. Ensure that audit logging is enabled in your Kubernetes cluster. Kubernetes audit logs provide a record of the requests made to the Kubernetes API server, which is crucial for monitoring and detecting suspicious activities. Configure the audit policy in Kubernetes to determine what kind of activities are logged. This is done by creating an Audit Policy and providing it to the API server. Use the Splunk OpenTelemetry Collector for Kubernetes to collect the logs. This doc will describe how to collect the audit log file https://github.com/signalfx/splunk-otel-collector-chart/blob/main/docs/migration-from-sck.md. When you want to use this detection with AWS EKS, you need to enable EKS control plane logging https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html. Then you can collect the logs from Cloudwatch using the AWS TA https://splunk.github.io/splunk-add-on-for-amazon-web-services/CloudWatchLogs/.
known_false_positives: No false positives have been identified at this time.
references:
- https://kubernetes.io/docs/tasks/debug/debug-cluster/audit/
intermediate_findings:
entities:
- field: user
type: user
score: 20
message: Kubernetes Pod Created in Default Namespace by $user$
threat_objects:
- field: src_ip
type: ip_address
analytic_story:
- Kubernetes Security
asset_type: Kubernetes
mitre_attack_id:
- T1204
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: cloud
security_domain: network
Stages and Predicates
Stage 1: search
`kube_audit` objectRef.resource=pods verb=create objectRef.namespace IN (
"default",
"kube-system",
"kube-public"
)
Stage 2: fillnull
| fillnull
Stage 3: stats
| stats count
BY objectRef.name objectRef.namespace objectRef.resource
requestReceivedTimestamp requestURI responseStatus.code
sourceIPs{} stage user.groups{}
user.uid user.username userAgent
verb
Stage 4: rename
| rename sourceIPs{} as src_ip, user.username as user
Stage 5: search
| `kubernetes_pod_created_in_default_namespace_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
objectRef.namespace | in |
| field:"objectRef.namespace" kind:in |
objectRef.resource | eq |
| field:"objectRef.resource" kind:eq value:"pods" |
verb | eq |
| field:"verb" kind:eq value:"create" |
MSIExec.exe Execution (Sysmon)
#msiexec.exe is a Windows system component used to install and modify software packages using Windows Installer. Threat actors may abuse msiexec.exe to install malicious software or execute scripts, leveraging its legitimate appearance to bypass security measures and gain persistence on a targeted system as observed in FlawedGrace attacks. This use case detects any execution of msiexec.exe
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
References
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
id: '24144.44554'
title: MSIExec.exe Execution
description: msiexec.exe is a Windows system component used to install and modify
software packages using Windows Installer. Threat actors may abuse msiexec.exe to
install malicious software or execute scripts, leveraging its legitimate appearance
to bypass security measures and gain persistence on a targeted system as observed
in FlawedGrace attacks. This use case detects any execution of msiexec.exe. Living
Off the Land Binary and Scripts (LOLBAS) (LOLBIN)
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<")
TERM(msiexec) OR "msiexec.exe" | regex process_name="(?i)msiexec\.exe" | table _time,
host, user process, process_*, parent_process_name, parent_process_* | bin span=1s
| stats values(*) as * by _time, host '
techniques:
- defense-evasion:system binary proxy execution:msiexec
technique_id:
- T1218.007
data_category:
- Windows Sysmon
references:
- https://thedfirreport.com/2023/06/12/a-truly-graceful-wipe-out/
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<") TERM(msiexec) OR "msiexec.exe"
Stage 2: regex
| regex process_name="(?i)msiexec\.exe"
Stage 3: table
| table _time, host, user process, process_*, parent_process_name, parent_process_*
Stage 4: bucket
| bin span=1s
Stage 5: stats
| stats values(*) as * by _time, host
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"1" |
process_name | regex_match |
| field:"process_name" kind:regex_match value:"(?i)msiexec.exe" |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>1<" |
| 1 | msiexec |
| 1 | "msiexec.exe" |
NirCmd Execution (Windows Event Log)
#NirCmd is a command line utility with capabilities to delete files from Recycling Bin, delete registry keys, take screenshots and execute command without displaying a user interface. While it has legitimate administrative uses, threat actors including Mint Sandstorm aka PHOSPHORUS have been observed using renamed NirCmd to execute malicious code. This use case detects executions of NirCmd.exe or command line argument patterns consistent with abusive activities observed with NirCmd, accounting for instances where it has been renamed. Allowlisting is recommended for executables using the same command line arguments for best results.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth | |
| Collection |
References
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
id: '27585.50194'
title: NirCmd Execution
description: 'NirCmd is a command line utility with capabilities to delete files from
Recycling Bin, delete registry keys, take screenshots and execute command without
displaying a user interface. While it has legitimate administrative uses, threat
actors including Mint Sandstorm aka PHOSPHORUS have been observed using renamed
NirCmd to execute malicious code. This use case detects executions of NirCmd.exe
or command line argument patterns consistent with abusive activities observed with
NirCmd, accounting for instances where it has been renamed. Allowlisting is recommended
for executables using the same command line arguments for best results. '
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
"<EventID>4688<" OR Type=Process) "NirCmd" OR ((" execmd " OR ".exe script " OR
".exe shexec " OR " runinteractive " OR " runinteractivecmd " OR " savescreenshot
" OR " savescreenshotfull " OR "savescreenshotwin " OR " regdelval " OR " regdelkey
" OR " regsetval ") OR ((" exec " OR " exec2 ") (" show " OR " hide "))) | where
match(process_name, "(?i)nircmd\.exe") or match(process, "(?i)\s(execcmd|runinteractive(cmd)?|savescreenshot(full|win)?|regdel(val|key)|regsetval|exec2?\s+(show|hide))\s|\.exe\s+(script|shexec)")
| table _time, host, user, process, parent_process_name, process_* | bin span=1s
| stats values(*) as * by _time, host '
techniques:
- collection:screen capture
- execution:command and scripting interpreter
- defense-evasion:indicator removal
technique_id:
- T1113
- T1059
- T1070
data_category:
- Process command-line parameters
- Windows event logs
references:
- https://www.microsoft.com/en-us/security/blog/2024/01/17/new-ttps-observed-in-mint-sandstorm-campaign-targeting-high-profile-individuals-at-universities-and-research-orgs/
- https://asec.ahnlab.com/ko/45153/
- https://nircmd.nirsoft.net/
- https://www.nirsoft.net/utils/nircmd.html
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) "NirCmd" OR ((" execmd " OR ".exe script " OR ".exe shexec " OR " runinteractive " OR " runinteractivecmd " OR " savescreenshot " OR " savescreenshotfull " OR "savescreenshotwin " OR " regdelval " OR " regdelkey " OR " regsetval ") OR ((" exec " OR " exec2 ") (" show " OR " hide ")))
Stage 2: where
| where match(process_name, "(?i)nircmd\.exe")
or match(
process,
"(?i)\s(execcmd|runinteractive(cmd)?|savescreenshot(full|win)?|regdel(val|key)|regsetval|exec2?\s+(show|hide))\s|\.exe\s+(script|shexec)"
)
Stage 3: table
| table _time, host, user, process, parent_process_name, process_*
Stage 4: bucket
| bin span=1s
Stage 5: stats
| stats values(*) as * by _time, host
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"4688" |
process | regex_match |
| field:"CommandLine" kind:regex_match |
process_name | regex_match |
| field:"process_name" kind:regex_match value:"(?i)nircmd.exe" |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>4688<" |
| 1 | "NirCmd" |
| 1 | " execmd " |
| 1 | ".exe script " |
| 1 | ".exe shexec " |
| 1 | " runinteractive " |
| 1 | " runinteractivecmd " |
| 1 | " savescreenshot " |
| 1 | " savescreenshotfull " |
| 1 | "savescreenshotwin " |
| 1 | " regdelval " |
| 1 | " regdelkey " |
| 1 | " regsetval " |
| 1 | " exec " |
| 1 | " exec2 " |
| 1 | " show " |
| 1 | " hide " |
Overwriting Accessibility Binaries
#The following analytic detects modifications to Windows accessibility binaries such as sethc.exe, utilman.exe, osk.exe, Magnify.exe, Narrator.exe, DisplaySwitch.exe, and AtBroker.exe. It leverages filesystem activity data from the Endpoint.Filesystem data model to identify changes to these specific files. This activity is significant because adversaries can exploit these binaries to gain unauthorized access or execute commands without logging in. If confirmed malicious, this could allow attackers to bypass authentication mechanisms, potentially leading to unauthorized system access and further compromise of the environment.
Known False Positives
- Microsoft may provide updates to these binaries. Verify that these changes do not correspond with your normal software update cycle.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 11: FileCreate |
Rule Body
name: Overwriting Accessibility Binaries
id: 13c2f6c3-10c5-4deb-9ba1-7c4460ebe4ae
version: 13
creation_date: '2020-04-29'
modification_date: '2026-05-13'
author: David Dorsey, Splunk
status: production
type: TTP
description: The following analytic detects modifications to Windows accessibility binaries such as sethc.exe, utilman.exe, osk.exe, Magnify.exe, Narrator.exe, DisplaySwitch.exe, and AtBroker.exe. It leverages filesystem activity data from the Endpoint.Filesystem data model to identify changes to these specific files. This activity is significant because adversaries can exploit these binaries to gain unauthorized access or execute commands without logging in. If confirmed malicious, this could allow attackers to bypass authentication mechanisms, potentially leading to unauthorized system access and further compromise of the environment.
data_source:
- Sysmon EventID 11
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Filesystem.user) as user values(Filesystem.dest) as dest values(Filesystem.file_path) as file_path from datamodel=Endpoint.Filesystem where (Filesystem.file_path=*\\Windows\\System32\\sethc.exe* OR Filesystem.file_path=*\\Windows\\System32\\utilman.exe* OR Filesystem.file_path=*\\Windows\\System32\\osk.exe* OR Filesystem.file_path=*\\Windows\\System32\\Magnify.exe* OR Filesystem.file_path=*\\Windows\\System32\\Narrator.exe* OR Filesystem.file_path=*\\Windows\\System32\\DisplaySwitch.exe* OR Filesystem.file_path=*\\Windows\\System32\\AtBroker.exe*) by Filesystem.action Filesystem.dest Filesystem.file_access_time Filesystem.file_create_time Filesystem.file_hash Filesystem.file_modify_time Filesystem.file_name Filesystem.file_path Filesystem.file_acl Filesystem.file_size Filesystem.process_guid Filesystem.process_id Filesystem.user Filesystem.vendor_product | `drop_dm_object_name(Filesystem)` | `security_content_ctime(lastTime)` | `security_content_ctime(firstTime)` | `overwriting_accessibility_binaries_filter`'
how_to_implement: You must be ingesting data that records the filesystem activity from your hosts to populate the Endpoint file-system data model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data.
known_false_positives: Microsoft may provide updates to these binaries. Verify that these changes do not correspond with your normal software update cycle.
references: []
finding:
title: A suspicious file modification or replace in $file_path$ in host $dest$
entity:
field: dest
type: system
score: 50
threat_objects:
- field: file_name
type: file_name
analytic_story:
- Data Destruction
- Hermetic Wiper
- Windows Privilege Escalation
- Flax Typhoon
asset_type: Endpoint
mitre_attack_id:
- T1546.008
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
values(Filesystem.user) as user
values(Filesystem.dest) as dest
values(Filesystem.file_path) as file_path
from datamodel=Endpoint.Filesystem
where (
Filesystem.file_path=*\\Windows\\System32\\sethc.exe*
OR Filesystem.file_path=*\\Windows\\System32\\utilman.exe*
OR Filesystem.file_path=*\\Windows\\System32\\osk.exe*
OR Filesystem.file_path=*\\Windows\\System32\\Magnify.exe*
OR Filesystem.file_path=*\\Windows\\System32\\Narrator.exe*
OR Filesystem.file_path=*\\Windows\\System32\\DisplaySwitch.exe*
OR Filesystem.file_path=*\\Windows\\System32\\AtBroker.exe*
)
by
Filesystem.action
Filesystem.dest
Filesystem.file_access_time
Filesystem.file_create_time
Filesystem.file_hash
Filesystem.file_modify_time
Filesystem.file_name
Filesystem.file_path
Filesystem.file_acl
Filesystem.file_size
Filesystem.process_guid
Filesystem.process_id
Filesystem.user
Filesystem.vendor_product
Stage 2: search
| `drop_dm_object_name(Filesystem)`
Stage 3: search
| `security_content_ctime(lastTime)`
Stage 4: search
| `security_content_ctime(firstTime)`
Stage 5: search
| `overwriting_accessibility_binaries_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Filesystem.file_path | eq |
| field:"TargetFilename" kind:eq |
Permission Modification using Takeown App
#The following analytic detects the modification of file or directory permissions using the takeown.exe Windows application. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on process execution logs that include process GUID, process name, and command-line details. This activity is significant because it is a common technique used by ransomware to take ownership of files or folders for encryption or deletion. If confirmed malicious, this could lead to unauthorized access, data encryption, or data destruction, severely impacting the integrity and availability of critical data.
Known False Positives
- takeown.exe is a normal windows application that may used by network operator.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
name: Permission Modification using Takeown App
id: fa7ca5c6-c9d8-11eb-bce9-acde48001122
version: 12
creation_date: '2021-06-10'
modification_date: '2026-05-13'
author: Teoderick Contreras, Splunk
status: production
type: Anomaly
description: The following analytic detects the modification of file or directory permissions using the takeown.exe Windows application. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on process execution logs that include process GUID, process name, and command-line details. This activity is significant because it is a common technique used by ransomware to take ownership of files or folders for encryption or deletion. If confirmed malicious, this could lead to unauthorized access, data encryption, or data destruction, severely impacting the integrity and availability of critical data.
data_source:
- Sysmon EventID 1
- Windows Event Log Security 4688
- CrowdStrike ProcessRollup2
search: |-
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes
WHERE Processes.process_name = "takeown.exe" Processes.process = "*/f*"
BY Processes.action Processes.dest Processes.original_file_name
Processes.parent_process Processes.parent_process_exec Processes.parent_process_guid
Processes.parent_process_id Processes.parent_process_name Processes.parent_process_path
Processes.process Processes.process_exec Processes.process_guid
Processes.process_hash Processes.process_id Processes.process_integrity_level
Processes.process_name Processes.process_path Processes.user
Processes.user_id Processes.vendor_product
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `permission_modification_using_takeown_app_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 process GUID, process name, and parent process. Additionally, you must ingest complete command-line executions. 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 `Processes` 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.
known_false_positives: takeown.exe is a normal windows application that may used by network operator.
references:
- https://research.nccgroup.com/2020/06/23/wastedlocker-a-new-ransomware-variant-developed-by-the-evil-corp-group/
intermediate_findings:
entities:
- field: dest
type: system
score: 20
message: A suspicious of execution of $process_name$ with process id $process_id$ and commandline $process$ to modify permission of directory or files in host $dest$
threat_objects:
- field: process_name
type: process_name
analytic_story:
- Sandworm Tools
- Ransomware
- Crypto Stealer
- Scattered Lapsus$ Hunters
asset_type: Endpoint
mitre_attack_id:
- T1222
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.Processes
WHERE Processes.process_name = "takeown.exe" Processes.process = "*/f*"
BY
Processes.action
Processes.dest
Processes.original_file_name
Processes.parent_process
Processes.parent_process_exec
Processes.parent_process_guid
Processes.parent_process_id
Processes.parent_process_name
Processes.parent_process_path
Processes.process
Processes.process_exec
Processes.process_guid
Processes.process_hash
Processes.process_id
Processes.process_integrity_level
Processes.process_name
Processes.process_path
Processes.user
Processes.user_id
Processes.vendor_product
Stage 2: search
| `drop_dm_object_name(Processes)`
Stage 3: search
| `security_content_ctime(firstTime)`
Stage 4: search
| `security_content_ctime(lastTime)`
Stage 5: search
| `permission_modification_using_takeown_app_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Processes.process | eq |
| field:"CommandLine" kind:eq value:"*/f*" |
Processes.process_name | eq |
| field:"process_basename" kind:eq value:"takeown.exe" |
Potential PowerShell Post-Exploitation Activity (Windows Event Log)
#Threat actors may perform post-exploitation activities using PowerShell scripts such as ADRecon. When running ADRecon, PowerShell launches child processes to compile and execute payloads and creates several .cmdline files in AppData\Local\Temp directories. This use case detects PowerShell-invoked compilations involving csc.exe and cvtres.exe referencing multiple .cmdline files from temp directories within a 5 minute time period. This may that a malicious script like ADRecon has been executed, regardless of the script title name or cmdlets invoked
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Discovery |
References
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
id: '27535.50073'
title: Potential PowerShell Post-Exploitation Activity
description: 'Threat actors may perform post-exploitation activities using PowerShell
scripts such as ADRecon. When running ADRecon, PowerShell launches child processes
to compile and execute payloads and creates several .cmdline files in AppData\Local\Temp
directories. This use case detects PowerShell-invoked compilations involving csc.exe
and cvtres.exe referencing multiple .cmdline files from temp directories within
a 5 minute time period. This may that a malicious script like ADRecon has been executed,
regardless of the script title name or cmdlets invoked. Atomics T1087.002 Test #4'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
"<EventID>4688<" OR Type=Process) ("powershell.exe" OR "pwsh.exe") ("csc.exe" OR
"cvtres.exe") ".cmdline" | regex parent_process_name="(?i)(powershell|pwsh)\.exe"|
regex process_name="(?i)(csc|cvtres)\.exe"| regex process="(?i)\x5cAppData\x5cLocal\x5cTemp.+\.cmdline"
| table _time, host, user process, parent_process_name, event_count | bin span=300s
| stats values(*) as * by _time, host | eventstats dc(process) as dc_process by
host, _time| where dc_process > 3 '
techniques:
- execution:command and scripting interpreter:powershell
- discovery:account discovery
- discovery:system information discovery
technique_id:
- T1059.001
- T1087
- T1082
data_category:
- Process command-line parameters
- Windows event logs
references:
- https://github.com/sense-of-security/ADRecon/tree/master
- https://www.dnif.it/en/blog/strategies-to-detect-post-exploitation-active-directory-reconnaissance
- https://symantec-enterprise-blogs.security.com/blogs/threat-intelligence/ransomware-hive-conti-avoslocker
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) ("powershell.exe" OR "pwsh.exe") ("csc.exe" OR "cvtres.exe") ".cmdline"
Stage 2: regex
| regex parent_process_name="(?i)(powershell|pwsh)\.exe"
Stage 3: regex
| regex process_name="(?i)(csc|cvtres)\.exe"
Stage 4: regex
| regex process="(?i)\x5cAppData\x5cLocal\x5cTemp.+\.cmdline"
Stage 5: table
| table _time, host, user process, parent_process_name, event_count
Stage 6: bucket
| bin span=300s
Stage 7: stats
| stats values(*) as * by _time, host
Stage 8: eventstats
| eventstats dc(process) as dc_process by host, _time
Stage 9: where
| where dc_process > 3
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"4688" |
dc_process | gt |
| field:"dc_process" kind:gt value:"3" |
parent_process_name | regex_match |
| field:"parent_process_name" kind:regex_match value:"(?i)(powershell|pwsh).exe" |
process | regex_match |
| field:"CommandLine" kind:regex_match value:"(?i)\x5cAppData\x5cLocal\x5cTemp.+.cmdline" |
process_name | regex_match |
| field:"process_name" kind:regex_match value:"(?i)(csc|cvtres).exe" |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>4688<" |
| 1 | "powershell.exe" |
| 1 | "pwsh.exe" |
| 1 | "csc.exe" |
| 1 | "cvtres.exe" |
| 1 | ".cmdline" |
Powershell Processing Stream Of Data
#The following analytic detects suspicious PowerShell script execution involving compressed stream data processing, identified via EventCode 4104. It leverages PowerShell Script Block Logging to flag scripts using IO.Compression, IO.StreamReader, or decompression methods. This activity is significant as it often indicates obfuscated PowerShell or embedded .NET/binary execution, which are common tactics for evading detection. If confirmed malicious, this behavior could allow attackers to execute hidden code, escalate privileges, or maintain persistence within the environment.
Known False Positives
- powershell may used this function to process compressed data.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4104: Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule Body
name: Powershell Processing Stream Of Data
id: 0d718b52-c9f1-11eb-bc61-acde48001122
version: 19
creation_date: '2021-06-14'
modification_date: '2026-06-29'
author: Teoderick Contreras, Splunk
status: production
type: Anomaly
description: |-
The following analytic detects suspicious PowerShell script execution involving compressed stream data processing, identified via EventCode 4104.
It leverages PowerShell Script Block Logging to flag scripts using `IO.Compression`, `IO.StreamReader`, or decompression methods.
This activity is significant as it often indicates obfuscated PowerShell or embedded .NET/binary execution, which are common tactics for evading detection.
If confirmed malicious, this behavior could allow attackers to execute hidden code, escalate privileges, or maintain persistence within the environment.
data_source:
- Powershell Script Block Logging 4104
search: |-
`powershell`
EventCode=4104
ScriptBlockText IN (
"*IO.Compression.*",
"*IO.StreamReader*",
"*]::Decompress*"
)
| fillnull
| stats count min(_time) as firstTime
max(_time) as lastTime
by dest signature signature_id
user_id vendor_product EventID
Guid Opcode Name
Path ProcessID ScriptBlockId
ScriptBlockText
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `powershell_processing_stream_of_data_filter`
how_to_implement: To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://help.splunk.com/en/security-offerings/splunk-user-behavior-analytics/get-data-in/5.4.1/add-other-data-to-splunk-uba/configure-powershell-logging-to-see-powershell-anomalies-in-splunk-uba.
known_false_positives: powershell may used this function to process compressed data.
references:
- https://medium.com/@ahmedjouini99/deobfuscating-emotets-powershell-payload-e39fb116f7b9
- https://help.splunk.com/en/security-offerings/splunk-user-behavior-analytics/get-data-in/5.4.1/add-other-data-to-splunk-uba/configure-powershell-logging-to-see-powershell-anomalies-in-splunk-uba
- https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63
- https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf
- https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/
- https://www.splunk.com/en_us/blog/security/hunting-for-malicious-powershell-using-script-block-logging.html
- https://thedfirreport.com/2023/05/22/icedid-macro-ends-in-nokoyawa-ransomware/
intermediate_findings:
entities:
- field: dest
type: system
score: 20
message: A suspicious powershell script with the ScriptBlockId [$ScriptBlockId$] containing stream commands to process compressed or decompressed binary file was executed on host $dest$
analytic_story:
- Hellcat Ransomware
- Malicious PowerShell
- Medusa Ransomware
- PXA Stealer
- Data Destruction
- Braodo Stealer
- AsyncRAT
- Hermetic Wiper
- IcedID
- XWorm
- MoonPeak
- MuddyWater
- Salat Stealer
asset_type: Endpoint
mitre_attack_id:
- T1059.001
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: search
`powershell`
EventCode=4104
ScriptBlockText IN (
"*IO.Compression.*",
"*IO.StreamReader*",
"*]::Decompress*"
)
Stage 2: fillnull
| fillnull
Stage 3: stats
| stats count min(_time) as firstTime
max(_time) as lastTime
by dest signature signature_id
user_id vendor_product EventID
Guid Opcode Name
Path ProcessID ScriptBlockId
ScriptBlockText
Stage 4: search
| `security_content_ctime(firstTime)`
Stage 5: search
| `security_content_ctime(lastTime)`
Stage 6: search
| `powershell_processing_stream_of_data_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"4104" |
ScriptBlockText | in |
| field:"ScriptBlockText" kind:in |
ProtocolHandler.exe File Download (Windows Event Log)
#ProtocolHandler.exe is a component of Microsoft Office and is typically used for accessing Microsoft Office documents from Outlook and Sharepoint. Adversaries can use ProtocolHandler.exe to download files. This use case detects executions of ProtocolHandler.exe followed by URLs in the command line. Allowlisting of expected Sharepoint domains is recommended to reduce false positives. LOLBINS/LOLBAS
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
References
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
id: '21901.38719'
title: ProtocolHandler.exe File Download
description: ProtocolHandler.exe is a component of Microsoft Office and is typically
used for accessing Microsoft Office documents from Outlook and Sharepoint. Adversaries
can use ProtocolHandler.exe to download files. This use case detects executions
of ProtocolHandler.exe followed by URLs in the command line. Allowlisting of expected
Sharepoint domains is recommended to reduce false positives. LOLBINS/LOLBAS
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
"<EventID>4688<" OR Type=Process) "ProtocolHandler.exe" | regex process="(?i)ProtocolHandler\.exe\"?\s+\"?[A-Za-z0-9]{2,6}:\/\/"
| table _time, host, user, signature_id, process, process_*, parent_process_path,
parent_process_name | bin span=1s | stats values(*) as * by _time, host '
techniques:
- command-and-control:ingress tool transfer
technique_id:
- T1105
data_category:
- Process command-line parameters
- Windows event logs
references:
- https://pentera.io/blog/the-lol-isnt-so-funny-when-it-bites-you-in-the-bas/
- https://lolbas-project.github.io/lolbas/OtherMSBinaries/ProtocolHandler/
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) "ProtocolHandler.exe"
Stage 2: regex
| regex process="(?i)ProtocolHandler\.exe\"?\s+\"?[A-Za-z0-9]{2,6}:\/\/"
Stage 3: table
| table _time, host, user, signature_id, process, process_*, parent_process_path,
parent_process_name
Stage 4: bucket
| bin span=1s
Stage 5: stats
| stats values(*) as * by _time, host
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"4688" |
process | regex_match |
| field:"CommandLine" kind:regex_match |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>4688<" |
| 1 | "ProtocolHandler.exe" |
Suspicious Executable by Powershell (Windows Event Log)
#Detect when an executable has been launched by powershell and similar processes. Such as powershell cscript or cmd and similar processes spawning cmd.exe, cscript rundll32 and similar processes being a child process of powershell
MITRE ATT&CK Coverage
References
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
id: '1041.1224'
title: Suspicious Executable by Powershell
description: 'Detect when an executable has been launched by powershell and similar
processes. Such as powershell cscript or cmd and similar processes spawning cmd.exe,
cscript rundll32 and similar processes being a child process of powershell. - Threat
Actor Association: APT29/Nobelium/Cozy Bear, APT34/OilRig, APT41, APT43, FIN7, Flax
Typhoon, Lancefly, MuddyWater, RedEyes - Software Association: Bazarloader, Blackbyte,
IcedID, Qakbot/Qbot - #TrendingThreat #Russia #Ukraine'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
"<EventID>4688<" OR Type=Process) "powershell.exe" ("cmd.exe" OR "services.exe"
OR "dllhost.exe" OR "rundll32.exe" OR "cscript.exe" OR "mshta.exe" OR "regsvr32.exe")
| regex parent_process_name="(?i)(powershell\.exe)" | regex process_path="(?i)((cmd)|(services)|(dllhost)|(rundll32)|(mshta)|(regsvr32)|(cscript))\.exe"
| table _time, host, user event_id, parent_*, process_*, process, signature_id,
src_*, dest_* | bin span=1s | stats values(*) as * by _time, host | where isnotnull(user) '
techniques:
- execution:command and scripting interpreter:powershell
- execution:command and scripting interpreter:windows command shell
technique_id:
- T1059.001
- T1059.003
data_category:
- Windows event logs
references:
- https://docs.broadcom.com/doc/increased-use-of-powershell-in-attacks-16-en
- https://www.clearskysec.com/wp-content/uploads/2018/11/MuddyWater-Operations-in-Lebanon-and-Oman.pdf
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) "powershell.exe" ("cmd.exe" OR "services.exe" OR "dllhost.exe" OR "rundll32.exe" OR "cscript.exe" OR "mshta.exe" OR "regsvr32.exe")
Stage 2: regex
| regex parent_process_name="(?i)(powershell\.exe)"
Stage 3: regex
| regex process_path="(?i)((cmd)|(services)|(dllhost)|(rundll32)|(mshta)|(regsvr32)|(cscript))\.exe"
Stage 4: table
| table _time, host, user event_id, parent_*, process_*, process, signature_id, src_*, dest_*
Stage 5: bucket
| bin span=1s
Stage 6: stats
| stats values(*) as * by _time, host
Stage 7: where
| where isnotnull(user)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"4688" |
parent_process_name | regex_match |
| field:"parent_process_name" kind:regex_match value:"(?i)(powershell.exe)" |
process_path | regex_match |
| field:"process_name" kind:regex_match value:"(?i)((cmd)|(services)|(dllhost)|(rundll32)|(mshta)|(regsvr32)|(cscript)).exe" |
user | is_not_null | field:"user" kind:is_not_null |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>4688<" |
| 1 | "powershell.exe" |
| 1 | "cmd.exe" |
| 1 | "services.exe" |
| 1 | "dllhost.exe" |
| 1 | "rundll32.exe" |
| 1 | "cscript.exe" |
| 1 | "mshta.exe" |
| 1 | "regsvr32.exe" |
Windows Service Created with Suspicious Service Name
#The following analytic detects the creation of a Windows Service with a known suspicious or malicious name using Windows Event ID 7045. It leverages logs from the wineventlog_system to identify these services installations. This activity is significant as adversaries, including those deploying Clop ransomware, often create malicious services for lateral movement, remote code execution, persistence, and execution. If confirmed malicious, this could allow attackers to maintain persistence, execute arbitrary code, and potentially escalate privileges, posing a severe threat to the environment.
Known False Positives
- Legitimate applications may install services with uncommon services paths.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Service-Control-Manager | Event ID 7045: A service was installed in the system. |
Rule Body
name: Windows Service Created with Suspicious Service Name
id: 35eb6d19-a497-400c-93c5-645562804b11
version: 9
creation_date: '2025-02-07'
modification_date: '2026-05-13'
author: Steven Dick
status: production
type: Anomaly
description: The following analytic detects the creation of a Windows Service with a known suspicious or malicious name using Windows Event ID 7045. It leverages logs from the `wineventlog_system` to identify these services installations. This activity is significant as adversaries, including those deploying Clop ransomware, often create malicious services for lateral movement, remote code execution, persistence, and execution. If confirmed malicious, this could allow attackers to maintain persistence, execute arbitrary code, and potentially escalate privileges, posing a severe threat to the environment.
data_source:
- Windows Event Log System 7045
search: |-
`wineventlog_system` EventCode=7045
| stats values(ImagePath) as process, count, min(_time) as firstTime, max(_time) as lastTime values(EventCode) as signature by Computer, ServiceName, StartType, ServiceType, UserID
| eval process_name = replace(mvindex(split(process,"\\"),-1), "\"", "")
| rename Computer as dest, ServiceName as object_name, ServiceType as object_type, UserID as user_id
| lookup windows_suspicious_services service_name as object_name
| where isnotnull(tool_name)
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `windows_service_created_with_suspicious_service_name_filter`
how_to_implement: To successfully implement this search, you need to be ingesting logs with the Service name, Service File Name Service Start type, and Service Type from your endpoints.
known_false_positives: Legitimate applications may install services with uncommon services paths.
references:
- https://attack.mitre.org/techniques/T1569/002/
- https://github.com/BishopFox/sliver/blob/71f94928bf36c1557ea5fbeffa161b71116f56b2/client/command/exec/psexec.go#LL61C5-L61C16
- https://www.microsoft.com/en-us/security/blog/2022/08/24/looking-for-the-sliver-lining-hunting-for-emerging-command-and-control-frameworks/
- https://github.com/mthcht/awesome-lists/blob/main/Lists/suspicious_windows_services_names_list.csv
intermediate_findings:
entities:
- field: dest
type: system
score: 20
message: A known malicious service name $object_name$ was created using $process$ on $dest$, this may indicate the presence of [$tool_name$]
threat_objects:
- field: object_name
type: signature
- field: process
type: process
analytic_story:
- Active Directory Lateral Movement
- Brute Ratel C4
- CISA AA23-347A
- Clop Ransomware
- Flax Typhoon
- PlugX
- Qakbot
- Snake Malware
- Tuoni
- Gh0st RAT
asset_type: Endpoint
mitre_attack_id:
- T1569.002
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: search
`wineventlog_system` EventCode=7045
Stage 2: stats
| stats
values(ImagePath) as process,
count,
min(_time) as firstTime,
max(_time) as lastTime
values(EventCode) as signature
by Computer, ServiceName, StartType, ServiceType, UserID
Stage 3: eval
| eval process_name = replace(mvindex(split(process,"\\"),-1), "\"", "")
Stage 4: rename
| rename Computer as dest, ServiceName as object_name, ServiceType as object_type, UserID as user_id
Stage 5: lookup
| lookup windows_suspicious_services service_name as object_name
Stage 6: where
| where isnotnull(tool_name)
Stage 7: search
| `security_content_ctime(firstTime)`
Stage 8: search
| `security_content_ctime(lastTime)`
Stage 9: search
| `windows_service_created_with_suspicious_service_name_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"7045" |
tool_name | is_not_null | field:"tool_name" kind:is_not_null |
Windows SQLCMD Execution
#This detection identifies potentially suspicious usage of sqlcmd.exe, focusing on command patterns that may indicate data exfiltration, reconnaissance, or malicious database operations. The detection looks for both short-form (-X) and long-form (--flag) suspicious parameter combinations, which have been observed in APT campaigns targeting high-value organizations. For example, threat actors like CL-STA-0048 have been known to abuse sqlcmd.exe for data theft and exfiltration from compromised MSSQL servers. The detection monitors for suspicious authentication attempts, output redirection, and potentially malicious query patterns that could indicate unauthorized database access or data theft.
Known False Positives
- Database administrators and developers commonly use sqlcmd.exe legitimately for database management and scripting tasks within enterprise environments. These legitimate activities often include database backups and restores, schema deployment scripts, automated database maintenance, and ETL processes. However, it's important to note that some organizations may have no sqlcmd.exe usage at all, making any detection highly suspicious. To effectively manage false positives, organizations should whitelist known administrator accounts, create exceptions for approved script paths and output locations, and add legitimate usage patterns to the filter macro as needed. Recommend running this detection first as a hunt to review usage patterns. Following, modify the risk score and false positive list as needed.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
name: Windows SQLCMD Execution
id: 4e7c2f85-8f02-4bd2-a48b-5ec98a2c5f72
version: 5
creation_date: '2025-02-13'
modification_date: '2026-05-13'
author: Michael Haag, Splunk
status: production
type: Hunting
description: This detection identifies potentially suspicious usage of sqlcmd.exe, focusing on command patterns that may indicate data exfiltration, reconnaissance, or malicious database operations. The detection looks for both short-form (-X) and long-form (--flag) suspicious parameter combinations, which have been observed in APT campaigns targeting high-value organizations. For example, threat actors like CL-STA-0048 have been known to abuse sqlcmd.exe for data theft and exfiltration from compromised MSSQL servers. The detection monitors for suspicious authentication attempts, output redirection, and potentially malicious query patterns that could indicate unauthorized database access or data theft.
data_source:
- Sysmon EventID 1
- Windows Event Log Security 4688
- CrowdStrike ProcessRollup2
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=sqlcmd.exe OR Processes.original_file_name=sqlcmd.exe) by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id | `drop_dm_object_name(Processes)` | eval process_lower=lower(process) | eval is_help_check=case( match(process, "(?i)-[?]"), 1, match(process_lower, "(?i)--help"), 1, match(process_lower, "(?i)--version"), 1, true(), 0 ), has_parameters=if(match(process, "-[A-Za-z]"), 1, 0), has_query=case( match(process, "-[Qq]\\s+"), 1, match(process_lower, "--query\\s+"), 1, match(process_lower, "--initial-query\\s+"), 1, true(), 0 ), has_output=case( match(process, "-[oO]\\s+"), 1, match(process_lower, "--output-file\\s+"), 1, true(), 0 ), has_input=case( match(process, "-[iI]\\s+"), 1, match(process_lower, "--input-file\\s+"), 1, true(), 0 ), has_url_input=case( match(process, "-[iI]\\s+https?://"), 1, match(process_lower, "--input-file\\s+https?://"), 1, match(process, "-[iI]\\s+ftp://"), 1, match(process_lower, "--input-file\\s+ftp://"), 1, true(), 0 ), has_admin_conn=case( match(process, "-A"), 1, match(process_lower, "--dedicated-admin-connection"), 1, true(), 0 ), has_suspicious_auth=case( match(process, "-U\\s+sa\\b"), 1, match(process_lower, "--user-name\\s+sa\\b"), 1, match(process, "-U\\s+admin\\b"), 1, match(process_lower, "--user-name\\s+admin\\b"), 1, match(process, "-E\\b"), 1, match(process_lower, "--use-trusted-connection"), 1, true(), 0 ), has_local_server=case( match(process, "-S\\s+127\\.0\\.0\\.1"), 1, match(process_lower, "--server\\s+127\\.0\\.0\\.1"), 1, match(process, "-S\\s+localhost"), 1, match(process_lower, "--server\\s+localhost"), 1, true(), 0 ), has_suspicious_output=case( match(process_lower, "-o\\s+.*\\.(txt|csv|dat)"), 1, match(process_lower, "--output-file\\s+.*\\.(txt|csv|dat)"), 1, true(), 0 ), has_cert_bypass=case( match(process, "-C"), 1, match(process_lower, "--trust-server-certificate"), 1, true(), 0 ), has_suspicious_query=case( match(process_lower, "(xp_cmdshell|sp_oacreate|sp_execute_external|openrowset|bulk\\s+insert)"), 1, match(process_lower, "(master\\.\\.\\.sysdatabases|msdb\\.\\.\\.backuphistory|sysadmin|securityadmin)"), 1, match(process_lower, "(select.*from.*sys\\.|select.*password|dump\\s+database)"), 1, match(process_lower, "(sp_addextendedproc|sp_makewebtask|sp_addsrvrolemember)"), 1, match(process_lower, "(sp_configure.*show\\s+advanced|reconfigure|enable_xp_cmdshell)"), 1, match(process_lower, "(exec.*master\\.dbo\\.|exec.*msdb\\.dbo\\.)"), 1, match(process_lower, "(sp_password|sp_control_dbmasterkey_password|sp_dropextendedproc)"), 1, match(process_lower, "(powershell|cmd\\.exe|rundll32|regsvr32|certutil)"), 1, true(), 0 ), has_suspicious_path=case( match(process_lower, "(\\\\temp\\\\|\\\\windows\\\\|\\\\public\\\\|\\\\users\\\\public\\\\|\\\\programdata\\\\)"), 1, match(process_lower, "(\\\\desktop\\\\.*\\.(zip|rar|7z|tar|gz))"), 1, match(process_lower, "(\\\\downloads\\\\.*\\.(dat|bin|tmp))"), 1, match(process_lower, "(\\\\appdata\\\\local\\\\temp\\\\|\\\\windows\\\\tasks\\\\)"), 1, match(process_lower, "(\\\\recycler\\\\|\\\\system32\\\\|\\\\system volume information\\\\)"), 1, match(process_lower, "(\\.vbs|\\.ps1|\\.bat|\\.cmd|\\.exe)$"), 1, true(), 0 ), has_suspicious_combo=case( match(process, "-E") AND match(process_lower, "(?i)xp_cmdshell"), 1, match(process, "-Q") AND match(process_lower, "(?i)exec\\s+master"), 1, has_local_server=1 AND has_suspicious_query=1, 1, true(), 0 ), has_obfuscation=case( match(process_lower, "(char\\(|convert\\(|cast\\(|declare\\s+@)"), 1, match(process_lower, "(exec\\s+\\(|exec\\s+@|;\\s*exec)"), 1, match(process, "\\^|\\%|\\+\\+|\\-\\-"), 1, len(process) > 500, 1, true(), 0 ), has_data_exfil=case( match(process_lower, "(for\\s+xml|for\\s+json)"), 1, match(process_lower, "(bulk\\s+insert.*from)"), 1, match(process_lower, "(bcp.*queryout|bcp.*out)"), 1, match(process_lower, "(select.*into.*from|select.*into.*outfile)"), 1, true(), 0 )
| eval risk_score=0 | eval risk_score=case( is_help_check=1, 0, has_parameters=0, 0, has_suspicious_combo=1, risk_score + 90, has_suspicious_query=1, risk_score + 60, has_suspicious_path=1, risk_score + 40, has_url_input=1 AND has_output=1, risk_score + 80, has_query=1 AND has_output=1, risk_score + 30, has_query=1 AND has_suspicious_output=1, risk_score + 40, has_admin_conn=1, risk_score + 50, has_suspicious_auth=1, risk_score + 40, has_local_server=1 AND has_query=1, risk_score + 30, has_cert_bypass=1, risk_score + 20, has_obfuscation=1, risk_score + 70, has_data_exfil=1, risk_score + 60, true(), risk_score )
| eval risk_factors=mvappend( if((is_help_check=0 AND has_parameters=0), null(), if(has_suspicious_combo=1, "High-risk command combination detected", null())), if((is_help_check=0 AND has_parameters=0), null(), if(has_suspicious_query=1, "Suspicious SQL query pattern", null())), if(has_suspicious_path=1, "Suspicious output path", null()), if(has_url_input=1 AND has_output=1, "File download attempt", null()), if(has_query=1 AND has_output=1, "Query output to file", null()), if(has_admin_conn=1, "Admin connection", null()), if(has_suspicious_auth=1, "Suspicious authentication", null()), if(has_local_server=1, "Local server connection", null()), if(has_cert_bypass=1, "Certificate validation bypass", null()), if(has_obfuscation=1, "Command obfuscation detected", null()), if(has_data_exfil=1, "Potential data exfiltration", null()) ) | eval risk_message="SQLCMD execution with risk factors: ".mvjoin(risk_factors, ", ")
| where is_help_check=0 AND (risk_score >= 30 OR (has_parameters=1 AND has_suspicious_query=1)) | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `windows_sqlcmd_execution_filter`'
how_to_implement: The analytic will need to be tuned based on organization specific data. Currently, set to hunting to allow for tuning. SQLCmd is a legitimate tool for database management and scripting tasks within enterprise environments. 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 process GUID, process name, and parent process. Additionally, you must ingest complete command-line executions. 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 `Processes` 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.
known_false_positives: |
Database administrators and developers commonly use sqlcmd.exe legitimately for database management and scripting tasks within enterprise environments. These legitimate activities often include database backups and restores, schema deployment scripts, automated database maintenance, and ETL processes. However, it's important to note that some organizations may have no sqlcmd.exe usage at all, making any detection highly suspicious. To effectively manage false positives, organizations should whitelist known administrator accounts, create exceptions for approved script paths and output locations, and add legitimate usage patterns to the filter macro as needed.
Recommend running this detection first as a hunt to review usage patterns. Following, modify the risk score and false positive list as needed.
references:
- https://docs.microsoft.com/en-us/sql/tools/sqlcmd-utility
- https://attack.mitre.org/techniques/T1078/
- https://attack.mitre.org/techniques/T1213/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1105/T1105.md#atomic-test-32---file-download-with-sqlcmdexe
- https://unit42.paloaltonetworks.com/espionage-campaign-targets-south-asian-entities/
analytic_story:
- SQL Server Abuse
- GhostRedirector IIS Module and Rungan Backdoor
asset_type: Endpoint
mitre_attack_id:
- T1059.003
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.Processes
where (Processes.process_name=sqlcmd.exe OR Processes.original_file_name=sqlcmd.exe)
by
Processes.dest
Processes.user
Processes.parent_process_name
Processes.process_name
Processes.process
Processes.process_id
Processes.parent_process_id
Stage 2: search
| `drop_dm_object_name(Processes)`
Stage 3: eval
| eval process_lower=lower(process)
Stage 4: eval
| eval
is_help_check=case(
match(process, "(?i)-[?]"), 1,
match(process_lower, "(?i)--help"), 1,
match(process_lower, "(?i)--version"), 1,
true(), 0
),
has_parameters=if(match(process, "-[A-Za-z]"), 1, 0),
has_query=case(
match(process, "-[Qq]\\s+"), 1,
match(process_lower, "--query\\s+"), 1,
match(process_lower, "--initial-query\\s+"), 1,
true(), 0
),
has_output=case(
match(process, "-[oO]\\s+"), 1,
match(process_lower, "--output-file\\s+"), 1,
true(), 0
),
has_input=case(
match(process, "-[iI]\\s+"), 1,
match(process_lower, "--input-file\\s+"), 1,
true(), 0
),
has_url_input=case(
match(process, "-[iI]\\s+https?://"), 1,
match(process_lower, "--input-file\\s+https?://"), 1,
match(process, "-[iI]\\s+ftp://"), 1,
match(process_lower, "--input-file\\s+ftp://"), 1,
true(), 0
),
has_admin_conn=case(
match(process, "-A"), 1,
match(process_lower, "--dedicated-admin-connection"), 1,
true(), 0
),
has_suspicious_auth=case(
match(process, "-U\\s+sa\\b"), 1,
match(process_lower, "--user-name\\s+sa\\b"), 1,
match(process, "-U\\s+admin\\b"), 1,
match(process_lower, "--user-name\\s+admin\\b"), 1,
match(process, "-E\\b"), 1,
match(process_lower, "--use-trusted-connection"), 1,
true(), 0
),
has_local_server=case(
match(process, "-S\\s+127\\.0\\.0\\.1"), 1,
match(process_lower, "--server\\s+127\\.0\\.0\\.1"), 1,
match(process, "-S\\s+localhost"), 1,
match(process_lower, "--server\\s+localhost"), 1,
true(), 0
),
has_suspicious_output=case(
match(process_lower, "-o\\s+.*\\.(txt|csv|dat)"), 1,
match(process_lower, "--output-file\\s+.*\\.(txt|csv|dat)"), 1,
true(), 0
),
has_cert_bypass=case(
match(process, "-C"), 1,
match(process_lower, "--trust-server-certificate"), 1,
true(), 0
),
has_suspicious_query=case(
match(
process_lower,
"(xp_cmdshell|sp_oacreate|sp_execute_external|openrowset|bulk\\s+insert)"
), 1,
match(
process_lower,
"(master\\.\\.\\.sysdatabases|msdb\\.\\.\\.backuphistory|sysadmin|securityadmin)"
), 1,
match(process_lower, "(select.*from.*sys\\.|select.*password|dump\\s+database)"), 1,
match(process_lower, "(sp_addextendedproc|sp_makewebtask|sp_addsrvrolemember)"), 1,
match(process_lower, "(sp_configure.*show\\s+advanced|reconfigure|enable_xp_cmdshell)"), 1,
match(process_lower, "(exec.*master\\.dbo\\.|exec.*msdb\\.dbo\\.)"), 1,
match(process_lower, "(sp_password|sp_control_dbmasterkey_password|sp_dropextendedproc)"),
1,
match(process_lower, "(powershell|cmd\\.exe|rundll32|regsvr32|certutil)"), 1,
true(), 0
),
has_suspicious_path=case(
match(
process_lower,
"(\\\\temp\\\\|\\\\windows\\\\|\\\\public\\\\|\\\\users\\\\public\\\\|\\\\programdata\\\\)"
), 1,
match(process_lower, "(\\\\desktop\\\\.*\\.(zip|rar|7z|tar|gz))"), 1,
match(process_lower, "(\\\\downloads\\\\.*\\.(dat|bin|tmp))"), 1,
match(process_lower, "(\\\\appdata\\\\local\\\\temp\\\\|\\\\windows\\\\tasks\\\\)"), 1,
match(
process_lower,
"(\\\\recycler\\\\|\\\\system32\\\\|\\\\system volume information\\\\)"
), 1,
match(process_lower, "(\\.vbs|\\.ps1|\\.bat|\\.cmd|\\.exe)$"), 1,
true(), 0
),
has_suspicious_combo=case(
match(process, "-E") AND match(process_lower, "(?i)xp_cmdshell"), 1,
match(process, "-Q") AND match(process_lower, "(?i)exec\\s+master"), 1,
has_local_server=1 AND has_suspicious_query=1, 1,
true(), 0
),
has_obfuscation=case(
match(process_lower, "(char\\(|convert\\(|cast\\(|declare\\s+@)"), 1,
match(process_lower, "(exec\\s+\\(|exec\\s+@|;\\s*exec)"), 1,
match(process, "\\^|\\%|\\+\\+|\\-\\-"), 1,
len(process) > 500, 1,
true(), 0
),
has_data_exfil=case(
match(process_lower, "(for\\s+xml|for\\s+json)"), 1,
match(process_lower, "(bulk\\s+insert.*from)"), 1,
match(process_lower, "(bcp.*queryout|bcp.*out)"), 1,
match(process_lower, "(select.*into.*from|select.*into.*outfile)"), 1,
true(), 0
)
has_admin_conn =match(process, "-A")1match(process_lower, "--dedicated-admin-connection")10has_cert_bypass =match(process, "-C")1match(process_lower, "--trust-server-certificate")10has_data_exfil =match(process_lower, "(for\\s+xml|for\\s+json)")1match(process_lower, "(bulk\\s+insert.*from)")1match(process_lower, "(bcp.*queryout|bcp.*out)")1match(process_lower, "(select.*into.*from|select.*into.*outfile)")10has_input =match(process, "-[iI]\\s+")1match(process_lower, "--input-file\\s+")10has_local_server =match(process, "-S\\s+127\\.0\\.0\\.1")1match(process_lower, "--server\\s+127\\.0\\.0\\.1")1match(process, "-S\\s+localhost")1match(process_lower, "--server\\s+localhost")10has_obfuscation =match(process_lower, "(char\\(|convert\\(|cast\\(|declare\\s+@)")1match(process_lower, "(exec\\s+\\(|exec\\s+@|;\\s*exec)")1match(process, "\\^|\\%|\\+\\+|\\-\\-")1len(process) > 50010has_output =match(process, "-[oO]\\s+")1match(process_lower, "--output-file\\s+")10has_parameters =match(process, "-[A-Za-z]")10has_query =match(process, "-[Qq]\\s+")1match(process_lower, "--query\\s+")1match(process_lower, "--initial-query\\s+")10has_suspicious_auth =match(process, "-U\\s+sa\\b")1match(process_lower, "--user-name\\s+sa\\b")1match(process, "-U\\s+admin\\b")1match(process_lower, "--user-name\\s+admin\\b")1match(process, "-E\\b")1match(process_lower, "--use-trusted-connection")10has_suspicious_combo =match(process, "-E") AND match(process_lower, "(?i)xp_cmdshell")1match(process, "-Q") AND match(process_lower, "(?i)exec\\s+master")1has_local_server = 1 AND has_suspicious_query = 110has_suspicious_output =match(process_lower, "-o\\s+.*\\.(txt|csv|dat)")1match(process_lower, "--output-file\\s+.*\\.(txt|csv|dat)")10has_suspicious_path =match(process_lower, "(\\\\temp\\\\|\\\\windows\\\\|\\\\public\\\\|\\\\users\\\\public\\\\|\\\\programdata\\\\)")1match(process_lower, "(\\\\desktop\\\\.*\\.(zip|rar|7z|tar|gz))")1match(process_lower, "(\\\\downloads\\\\.*\\.(dat|bin|tmp))")1match(process_lower, "(\\\\appdata\\\\local\\\\temp\\\\|\\\\windows\\\\tasks\\\\)")1match(process_lower, "(\\\\recycler\\\\|\\\\system32\\\\|\\\\system volume information\\\\)")1match(process_lower, "(\\.vbs|\\.ps1|\\.bat|\\.cmd|\\.exe)$")10has_suspicious_query =match(process_lower, "(xp_cmdshell|sp_oacreate|sp_execute_external|openrowset|bulk\\s+insert)")1match(process_lower, "(master\\.\\.\\.sysdatabases|msdb\\.\\.\\.backuphistory|sysadmin|securityadmin)")1match(process_lower, "(select.*from.*sys\\.|select.*password|dump\\s+database)")1match(process_lower, "(sp_addextendedproc|sp_makewebtask|sp_addsrvrolemember)")1match(process_lower, "(sp_configure.*show\\s+advanced|reconfigure|enable_xp_cmdshell)")1match(process_lower, "(exec.*master\\.dbo\\.|exec.*msdb\\.dbo\\.)")1match(process_lower, "(sp_password|sp_control_dbmasterkey_password|sp_dropextendedproc)")1match(process_lower, "(powershell|cmd\\.exe|rundll32|regsvr32|certutil)")10has_url_input =match(process, "-[iI]\\s+https?://")1match(process_lower, "--input-file\\s+https?://")1match(process, "-[iI]\\s+ftp://")1match(process_lower, "--input-file\\s+ftp://")10is_help_check =match(process, "(?i)-[?]")1match(process_lower, "(?i)--help")1match(process_lower, "(?i)--version")10Stage 5: eval
| eval risk_score=0
Stage 6: eval
| eval
risk_score=case(
is_help_check=1, 0,
has_parameters=0, 0,
has_suspicious_combo=1, risk_score + 90,
has_suspicious_query=1, risk_score + 60,
has_suspicious_path=1, risk_score + 40,
has_url_input=1 AND has_output=1, risk_score + 80,
has_query=1 AND has_output=1, risk_score + 30,
has_query=1 AND has_suspicious_output=1, risk_score + 40,
has_admin_conn=1, risk_score + 50,
has_suspicious_auth=1, risk_score + 40,
has_local_server=1 AND has_query=1, risk_score + 30,
has_cert_bypass=1, risk_score + 20,
has_obfuscation=1, risk_score + 70,
has_data_exfil=1, risk_score + 60,
true(), risk_score
)
risk_score =is_help_check = 10has_parameters = 00has_suspicious_combo = 1plus(risk_score, 90)has_suspicious_query = 1plus(risk_score, 60)has_suspicious_path = 1plus(risk_score, 40)has_url_input = 1 AND has_output = 1plus(risk_score, 80)has_query = 1 AND has_output = 1plus(risk_score, 30)has_query = 1 AND has_suspicious_output = 1plus(risk_score, 40)has_admin_conn = 1plus(risk_score, 50)has_suspicious_auth = 1plus(risk_score, 40)has_local_server = 1 AND has_query = 1plus(risk_score, 30)has_cert_bypass = 1plus(risk_score, 20)has_obfuscation = 1plus(risk_score, 70)has_data_exfil = 1plus(risk_score, 60)risk_scoreStage 7: eval
| eval
risk_factors=mvappend(
if(
(is_help_check=0 AND has_parameters=0),
null(),
if(has_suspicious_combo=1, "High-risk command combination detected", null())
),
if(
(is_help_check=0 AND has_parameters=0),
null(),
if(has_suspicious_query=1, "Suspicious SQL query pattern", null())
),
if(has_suspicious_path=1, "Suspicious output path", null()),
if(has_url_input=1 AND has_output=1, "File download attempt", null()),
if(has_query=1 AND has_output=1, "Query output to file", null()),
if(has_admin_conn=1, "Admin connection", null()),
if(has_suspicious_auth=1, "Suspicious authentication", null()),
if(has_local_server=1, "Local server connection", null()),
if(has_cert_bypass=1, "Certificate validation bypass", null()),
if(has_obfuscation=1, "Command obfuscation detected", null()),
if(has_data_exfil=1, "Potential data exfiltration", null())
)
Stage 8: eval
| eval risk_message="SQLCMD execution with risk factors: ".mvjoin(risk_factors, ", ")
Stage 9: where
| where is_help_check=0 AND (risk_score >= 30 OR (has_parameters=1 AND has_suspicious_query=1))
Stage 10: search
| `security_content_ctime(firstTime)`
Stage 11: search
| `security_content_ctime(lastTime)`
Stage 12: search
| `windows_sqlcmd_execution_filter`
Indicators
These rows show field, operator, and value matches.