Detection rules › Splunk
Splunk rules: 32
ASL AWS Defense Evasion Delete Cloudtrail
#The following analytic detects AWS DeleteTrail events within CloudTrail logs. It leverages Amazon Security Lake logs parsed in the Open Cybersecurity Schema Framework (OCSF) format to identify when a CloudTrail is deleted. This activity is significant because adversaries may delete CloudTrail logs to evade detection and operate with stealth. If confirmed malicious, this action could allow attackers to cover their tracks, making it difficult to trace their activities and investigate other potential compromises within the AWS environment.
Known False Positives
- While this search has no known false positives, it is possible that an AWS admin has stopped cloudTrail logging. Please investigate this activity.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
Rule Body
name: ASL AWS Defense Evasion Delete Cloudtrail
id: 1f0b47e5-0134-43eb-851c-e3258638945e
version: 14
creation_date: '2022-07-12'
modification_date: '2026-05-13'
author: Patrick Bareiss, Splunk
status: production
type: TTP
description: The following analytic detects AWS `DeleteTrail` events within CloudTrail logs. It leverages Amazon Security Lake logs parsed in the Open Cybersecurity Schema Framework (OCSF) format to identify when a CloudTrail is deleted. This activity is significant because adversaries may delete CloudTrail logs to evade detection and operate with stealth. If confirmed malicious, this action could allow attackers to cover their tracks, making it difficult to trace their activities and investigate other potential compromises within the AWS environment.
data_source:
- ASL AWS CloudTrail
search: |-
`amazon_security_lake` api.operation=DeleteTrail
| fillnull
| stats count min(_time) as firstTime max(_time) as lastTime
BY actor.user.uid api.operation api.service.name
http_request.user_agent src_endpoint.ip actor.user.account.uid
cloud.provider cloud.region
| rename actor.user.uid as user api.operation as action api.service.name as dest http_request.user_agent as user_agent src_endpoint.ip as src actor.user.account.uid as vendor_account cloud.provider as vendor_product cloud.region as vendor_region
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `asl_aws_defense_evasion_delete_cloudtrail_filter`
how_to_implement: The detection is based on Amazon Security Lake events from Amazon Web Services (AWS), which is a centralized data lake that provides security-related data from AWS services. To use this detection, you must ingest CloudTrail logs from Amazon Security Lake into Splunk. To run this search, ensure that you ingest events using the latest version of Splunk Add-on for Amazon Web Services (https://splunkbase.splunk.com/app/1876) or the Federated Analytics App.
known_false_positives: While this search has no known false positives, it is possible that an AWS admin has stopped cloudTrail logging. Please investigate this activity.
references:
- https://attack.mitre.org/techniques/T1562/008/
finding:
title: User $user$ has deleted CloudTrail logging
entity:
field: user
type: user
score: 50
threat_objects:
- field: src
type: ip_address
analytic_story:
- AWS Defense Evasion
asset_type: AWS Account
mitre_attack_id:
- T1685.002
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: cloud
security_domain: threat
Stages and Predicates
Stage 1: search
`amazon_security_lake` api.operation=DeleteTrail
Stage 2: fillnull
| fillnull
Stage 3: stats
| stats count min(_time) as firstTime max(_time) as lastTime
BY actor.user.uid api.operation api.service.name
http_request.user_agent src_endpoint.ip actor.user.account.uid
cloud.provider cloud.region
Stage 4: rename
| rename actor.user.uid as user api.operation as action api.service.name as dest
http_request.user_agent as user_agent src_endpoint.ip as src
actor.user.account.uid as vendor_account cloud.provider as vendor_product
cloud.region as vendor_region
Stage 5: search
| `security_content_ctime(firstTime)`
Stage 6: search
| `security_content_ctime(lastTime)`
Stage 7: search
| `asl_aws_defense_evasion_delete_cloudtrail_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
api.operation | eq |
| field:"aws::eventName" kind:eq value:"DeleteTrail" |
sourcetype | eq |
| field:"sourcetype" kind:eq value:"aws:asl" |
ASL AWS Defense Evasion PutBucketLifecycle
#The following analytic detects PutBucketLifecycle events in AWS CloudTrail logs where a user sets a lifecycle rule for an S3 bucket with an expiration period of fewer than three days. This detection leverages CloudTrail logs to identify suspicious lifecycle configurations. This activity is significant because attackers may use it to delete CloudTrail logs quickly, thereby evading detection and impairing forensic investigations. If confirmed malicious, this could allow attackers to cover their tracks, making it difficult to trace their actions and respond to the breach effectively.
Known False Positives
- While this search has no known false positives, it is possible that it is a legitimate admin activity. Please consider filtering out these noisy events using userAgent, user_arn field names.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment | |
| Impact |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
Rule Body
name: ASL AWS Defense Evasion PutBucketLifecycle
id: 986565a2-7707-48ea-9590-37929cebc938
version: 7
creation_date: '2022-07-25'
modification_date: '2026-05-13'
author: Patrick Bareiss, Splunk
status: production
type: Hunting
description: The following analytic detects `PutBucketLifecycle` events in AWS CloudTrail logs where a user sets a lifecycle rule for an S3 bucket with an expiration period of fewer than three days. This detection leverages CloudTrail logs to identify suspicious lifecycle configurations. This activity is significant because attackers may use it to delete CloudTrail logs quickly, thereby evading detection and impairing forensic investigations. If confirmed malicious, this could allow attackers to cover their tracks, making it difficult to trace their actions and respond to the breach effectively.
data_source:
- ASL AWS CloudTrail
search: |-
`amazon_security_lake` api.operation=PutBucketLifecycle
| spath input=api.request.data path=LifecycleConfiguration.Rule.NoncurrentVersionExpiration.NoncurrentDays output=NoncurrentDays
| where NoncurrentDays < 3
| spath input=api.request.data
| fillnull
| stats count min(_time) as firstTime max(_time) as lastTime
BY actor.user.uid api.operation api.service.name
http_request.user_agent src_endpoint.ip actor.user.account.uid
cloud.provider cloud.region NoncurrentDays
bucketName
| rename actor.user.uid as user api.operation as action api.service.name as dest http_request.user_agent as user_agent src_endpoint.ip as src actor.user.account.uid as vendor_account cloud.provider as vendor_product cloud.region as vendor_region
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `asl_aws_defense_evasion_putbucketlifecycle_filter`
how_to_implement: The detection is based on Amazon Security Lake events from Amazon Web Services (AWS), which is a centralized data lake that provides security-related data from AWS services. To use this detection, you must ingest CloudTrail logs from Amazon Security Lake into Splunk. To run this search, ensure that you ingest events using the latest version of Splunk Add-on for Amazon Web Services (https://splunkbase.splunk.com/app/1876) or the Federated Analytics App.
known_false_positives: While this search has no known false positives, it is possible that it is a legitimate admin activity. Please consider filtering out these noisy events using userAgent, user_arn field names.
references:
- https://stratus-red-team.cloud/attack-techniques/AWS/aws.defense-evasion.cloudtrail-lifecycle-rule/
analytic_story:
- AWS Defense Evasion
asset_type: AWS Account
mitre_attack_id:
- T1485.001
- T1685.002
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: cloud
security_domain: threat
Stages and Predicates
Stage 1: search
`amazon_security_lake` api.operation=PutBucketLifecycle
Stage 2: spath
| spath input=api.request.data
path=LifecycleConfiguration.Rule.NoncurrentVersionExpiration.NoncurrentDays
output=NoncurrentDays
Stage 3: where
| where NoncurrentDays < 3
Stage 4: spath
| spath input=api.request.data
Stage 5: fillnull
| fillnull
Stage 6: stats
| stats count min(_time) as firstTime max(_time) as lastTime
BY actor.user.uid api.operation api.service.name
http_request.user_agent src_endpoint.ip actor.user.account.uid
cloud.provider cloud.region NoncurrentDays
bucketName
Stage 7: rename
| rename actor.user.uid as user api.operation as action api.service.name as dest
http_request.user_agent as user_agent src_endpoint.ip as src
actor.user.account.uid as vendor_account cloud.provider as vendor_product
cloud.region as vendor_region
Stage 8: search
| `security_content_ctime(firstTime)`
Stage 9: search
| `security_content_ctime(lastTime)`
Stage 10: search
| `asl_aws_defense_evasion_putbucketlifecycle_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
NoncurrentDays | lt |
| field:"NoncurrentDays" kind:lt value:"3" |
api.operation | eq |
| field:"aws::eventName" kind:eq value:"PutBucketLifecycle" |
sourcetype | eq |
| field:"sourcetype" kind:eq value:"aws:asl" |
AWS ECR Container Upload Unknown User
#The following analytic detects the upload of a new container image to AWS Elastic Container Registry (ECR) by an unknown user. It leverages AWS CloudTrail logs to identify PutImage events from the ECR service, filtering out known users. This activity is significant because container uploads should typically be performed by a limited set of authorized users. If confirmed malicious, this could indicate unauthorized access, potentially leading to the deployment of malicious containers, data exfiltration, or further compromise of the AWS environment.
Known False Positives
- No false positives have been identified at this time.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
- AWS ECR Container Upload Outside Business Hours (Splunk)
- ECR CRUD Actions (Panther)
Rule Body
name: AWS ECR Container Upload Unknown User
id: 300688e4-365c-4486-a065-7c884462b31d
version: 12
creation_date: '2021-08-19'
modification_date: '2026-05-13'
author: Patrick Bareiss, Splunk
status: production
type: Anomaly
description: The following analytic detects the upload of a new container image to AWS Elastic Container Registry (ECR) by an unknown user. It leverages AWS CloudTrail logs to identify `PutImage` events from the ECR service, filtering out known users. This activity is significant because container uploads should typically be performed by a limited set of authorized users. If confirmed malicious, this could indicate unauthorized access, potentially leading to the deployment of malicious containers, data exfiltration, or further compromise of the AWS environment.
data_source:
- AWS CloudTrail PutImage
search: |-
`cloudtrail` eventSource=ecr.amazonaws.com eventName=PutImage NOT `aws_ecr_users`
| rename requestParameters.* as *
| rename repositoryName AS image
| rename user_name as user
| stats count min(_time) as firstTime max(_time) as lastTime
BY signature user user_agent
src vendor_account vendor_region
vendor_product image
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `aws_ecr_container_upload_unknown_user_filter`
how_to_implement: You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.
known_false_positives: No false positives have been identified at this time.
references:
- https://attack.mitre.org/techniques/T1204/003/
intermediate_findings:
entities:
- field: user
type: user
score: 20
message: Container uploaded from unknown user $user$
threat_objects:
- field: src
type: ip_address
analytic_story:
- Dev Sec Ops
asset_type: AWS Account
mitre_attack_id:
- T1204.003
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: cloud
security_domain: network
Stages and Predicates
Stage 1: search
`cloudtrail` eventSource=ecr.amazonaws.com eventName=PutImage NOT `aws_ecr_users`
Stage 2: rename
| rename requestParameters.* as *
Stage 3: rename
| rename repositoryName AS image
Stage 4: rename
| rename user_name as user
Stage 5: stats
| stats count min(_time) as firstTime max(_time) as lastTime
BY signature user user_agent
src vendor_account vendor_region
vendor_product image
Stage 6: search
| `security_content_ctime(firstTime)`
Stage 7: search
| `security_content_ctime(lastTime)`
Stage 8: search
| `aws_ecr_container_upload_unknown_user_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
eventName | eq |
| field:"aws::eventName" kind:eq value:"PutImage" |
eventSource | eq |
| field:"aws::eventSource" kind:eq value:"ecr.amazonaws.com" |
sourcetype | eq |
| field:"sourcetype" kind:eq value:"aws:cloudtrail" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
userName | eq | user | excludes:userName field:"userName" value:"user" |
Cisco Duo Admin Login Unusual Browser
#The following analytic identifies instances where a Duo admin logs in using a browser other than Chrome, which is considered unusual based on typical access patterns. Please adjust as needed to your environment. The detection leverages Duo activity logs ingested via the Cisco Security Cloud App and filters for admin login actions where the browser is not Chrome. By renaming and aggregating relevant fields such as user, browser, IP address, and location, the analytic highlights potentially suspicious access attempts that deviate from the norm. This behavior is significant for a SOC because the use of an unexpected browser may indicate credential compromise, session hijacking, or the use of unauthorized devices by attackers attempting to evade detection. Detecting such anomalies enables early investigation and response, helping to prevent privilege escalation, policy manipulation, or further compromise of sensitive administrative accounts. The impact of this attack could include unauthorized changes to security policies, user access, or the disabling of critical security controls, posing a substantial risk to the organizations security posture.
Known False Positives
- No false positives have been identified at this time.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Defense Impairment | |
| Credential Access |
Rule Body
name: Cisco Duo Admin Login Unusual Browser
id: b38932ad-e663-4e90-bfdf-8446ee5b3f34
version: 6
creation_date: '2025-07-10'
modification_date: '2026-05-13'
author: Patrick Bareiss, Splunk
status: production
type: TTP
description: The following analytic identifies instances where a Duo admin logs in using a browser other than Chrome, which is considered unusual based on typical access patterns. Please adjust as needed to your environment. The detection leverages Duo activity logs ingested via the Cisco Security Cloud App and filters for admin login actions where the browser is not Chrome. By renaming and aggregating relevant fields such as user, browser, IP address, and location, the analytic highlights potentially suspicious access attempts that deviate from the norm. This behavior is significant for a SOC because the use of an unexpected browser may indicate credential compromise, session hijacking, or the use of unauthorized devices by attackers attempting to evade detection. Detecting such anomalies enables early investigation and response, helping to prevent privilege escalation, policy manipulation, or further compromise of sensitive administrative accounts. The impact of this attack could include unauthorized changes to security policies, user access, or the disabling of critical security controls, posing a substantial risk to the organizations security posture.
data_source:
- Cisco Duo Activity
search: |-
`cisco_duo_activity` "action.name"=admin_login NOT access_device.browser IN (Chrome)
| rename actor.name as user access_device.ip.address as src_ip
| stats count min(_time) as firstTime max(_time) as lastTime
BY access_device.browser access_device.browser_version src_ip
access_device.location.city access_device.location.country access_device.location.state
access_device.os access_device.os_version actor.details
actor.type outcome.result user
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `cisco_duo_admin_login_unusual_browser_filter`
how_to_implement: The analytic leverages Duo activity logs to be ingested using the Cisco Security Cloud App (https://splunkbase.splunk.com/app/7404).
known_false_positives: No false positives have been identified at this time.
references:
- https://splunkbase.splunk.com/app/7404
finding:
title: A user $user$ has logged in using an unusual browser $access_device.browser$ from $src_ip$.
entity:
field: user
type: user
score: 50
threat_objects:
- field: access_device.browser
type: http_user_agent
- field: src_ip
type: ip_address
analytic_story:
- Cisco Duo Suspicious Activity
asset_type: Identity
mitre_attack_id:
- T1556
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: application
security_domain: identity
Stages and Predicates
Stage 1: search
`cisco_duo_activity` "action.name"=admin_login NOT access_device.browser IN (Chrome)
Stage 2: rename
| rename actor.name as user access_device.ip.address as src_ip
Stage 3: stats
| stats count min(_time) as firstTime max(_time) as lastTime
BY access_device.browser access_device.browser_version src_ip
access_device.location.city access_device.location.country access_device.location.state
access_device.os access_device.os_version actor.details
actor.type outcome.result user
Stage 4: search
| `security_content_ctime(firstTime)`
Stage 5: search
| `security_content_ctime(lastTime)`
Stage 6: search
| `cisco_duo_admin_login_unusual_browser_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
action.name | eq |
| field:"action.name" kind:eq value:"admin_login" |
sourcetype | eq |
| field:"sourcetype" kind:eq value:"cisco:duo:activity" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
access_device.browser | eq | Chrome | excludes:access_device.browser field:"access_device.browser" value:"Chrome" |
Cisco NVM - Susp Script From Archive Triggering Network Activity
#This analytic detects script execution (wscript.exe or cscript.exe) triggered from compressed files opened directly using explorer.exe, winrar.exe, or 7zFM.exe. When a user double clicks on a ".js" file from within one of these compressed files. Its extracted temporally in the temp directory in folder with certain markers. It leverages Cisco Network Visibility Module (NVM) flow data, in order to look for a specific parent/child relationship and an initiated network connection. This behavior is exploited by threat actors such as Scarlet Goldfinch to deliver and run malicious scripts as an initial access technique.
Known False Positives
- Some software installers or automation scripts may extract and run scripts from archive files in temporary directories. However, it is uncommon for such scripts to initiate outbound network connections immediately upon extraction. This behavior should be considered suspicious and investigated, especially in environments where such scripting is not typical.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Rule Body
name: Cisco NVM - Susp Script From Archive Triggering Network Activity
id: 8b07c2c9-0cde-4c44-9fa6-59dcf2b25777
version: 6
creation_date: '2025-07-01'
modification_date: '2026-07-14'
author: Nasreddine Bencherchali, Splunk
status: production
type: Anomaly
description: |
This analytic detects script execution (`wscript.exe` or `cscript.exe`) triggered from compressed files opened directly using
`explorer.exe`, `winrar.exe`, or `7zFM.exe`.
When a user double clicks on a ".js" file from within one of these compressed files. Its extracted temporally in the temp directory in folder with certain markers.
It leverages Cisco Network Visibility Module (NVM) flow data, in order to look for a specific parent/child relationship and an initiated network connection.
This behavior is exploited by threat actors such as Scarlet Goldfinch to deliver and run malicious scripts as an initial access technique.
data_source:
- Cisco Network Visibility Module Flow Data
search: |
`cisco_network_visibility_module_flowdata`
parent_process_name IN ("explorer.exe", "winrar.exe", "7zFM.exe")
process_name IN ("wscript.exe", "cscript.exe")
process_arguments = "*\\AppData\\Local\\Temp\\*"
process_arguments IN ("*\\rar*", "*\\7z*", "*.zip*")
| stats count min(_time) as firstTime max(_time) as lastTime
values(parent_process_arguments) as parent_process_arguments
values(process_arguments) as process_arguments
values(parent_process_hash) as parent_process_hash
values(process_hash) as process_hash
values(module_name_list) as module_name_list
values(module_hash_list) as module_hash_list
values(dest_port) as dest_port
values(aliul) as additional_logged_in_users_list
values(dest_hostname) as dest_hostname
by src dest parent_process_path parent_process_name parent_process_integrity_level process_path process_name process_integrity_level process_id transport
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| table
parent_process_integrity_level parent_process_name parent_process_path parent_process_arguments parent_process_hash
process_integrity_level process_path process_name process_arguments process_hash process_id
additional_logged_in_users_list module_name_list module_hash_list
src dest_hostname dest dest_port transport firstTime lastTime
| `cisco_nvm___susp_script_from_archive_triggering_network_activity_filter`
how_to_implement: |
This search requires Network Visibility Module logs, which includes the flow data sourcetype.
This search uses an input macro named `cisco_network_visibility_module_flowdata`.
We strongly recommend that you specify your environment-specific configurations
(index, source, sourcetype, etc.) for Cisco Network Visibility Module logs.
Replace the macro definition with configurations for your Splunk environment.
The search also uses a post-filter macro designed to filter out known false positives.
The logs are to be ingested using the Splunk Add-on for Cisco Endpoint Security Analytics (CESA) (https://splunkbase.splunk.com/app/4221).
known_false_positives: |
Some software installers or automation scripts may extract and run scripts from archive files in temporary directories.
However, it is uncommon for such scripts to initiate outbound network connections immediately upon extraction.
This behavior should be considered suspicious and investigated, especially in environments where such scripting is not typical.
references:
- https://redcanary.com/threat-detection-report/threats/scarlet-goldfinch/
intermediate_findings:
entities:
- field: src
type: system
score: 20
message: $process_path$ running from $parent_process_name$ with archive-related execution in Temp was observed from host $src$ performing network a connection towards $dest$ / $dest_hostname$ over port $dest_port$.
threat_objects:
- field: process_name
type: process_name
analytic_story:
- Cisco Network Visibility Module Analytics
asset_type: Endpoint
mitre_attack_id:
- T1059.005
- T1204.002
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: search
`cisco_network_visibility_module_flowdata`
parent_process_name IN ("explorer.exe", "winrar.exe", "7zFM.exe")
process_name IN ("wscript.exe", "cscript.exe")
process_arguments = "*\\AppData\\Local\\Temp\\*"
process_arguments IN ("*\\rar*", "*\\7z*", "*.zip*")
Stage 2: stats
| stats
count
min(_time) as firstTime
max(_time) as lastTime
values(parent_process_arguments) as parent_process_arguments
values(process_arguments) as process_arguments
values(parent_process_hash) as parent_process_hash
values(process_hash) as process_hash
values(module_name_list) as module_name_list
values(module_hash_list) as module_hash_list
values(dest_port) as dest_port
values(aliul) as additional_logged_in_users_list
values(dest_hostname) as dest_hostname
by
src
dest
parent_process_path
parent_process_name
parent_process_integrity_level
process_path
process_name
process_integrity_level
process_id
transport
Stage 3: search
| `security_content_ctime(firstTime)`
Stage 4: search
| `security_content_ctime(lastTime)`
Stage 5: table
| table
parent_process_integrity_level parent_process_name parent_process_path parent_process_arguments
parent_process_hash
process_integrity_level process_path process_name process_arguments process_hash process_id
additional_logged_in_users_list module_name_list module_hash_list
src dest_hostname dest dest_port transport firstTime lastTime
Stage 6: search
| `cisco_nvm___susp_script_from_archive_triggering_network_activity_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
parent_process_name | in |
| field:"parent_process_name" kind:in |
process_arguments | eq |
| field:"process_arguments" kind:eq value:"*\AppData\Local\Temp\*" |
process_arguments | in |
| field:"process_arguments" kind:in |
process_name | in |
| field:"process_name" kind:in |
sourcetype | in |
| field:"sourcetype" kind:in |
CMD Carry Out String Command Parameter
#The following analytic detects the use of cmd.exe /c to execute commands, a technique often employed by adversaries and malware to run batch commands or invoke other shells like PowerShell. This detection leverages data from Endpoint Detection and Response (EDR) agents, focusing on command-line executions and process metadata. Monitoring this activity is crucial as it can indicate script-based attacks or unauthorized command execution. If confirmed malicious, this behavior could lead to unauthorized code execution, privilege escalation, or persistence within the environment.
Known False Positives
- False positives may be high based on legitimate scripted code in any environment. Filter 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: CMD Carry Out String Command Parameter
id: 54a6ed00-3256-11ec-b031-acde48001122
version: 19
creation_date: '2021-10-21'
modification_date: '2026-05-13'
author: Teoderick Contreras, Bhavin Patel, Splunk
status: production
type: Hunting
description: The following analytic detects the use of `cmd.exe /c` to execute commands, a technique often employed by adversaries and malware to run batch commands or invoke other shells like PowerShell. This detection leverages data from Endpoint Detection and Response (EDR) agents, focusing on command-line executions and process metadata. Monitoring this activity is crucial as it can indicate script-based attacks or unauthorized command execution. If confirmed malicious, this behavior could lead to unauthorized code execution, privilege escalation, or persistence within the environment.
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 FROM datamodel=Endpoint.Processes
WHERE `process_cmd`
AND
Processes.process IN ("*/c*", "*/k*")
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)`
| `cmd_carry_out_string_command_parameter_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: False positives may be high based on legitimate scripted code in any environment. Filter as needed.
references:
- https://thedfirreport.com/2021/10/18/icedid-to-xinglocker-ransomware-in-24-hours/
- https://www.microsoft.com/security/blog/2022/01/15/destructive-malware-targeting-ukrainian-organizations/
analytic_story:
- StealC Stealer
- PlugX
- Warzone RAT
- Data Destruction
- Winter Vivern
- WhisperGate
- ProxyNotShell
- DarkGate Malware
- Chaos Ransomware
- Hermetic Wiper
- Quasar RAT
- Rhysida Ransomware
- DarkCrystal RAT
- Qakbot
- IcedID
- CISA AA23-347A
- Azorult
- Living Off The Land
- Crypto Stealer
- Malicious Inno Setup Loader
- NjRAT
- AsyncRAT
- RedLine Stealer
- Log4Shell CVE-2021-44228
- Interlock Rat
- 0bj3ctivity Stealer
- Gh0st RAT
asset_type: Endpoint
cve:
- CVE-2021-44228
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`
min(_time) as firstTime
max(_time) as lastTime
FROM datamodel=Endpoint.Processes
WHERE `process_cmd`
AND
Processes.process IN ("*/c*", "*/k*")
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
| `cmd_carry_out_string_command_parameter_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Processes.original_file_name | eq |
| field:"OriginalFileName" kind:eq value:"Cmd.Exe" |
Processes.process | in |
| field:"CommandLine" kind:in |
Processes.process_name | eq |
| field:"process_basename" kind:eq value:"cmd.exe" |
Disable Registry Tool
#The following analytic detects modifications to the Windows registry aimed at disabling the Registry Editor (regedit). It leverages data from the Endpoint.Registry data model, specifically monitoring changes to the registry path "*\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools" with a value of "0x00000001". This activity is significant because malware, such as RATs or trojans, often disable registry tools to prevent the removal of their entries, aiding in persistence and defense evasion. If confirmed malicious, this could hinder incident response efforts and allow the attacker to maintain control over the compromised system.
Known False Positives
- admin may disable this application for non technical user.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Defense Impairment |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 13: RegistryEvent (Value Set) |
Rule Body
name: Disable Registry Tool
id: cd2cf33c-9201-11eb-a10a-acde48001122
version: 17
creation_date: '2021-03-31'
modification_date: '2026-05-13'
author: Teoderick Contreras, Splunk, Steven Dick
status: production
type: TTP
description: The following analytic detects modifications to the Windows registry aimed at disabling the Registry Editor (regedit). It leverages data from the Endpoint.Registry data model, specifically monitoring changes to the registry path "*\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableRegistryTools" with a value of "0x00000001". This activity is significant because malware, such as RATs or trojans, often disable registry tools to prevent the removal of their entries, aiding in persistence and defense evasion. If confirmed malicious, this could hinder incident response efforts and allow the attacker to maintain control over the compromised system.
data_source:
- Sysmon EventID 13
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry WHERE (Registry.registry_path= "*\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableRegistryTools" Registry.registry_value_data = "0x00000001") by Registry.action Registry.dest Registry.process_guid Registry.process_id Registry.registry_hive Registry.registry_path Registry.registry_key_name Registry.registry_value_data Registry.registry_value_name Registry.registry_value_type Registry.status Registry.user Registry.vendor_product | `drop_dm_object_name(Registry)`| where isnotnull(registry_value_data) | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `disable_registry_tool_filter`'
how_to_implement: To successfully implement this search, you need to be ingesting logs with the registry value name, registry path, and registry value data from your endpoints. If you are using Sysmon, you must have at least version 2.0 of the official Sysmon TA. https://splunkbase.splunk.com/app/5709
known_false_positives: admin may disable this application for non technical user.
references:
- https://any.run/report/ea4ea08407d4ee72e009103a3b77e5a09412b722fdef67315ea63f22011152af/a866d7b1-c236-4f26-a391-5ae32213dfc4#registry
finding:
title: Disabled Registry Tools on $dest$
entity:
field: dest
type: system
score: 50
analytic_story:
- Windows Defense Evasion Tactics
- Windows Registry Abuse
- NjRAT
asset_type: Endpoint
mitre_attack_id:
- T1112
- T1685
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: tstats
| tstats `security_content_summariesonly`
count
min(_time) as firstTime
max(_time) as lastTime
FROM datamodel=Endpoint.Registry
WHERE (
Registry.registry_path= "*\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableRegistryTools"
Registry.registry_value_data = "0x00000001"
)
by
Registry.action
Registry.dest
Registry.process_guid
Registry.process_id
Registry.registry_hive
Registry.registry_path
Registry.registry_key_name
Registry.registry_value_data
Registry.registry_value_name
Registry.registry_value_type
Registry.status
Registry.user
Registry.vendor_product
Stage 2: search
| `drop_dm_object_name(Registry)`
Stage 3: where
| where isnotnull(registry_value_data)
Stage 4: search
| `security_content_ctime(firstTime)`
Stage 5: search
| `security_content_ctime(lastTime)`
Stage 6: search
| `disable_registry_tool_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Registry.registry_path | eq |
| field:"registry_path" kind:eq value:"*\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools" |
Registry.registry_value_data | eq |
| field:"Details" kind:eq value:"0x00000001" |
registry_value_data | is_not_null | field:"Details" kind:is_not_null |
DLL Concatenation (PowerShell)
#Threat actors were observed using Impacket to concatenate the malicious proxy tool Stowaway (msoe.dll) with all DLLs starting with 'd' from the system32 directory into a single DLL (appmgmt.dll) to pad and obfuscate the malicious DLL, thereby facilitating its deployment and evasion. This use case detects copy commands followed by either *.dll or multiple .dll references, indicating possible attempts to concatenate multiple DLLs into a single file. NOTE: For commands using 'copy' or 'type', they must be executed in a way that creates a new process, e.g. with cmd /c or powershell -c, as they are built-in commands that run within the current cmd session and do not create new processes on their own.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
References
Telemetry Coverage
Rule Body
id: '33834.59907'
title: DLL Concatenation
description: 'Threat actors were observed using Impacket to concatenate the malicious
proxy tool Stowaway (msoe.dll) with all DLLs starting with ''d'' from the system32
directory into a single DLL (appmgmt.dll) to pad and obfuscate the malicious DLL,
thereby facilitating its deployment and evasion. This use case detects copy commands
followed by either *.dll or multiple .dll references, indicating possible attempts
to concatenate multiple DLLs into a single file. NOTE: For commands using ''copy''
or ''type'', they must be executed in a way that creates a new process, e.g. with
cmd /c or powershell -c, as they are built-in commands that run within the current
cmd session and do not create new processes on their own.'
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(copy) OR TERM(robocopy)
OR TERM(xcopy) OR ((TERM(type) OR TERM(Get-Content) OR "gc" OR "cat" OR TERM(more))
">")) ".dll" | regex process="(?i)(copy|more|Get-Content|type|cat|gc)\s+.*?((\/b\s+\S+\.dll\s+\+\s*\S+\.dll)|(\*\.dll\s+\S+)|(\.dll.*\.dll))"
| table _time, host, user, process, signature_id | bin span=1s | stats values(*)
as * by _time, host '
techniques:
- defense-evasion:masquerading
- defense-evasion:obfuscated files or information:binary padding
technique_id:
- T1036
- T1027.001
data_category:
- PowerShell logs
references:
- https://attack.mitre.org/techniques/T1027/001/
- https://news.sophos.com/en-us/2024/06/05/operation-crimson-palace-a-technical-deep-dive/
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(copy) OR TERM(robocopy) OR TERM(xcopy) OR ((TERM(type) OR TERM(Get-Content) OR "gc" OR "cat" OR TERM(more)) ">")) ".dll"
Stage 2: regex
| regex
process="(?i)(copy|more|Get-Content|type|cat|gc)\s+.*?((\/b\s+\S+\.dll\s+\+\s*\S+\.dll)|(\*\.dll\s+\S+)|(\.dll.*\.dll))"
Stage 3: table
| table _time, host, user, process, signature_id
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 |
process | regex_match |
| field:"CommandLine" kind:regex_match value:"(?i)(copy|more|Get-Content|type|cat|gc)\s+.*?((\/b\s+\S+.dll\s++\s*\S+.dll)|(*.dll\s+\S+)|(.dll.*.dll))" |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>4103<" |
| 1 | "<EventID>4104<" |
| 1 | copy |
| 1 | robocopy |
| 1 | xcopy |
| 1 | type |
| 1 | "Get-Content" |
| 1 | "gc" |
| 1 | "cat" |
| 1 | more |
| 1 | ">" |
| 1 | ".dll" |
Expand.exe Execution (Sysmon)
#expand.exe is a legitimate Windows utility used to extract files from compressed .cab archives. Threat actors have been observed abusing expand.exe to unpack malicious payloads hidden within .cab files on compromised systems. This use case detects expand.exe executions with .cab file extensions or references to suspicious path locations. Allowlisting expected processes with full file paths and command lines where possible is recommended for best fidelity
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth | |
| Command & Control |
References
- https://lolbas-project.github.io/lolbas/Binaries/Expand/
- https://github.com/SigmaHQ/sigma/blob/c04bef2fbbe8beff6c7620d5d7ea6872dbe7acba/rules/windows/process_creation/proc_creation_win_expand_cabinet_files.yml
- https://www.threatdown.com/blog/new-variant-of-konni-malware-used-in-campaign-targetting-russia/
- https://www.sygnia.co/blog/ghost-emperor-demodex-rootkit/
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
id: '35367.62200'
title: Expand.exe Execution
description: expand.exe is a legitimate Windows utility used to extract files from
compressed .cab archives. Threat actors have been observed abusing expand.exe to
unpack malicious payloads hidden within .cab files on compromised systems. This
use case detects expand.exe executions with .cab file extensions or references to
suspicious path locations. Allowlisting expected processes with full file paths
and command lines where possible is recommended for best fidelity. 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<")
"expand.exe" (".cab" OR "/F:" OR "-F:" OR "\\ProgramData" OR "\\Public" OR "\\AppData\\Local\\Temp\\"
OR "\\AppData\\Roaming\\Temp\\") | where match(process_name, "(?i)expand\.exe")
and match(process, "(?i)\.cab|(-|\/)F:|\x5cAppData\x5c|(Local|Roaming)\x5cTemp\x5c")
and not (match(parent_process_path, "(?i):\x5cProgram\sFiles\s\(x86\)\x5cDell\x5cUpdateService\x5cServiceShell\.exe")
and match(process, "(?i):\x5cProgramData\x5cDell\x5cUpdateService\x5cTemp\x5c"))
| table _time, host, user, signature_id, process, process_*, parent_* | bin span=1s
| stats values(*) as * by _time, host '
techniques:
- command-and-control:ingress tool transfer
- defense-evasion:hide artifacts:ntfs file attributes
technique_id:
- T1105
- T1564.004
data_category:
- Windows Sysmon
references:
- https://lolbas-project.github.io/lolbas/Binaries/Expand/
- https://github.com/SigmaHQ/sigma/blob/c04bef2fbbe8beff6c7620d5d7ea6872dbe7acba/rules/windows/process_creation/proc_creation_win_expand_cabinet_files.yml
- https://www.threatdown.com/blog/new-variant-of-konni-malware-used-in-campaign-targetting-russia/
- https://www.sygnia.co/blog/ghost-emperor-demodex-rootkit/
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<") "expand.exe" (".cab" OR "/F:" OR "-F:" OR "\\ProgramData" OR "\\Public" OR "\\AppData\\Local\\Temp\\" OR "\\AppData\\Roaming\\Temp\\")
Stage 2: where
| where match(process_name, "(?i)expand\.exe")
and match(process, "(?i)\.cab|(-|\/)F:|\x5cAppData\x5c|(Local|Roaming)\x5cTemp\x5c") and not (
match(
parent_process_path,
"(?i):\x5cProgram\sFiles\s\(x86\)\x5cDell\x5cUpdateService\x5cServiceShell\.exe"
)
and match(process, "(?i):\x5cProgramData\x5cDell\x5cUpdateService\x5cTemp\x5c")
)
Stage 3: table
| table _time, host, user, signature_id, process, process_*, parent_*
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 | regex_match |
| field:"CommandLine" kind:regex_match |
process_name | regex_match |
| field:"process_name" kind:regex_match value:"(?i)expand.exe" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
parent_process_path | regex_match | (?i):\x5cProgram\sFiles\s(x86)\x5cDell\x5cUpdateService\x5cServiceShell.exe | excludes:parent_process_path field:"parent_process_path" value:"(?i):\x5cProgram\sFiles\s(x86)\x5cDell\x5cUpdateService\x5cServiceShell.exe" |
process | regex_match | (?i):\x5cProgramData\x5cDell\x5cUpdateService\x5cTemp\x5c | excludes:process field:"process" value:"(?i):\x5cProgramData\x5cDell\x5cUpdateService\x5cTemp\x5c" |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>1<" |
| 1 | "expand.exe" |
| 1 | ".cab" |
| 1 | "/F:" |
| 1 | "-F:" |
| 1 | "\\ProgramData" |
| 1 | "\\Public" |
| 1 | "\\AppData\\Local\\Temp\\" |
| 1 | "\\AppData\\Roaming\\Temp\\" |
Get-ForestTrust with PowerShell
#The following analytic detects the execution of the Get-ForestTrust command via PowerShell, commonly used by adversaries to gather domain trust information. This detection leverages data from Endpoint Detection and Response (EDR) agents, focusing on process names and command-line executions. Identifying this activity is crucial as it indicates potential reconnaissance efforts to map out domain trusts, which can inform further attacks. If confirmed malicious, this activity could allow attackers to understand domain relationships, aiding in lateral movement and privilege escalation within the network.
Known False Positives
- Limited false positives as this requires an active Administrator or adversary to bring in, import, and execute.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery |
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: Get-ForestTrust with PowerShell
id: 584f4884-0bf1-11ec-a5ec-acde48001122
version: 10
creation_date: '2021-09-02'
modification_date: '2026-05-13'
author: Michael Haag, Splunk
status: production
type: TTP
description: The following analytic detects the execution of the Get-ForestTrust command via PowerShell, commonly used by adversaries to gather domain trust information. This detection leverages data from Endpoint Detection and Response (EDR) agents, focusing on process names and command-line executions. Identifying this activity is crucial as it indicates potential reconnaissance efforts to map out domain trusts, which can inform further attacks. If confirmed malicious, this activity could allow attackers to understand domain relationships, aiding in lateral movement and privilege escalation within the network.
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=powershell.exe
OR
Processes.process_name=cmd.exe Processes.process=*get-foresttrust*
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)`
| `get_foresttrust_with_powershell_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: Limited false positives as this requires an active Administrator or adversary to bring in, import, and execute.
references:
- https://powersploit.readthedocs.io/en/latest/Recon/Get-ForestTrust/
finding:
title: Suspicious PowerShell Get-ForestTrust was identified on endpoint $dest$ by user $user$.
entity:
field: user
type: user
score: 50
intermediate_findings:
entities:
- field: dest
type: system
score: 50
message: Suspicious PowerShell Get-ForestTrust was identified on endpoint $dest$ by user $user$.
analytic_story:
- Active Directory Discovery
asset_type: Endpoint
mitre_attack_id:
- T1482
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=powershell.exe
OR
Processes.process_name=cmd.exe Processes.process=*get-foresttrust*
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
| `get_foresttrust_with_powershell_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Processes.process | eq |
| field:"CommandLine" kind:eq value:"*get-foresttrust*" |
Processes.process_name | eq |
| field:"process_basename" kind:eq |
HTTP Scripting Tool User Agent
#This Splunk query analyzes web access logs to identify and categorize non-browser user agents, detecting various types of security tools, scripting languages, automation frameworks, and suspicious patterns. This activity can signify malicious actors attempting to interact with web endpoints in non-standard ways.
Known False Positives
- False positives may be present if the activity is part of diagnostics or testing. Filter as needed.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Rule Body
name: HTTP Scripting Tool User Agent
id: 04430b4e-5ca8-4e88-98b5-d6bcf54f8393
version: 6
creation_date: '2025-10-21'
modification_date: '2026-06-15'
author: Raven Tait, Splunk
status: production
type: Anomaly
description: This Splunk query analyzes web access logs to identify and categorize non-browser user agents, detecting various types of security tools, scripting languages, automation frameworks, and suspicious patterns. This activity can signify malicious actors attempting to interact with web endpoints in non-standard ways.
data_source:
- Nginx Access
search: |-
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime
from datamodel=Web where
Web.http_user_agent =*
NOT Web.http_user_agent IN (
"-",
"unknown"
)
by Web.http_user_agent Web.dest Web.src Web.status
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `drop_dm_object_name(Web)`
| eval http_user_agent = lower(http_user_agent)
| lookup scripting_tools_user_agents tool_user_agent AS http_user_agent OUTPUT tool
| where isnotnull(tool)
| stats count
min(firstTime) as first_seen
max(lastTime) as last_seen
values(tool) as tool
by http_user_agent dest src status
| `security_content_ctime(first_seen)`
| `security_content_ctime(last_seen)`
| `http_scripting_tool_user_agent_filter`
how_to_implement: This analytic necessitates the collection of web data, which can be achieved through Splunk Stream or by utilizing the Splunk Add-on for Apache Web Server. No additional configuration is required for this analytic.
known_false_positives: False positives may be present if the activity is part of diagnostics or testing. Filter as needed.
references:
- https://portswigger.net/web-security/request-smuggling#what-is-http-request-smuggling
- https://portswigger.net/research/http1-must-die
- https://www.vaadata.com/blog/what-is-http-request-smuggling-exploitations-and-security-best-practices/
- https://www.securityweek.com/new-http-request-smuggling-attacks-impacted-cdns-major-orgs-millions-of-websites/
- https://github.com/SigmaHQ/sigma/blob/master/rules/web/proxy_generic/proxy_ua_hacktool.yml
- https://help.aikido.dev/zen-firewall/miscellaneous/bot-protection-details
intermediate_findings:
entities:
- field: dest
type: system
score: 20
message: Known scripting tool was used against a web request. The source IP/Host is $src$ and the destination is $dest$.
threat_objects:
- field: src
type: ip_address
- field: http_user_agent
type: http_user_agent
analytic_story:
- HTTP Request Smuggling
- Suspicious User Agents
asset_type: Network
mitre_attack_id:
- T1071.001
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: web
security_domain: network
Stages and Predicates
Stage 1: tstats
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime
from datamodel=Web where
Web.http_user_agent =*
NOT Web.http_user_agent IN (
"-",
"unknown"
)
by Web.http_user_agent Web.dest Web.src Web.status
Stage 2: search
| `security_content_ctime(firstTime)`
Stage 3: search
| `security_content_ctime(lastTime)`
Stage 4: search
| `drop_dm_object_name(Web)`
Stage 5: eval
| eval http_user_agent = lower(http_user_agent)
Stage 6: lookup
| lookup scripting_tools_user_agents tool_user_agent AS http_user_agent OUTPUT tool
Stage 7: where
| where isnotnull(tool)
Stage 8: stats
| stats count
min(firstTime) as first_seen
max(lastTime) as last_seen
values(tool) as tool
by http_user_agent dest src status
Stage 9: search
| `security_content_ctime(first_seen)`
Stage 10: search
| `security_content_ctime(last_seen)`
Stage 11: search
| `http_scripting_tool_user_agent_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Web.http_user_agent | eq |
| field:"c-useragent" kind:eq value:"*" |
tool | is_not_null | field:"tool" kind:is_not_null |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
Web.http_user_agent | in | -, unknown | excludes:Web.http_user_agent field:"Web.http_user_agent" value:"-" field:"Web.http_user_agent" value:"unknown" |
Kubernetes Anomalous Inbound Outbound Network IO
#The following analytic identifies high inbound or outbound network I/O anomalies in Kubernetes containers. It leverages process metrics from an OTEL collector and Kubelet Stats Receiver, along with data from Splunk Observability Cloud. A lookup table with average and standard deviation values for network I/O is used to detect anomalies persisting over a 1-hour period. This activity is significant as it may indicate data exfiltration, command and control communication, or unauthorized data transfers. If confirmed malicious, it could lead to data breaches, service outages, financial losses, and reputational damage.
Known False Positives
- No false positives have been identified at this time.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Rule Body
name: Kubernetes Anomalous Inbound Outbound Network IO
id: 4f3b0c97-657e-4547-a89a-9a50c656e3cd
version: 9
creation_date: '2024-01-10'
modification_date: '2026-05-13'
author: Matthew Moore, Splunk
status: experimental
type: Anomaly
description: The following analytic identifies high inbound or outbound network I/O anomalies in Kubernetes containers. It leverages process metrics from an OTEL collector and Kubelet Stats Receiver, along with data from Splunk Observability Cloud. A lookup table with average and standard deviation values for network I/O is used to detect anomalies persisting over a 1-hour period. This activity is significant as it may indicate data exfiltration, command and control communication, or unauthorized data transfers. If confirmed malicious, it could lead to data breaches, service outages, financial losses, and reputational damage.
data_source: []
search: "| mstats avg(k8s.pod.network.io) as io where `kubernetes_metrics` by k8s.cluster.name k8s.pod.name k8s.node.name direction span=10s | eval service = replace('k8s.pod.name', \"-\\w{5}$$|-[abcdef0-9]{8,10}-\\w{5}$$\", \"\") | stats avg(eval(if(direction=\"transmit\", io,null()))) as outbound_network_io avg(eval(if(direction=\"receive\", io,null()))) as inbound_network_io by k8s.cluster.name k8s.node.name k8s.pod.name service _time | eval key = 'k8s.cluster.name' + \":\" + 'service' | lookup k8s_container_network_io_baseline key | eval anomalies = \"\" | foreach stdev_* [ eval anomalies =if( '<<MATCHSTR>>' > ('avg_<<MATCHSTR>>' + 4 * 'stdev_<<MATCHSTR>>'), anomalies + \"<<MATCHSTR>> higher than average by \" + tostring(round(('<<MATCHSTR>>' - 'avg_<<MATCHSTR>>')/'stdev_<<MATCHSTR>>' ,2)) + \" Standard Deviations. <<MATCHSTR>>=\" + tostring('<<MATCHSTR>>') + \" avg_<<MATCHSTR>>=\" + tostring('avg_<<MATCHSTR>>') + \" 'stdev_<<MATCHSTR>>'=\" + tostring('stdev_<<MATCHSTR>>') + \", \" , anomalies) ] | eval anomalies = replace(anomalies, \",\\s$$\", \"\") | where anomalies!=\"\" | stats count values(anomalies) as anomalies by k8s.cluster.name k8s.node.name k8s.pod.name service | rename service as k8s.service | where count > 5 | rename k8s.node.name as host | `kubernetes_anomalous_inbound_outbound_network_io_filter`"
how_to_implement: "To implement this detection, follow these steps:\n* Deploy the OpenTelemetry Collector (OTEL) to your Kubernetes cluster.\n* Enable the hostmetrics/process receiver in the OTEL configuration.\n* Ensure that the process metrics, specifically Process.cpu.utilization and process.memory.utilization, are enabled.\n* Install the Splunk Infrastructure Monitoring (SIM) add-on. (ref: https://splunkbase.splunk.com/app/5247)\n * Configure the SIM add-on with your Observability Cloud Organization ID and Access Token.\n* Set up the SIM modular input to ingest Process Metrics. Name this input \"sim_process_metrics_to_metrics_index\".\n* In the SIM configuration, set the Organization ID to your Observability Cloud Organization ID.\n* Set the Signal Flow Program to the following: data('process.threads').publish(label='A'); data('process.cpu.utilization').publish(label='B'); data('process.cpu.time').publish(label='C'); data('process.disk.io').publish(label='D'); data('process.memory.usage').publish(label='E'); data('process.memory.virtual').publish(label='F'); data('process.memory.utilization').publish(label='G'); data('process.cpu.utilization').publish(label='H'); data('process.disk.operations').publish(label='I'); data('process.handles').publish(label='J'); data('process.threads').publish(label='K')\n* Set the Metric Resolution to 10000.\n * Leave all other settings at their default values.\n* Run the Search Baseline Of Kubernetes Container Network IO Ratio"
known_false_positives: No false positives have been identified at this time.
references:
- https://github.com/signalfx/splunk-otel-collector-chart
intermediate_findings:
entities:
- field: host
type: system
score: 20
message: Kubernetes Anomalous Inbound Outbound Network IO from container on host $host$
analytic_story:
- Abnormal Kubernetes Behavior using Splunk Infrastructure Monitoring
asset_type: Kubernetes
mitre_attack_id:
- T1204
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: cloud
security_domain: network
baselines:
- Baseline Of Kubernetes Container Network IO
Stages and Predicates
Stage 1: search
| mstats avg(k8s.pod.network.io) as io where `kubernetes_metrics` by k8s.cluster.name k8s.pod.name k8s.node.name direction span=10s
Stage 2: eval
| eval service = replace('k8s.pod.name', "-\w{5}$$|-[abcdef0-9]{8,10}-\w{5}$$", "")
Stage 3: stats
| stats
avg(eval(if(direction="transmit", io,null()))) as outbound_network_io
avg(eval(if(direction="receive", io,null()))) as inbound_network_io
by k8s.cluster.name k8s.node.name k8s.pod.name service _time
Stage 4: eval
| eval key = 'k8s.cluster.name' + ":" + 'service'
Stage 5: lookup
| lookup k8s_container_network_io_baseline key
Stage 6: eval
| eval anomalies = ""
Stage 7: search
| foreach stdev_*
[
eval
anomalies =if(
'<<MATCHSTR>>' > ('avg_<<MATCHSTR>>' + 4 * 'stdev_<<MATCHSTR>>'),
anomalies + "<<MATCHSTR>> higher than average by " + tostring(
round(('<<MATCHSTR>>' - 'avg_<<MATCHSTR>>')/'stdev_<<MATCHSTR>>' ,2)
) + " Standard Deviations. <<MATCHSTR>>=" + tostring('<<MATCHSTR>>') + " avg_<<MATCHSTR>>=" + tostring(
'avg_<<MATCHSTR>>'
) + " 'stdev_<<MATCHSTR>>'=" + tostring('stdev_<<MATCHSTR>>') + ", ",
anomalies
)
]
Stage 8: eval
| eval anomalies = replace(anomalies, ",\s$$", "")
Stage 9: where
| where anomalies!=""
Stage 10: stats
| stats count values(anomalies) as anomalies by k8s.cluster.name k8s.node.name k8s.pod.name service
Stage 11: rename
| rename service as k8s.service
Stage 12: where
| where count > 5
Stage 13: rename
| rename k8s.node.name as host
Stage 14: search
| `kubernetes_anomalous_inbound_outbound_network_io_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
count | gt |
| field:"count" kind:gt value:"5" |
span | eq |
| field:"span" kind:eq value:"10s" |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | mstats |
| 1 | avg |
| 1 | k8s.pod.network.io |
| 1 | as |
| 1 | io |
| 1 | where |
| 1 | by |
| 1 | direction |
| 1 | k8s.cluster.name |
| 1 | k8s.pod.name |
| 1 | k8s.node.name |
| 7 | foreach |
| 7 | stdev_* |
Linux Auditd Shred Overwrite Command
#The following analytic detects the execution of the 'shred' command on a Linux machine, which is used to overwrite files to make them unrecoverable. It leverages data from Linux Auditd, focusing on process names and command-line arguments. This activity is significant because the 'shred' command can be used in destructive attacks, such as those seen in the Industroyer2 malware targeting energy facilities. If confirmed malicious, this activity could lead to the permanent destruction of critical files, severely impacting system integrity and data availability.
Known False Positives
- Administrator or network operator can use this application for automation purposes. Please update the filter macros to remove false positives.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Impact |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Linux | auditd PROCTITLE record: Process Title info |
Rule Body
name: Linux Auditd Shred Overwrite Command
id: ce2bde4d-a1d4-4452-8c87-98440e5adfb3
version: 9
creation_date: '2024-08-12'
modification_date: '2026-05-13'
author: Teoderick Contreras, Splunk
status: production
type: TTP
description: The following analytic detects the execution of the 'shred' command on a Linux machine, which is used to overwrite files to make them unrecoverable. It leverages data from Linux Auditd, focusing on process names and command-line arguments. This activity is significant because the 'shred' command can be used in destructive attacks, such as those seen in the Industroyer2 malware targeting energy facilities. If confirmed malicious, this activity could lead to the permanent destruction of critical files, severely impacting system integrity and data availability.
data_source:
- Linux Auditd Proctitle
search: |-
`linux_auditd` proctitle IN ("*shred*") AND proctitle IN ("*-n*", "*-z*", "*-u*", "*-s*")
| rename host as dest
| stats count min(_time) as firstTime max(_time) as lastTime
BY proctitle dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `linux_auditd_shred_overwrite_command_filter`
how_to_implement: To implement this detection, the process begins by ingesting auditd data, that consist SYSCALL, TYPE, EXECVE and PROCTITLE events, which captures command-line executions and process details on Unix/Linux systems. These logs should be ingested and processed using Splunk Add-on for Unix and Linux (https://splunkbase.splunk.com/app/833), which is essential for correctly parsing and categorizing the data. The next step involves normalizing the field names to match the field names set by the Splunk Common Information Model (CIM) to ensure consistency across different data sources and enhance the efficiency of data modeling. This approach enables effective monitoring and detection of linux endpoints where auditd is deployed
known_false_positives: Administrator or network operator can use this application for automation purposes. Please update the filter macros to remove false positives.
references:
- https://www.welivesecurity.com/2022/04/12/industroyer2-industroyer-reloaded/
- https://cert.gov.ua/article/39518
finding:
title: A [$proctitle$] event occurred on host - [$dest$] to overwrite files using the shred utility.
entity:
field: dest
type: system
score: 50
analytic_story:
- AwfulShred
- Linux Privilege Escalation
- Data Destruction
- Linux Persistence Techniques
- Industroyer2
- Compromised Linux Host
asset_type: Endpoint
mitre_attack_id:
- T1485
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: search
`linux_auditd` proctitle IN ("*shred*") AND proctitle IN ("*-n*", "*-z*", "*-u*", "*-s*")
Stage 2: rename
| rename host as dest
Stage 3: stats
| stats count min(_time) as firstTime max(_time) as lastTime
BY proctitle dest
Stage 4: search
| `security_content_ctime(firstTime)`
Stage 5: search
| `security_content_ctime(lastTime)`
Stage 6: search
| `linux_auditd_shred_overwrite_command_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
proctitle | in |
| field:"proctitle" kind:in |
sourcetype | eq |
| field:"sourcetype" kind:eq value:"auditd" |
Linux Octave Privilege Escalation
#The following analytic detects the execution of GNU Octave with elevated privileges, specifically when it runs system commands via sudo. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on process command-line arguments that include "octave-cli," "--eval," "system," and "sudo." This activity is significant because it indicates a potential privilege escalation attempt, allowing a user to execute commands as root. If confirmed malicious, this could lead to full system compromise, enabling an attacker to gain root access and execute arbitrary commands, severely impacting system security and integrity.
Known False Positives
- False positives may be present, filter as needed.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Linux | Event ID 1: Process Create |
Rule Body
name: Linux Octave Privilege Escalation
id: 78f7487d-42ce-4f7f-8685-2159b25fb477
version: 13
creation_date: '2022-08-10'
modification_date: '2026-05-13'
author: Gowthamaraj Rajendran, Splunk
status: production
type: Anomaly
description: The following analytic detects the execution of GNU Octave with elevated privileges, specifically when it runs system commands via sudo. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on process command-line arguments that include "octave-cli," "--eval," "system," and "sudo." This activity is significant because it indicates a potential privilege escalation attempt, allowing a user to execute commands as root. If confirmed malicious, this could lead to full system compromise, enabling an attacker to gain root access and execute arbitrary commands, severely impacting system security and integrity.
data_source:
- Sysmon for Linux EventID 1
search: |-
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes
WHERE Processes.process="*octave-cli*"
AND
Processes.process="*--eval*"
AND
Processes.process="*system*"
AND
Processes.process="*sudo*"
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)`
| `linux_octave_privilege_escalation_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: False positives may be present, filter as needed.
references:
- https://gtfobins.github.io/gtfobins/octave/
- https://en.wikipedia.org/wiki/GNU_Octave
intermediate_findings:
entities:
- field: dest
type: system
score: 20
message: An instance of $parent_process_name$ spawning $process_name$ was identified on endpoint $dest$
threat_objects:
- field: parent_process_name
type: parent_process_name
- field: process_name
type: process_name
analytic_story:
- Linux Privilege Escalation
- Linux Living Off The Land
asset_type: Endpoint
mitre_attack_id:
- T1548.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="*octave-cli*"
AND
Processes.process="*--eval*"
AND
Processes.process="*system*"
AND
Processes.process="*sudo*"
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
| `linux_octave_privilege_escalation_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Processes.process | eq |
| field:"CommandLine" kind:eq |
Linux PHP Privilege Escalation
#The following analytic detects the execution of PHP commands with elevated privileges on a Linux system. It identifies instances where PHP is used in conjunction with 'sudo' and 'system' commands, indicating an attempt to run system commands as the root user. This detection leverages data from Endpoint Detection and Response (EDR) agents, focusing on process command-line arguments. This activity is significant because it can indicate an attempt to escalate privileges, potentially leading to full root access. If confirmed malicious, this could allow an attacker to execute arbitrary commands with root privileges, compromising the entire system.
Known False Positives
- False positives may be present, filter as needed.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Linux | Event ID 1: Process Create |
Rule Body
name: Linux PHP Privilege Escalation
id: 4fc4c031-e5be-4cc0-8cf9-49f9f507bcb5
version: 13
creation_date: '2022-08-10'
modification_date: '2026-05-13'
author: Gowthamaraj Rajendran, Splunk
status: production
type: Anomaly
description: The following analytic detects the execution of PHP commands with elevated privileges on a Linux system. It identifies instances where PHP is used in conjunction with 'sudo' and 'system' commands, indicating an attempt to run system commands as the root user. This detection leverages data from Endpoint Detection and Response (EDR) agents, focusing on process command-line arguments. This activity is significant because it can indicate an attempt to escalate privileges, potentially leading to full root access. If confirmed malicious, this could allow an attacker to execute arbitrary commands with root privileges, compromising the entire system.
data_source:
- Sysmon for Linux EventID 1
search: |-
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes
WHERE Processes.process="*php*-r*"
AND
Processes.process="*system*"
AND
Processes.process="*sudo*"
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)`
| `linux_php_privilege_escalation_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: False positives may be present, filter as needed.
references:
- https://gtfobins.github.io/gtfobins/php/
- https://en.wikipedia.org/wiki/PHP
intermediate_findings:
entities:
- field: dest
type: system
score: 20
message: An instance of $parent_process_name$ spawning $process_name$ was identified on endpoint $dest$
threat_objects:
- field: parent_process_name
type: parent_process_name
- field: process_name
type: process_name
analytic_story:
- Linux Privilege Escalation
- Linux Living Off The Land
asset_type: Endpoint
mitre_attack_id:
- T1548.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="*php*-r*"
AND
Processes.process="*system*"
AND
Processes.process="*sudo*"
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
| `linux_php_privilege_escalation_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Processes.process | eq |
| field:"CommandLine" kind:eq |
Named Pipe Created (Sysmon)
#This use case detects Sysmon events 17 and 18 which are generated when a named pipe is created or connected
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | |
| Stealth | |
| Command & Control |
References
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 17: PipeEvent (Pipe Created) |
| Sysmon | Event ID 18: PipeEvent (Pipe Connected) |
Rule Body
id: '20002.35589'
title: Named Pipe Created
description: 'This use case detects Sysmon events 17 and 18 which are generated when
a named pipe is created or connected. - Threat Actor Association: Earth Estries
- Software Association: Conti, Rhysida'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=17) OR TERM(EventCode=18)
OR "<EventID>17<" OR "<EventID>18<") ("CreatePipe" OR "ConnectPipe") | table _time,
host, user, process, process_*, parent_process_* | bin span=1s | stats values(*)
as * by _time, host '
techniques:
- command-and-control:protocol tunneling
- defense-evasion:process injection
- privilege-escalation:process injection
technique_id:
- T1572
- T1055
data_category:
- Windows Sysmon
references:
- https://redcanary.com/threat-detection-report/threats/cobalt-strike/
- https://www.youtube.com/watch?v=borfuQGrB8g&t=1783s
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=17) OR TERM(EventCode=18) OR "<EventID>17<" OR "<EventID>18<") ("CreatePipe" OR "ConnectPipe")
Stage 2: table
| table _time, host, user, process, process_*, parent_process_*
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>17<" |
| 1 | "<EventID>18<" |
| 1 | "CreatePipe" |
| 1 | "ConnectPipe" |
Network Connection with Suspicious Folder (Sysmon)
#Detects potential downloads to suspicious file locations like temp, appdata, and downloads
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 3: Network connection |
Rule Body
id: '9019.12092'
title: Network Connection with Suspicious Folder
description: 'Detects potential downloads to suspicious file locations like temp,
appdata, and downloads. - Threat Actor Association: Alloy Taurus/Gallium, Lazarus,
NewsPenguin, OilRig, TA413 - Software Association: LOWZERO, Vidar Stealer'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (EventCode=3 OR "Event>ID<3")
("Temporary Internet Files" OR TERM("TEMP") OR TERM("Downloads") OR TERM("Appdata"))
| regex process="(?i)Temp|Downloads|Appdata" | table _time, host, user dest, direction,
event_id, eventtype, parent_*, process, process_*, user, user_id, src_*, dest_*
| bin span=1s | stats values(*) as * by _time, host, process '
techniques:
- command-and-control:ingress tool transfer
technique_id:
- T1105
data_category:
- Process use of network
- Windows Sysmon
references: null
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` (EventCode=3 OR "Event>ID<3") ("Temporary Internet Files" OR TERM("TEMP") OR TERM("Downloads") OR TERM("Appdata"))
Stage 2: regex
| regex process="(?i)Temp|Downloads|Appdata"
Stage 3: table
| table _time, host, user dest, direction, event_id, eventtype, parent_*, process, process_*, user,
user_id, src_*, dest_*
Stage 4: bucket
| bin span=1s
Stage 5: stats
| stats values(*) as * by _time, host, process
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"3" |
process | regex_match |
| field:"CommandLine" kind:regex_match |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "Event>ID<3" |
| 1 | "Temporary Internet Files" |
| 1 | "\"TEMP\"" |
| 1 | "\"Downloads\"" |
| 1 | "\"Appdata\"" |
O365 Email Hard Delete Excessive Volume
#The following analytic identifies when an O365 email account hard deletes an excessive number of emails within a short period (within 1 hour). This behavior may indicate a compromised account where the threat actor is attempting to permanently purge a large amount of items from the mailbox. Threat actors may attempt to remove evidence of their activity by purging items from the compromised mailbox. --- Some account owner legitimate behaviors can trigger this alert, however these actions may not be aligned with organizational expectations / best practice behaviors.
Known False Positives
- Users that habitually/proactively cleaning the recoverable items folder may trigger this alert.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth | |
| Impact |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Microsoft 365 | HardDelete |
| Microsoft 365 | HardDelete |
Rules Detecting the Same Action
These rules filter on the same operation.
- M365 Exchange MFA Notification Email Deleted or Moved (Elastic)
- O365 Email Password and Payroll Compromise Behavior (Splunk)
- O365 Email Receive and Hard Delete Takeover Behavior (Splunk)
- O365 Email Send and Hard Delete Exfiltration Behavior (Splunk)
- O365 Email Send and Hard Delete Suspicious Behavior (Splunk)
Rule Body
name: O365 Email Hard Delete Excessive Volume
id: c7fe0949-348a-41ce-8f17-a09a7fe5fd7d
version: 6
creation_date: '2025-01-23'
modification_date: '2026-05-13'
author: Steven Dick
status: production
type: Anomaly
description: The following analytic identifies when an O365 email account hard deletes an excessive number of emails within a short period (within 1 hour). This behavior may indicate a compromised account where the threat actor is attempting to permanently purge a large amount of items from the mailbox. Threat actors may attempt to remove evidence of their activity by purging items from the compromised mailbox. --- Some account owner legitimate behaviors can trigger this alert, however these actions may not be aligned with organizational expectations / best practice behaviors.
data_source:
- Office 365 Universal Audit Log
search: |-
`o365_management_activity` Workload=Exchange (Operation IN ("HardDelete") AND Folder.Path IN ("\\Sent Items","\\Recoverable Items\\Deletions"))
| eval user = lower(UserId), sender = lower(CASE(isnotnull(SendAsUserSmtp),SendAsUserSmtp,isnotnull(SendOnBehalfOfUserSmtp),SendOnBehalfOfUserSmtp,true(),MailboxOwnerUPN)), subject = trim(CASE(Operation IN ("Send","SendAs","SendOnBehalf"),'Item.Subject',Operation IN ("SoftDelete","HardDelete"),'AffectedItems{}.Subject')), -time = _time,file_name = CASE(Operation IN ("Send","SendAs","SendOnBehalf"),split('Item.Attachments',"; "),Operation IN ("SoftDelete","HardDelete"),split('AffectedItems{}.Attachments',"; ")), file_size = CASE(Operation IN ("Send","SendAs","SendOnBehalf"),round(tonumber('Item.SizeInBytes')/1024/1024,2),true(),round(tonumber(replace(file_name, "(.+)\s\((\d+)(b\)$)", "\2"))/1024/1024,2))
| bin _time span=1hr
| stats values(sender) as sender, values(ClientIPAddress) as src, values(ClientInfoString) as http_user_agent, values(Operation) as signature, latest(file_name) as file_name, sum(file_size) as file_size, values(Folder.Path) as file_path, min(-time) as firstTime, max(-time) as lastTime, dc(subject) as count by _time,user
| where count > 50 OR file_size > 10
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `o365_email_hard_delete_excessive_volume_filter`
how_to_implement: You must install the Splunk Microsoft Office 365 Add-on and ingest Office 365 management activity events.
known_false_positives: Users that habitually/proactively cleaning the recoverable items folder may trigger this alert.
references:
- https://attack.mitre.org/techniques/T1114/
- https://www.hhs.gov/sites/default/files/help-desk-social-engineering-sector-alert-tlpclear.pdf
- https://intelligence.abnormalsecurity.com/attack-library/threat-actor-convincingly-impersonates-employee-requesting-direct-deposit-update-in-likely-ai-generated-attack
intermediate_findings:
entities:
- field: user
type: user
score: 20
message: The user $user$ deleted an excessing number of emails [$count$] within a short timeframe
threat_objects:
- field: src
type: ip_address
analytic_story:
- Office 365 Account Takeover
- Suspicious Emails
- Data Destruction
asset_type: O365 Tenant
mitre_attack_id:
- T1070.008
- T1485
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: cloud
security_domain: threat
Stages and Predicates
Stage 1: search
`o365_management_activity` Workload=Exchange (Operation IN ("HardDelete") AND Folder.Path IN ("\\Sent Items","\\Recoverable Items\\Deletions"))
Stage 2: eval
| eval user = lower(UserId),
sender = lower(
CASE(
isnotnull(SendAsUserSmtp), SendAsUserSmtp,
isnotnull(SendOnBehalfOfUserSmtp), SendOnBehalfOfUserSmtp,
true(), MailboxOwnerUPN
)
),
subject = trim(
CASE(
Operation IN ("Send","SendAs","SendOnBehalf"), 'Item.Subject',
Operation IN ("SoftDelete","HardDelete"), 'AffectedItems{}.Subject'
)
),
-time = _time,
file_name = CASE(
Operation IN ("Send","SendAs","SendOnBehalf"), split('Item.Attachments',"; "),
Operation IN ("SoftDelete","HardDelete"), split('AffectedItems{}.Attachments',"; ")
),
file_size = CASE(
Operation IN ("Send","SendAs","SendOnBehalf"),
round(tonumber('Item.SizeInBytes')/1024/1024,2),
true(), round(tonumber(replace(file_name, "(.+)\s\((\d+)(b\)$)", "\2"))/1024/1024,2)
)
file_size =in(Operation, "Send", "SendAs", "SendOnBehalf")round(<FUNCTION:divides>, 2)round(<FUNCTION:divides>, 2)Stage 3: bucket
| bin _time span=1hr
Stage 4: stats
| stats
values(sender) as sender,
values(ClientIPAddress) as src,
values(ClientInfoString) as http_user_agent,
values(Operation) as signature,
latest(file_name) as file_name,
sum(file_size) as file_size,
values(Folder.Path) as file_path,
min(-time) as firstTime,
max(-time) as lastTime,
dc(subject) as count
by _time,user
Stage 5: where
| where count > 50 OR file_size > 10
Stage 6: search
| `security_content_ctime(firstTime)`
Stage 7: search
| `security_content_ctime(lastTime)`
Stage 8: search
| `o365_email_hard_delete_excessive_volume_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Folder.Path | in |
| field:"m365::Folder.Path" kind:in |
Operation | in |
| field:"Operation" kind:in value:"HardDelete" |
Workload | eq |
| field:"Workload" kind:eq value:"Exchange" |
count | gt |
| field:"count" kind:gt value:"50" |
file_size | gt |
| field:"file_size" kind:gt value:"10" |
sourcetype | eq |
| field:"sourcetype" kind:eq value:"o365:management:activity" |
Okta Authentication Failed During MFA Challenge
#The following analytic identifies failed authentication attempts during the Multi-Factor Authentication (MFA) challenge in an Okta tenant. It uses the Authentication datamodel to detect specific failed events where the authentication signature is user.authentication.auth_via_mfa. This activity is significant as it may indicate an adversary attempting to authenticate with compromised credentials on an account with MFA enabled. If confirmed malicious, this could suggest an ongoing attempt to bypass MFA protections, potentially leading to unauthorized access and further compromise of the affected account.
Known False Positives
- A user may have accidentally entered the wrong credentials during the MFA challenge. If the user is new to MFA, they may have trouble authenticating. Ensure that the user is aware of the MFA process and has the correct credentials.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Resource Development | |
| Initial Access | |
| Persistence | |
| Privilege Escalation | |
| Stealth | |
| Credential Access |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Okta | System Log event type user.authentication.auth_via_mfa: User authenticated via MFA |
Rules Detecting the Same Action
These rules filter on the same operation.
- First Occurrence of Okta User Session Started via Proxy (Elastic)
- MFA Fatigue (OKTA) (Kusto)
- Okta AiTM Phishing Attempt Blocked by FastPass (Panther)
- Okta Fast Pass phishing Detection (Kusto)
- Okta FastPass Phishing Detection (Sigma)
- Okta FastPass Phishing Detection (Elastic)
- Okta MFA Bruteforce Attack (YARA-L)
- Okta Mismatch Between Source And Response For Verify Push Request (YARA-L)
Rule Body
name: Okta Authentication Failed During MFA Challenge
id: e2b99e7d-d956-411a-a120-2b14adfdde93
version: 11
creation_date: '2024-04-17'
modification_date: '2026-05-13'
author: Bhavin Patel, Splunk
status: production
type: TTP
description: The following analytic identifies failed authentication attempts during the Multi-Factor Authentication (MFA) challenge in an Okta tenant. It uses the Authentication datamodel to detect specific failed events where the authentication signature is `user.authentication.auth_via_mfa`. This activity is significant as it may indicate an adversary attempting to authenticate with compromised credentials on an account with MFA enabled. If confirmed malicious, this could suggest an ongoing attempt to bypass MFA protections, potentially leading to unauthorized access and further compromise of the affected account.
data_source:
- Okta
search: |-
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Authentication.app) as app values(Authentication.reason) as reason values(Authentication.signature) as signature values(Authentication.method) as method FROM datamodel=Authentication
WHERE Authentication.signature=user.authentication.auth_via_mfa Authentication.action = failure
BY _time Authentication.src Authentication.user
Authentication.dest Authentication.action
| `drop_dm_object_name("Authentication")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| iplocation src
| `okta_authentication_failed_during_mfa_challenge_filter`
how_to_implement: The analytic leverages Okta OktaIm2 logs to be ingested using the Splunk Add-on for Okta Identity Cloud (https://splunkbase.splunk.com/app/6553).
known_false_positives: A user may have accidentally entered the wrong credentials during the MFA challenge. If the user is new to MFA, they may have trouble authenticating. Ensure that the user is aware of the MFA process and has the correct credentials.
references:
- https://sec.okta.com/everythingisyes
- https://splunkbase.splunk.com/app/6553
finding:
title: A user [$user$] has failed to authenticate via MFA from IP Address - [$src$]"
entity:
field: user
type: user
score: 50
threat_objects:
- field: src
type: ip_address
analytic_story:
- Okta Account Takeover
- Scattered Lapsus$ Hunters
asset_type: Okta Tenant
mitre_attack_id:
- T1078.004
- T1586.003
- T1621
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: application
security_domain: identity
Stages and Predicates
Stage 1: tstats
| tstats `security_content_summariesonly`
count
min(_time) as firstTime
max(_time) as lastTime
values(Authentication.app) as app
values(Authentication.reason) as reason
values(Authentication.signature) as signature
values(Authentication.method) as method
FROM datamodel=Authentication
WHERE Authentication.signature=user.authentication.auth_via_mfa Authentication.action = failure
BY _time Authentication.src Authentication.user
Authentication.dest Authentication.action
Stage 2: search
| `drop_dm_object_name("Authentication")`
Stage 3: search
| `security_content_ctime(firstTime)`
Stage 4: search
| `security_content_ctime(lastTime)`
Stage 5: search
| iplocation src
Stage 6: search
| `okta_authentication_failed_during_mfa_challenge_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Authentication.action | eq |
| field:"event_action" kind:eq value:"failure" |
Authentication.signature | eq |
| field:"signature" kind:eq value:"user.authentication.auth_via_mfa" |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 5 | iplocation |
| 5 | src |
Permission Groups Discovery: Domain Groups (PowerShell)
#Adversaries may attempt to find domain-level groups and permission settings. The knowledge of domain-level permission groups can help adversaries determine which groups exist and which users belong to a particular group. Adversaries may use this information to determine which users have elevated permissions, such as domain administrators
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery |
References
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1069.002/T1069.002.md#atomic-test-1---basic-permission-groups-discovery-windows-domain
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1069.002/T1069.002.md#atomic-test-2---permission-groups-discovery-powershell-domain
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1069.002/T1069.002.md#atomic-test-3---elevated-group-enumeration-using-net-group-domain
Telemetry Coverage
Rule Body
id: '16633.25781'
title: 'Permission Groups Discovery: Domain Groups'
description: 'Adversaries may attempt to find domain-level groups and permission settings.
The knowledge of domain-level permission groups can help adversaries determine which
groups exist and which users belong to a particular group. Adversaries may use this
information to determine which users have elevated permissions, such as domain administrators.
-- Threat Actor Association: Mustang Panda (aka. Stately Taurus//Earth Preta/BRONZE
PRESIDENT/TA416/RedDelta) - Software Association: Akira, Rhysida -- Atomics T1069.001
Test #2 Atomics T1069.002 Test #1 Atomics T1069.002 Test #2 Atomics T1069.002 Test
#3 Atomics T1069.002 Test #9 Atomics T1069.002 Test #10'
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(get-ADPrincipalGroupMembership)
OR TERM(Get-ADGroup) OR "objectcategory=group" OR "adsisearcher" OR "adfind" OR
(TERM(net) AND (TERM(localgroup) OR ("group" AND "doma"))) OR (TERM(localgroup)
OR ("group" AND "doma")) | regex process="(?i)\s+(localgroup|group(s?)\s+.*doma)|Get-AD(PrincipalGroupMembership|Group)|objectcategory=group"
| table _time, host, user, process, process_*, parent_process* | bin span=1s | stats
values(*) as * by _time, host '
techniques:
- discovery:permission groups discovery:domain groups
- discovery:permission groups discovery
technique_id:
- T1069.002
- T1069
data_category:
- PowerShell logs
references:
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1069.002/T1069.002.md#atomic-test-1---basic-permission-groups-discovery-windows-domain
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1069.002/T1069.002.md#atomic-test-2---permission-groups-discovery-powershell-domain
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1069.002/T1069.002.md#atomic-test-3---elevated-group-enumeration-using-net-group-domain
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(get-ADPrincipalGroupMembership) OR TERM(Get-ADGroup) OR "objectcategory=group" OR "adsisearcher" OR "adfind" OR (TERM(net) AND (TERM(localgroup) OR ("group" AND "doma"))) OR (TERM(localgroup) OR ("group" AND "doma"))
Stage 2: regex
| regex
process="(?i)\s+(localgroup|group(s?)\s+.*doma)|Get-AD(PrincipalGroupMembership|Group)|objectcategory=group"
Stage 3: table
| table _time, host, user, process, process_*, 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 |
process | regex_match |
| field:"CommandLine" kind:regex_match |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>4103<" |
| 1 | "<EventID>4104<" |
| 1 | "get-ADPrincipalGroupMembership" |
| 1 | "Get-ADGroup" |
| 1 | "objectcategory=group" |
| 1 | "adsisearcher" |
| 1 | "adfind" |
| 1 | net |
| 1 | localgroup |
| 1 | "group" |
| 1 | "doma" |
| 1 | localgroup |
| 1 | "group" |
| 1 | "doma" |
PowerShell 4104 Hunting
#The following analytic identifies suspicious PowerShell execution using Script Block Logging (EventCode 4104). It leverages specific patterns and keywords within the ScriptBlockText field to detect potentially malicious activities. This detection is significant for SOC analysts as PowerShell is commonly used by attackers for various malicious purposes, including code execution, privilege escalation, and persistence. If confirmed malicious, this activity could allow attackers to execute arbitrary commands, exfiltrate data, or maintain long-term access to the compromised system, posing a severe threat to the organization's security.
Known False Positives
- Limited false positives. May filter as needed.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Defense Impairment | |
| Credential Access |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4104: Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule Body
name: PowerShell 4104 Hunting
id: d6f2b006-0041-11ec-8885-acde48001122
version: 29
creation_date: '2021-08-19'
modification_date: '2026-09-03'
author: Michael Haag, Splunk
status: production
type: Hunting
description: |-
The following analytic identifies suspicious PowerShell execution using Script Block Logging (EventCode 4104). It leverages specific patterns and keywords within the ScriptBlockText field to detect potentially malicious activities. This detection is significant for SOC analysts as PowerShell is commonly used by attackers for various malicious purposes, including code execution, privilege escalation, and persistence.
If confirmed malicious, this activity could allow attackers to execute arbitrary commands, exfiltrate data, or maintain long-term access to the compromised system, posing a severe threat to the organization's security.
data_source:
- Powershell Script Block Logging 4104
search: |-
`powershell`
EventCode=4104
ScriptBlockText IN (
"*-dumpcr*", "* -version *", "*::decompress*",
"*Add-Exfiltration*", "*Add-Persistence*", "*Add-RegBackdoor*",
"*Add-ScrnSaveBackdoor*", "*AmsiBypass*", "*assemblybuilderaccess*", "*backdoor*",
"*backupprivilege*", "*beacon*", "*bitstransfer*", "*Brute-Force*", "*BruteForce*",
"*CachedRDPConnection*", "*Check-VM*", "*cnvert*", "*compress-archive*", "*ComputerProperty*",
"*comsvcs*", "*copy-vss*", "*CreateShortcut*", "*disablerealtimemonitoring*",
"*Do-Exfiltration*", "*downloadfile*", "*downloadstring*", "*Enabled-DuplicateToken*",
"*EXEonRemote*", "*exfiltration*", "*expand-archive*", "*Exploit-*", "*exploit*",
"*Find-*", "*Frombase64*", "*Get-ApplicationHost*", "*Get-ChromeDump*",
"*Get-ClipboardContents*", "*Get-*Credent*", "*Get-FoxDump*", "*Get-GPPPassword*", "*Get-IndexedItem*",
"*Get-Keystrokes*", "*Get-PassHash*", "*Get-*Password*", "*Get-RegAlwaysInstallElevated*", "*Get-RegAutoLogon*",
"*Get-RickAstley*", "*Get-Screenshot*", "*Get-SecurityPackages*", "*Get-ServiceFilePermission*",
"*Get-ServicePermission*", "*Get-ServiceUnquoted*", "*Get-SiteListPassword*",
"*Get-System*", "*Get-TimedScreenshot*", "*Get-UnattendedInstallFile*",
"*Get-Unconstrained*", "*Get-VaultCredential*", "*Get-VulnAutoRun*",
"*Get-VulnSchTask*", "*Gupt-Backdoor*", "*gzipstream*", "*hijack*",
"*HTTP-Login*", "*IEX *", "*injection*", "*Install-Service*",
"*Install-ServiceBinary*", "*Install-SSP*", "*internetexplorer.application*",
"*Invoke-*", "*io.compression*", "*kerberos::*", "*lastloggedon*",
"*localadmin*", "*LSASecret*", "*lsass.exe*", "*MailRaider*", "*metasp*",
"*mimikatz*", "*NEEEEWWW*", "*netfirewall*", "*NetworkRelay*",
"*New-HoneyHash*", "*ngrok*", "*nishang*", "*Out-Minidump*",
"*out-shortcut*", "*Port-Scan*", "*PortScan*", "*PowerBreach*",
"*PowerShellIcmp*", "*PowerShelludp*", "*powershellwmi*", "*PowerUp*", "*PowerView*",
"*rc4bytestream*", "*reflection.assembly*", "*remoteps*", "*remotewmi*",
"*Remove-Update*", "*SEKURLSA::*", "*Set-MacAttribute*", "*Set-Wallpaper*",
"*shell.application*", "*shellcode*", "*Show-TargetScreen*", "*Start-CaptureServer*",
"*start-process*", "*system.security.cryptography*", "*Uninstall-Windows*", "*UserProperty*",
"*VolumeShadowCopyTools*", "*WebClient*", "*webrequest*", "*wmicommand*",
"*wmimethod*", "*wmiobject*", "*write-zip*", "*xmlhttp*",
)
| eval script_lower=lower(ScriptBlockText)
| eval ecnoded_command_keyword=if(match(ScriptBlockText,"(?i)(?:^|\\s)(?:/(?!/)|--?|–{1,2}|—{1,2}|―{1,2})(?:ec|encodedcommand|encodedcomman|encodedcomma|encodedcomm|encodedcom|encodedco|encodedc|encoded|encode|encod|enco|enc|en|e(?=\\s))\\s+['\\\"]?[A-Za-z0-9+/=]{5,}['\\\"]?"), 4, 0)
| eval suspicious_cmdlets=if(match(ScriptBlockText, "(?i)Add-Exfiltration|Add-Persistence|Add-RegBackdoor|Add-ScrnSaveBackdoor|Check-VM|Do-Exfiltration|Enabled-DuplicateToken|Exploit-|Find-Fruit|Find-GPOLocation|Find-TrustedDocuments|Get-ApplicationHost|Get-ChromeDump|Get-ClipboardContents|Get-FoxDump|Get-GPPPassword|Get-IndexedItem|Get-Keystrokes|LSASecret|Get-PassHash|Get-RegAlwaysInstallElevated|Get-RegAutoLogon|Get-RickAstley|Get-Screenshot|Get-SecurityPackages|Get-ServiceFilePermission|Get-ServicePermission|Get-ServiceUnquoted|Get-SiteListPassword|Get-System|Get-TimedScreenshot|Get-UnattendedInstallFile|Get-Unconstrained|Get-VaultCredential|Get-VulnAutoRun|Get-VulnSchTask|Gupt-Backdoor|HTTP-Login|Install-SSP|Install-ServiceBinary|Invoke-ACLScanner|Invoke-ADSBackdoor|Invoke-ARPScan|Invoke-AllChecks|Invoke-BackdoorLNK|Invoke-BypassUAC|Invoke-CredentialInjection|Invoke-DCSync|Invoke-DllInjection|Invoke-DowngradeAccount|Invoke-EgressCheck|Invoke-Inveigh|Invoke-InveighRelay|Invoke-Mimikittenz|Invoke-NetRipper|Invoke-NinjaCopy|Invoke-PSInject|Invoke-Paranoia|Invoke-PortScan|Invoke-PoshRat|Invoke-PostExfil|Invoke-PowerDump|Invoke-PowerShellTCP|Invoke-PsExec|Invoke-PsUaCme|Invoke-ReflectivePEInjection|Invoke-ReverseDNSLookup|Invoke-RunAs|Invoke-SMBScanner|Invoke-SSHCommand|Invoke-Service|Invoke-Shellcode|Invoke-Tater|Invoke-ThunderStruck|Invoke-Token|Invoke-UserHunter|Invoke-VoiceTroll|Invoke-WScriptBypassUAC|Invoke-WinEnum|MailRaider|New-HoneyHash|Out-Minidump|Port-Scan|PowerBreach|PowerUp|PowerView|Remove-Update|Set-MacAttribute|Set-Wallpaper|Show-TargetScreen|Start-CaptureServer|VolumeShadowCopyTools|NEEEEWWW|(Computer|User)Property|CachedRDPConnection|invoke-\S+hunter|Install-Service|get-\S+(credent|password)|remoteps|netfirewall|Uninstall-Windows|AmsiBypass|nishang|Invoke-Interceptor|EXEonRemote|NetworkRelay|PowerShelludp|PowerShellIcmp|CreateShortcut|copy-vss|invoke-dll|invoke-mass|out-shortcut|Invoke-ShellCommand"),1,0)
| eval base64_keyword=if(like(script_lower,"%frombase64%"), 4, 0)
| eval empire=if(like(script_lower,"%system.net.webclient%") AND like(script_lower,"%frombase64%"),5,0)
| eval mimikatz=if(like(script_lower,"%mimikatz%") OR like(script_lower,"%-dumpcr%") OR like(script_lower,"%sekurlsa::pth%") OR like(script_lower,"%kerberos::ptt%") OR like(script_lower,"%kerberos::golden%"),5,0)
| eval invoke_expression_keyword=if(like(script_lower,"%iex %") OR like(script_lower,"%invoke-expression %"),2,0)
| eval webclient=if(like(script_lower,"%webclient%") OR like(script_lower,"%webrequest%") OR like(script_lower,"%downloadfile%") OR like(script_lower,"%downloadstring%") OR like(script_lower,"%bitstransfer%") OR like(script_lower,"%internetexplorer.application%") OR like(script_lower,"%xmlhttp%"),5,0)
| eval suspicious_keyword=if(match(script_lower, "(metasp|assemblybuilderaccess|reflection\.assembly|shellcode|injection|cnvert|shell\.application|start-process |rc4bytestream|system\.security\.cryptography|lsass\.exe|localadmin|lastloggedon|hijack|backupprivilege|ngrok|comsvcs|backdoor|brute.?force|port.?scan|exfiltration|exploit|disablerealtimemonitoring|beacon)"),1,0)
| eval invoke_wmi_keyword=if(like(script_lower,"%wmiobject%") OR like(script_lower,"%wmimethod%") OR like(script_lower,"%remotewmi%") OR like(script_lower,"%powershellwmi%") OR like(script_lower,"%wmicommand%"),5,0)
| eval downgrade_version=if(like(script_lower, "% -version 2%"),3,0)
| eval compression_keyword=if(match(script_lower, "gzipstream|::decompress|io.compression|write-zip|(expand|compress)-archive"),5,0)
| eval invoke_command_keyword=if(like(script_lower,"%invoke-command%"), 4, 0)
| eval Score=ecnoded_command_keyword
+ suspicious_cmdlets
+ suspicious_keyword
+ compression_keyword
+ downgrade_version
+ mimikatz
+ invoke_expression_keyword
+ empire
+ webclient
+ invoke_wmi_keyword
+ invoke_command_keyword
+ base64_keyword
| where Score>=4 OR mimikatz>0 OR suspicious_cmdlets>0 OR suspicious_keyword>0
| eval matched_rules=mvappend(
if(ecnoded_command_keyword>0, "Encoded Command Keywords", null()),
if(suspicious_cmdlets>0, "Suspicious Cmdlets", null()),
if(base64_keyword>0, "Base64 Keyword", null()),
if(empire>0, "Empire Framework Commands", null()),
if(mimikatz>0, "Mimikatz Keywords or Strings", null()),
if(invoke_expression_keyword>0, "Invoke Expression Keywords", null()),
if(webclient>0, "Webclient Keywords", null()),
if(suspicious_keyword>0, "Potentially Suspicious Keywords or Strings", null()),
if(invoke_wmi_keyword>0, "Invoke WMI Keywords", null()),
if(downgrade_version>0, "PowerShell Downgrade Version Attempt", null()),
if(compression_keyword>0, "Compression Keywords", null()),
if(invoke_command_keyword>0, "Invoke Command Keywords", null())
)
| eval matched_rules=mvfilter(isnotnull(matched_rules))
| rename Computer as dest, UserID as user
| stats max(Score) as Score values(matched_rules) as matched_rules
BY user dest ScriptBlockId
| eval matched_rules=mvjoin(matched_rules, ", ")
| `powershell_4104_hunting_filter`
how_to_implement: |-
The following Hunting analytic requires PowerShell operational logs to be ingested with ScriptBlockLogging enabled.
Modify the powershell macro as needed to match the sourcetype or add index.
This analytic is specific to EventID 4104, or PowerShell Script Block Logging.
known_false_positives: Limited false positives. May filter as needed.
references:
- https://github.com/inodee/threathunting-spl/blob/master/hunt-queries/powershell_qualifiers.md
- 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://github.com/marcurdy/dfir-toolset/blob/master/Powershell%20Blueteam.txt
- https://devblogs.microsoft.com/powershell/powershell-the-blue-team/
- https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_logging?view=powershell-5.1
- https://www.mandiant.com/resources/greater-visibilityt
- https://hurricanelabs.com/splunk-tutorials/how-to-use-powershell-transcription-logs-in-splunk/
- https://www.splunk.com/en_us/blog/security/hunting-for-malicious-powershell-using-script-block-logging.html
- https://adlumin.com/post/powerdrop-a-new-insidious-powershell-script-for-command-and-control-attacks-targets-u-s-aerospace-defense-industry/
analytic_story:
- Braodo Stealer
- Cactus Ransomware
- China-Nexus Threat Activity
- CISA AA23-347A
- CISA AA24-241A
- Cleo File Transfer Software
- DarkGate Malware
- Data Destruction
- Flax Typhoon
- Hermetic Wiper
- Lumma Stealer
- Malicious PowerShell
- Medusa Ransomware
- Rhysida Ransomware
- Salt Typhoon
- SystemBC
- PHP-CGI RCE Attack on Japanese Organizations
- Water Gamayun
- XWorm
- Scattered Spider
- Interlock Ransomware
- 0bj3ctivity Stealer
- APT37 Rustonotto and FadeStealer
- GhostRedirector IIS Module and Rungan Backdoor
- Hellcat Ransomware
- Microsoft WSUS CVE-2025-59287
- MuddyWater
- Axios Supply Chain Post Compromise
- Salat Stealer
- Phantom Stealer
- Starland RAT Campaign
asset_type: Endpoint
mitre_attack_id:
- T1059.001
- T1689
- T1003
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: search
`powershell`
EventCode=4104
ScriptBlockText IN (
"*-dumpcr*", "* -version *", "*::decompress*",
"*Add-Exfiltration*", "*Add-Persistence*", "*Add-RegBackdoor*",
"*Add-ScrnSaveBackdoor*", "*AmsiBypass*", "*assemblybuilderaccess*", "*backdoor*",
"*backupprivilege*", "*beacon*", "*bitstransfer*", "*Brute-Force*", "*BruteForce*",
"*CachedRDPConnection*", "*Check-VM*", "*cnvert*", "*compress-archive*", "*ComputerProperty*",
"*comsvcs*", "*copy-vss*", "*CreateShortcut*", "*disablerealtimemonitoring*",
"*Do-Exfiltration*", "*downloadfile*", "*downloadstring*", "*Enabled-DuplicateToken*",
"*EXEonRemote*", "*exfiltration*", "*expand-archive*", "*Exploit-*", "*exploit*",
"*Find-*", "*Frombase64*", "*Get-ApplicationHost*", "*Get-ChromeDump*",
"*Get-ClipboardContents*", "*Get-*Credent*", "*Get-FoxDump*", "*Get-GPPPassword*", "*Get-IndexedItem*",
"*Get-Keystrokes*", "*Get-PassHash*", "*Get-*Password*", "*Get-RegAlwaysInstallElevated*", "*Get-RegAutoLogon*",
"*Get-RickAstley*", "*Get-Screenshot*", "*Get-SecurityPackages*", "*Get-ServiceFilePermission*",
"*Get-ServicePermission*", "*Get-ServiceUnquoted*", "*Get-SiteListPassword*",
"*Get-System*", "*Get-TimedScreenshot*", "*Get-UnattendedInstallFile*",
"*Get-Unconstrained*", "*Get-VaultCredential*", "*Get-VulnAutoRun*",
"*Get-VulnSchTask*", "*Gupt-Backdoor*", "*gzipstream*", "*hijack*",
"*HTTP-Login*", "*IEX *", "*injection*", "*Install-Service*",
"*Install-ServiceBinary*", "*Install-SSP*", "*internetexplorer.application*",
"*Invoke-*", "*io.compression*", "*kerberos::*", "*lastloggedon*",
"*localadmin*", "*LSASecret*", "*lsass.exe*", "*MailRaider*", "*metasp*",
"*mimikatz*", "*NEEEEWWW*", "*netfirewall*", "*NetworkRelay*",
"*New-HoneyHash*", "*ngrok*", "*nishang*", "*Out-Minidump*",
"*out-shortcut*", "*Port-Scan*", "*PortScan*", "*PowerBreach*",
"*PowerShellIcmp*", "*PowerShelludp*", "*powershellwmi*", "*PowerUp*", "*PowerView*",
"*rc4bytestream*", "*reflection.assembly*", "*remoteps*", "*remotewmi*",
"*Remove-Update*", "*SEKURLSA::*", "*Set-MacAttribute*", "*Set-Wallpaper*",
"*shell.application*", "*shellcode*", "*Show-TargetScreen*", "*Start-CaptureServer*",
"*start-process*", "*system.security.cryptography*", "*Uninstall-Windows*", "*UserProperty*",
"*VolumeShadowCopyTools*", "*WebClient*", "*webrequest*", "*wmicommand*",
"*wmimethod*", "*wmiobject*", "*write-zip*", "*xmlhttp*",
)
Stage 2: eval
| eval script_lower=lower(ScriptBlockText)
Stage 3: macro (not parsed)
| eval
ecnoded_command_keyword=if(
match(
ScriptBlockText,
"(?i)(?:^|\\s)(?:/(?!/)|--?|–{1,2}|—{1,2}|―{1,2})(?:ec|encodedcommand|encodedcomman|encodedcomma|encodedcomm|encodedcom|encodedco|encodedc|encoded|encode|encod|enco|enc|en|e(?=\\s))\\s+['\\\"]?[A-Za-z0-9+/=]{5,}['\\\"]?"
),
4,
0
)
Stage 4: eval
| eval
suspicious_cmdlets=if(
match(
ScriptBlockText,
"(?i)Add-Exfiltration|Add-Persistence|Add-RegBackdoor|Add-ScrnSaveBackdoor|Check-VM|Do-Exfiltration|Enabled-DuplicateToken|Exploit-|Find-Fruit|Find-GPOLocation|Find-TrustedDocuments|Get-ApplicationHost|Get-ChromeDump|Get-ClipboardContents|Get-FoxDump|Get-GPPPassword|Get-IndexedItem|Get-Keystrokes|LSASecret|Get-PassHash|Get-RegAlwaysInstallElevated|Get-RegAutoLogon|Get-RickAstley|Get-Screenshot|Get-SecurityPackages|Get-ServiceFilePermission|Get-ServicePermission|Get-ServiceUnquoted|Get-SiteListPassword|Get-System|Get-TimedScreenshot|Get-UnattendedInstallFile|Get-Unconstrained|Get-VaultCredential|Get-VulnAutoRun|Get-VulnSchTask|Gupt-Backdoor|HTTP-Login|Install-SSP|Install-ServiceBinary|Invoke-ACLScanner|Invoke-ADSBackdoor|Invoke-ARPScan|Invoke-AllChecks|Invoke-BackdoorLNK|Invoke-BypassUAC|Invoke-CredentialInjection|Invoke-DCSync|Invoke-DllInjection|Invoke-DowngradeAccount|Invoke-EgressCheck|Invoke-Inveigh|Invoke-InveighRelay|Invoke-Mimikittenz|Invoke-NetRipper|Invoke-NinjaCopy|Invoke-PSInject|Invoke-Paranoia|Invoke-PortScan|Invoke-PoshRat|Invoke-PostExfil|Invoke-PowerDump|Invoke-PowerShellTCP|Invoke-PsExec|Invoke-PsUaCme|Invoke-ReflectivePEInjection|Invoke-ReverseDNSLookup|Invoke-RunAs|Invoke-SMBScanner|Invoke-SSHCommand|Invoke-Service|Invoke-Shellcode|Invoke-Tater|Invoke-ThunderStruck|Invoke-Token|Invoke-UserHunter|Invoke-VoiceTroll|Invoke-WScriptBypassUAC|Invoke-WinEnum|MailRaider|New-HoneyHash|Out-Minidump|Port-Scan|PowerBreach|PowerUp|PowerView|Remove-Update|Set-MacAttribute|Set-Wallpaper|Show-TargetScreen|Start-CaptureServer|VolumeShadowCopyTools|NEEEEWWW|(Computer|User)Property|CachedRDPConnection|invoke-\S+hunter|Install-Service|get-\S+(credent|password)|remoteps|netfirewall|Uninstall-Windows|AmsiBypass|nishang|Invoke-Interceptor|EXEonRemote|NetworkRelay|PowerShelludp|PowerShellIcmp|CreateShortcut|copy-vss|invoke-dll|invoke-mass|out-shortcut|Invoke-ShellCommand"
),
1,
0
)
suspicious_cmdlets =match(ScriptBlockText, "(?i)Add-Exfiltration|Add-Persistence|Add-RegBackdoor|Add-ScrnSaveBackdoor|Check-VM|Do-Exfiltration|Enabled-DuplicateToken|Exploit-|Find-Fruit|Find-GPOLocation|Find-TrustedDocuments|Get-ApplicationHost|Get-ChromeDump|Get-ClipboardContents|Get-FoxDump|Get-GPPPassword|Get-IndexedItem|Get-Keystrokes|LSASecret|Get-PassHash|Get-RegAlwaysInstallElevated|Get-RegAutoLogon|Get-RickAstley|Get-Screenshot|Get-SecurityPackages|Get-ServiceFilePermission|Get-ServicePermission|Get-ServiceUnquoted|Get-SiteListPassword|Get-System|Get-TimedScreenshot|Get-UnattendedInstallFile|Get-Unconstrained|Get-VaultCredential|Get-VulnAutoRun|Get-VulnSchTask|Gupt-Backdoor|HTTP-Login|Install-SSP|Install-ServiceBinary|Invoke-ACLScanner|Invoke-ADSBackdoor|Invoke-ARPScan|Invoke-AllChecks|Invoke-BackdoorLNK|Invoke-BypassUAC|Invoke-CredentialInjection|Invoke-DCSync|Invoke-DllInjection|Invoke-DowngradeAccount|Invoke-EgressCheck|Invoke-Inveigh|Invoke-InveighRelay|Invoke-Mimikittenz|Invoke-NetRipper|Invoke-NinjaCopy|Invoke-PSInject|Invoke-Paranoia|Invoke-PortScan|Invoke-PoshRat|Invoke-PostExfil|Invoke-PowerDump|Invoke-PowerShellTCP|Invoke-PsExec|Invoke-PsUaCme|Invoke-ReflectivePEInjection|Invoke-ReverseDNSLookup|Invoke-RunAs|Invoke-SMBScanner|Invoke-SSHCommand|Invoke-Service|Invoke-Shellcode|Invoke-Tater|Invoke-ThunderStruck|Invoke-Token|Invoke-UserHunter|Invoke-VoiceTroll|Invoke-WScriptBypassUAC|Invoke-WinEnum|MailRaider|New-HoneyHash|Out-Minidump|Port-Scan|PowerBreach|PowerUp|PowerView|Remove-Update|Set-MacAttribute|Set-Wallpaper|Show-TargetScreen|Start-CaptureServer|VolumeShadowCopyTools|NEEEEWWW|(Computer|User)Property|CachedRDPConnection|invoke-\S+hunter|Install-Service|get-\S+(credent|password)|remoteps|netfirewall|Uninstall-Windows|AmsiBypass|nishang|Invoke-Interceptor|EXEonRemote|NetworkRelay|PowerShelludp|PowerShellIcmp|CreateShortcut|copy-vss|invoke-dll|invoke-mass|out-shortcut|Invoke-ShellCommand")10Stage 5: eval
| eval base64_keyword=if(like(script_lower,"%frombase64%"), 4, 0)
base64_keyword =like(script_lower, "%frombase64%")40Stage 6: eval
| eval
empire=if(like(script_lower,"%system.net.webclient%") AND like(script_lower,"%frombase64%"),5,0)
empire =like(script_lower, "%system.net.webclient%") AND like(script_lower, "%frombase64%")50Stage 7: eval
| eval
mimikatz=if(
like(script_lower,"%mimikatz%") OR like(script_lower,"%-dumpcr%") OR like(
script_lower,
"%sekurlsa::pth%"
) OR like(script_lower,"%kerberos::ptt%") OR like(script_lower,"%kerberos::golden%"),
5,
0
)
mimikatz =like(script_lower, "%mimikatz%") OR like(script_lower, "%-dumpcr%") OR like(script_lower, "%sekurlsa::pth%") OR like(script_lower, "%kerberos::ptt%") OR like(script_lower, "%kerberos::golden%")50Stage 8: eval
| eval
invoke_expression_keyword=if(
like(script_lower,"%iex %") OR like(script_lower,"%invoke-expression %"),
2,
0
)
invoke_expression_keyword =like(script_lower, "%iex %") OR like(script_lower, "%invoke-expression %")20Stage 9: eval
| eval
webclient=if(
like(script_lower,"%webclient%") OR like(script_lower,"%webrequest%") OR like(
script_lower,
"%downloadfile%"
) OR like(script_lower,"%downloadstring%") OR like(script_lower,"%bitstransfer%") OR like(
script_lower,
"%internetexplorer.application%"
) OR like(script_lower,"%xmlhttp%"),
5,
0
)
webclient =like(script_lower, "%webclient%") OR like(script_lower, "%webrequest%") OR like(script_lower, "%downloadfile%") OR like(script_lower, "%downloadstring%") OR like(script_lower, "%bitstransfer%") OR like(script_lower, "%internetexplorer.application%") OR like(script_lower, "%xmlhttp%")50Stage 10: eval
| eval
suspicious_keyword=if(
match(
script_lower,
"(metasp|assemblybuilderaccess|reflection\.assembly|shellcode|injection|cnvert|shell\.application|start-process |rc4bytestream|system\.security\.cryptography|lsass\.exe|localadmin|lastloggedon|hijack|backupprivilege|ngrok|comsvcs|backdoor|brute.?force|port.?scan|exfiltration|exploit|disablerealtimemonitoring|beacon)"
),
1,
0
)
suspicious_keyword =match(script_lower, "(metasp|assemblybuilderaccess|reflection\.assembly|shellcode|injection|cnvert|shell\.application|start-process |rc4bytestream|system\.security\.cryptography|lsass\.exe|localadmin|lastloggedon|hijack|backupprivilege|ngrok|comsvcs|backdoor|brute.?force|port.?scan|exfiltration|exploit|disablerealtimemonitoring|beacon)")10Stage 11: eval
| eval
invoke_wmi_keyword=if(
like(script_lower,"%wmiobject%") OR like(script_lower,"%wmimethod%") OR like(
script_lower,
"%remotewmi%"
) OR like(script_lower,"%powershellwmi%") OR like(script_lower,"%wmicommand%"),
5,
0
)
invoke_wmi_keyword =like(script_lower, "%wmiobject%") OR like(script_lower, "%wmimethod%") OR like(script_lower, "%remotewmi%") OR like(script_lower, "%powershellwmi%") OR like(script_lower, "%wmicommand%")50Stage 12: eval
| eval downgrade_version=if(like(script_lower, "% -version 2%"),3,0)
downgrade_version =like(script_lower, "% -version 2%")30Stage 13: eval
| eval
compression_keyword=if(
match(
script_lower,
"gzipstream|::decompress|io.compression|write-zip|(expand|compress)-archive"
),
5,
0
)
compression_keyword =match(script_lower, "gzipstream|::decompress|io.compression|write-zip|(expand|compress)-archive")50Stage 14: eval
| eval invoke_command_keyword=if(like(script_lower,"%invoke-command%"), 4, 0)
invoke_command_keyword =like(script_lower, "%invoke-command%")40Stage 15: eval
| eval Score=ecnoded_command_keyword
+ suspicious_cmdlets
+ suspicious_keyword
+ compression_keyword
+ downgrade_version
+ mimikatz
+ invoke_expression_keyword
+ empire
+ webclient
+ invoke_wmi_keyword
+ invoke_command_keyword
+ base64_keyword
Stage 16: where
| where Score>=4 OR mimikatz>0 OR suspicious_cmdlets>0 OR suspicious_keyword>0
Stage 17: eval
| eval matched_rules=mvappend(
if(ecnoded_command_keyword>0, "Encoded Command Keywords", null()),
if(suspicious_cmdlets>0, "Suspicious Cmdlets", null()),
if(base64_keyword>0, "Base64 Keyword", null()),
if(empire>0, "Empire Framework Commands", null()),
if(mimikatz>0, "Mimikatz Keywords or Strings", null()),
if(invoke_expression_keyword>0, "Invoke Expression Keywords", null()),
if(webclient>0, "Webclient Keywords", null()),
if(suspicious_keyword>0, "Potentially Suspicious Keywords or Strings", null()),
if(invoke_wmi_keyword>0, "Invoke WMI Keywords", null()),
if(downgrade_version>0, "PowerShell Downgrade Version Attempt", null()),
if(compression_keyword>0, "Compression Keywords", null()),
if(invoke_command_keyword>0, "Invoke Command Keywords", null())
)
Stage 18: eval
| eval matched_rules=mvfilter(isnotnull(matched_rules))
Stage 19: rename
| rename Computer as dest, UserID as user
Stage 20: stats
| stats max(Score) as Score values(matched_rules) as matched_rules
BY user dest ScriptBlockId
Stage 21: eval
| eval matched_rules=mvjoin(matched_rules, ", ")
Stage 22: search
| `powershell_4104_hunting_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"4104" |
Score | ge |
| field:"Score" kind:ge value:"4" |
ScriptBlockText | in |
| field:"ScriptBlockText" kind:in |
mimikatz | gt |
| field:"mimikatz" kind:gt value:"0" |
suspicious_cmdlets | gt |
| field:"suspicious_cmdlets" kind:gt value:"0" |
suspicious_keyword | gt |
| field:"suspicious_keyword" kind:gt value:"0" |
PowerShell Clipboard Access (PowerShell)
#Infostealer malware including Bbystealer may use PowerShell commands to access the clipboard to retrieve or store information. This use case detects PowerShell cmdlets and commands used to access the clipboard.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
References
Telemetry Coverage
Rule Body
id: '23306.42453'
title: PowerShell Clipboard Access
description: Infostealer malware including Bbystealer may use PowerShell commands
to access the clipboard to retrieve or store information. This use case detects
PowerShell cmdlets and commands used to access the clipboard.
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(Get-Clipboard)
OR TERM(gcb) OR TERM(Set-Clipboard) OR TERM(scb) OR ".Clipboard" | table _time,
host, user, signature_id, process, process_name, parent_process_name | bin span=1s
| stats values(*) as * by _time, host '
techniques:
- execution:command and scripting interpreter:powershell
- collection:clipboard data
technique_id:
- T1059.001
data_category:
- PowerShell logs
references:
- https://cyble.com/blog/bbystealer-malware-resurfaces-sets-sights-on-vpn-users/
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(Get-Clipboard) OR TERM(gcb) OR TERM(Set-Clipboard) OR TERM(scb) OR ".Clipboard"
Stage 2: table
| table _time, host, user, signature_id, process, process_name, parent_process_name
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 | "Get-Clipboard" |
| 1 | gcb |
| 1 | "Set-Clipboard" |
| 1 | scb |
| 1 | ".Clipboard" |
Process Connection to Mega - Windows (Sysmon)
#Mega is a cloud storage service used by many threat actors due to its use of end-to-end encryption and semi-anonymous payment options. The client application MEGAsync.exe and command-line interface utility MegaCMD allow threat actors to exfiltrate large amounts of data. This use case detects network connections involving MEGASync.exe or MegaCMD or network connections to mega.co.nz or mega.nz (Sysmon only).
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Exfiltration |
References
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 3: Network connection |
Rule Body
id: '35864.62856'
title: Process Connection to Mega - Windows
description: Mega is a cloud storage service used by many threat actors due to its
use of end-to-end encryption and semi-anonymous payment options. The client application
MEGAsync.exe and command-line interface utility MegaCMD allow threat actors to exfiltrate
large amounts of data. This use case detects network connections involving MEGASync.exe
or MegaCMD or network connections to mega.co.nz or mega.nz (Sysmon only).
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=3) OR "<EventID>3<")
"Megasync.exe" OR "megacmd" OR "mega.co.nz" OR "mega.nz" | where match(dest_host,
"(?i)mega\.(co\.)?nz") or match(process_name, "(?i)mega(sync|cmd)") | table _time,
host, user, process, process_*, parent_process_*, dest_host | bin span=300s | stats
values(*) as * by _time, host '
techniques:
- exfiltration:exfiltration over web service
technique_id:
- T1567
data_category:
- Windows Sysmon
- Process use of network
references:
- https://redcanary.com/blog/threat-detection/rclone-mega-extortion/
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=3) OR "<EventID>3<") "Megasync.exe" OR "megacmd" OR "mega.co.nz" OR "mega.nz"
Stage 2: where
| where match(dest_host, "(?i)mega\.(co\.)?nz") or match(process_name, "(?i)mega(sync|cmd)")
Stage 3: table
| table _time, host, user, process, process_*, parent_process_*, dest_host
Stage 4: bucket
| bin span=300s
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:"3" |
dest_host | regex_match |
| field:"dest_host" kind:regex_match value:"(?i)mega.(co.)?nz" |
process_name | regex_match |
| field:"process_name" kind:regex_match value:"(?i)mega(sync|cmd)" |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>3<" |
| 1 | "Megasync.exe" |
| 1 | "megacmd" |
| 1 | "mega.co.nz" |
| 1 | "mega.nz" |
Remote Process Instantiation via DCOM and PowerShell Script Block
#The following analytic detects the execution of PowerShell commands that initiate a process on a remote endpoint via the DCOM protocol. It leverages PowerShell Script Block Logging (EventCode=4104) to identify the use of ShellExecute and ExecuteShellCommand. This activity is significant as it may indicate lateral movement or remote code execution attempts by adversaries. If confirmed malicious, this behavior could allow attackers to execute arbitrary code on remote systems, potentially leading to further compromise and persistence within the network.
Known False Positives
- Administrators may leverage DCOM to start a process on remote systems, but this activity is usually limited to a small set of hosts or users.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4104: Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule Body
name: Remote Process Instantiation via DCOM and PowerShell Script Block
id: fa1c3040-4680-11ec-a618-3e22fbd008af
version: 13
creation_date: '2021-11-15'
modification_date: '2026-05-13'
author: Mauricio Velazco, Splunk
status: production
type: TTP
description: The following analytic detects the execution of PowerShell commands that initiate a process on a remote endpoint via the DCOM protocol. It leverages PowerShell Script Block Logging (EventCode=4104) to identify the use of ShellExecute and ExecuteShellCommand. This activity is significant as it may indicate lateral movement or remote code execution attempts by adversaries. If confirmed malicious, this behavior could allow attackers to execute arbitrary code on remote systems, potentially leading to further compromise and persistence within the network.
data_source:
- Powershell Script Block Logging 4104
search: |-
`powershell` EventCode=4104 (ScriptBlockText="*Document.Application.ShellExecute*" OR ScriptBlockText="*Document.ActiveView.ExecuteShellCommand*")
| 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)`
| `remote_process_instantiation_via_dcom_and_powershell_script_block_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 instructions can be found 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: Administrators may leverage DCOM to start a process on remote systems, but this activity is usually limited to a small set of hosts or users.
references:
- https://attack.mitre.org/techniques/T1021/003/
- https://www.cybereason.com/blog/dcom-lateral-movement-techniques
finding:
title: A process was started on a remote endpoint from $dest$ by abusing WMI using PowerShell.exe
entity:
field: dest
type: system
score: 50
analytic_story:
- Active Directory Lateral Movement
asset_type: Endpoint
mitre_attack_id:
- T1021.003
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: search
`powershell` EventCode=4104 (
ScriptBlockText="*Document.Application.ShellExecute*"
OR ScriptBlockText="*Document.ActiveView.ExecuteShellCommand*"
)
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
| `remote_process_instantiation_via_dcom_and_powershell_script_block_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"4104" |
ScriptBlockText | eq |
| field:"ScriptBlockText" kind:eq |
Rundll32 Suspicious Command Line (Sysmon)
#Threat actors using Gamarue, also referred to as Andromeda or Wauchos, have been observed abusing rundll32.exe using unusual strings for DLL names. This use case detects rundll32 executions with strings matching unusual patterns
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
References
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
id: '27224.49776'
title: Rundll32 Suspicious Command Line
description: Threat actors using Gamarue, also referred to as Andromeda or Wauchos,
have been observed abusing rundll32.exe using unusual strings for DLL names. This
use case detects rundll32 executions with strings matching unusual patterns. 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(rundll32) OR "rundll32" | regex process="\x5c\x5c?[-_]{2,}[-_]{2,}[-_]{2,}.+,"|
table _time, host, user, process, process_*, parent_process_* | bin span=1s | stats
values(*) as * by _time, host '
techniques:
- defense-evasion:system binary proxy execution:rundll32
technique_id:
- T1218.011
data_category:
- Windows Sysmon
references:
- https://redcanary.com/threat-detection-report/threats/gamarue/
- https://redcanary.com/blog/lolbins-abuse/
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<") TERM(rundll32) OR "rundll32"
Stage 2: regex
| regex process="\x5c\x5c?[-_]{2,}[-_]{2,}[-_]{2,}.+,"
Stage 3: table
| table _time, host, user, process, process_*, 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 | regex_match |
| field:"CommandLine" kind:regex_match value:"\x5c\x5c?[-_]{2,}[-_]{2,}[-_]{2,}.+," |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>1<" |
| 1 | rundll32 |
| 1 | "rundll32" |
SimpleHelp Remote Access Tool Execution (Sysmon)
#Threat actors may install remote access tools (RATs) to maintain persistent access to compromised systems. Tools like SimpleHelp or JWrapper Remote Access are often abused for stealthy remote control, masquerading as legitimate IT support tools. This use case detects process creation events with file paths or executable names related to SimpleHelp Remote Access. - LOLRMM
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
References
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
id: '44775.89974'
title: SimpleHelp Remote Access Tool Execution
description: Threat actors may install remote access tools (RATs) to maintain persistent
access to compromised systems. Tools like SimpleHelp or JWrapper Remote Access are
often abused for stealthy remote control, masquerading as legitimate IT support
tools. This use case detects process creation events with file paths or executable
names related to SimpleHelp Remote Access. - LOLRMM
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<")
"JWrapper-Remote" OR "SimpleHelp" OR "SimpleService" OR "SimpleGatewayService" |
where (match(process_name, "(?i)(Simple(help(customer)?|service|gatewayservice)|remote\saccess|windows\slauncher)\.exe")
and match(process_path, "(?i)JWrapper-Remote\s+(Access|Support)")) or match(process_name,
"(?i)Simple(help(customer)?|service|gatewayservice)\.exe") | table _time, host,
user, signature_id, process, process_name, process_path `group_events("host", 5)` '
techniques:
- command-and-control:remote access software
technique_id:
- T1219
data_category:
- Windows Sysmon
references:
- https://lolrmm.io/tools/simplehelp
- https://detection.fyi/sigmahq/sigma/windows/process_creation/proc_creation_win_remote_access_tools_simple_help/
- https://simple-help.com/downloads
- https://www.huntress.com/blog/slashandgrab-screen-connect-post-exploitation-in-the-wild-cve-2024-1709-cve-2024-1708
Stages and Predicates
Stage 1: search
search EventCode=1 source="*" source IN (
"WinEventLog:Microsoft-Windows-Sysmon/Operational",
"XmlWinEventLog:Microsoft-Windows-Sysmon/Operational"
)
Stage 2: where
where ((match(process_name, "(?i)(Simple(help(customer)?|service|gatewayservice)|remote\\saccess|windows\\slauncher)\\.exe") match(process_path, "(?i)JWrapper-Remote\\s+(Access|Support)")) OR match(process_name, "(?i)Simple(help(customer)?|service|gatewayservice)\\.exe"))
Stage 3: table
table _time, host, process, process_name, process_path, signature_id, user
Stage 4: bucket
bucket _time
Stage 5: stats
stats BY host, _time
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 |
process_path | regex_match |
| field:"process_name" kind:regex_match value:"(?i)JWrapper-Remote\s+(Access|Support)" |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>1<" |
| 1 | "JWrapper-Remote" |
| 1 | "SimpleHelp" |
| 1 | "SimpleService" |
| 1 | "SimpleGatewayService" |
Splunk RCE via User XSLT
#The following analytic identifies potential remote code execution (RCE) attempts via user-supplied Extensible Stylesheet Language Transformations (XSLT) in Splunk versions 9.1.x. It detects this activity by analyzing splunkd_ui logs for specific URI patterns and status codes indicative of XSLT injection attempts. This activity is significant because successful exploitation could allow an attacker to execute arbitrary code on the Splunk server. If confirmed malicious, this could lead to full system compromise, unauthorized data access, and further lateral movement within the network.
Known False Positives
- This search will provide information for investigation and hunting possible abuse of user-supplied XSLT. There may be false positives and results should individually evaluated. Please evaluate the source IP and useragent responsible for creating the requests.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement |
Rule Body
name: Splunk RCE via User XSLT
id: 6cb7e011-55fb-48e3-a98d-164fa854e37e
version: 7
creation_date: '2023-11-22'
modification_date: '2026-05-14'
author: Marissa Bower, Chase Franklin, Rod Soto, Bhavin Patel, Eric McGinnis, Splunk
status: production
type: Hunting
description: The following analytic identifies potential remote code execution (RCE) attempts via user-supplied Extensible Stylesheet Language Transformations (XSLT) in Splunk versions 9.1.x. It detects this activity by analyzing `splunkd_ui` logs for specific URI patterns and status codes indicative of XSLT injection attempts. This activity is significant because successful exploitation could allow an attacker to execute arbitrary code on the Splunk server. If confirmed malicious, this could lead to full system compromise, unauthorized data access, and further lateral movement within the network.
data_source: []
search: '`splunkd_ui` ((uri="*NO_BINARY_CHECK=1*" AND "*input.path=*.xsl*") OR uri="*dispatch*.xsl*") AND uri!= "*splunkd_ui*" | rex field=uri "(?<string>=\s*([\S\s]+))" | eval decoded_field=urldecode(string) | eval action=case(match(status,"200"),"Allowed",match(status,"303|500|401|403|404|301|406"),"Blocked",1=1,"Unknown") | stats count min(_time) as firstTime max(_time) as lastTime by clientip useragent uri decoded_field action host | rename clientip as src, uri as dest_uri | iplocation src | fillnull value="N/A" | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | table firstTime, lastTime src, useragent, action, count, Country, Region, City, dest_uri, decoded_field | `splunk_rce_via_user_xslt_filter`'
how_to_implement: This detection does not require you to ingest any new data. The detection does require the ability to search the _internal index.
known_false_positives: This search will provide information for investigation and hunting possible abuse of user-supplied XSLT. There may be false positives and results should individually evaluated. Please evaluate the source IP and useragent responsible for creating the requests.
references:
- https://advisory.splunk.com/advisories/SVD-2023-1104
analytic_story:
- Splunk Vulnerabilities
asset_type: Endpoint
cve:
- CVE-2023-46214
mitre_attack_id:
- T1210
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: application
security_domain: endpoint
Stages and Predicates
Stage 1: search
`splunkd_ui` ((uri="*NO_BINARY_CHECK=1*" AND "*input.path=*.xsl*") OR uri="*dispatch*.xsl*")
AND uri!= "*splunkd_ui*"
Stage 2: rex
| rex field=uri "(?<string>=\s*([\S\s]+))"
Stage 3: eval
| eval decoded_field=urldecode(string)
Stage 4: eval
| eval
action=case(
match(status,"200"), "Allowed",
match(status,"303|500|401|403|404|301|406"), "Blocked",
1=1, "Unknown"
)
action =match(status, "200")"Allowed"match(status, "303|500|401|403|404|301|406")"Blocked""Unknown"Stage 5: stats
| stats
count
min(_time) as firstTime
max(_time) as lastTime
by clientip useragent uri decoded_field action host
Stage 6: rename
| rename clientip as src, uri as dest_uri
Stage 7: search
| iplocation src
Stage 8: fillnull
| fillnull value="N/A"
Stage 9: search
| `security_content_ctime(firstTime)`
Stage 10: search
| `security_content_ctime(lastTime)`
Stage 11: table
| table firstTime, lastTime src, useragent, action, count, Country, Region, City, dest_uri,
decoded_field
Stage 12: search
| `splunk_rce_via_user_xslt_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
sourcetype | eq |
| field:"sourcetype" kind:eq value:"splunkd_ui_access" |
uri | eq |
| field:"uri" kind:eq |
uri | ne |
| field:"uri" kind:ne value:"*splunkd_ui*" |
Search Terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "*input.path=*.xsl*" |
| 7 | iplocation |
| 7 | src |
Suspicious Reg exe Process
#The following analytic identifies instances of reg.exe being launched from a command prompt (cmd.exe) that was not initiated by the user, as indicated by a parent process other than explorer.exe. This detection leverages data from Endpoint Detection and Response (EDR) agents, focusing on process and parent process names. This activity is significant because reg.exe is often used in registry manipulation, which can be indicative of malicious behavior such as persistence mechanisms or system configuration changes. If confirmed malicious, this could allow an attacker to modify critical system settings, potentially leading to privilege escalation or persistent access.
Known False Positives
- It's possible for system administrators to write scripts that exhibit this behavior. If this is the case, the search will need to be modified to filter them out.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| 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: Suspicious Reg exe Process
id: a6b3ab4e-dd77-4213-95fa-fc94701995e0
version: 16
creation_date: '2020-04-29'
modification_date: '2026-05-13'
author: David Dorsey, Splunk
status: production
type: Anomaly
description: The following analytic identifies instances of reg.exe being launched from a command prompt (cmd.exe) that was not initiated by the user, as indicated by a parent process other than explorer.exe. This detection leverages data from Endpoint Detection and Response (EDR) agents, focusing on process and parent process names. This activity is significant because reg.exe is often used in registry manipulation, which can be indicative of malicious behavior such as persistence mechanisms or system configuration changes. If confirmed malicious, this could allow an attacker to modify critical system settings, potentially leading to privilege escalation or persistent access.
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 != explorer.exe Processes.process_name =cmd.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)`
| search [
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes
WHERE Processes.parent_process_name=cmd.exe Processes.process_name= reg.exe
BY Processes.parent_process_id Processes.dest Processes.process_name
| `drop_dm_object_name("Processes")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| rename parent_process_id as process_id
| dedup process_id
| table process_id dest]
| `suspicious_reg_exe_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: It's possible for system administrators to write scripts that exhibit this behavior. If this is the case, the search will need to be modified to filter them out.
references:
- https://car.mitre.org/wiki/CAR-2013-03-001/
intermediate_findings:
entities:
- field: user
type: user
score: 20
message: An instance of $parent_process_name$ spawning $process_name$ was identified on endpoint $dest$ by user $user$ attempting to add a registry entry.
- field: dest
type: system
score: 20
message: An instance of $parent_process_name$ spawning $process_name$ was identified on endpoint $dest$ by user $user$ attempting to add a registry entry.
threat_objects:
- field: parent_process_name
type: parent_process_name
- field: process_name
type: process_name
analytic_story:
- Windows Defense Evasion Tactics
- Disabling Security Tools
- DHS Report TA18-074A
asset_type: Endpoint
mitre_attack_id:
- T1112
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 != explorer.exe Processes.process_name =cmd.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
| search [
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes
WHERE Processes.parent_process_name=cmd.exe Processes.process_name= reg.exe
BY Processes.parent_process_id Processes.dest Processes.process_name
| `drop_dm_object_name("Processes")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| rename parent_process_id as process_id
| dedup process_id
| table process_id dest]
Stage 6: search
| `suspicious_reg_exe_process_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
1 | eq |
| field:"1" kind:eq value:"1" |
Processes.parent_process_name | ne |
| field:"parent_process_basename" kind:ne value:"explorer.exe" |
Processes.process_name | eq |
| field:"process_basename" kind:eq value:"cmd.exe" |
Windows AD Domain Controller Promotion
#The following analytic identifies a genuine Domain Controller (DC) promotion event by detecting when a computer assigns itself the necessary Service Principal Names (SPNs) to function as a domain controller. It leverages Windows Security Event Code 4742 to monitor existing domain controllers for these changes. This activity is significant as it can help identify rogue DCs added to the network, which could indicate a DCShadow attack. If confirmed malicious, this could allow an attacker to manipulate Active Directory, leading to potential privilege escalation and persistent access within the environment.
Known False Positives
- No false positives have been identified at this time.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry Coverage
Rule Body
name: Windows AD Domain Controller Promotion
id: e633a0ef-2a6e-4ed7-b925-5ff999e5d1f0
version: 11
creation_date: '2023-01-25'
modification_date: '2026-05-13'
author: Dean Luxton
status: production
type: TTP
description: The following analytic identifies a genuine Domain Controller (DC) promotion event by detecting when a computer assigns itself the necessary Service Principal Names (SPNs) to function as a domain controller. It leverages Windows Security Event Code 4742 to monitor existing domain controllers for these changes. This activity is significant as it can help identify rogue DCs added to the network, which could indicate a DCShadow attack. If confirmed malicious, this could allow an attacker to manipulate Active Directory, leading to potential privilege escalation and persistent access within the environment.
data_source:
- Windows Event Log Security 4742
search: |-
`wineventlog_security` EventCode=4742 ServicePrincipalNames IN ("*E3514235-4B06-11D1-AB04-00C04FC2DCD2/*","*GC/*")
| stats min(_time) as _time latest(ServicePrincipalNames) as ServicePrincipalNames,values(signature) as signature, values(src_user) as src_user, values(user) as user
BY Logon_ID, dvc
| where src_user=user
| rename Logon_ID as TargetLogonId, user as dest
| appendpipe [
| map search="search `wineventlog_security` EventCode=4624 TargetLogonId=$TargetLogonId$"
| fields - dest, dvc, signature]
| stats min(_time) as _time, values(TargetUserSid) as TargetUserSid, values(Target_Domain) as Target_Domain, values(user) as user, values(status) as status, values(src_category) as src_category, values(src_ip) as src_ip values(ServicePrincipalNames) as ServicePrincipalNames values(signature) as signature values(dest) as dest values(dvc) as dvc
BY TargetLogonId
| eval dest=trim(dest,"$")
| `windows_ad_domain_controller_promotion_filter`
how_to_implement: To successfully implement this search, you need to be ingesting eventcode `4742`. The Advanced Security Audit policy setting `Audit Computer Account Management` within `Account Management` needs to be enabled.
known_false_positives: No false positives have been identified at this time.
references:
- https://attack.mitre.org/techniques/T1207/
finding:
title: AD Domain Controller Promotion Event Detected for $dest$
entity:
field: dest
type: system
score: 50
analytic_story:
- Compromised Windows Host
- Sneaky Active Directory Persistence Tricks
asset_type: Endpoint
mitre_attack_id:
- T1207
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: search
`wineventlog_security` EventCode=4742 ServicePrincipalNames IN (
"*E3514235-4B06-11D1-AB04-00C04FC2DCD2/*",
"*GC/*"
)
Stage 2: stats
| stats
min(_time) as _time
latest(ServicePrincipalNames) as ServicePrincipalNames,
values(signature) as signature,
values(src_user) as src_user,
values(user) as user
BY Logon_ID, dvc
Stage 3: where
| where src_user=user
Stage 4: rename
| rename Logon_ID as TargetLogonId, user as dest
Stage 5: appendpipe
| appendpipe [
| map search="search `wineventlog_security` EventCode=4624 TargetLogonId=$TargetLogonId$"
| fields - dest, dvc, signature]
Stage 6: stats
| stats
min(_time) as _time,
values(TargetUserSid) as TargetUserSid,
values(Target_Domain) as Target_Domain,
values(user) as user,
values(status) as status,
values(src_category) as src_category,
values(src_ip) as src_ip
values(ServicePrincipalNames) as ServicePrincipalNames
values(signature) as signature
values(dest) as dest
values(dvc) as dvc
BY TargetLogonId
Stage 7: eval
| eval dest=trim(dest,"$")
Stage 8: search
| `windows_ad_domain_controller_promotion_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"4742" |
ServicePrincipalNames | in |
| field:"ServicePrincipalNames" kind:in |
Windows Explorer.exe Spawning PowerShell or Cmd
#This detection identifies instances where Windows Explorer.exe spawns PowerShell or cmd.exe processes, particularly focusing on executions initiated by LNK files. This behavior is associated with the ZDI-CAN-25373 Windows shortcut zero-day vulnerability, where specially crafted LNK files are used to trigger malicious code execution through cmd.exe or powershell.exe. This technique has been actively exploited by multiple APT groups in targeted attacks through both HTTP and SMB delivery methods.
Known False Positives
- Some legitimate user actions may trigger Explorer.exe to spawn PowerShell or cmd.exe, such as right-clicking and selecting "Open PowerShell window here" or similar options. Filter as needed based on your environment's normal behavior patterns.
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 Explorer.exe Spawning PowerShell or Cmd
id: 593854c5-2182-49dd-9f31-18ef697445b9
version: 3
creation_date: '2022-06-17'
modification_date: '2026-05-13'
author: Michael Haag, AJ King, Splunk, Jesse Hunter, Splunk Community Contributor
status: production
type: Hunting
description: This detection identifies instances where Windows Explorer.exe spawns PowerShell or cmd.exe processes, particularly focusing on executions initiated by LNK files. This behavior is associated with the ZDI-CAN-25373 Windows shortcut zero-day vulnerability, where specially crafted LNK files are used to trigger malicious code execution through cmd.exe or powershell.exe. This technique has been actively exploited by multiple APT groups in targeted attacks through both HTTP and SMB delivery methods.
data_source:
- Sysmon EventID 1
- Windows Event Log Security 4688
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_path="*\\explorer.exe" `process_powershell` OR `process_cmd` by Processes.dest Processes.process_current_directory Processes.process_path Processes.process Processes.original_file_name Processes.parent_process Processes.parent_process_name Processes.parent_process_path Processes.parent_process_guid Processes.parent_process_id Processes.process_guid Processes.process_id Processes.user | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)`| `security_content_ctime(lastTime)` | `windows_explorer_exe_spawning_powershell_or_cmd_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: Some legitimate user actions may trigger Explorer.exe to spawn PowerShell or cmd.exe, such as right-clicking and selecting "Open PowerShell window here" or similar options. Filter as needed based on your environment's normal behavior patterns.
references:
- https://www.zerodayinitiative.com/advisories/ZDI-CAN-25373/
- https://www.trendmicro.com/en_us/research/25/c/windows-shortcut-zero-day-exploit.html
analytic_story:
- ZDI-CAN-25373 Windows Shortcut Exploit Abused as Zero-Day
asset_type: Endpoint
mitre_attack_id:
- T1059.001
- T1204.002
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_path="*\\explorer.exe" `process_powershell` OR `process_cmd`
by
Processes.dest
Processes.process_current_directory
Processes.process_path
Processes.process
Processes.original_file_name
Processes.parent_process
Processes.parent_process_name
Processes.parent_process_path
Processes.parent_process_guid
Processes.parent_process_id
Processes.process_guid
Processes.process_id
Processes.user
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
| `windows_explorer_exe_spawning_powershell_or_cmd_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Processes.original_file_name | eq |
| field:"OriginalFileName" kind:eq |
Processes.parent_process_path | eq |
| field:"ParentImage" kind:eq value:"*\explorer.exe" |
Processes.process_name | eq |
| field:"process_basename" kind:eq |
Windows Find Domain Organizational Units with GetDomainOU
#The following analytic detects the execution of the Get-DomainOU cmdlet, a part of the PowerView toolkit used for Windows domain enumeration. It leverages PowerShell Script Block Logging (EventCode=4104) to identify this activity. Detecting Get-DomainOU usage is significant as adversaries may use it to gather information about organizational units within Active Directory, which can facilitate lateral movement or privilege escalation. If confirmed malicious, this activity could allow attackers to map the domain structure, aiding in further exploitation and persistence within the network.
Known False Positives
- Administrators may leverage PowerSploit tools for legitimate reasons, filter as needed.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4104: Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule Body
name: Windows Find Domain Organizational Units with GetDomainOU
id: 0ada2f82-b7af-40cc-b1d7-1e5985afcb4e
version: 11
creation_date: '2023-09-01'
modification_date: '2026-05-13'
author: Gowthamaraj Rajendran, Mauricio Velazco, Splunk
status: production
type: TTP
description: The following analytic detects the execution of the `Get-DomainOU` cmdlet, a part of the PowerView toolkit used for Windows domain enumeration. It leverages PowerShell Script Block Logging (EventCode=4104) to identify this activity. Detecting `Get-DomainOU` usage is significant as adversaries may use it to gather information about organizational units within Active Directory, which can facilitate lateral movement or privilege escalation. If confirmed malicious, this activity could allow attackers to map the domain structure, aiding in further exploitation and persistence within the network.
data_source:
- Powershell Script Block Logging 4104
search: |-
`powershell` EventCode=4104 ScriptBlockText = "*Get-DomainOU*"
| 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)`
| `windows_find_domain_organizational_units_with_getdomainou_filter`
how_to_implement: The following Hunting analytic requires PowerShell operational logs to be imported. Modify the powershell macro as needed to match the sourcetype or add index. This analytic is specific to 4104, or PowerShell Script Block Logging.
known_false_positives: Administrators may leverage PowerSploit tools for legitimate reasons, filter as needed.
references:
- https://powersploit.readthedocs.io/en/latest/Recon/Get-DomainOU/
- https://attack.mitre.org/techniques/T1087/002/
- https://book.hacktricks.xyz/windows-hardening/basic-powershell-for-pentesters/powerview
finding:
title: Suspicious PowerShell Get-DomainOU was identified on endpoint $dest$ by user $user_id$.
entity:
field: user_id
type: user
score: 50
intermediate_findings:
entities:
- field: dest
type: system
score: 50
message: Suspicious PowerShell Get-DomainOU was identified on endpoint $dest$ by user $user_id$.
analytic_story:
- Active Directory Discovery
asset_type: Endpoint
mitre_attack_id:
- T1087.002
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: search
`powershell` EventCode=4104 ScriptBlockText = "*Get-DomainOU*"
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
| `windows_find_domain_organizational_units_with_getdomainou_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"4104" |
ScriptBlockText | eq |
| field:"ScriptBlockText" kind:eq value:"*Get-DomainOU*" |
Windows Process Injection Remote Thread
#The following analytic detects suspicious remote thread execution in processes such as Taskmgr.exe, calc.exe, and notepad.exe, which may indicate process injection by malware like Qakbot. This detection leverages Sysmon EventCode 8 to identify remote thread creation in specific target processes. This activity is significant as it often signifies an attempt by malware to inject malicious code into legitimate processes, potentially leading to unauthorized code execution. If confirmed malicious, this could allow attackers to execute arbitrary code, escalate privileges, or maintain persistence on the compromised host.
Known False Positives
- No false positives have been identified at this time.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 8: CreateRemoteThread |
Rule Body
name: Windows Process Injection Remote Thread
id: 8a618ade-ca8f-4d04-b972-2d526ba59924
version: 15
creation_date: '2022-10-28'
modification_date: '2026-08-14'
author: Teoderick Contreras, Splunk
status: production
type: TTP
description: |
The following analytic detects suspicious remote thread execution in processes such as Taskmgr.exe, calc.exe, and notepad.exe, which may indicate process injection by malware like Qakbot. This detection leverages Sysmon EventCode 8 to identify remote thread creation in specific target processes. This activity is significant as it often signifies an attempt by malware to inject malicious code into legitimate processes, potentially leading to unauthorized code execution. If confirmed malicious, this could allow attackers to execute arbitrary code, escalate privileges, or maintain persistence on the compromised host.
data_source:
- Sysmon EventID 8
search: |-
`sysmon`
EventCode=8
TargetImage IN (
"*\\calc.exe",
"*\\CalculatorApp.exe",
"*\\cmd.exe",
"*\\dxdiag.exe",
"*\\explorer.exe",
"*\\mobsync.exe",
"*\\msra.exe",
"*\\notepad.exe",
"*\\OneDriveSetup.exe",
"*\\ping.exe",
"*\\powershell.exe",
"*\\rdpclip.exe",
"*\\Taskmgr.exe",
"*\\wermgr.exe",
"*\\win32calc.exe",
"*\\xwizard.exe"
)
| stats count min(_time) as firstTime
max(_time) as lastTime
values(NewThreadId) as "NewThreadId"
values(StartAddress) as "StartAddress"
by dest signature_id signature
SourceProcessGuid SourceProcessId SourceImage
TargetProcessGuid TargetProcessId TargetImage
StartModule StartFunction vendor_product
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `windows_process_injection_remote_thread_filter`
how_to_implement: To successfully implement this search, you must be ingesting data that records process activity from your hosts like remote thread EventCode=8 of sysmon. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.
known_false_positives: No false positives have been identified at this time.
references:
- https://twitter.com/pr0xylife/status/1585612370441031680?s=46&t=Dc3CJi4AnM-8rNoacLbScg
- https://thedfirreport.com/2023/06/12/a-truly-graceful-wipe-out/
finding:
title: process $SourceImage$ created a remote thread in target process $TargetImage$ on host $dest$
entity:
field: dest
type: system
score: 50
threat_objects:
- field: SourceImage
type: process
analytic_story:
- Qakbot
- Graceful Wipe Out Attack
- Warzone RAT
- Earth Alux
- Water Gamayun
- Phantom Stealer
- Vidar Stealer
asset_type: Endpoint
mitre_attack_id:
- T1055.002
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: search
`sysmon`
EventCode=8
TargetImage IN (
"*\\calc.exe",
"*\\CalculatorApp.exe",
"*\\cmd.exe",
"*\\dxdiag.exe",
"*\\explorer.exe",
"*\\mobsync.exe",
"*\\msra.exe",
"*\\notepad.exe",
"*\\OneDriveSetup.exe",
"*\\ping.exe",
"*\\powershell.exe",
"*\\rdpclip.exe",
"*\\Taskmgr.exe",
"*\\wermgr.exe",
"*\\win32calc.exe",
"*\\xwizard.exe"
)
Stage 2: stats
| stats count min(_time) as firstTime
max(_time) as lastTime
values(NewThreadId) as "NewThreadId"
values(StartAddress) as "StartAddress"
by dest signature_id signature
SourceProcessGuid SourceProcessId SourceImage
TargetProcessGuid TargetProcessId TargetImage
StartModule StartFunction vendor_product
Stage 3: search
| `security_content_ctime(firstTime)`
Stage 4: search
| `security_content_ctime(lastTime)`
Stage 5: search
| `windows_process_injection_remote_thread_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"8" |
TargetImage | in |
| field:"TargetImage" kind:in |
Windows Scheduled Task Created in a Group Policy Object
#When a scheduled task is created within a Group Policy, a characteristic file ScheduledTasks.xml with its definition is created in the respective subfolder of the SYSVOL share. This rule can hit on legitimate GPO scheduled task creation, but this does not happen often and is therefore an effective way to monitor for malicious scheduled tasks.
Known False Positives
- Some legitimate scheduled tasks are occasionally created via Group Policy Objects in managed environments. Filter alerts for approved GPO deployments to reduce false positives.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Persistence | |
| Privilege Escalation | |
| Defense Impairment |
Telemetry Coverage
Rule Body
name: Windows Scheduled Task Created in a Group Policy Object
id: 350032cd-3d3f-4278-afc8-e01cf5c33524
version: 2
creation_date: '2026-05-05'
modification_date: '2026-05-13'
author: Raven Tait, Splunk
status: production
type: TTP
description: |-
When a scheduled task is created within a Group Policy, a characteristic file ScheduledTasks.xml with its definition is created in the respective subfolder of the SYSVOL share.
This rule can hit on legitimate GPO scheduled task creation, but this does not happen often and is therefore an effective way to monitor for malicious scheduled tasks.
data_source:
- Windows Event Log Security 5145
search: |-
`wineventlog_security`
EventID=5145
ShareName="\\*\\SYSVOL"
RelativeTargetName="*\\ScheduledTasks\\ScheduledTasks.xml"
RelativeTargetName="*\\Policies\\*"
AccessList IN (
"*%%4417*",
"*%%4418*"
)
| fillnull
| stats count min(_time) as firstTime
max(_time) as lastTime
by Computer ShareName RelativeTargetName AccessList
| rename Computer as dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `windows_scheduled_task_created_in_a_group_policy_object_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: Some legitimate scheduled tasks are occasionally created via Group Policy Objects in managed environments. Filter alerts for approved GPO deployments to reduce false positives.
references:
- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-5145
finding:
title: Potential Scheduled task created in a Group Policy Object activity observed on $dest$.
entity:
field: dest
type: system
score: 50
analytic_story:
- Scheduled Tasks
- Windows Persistence Techniques
- Living Off The Land
asset_type: Endpoint
mitre_attack_id:
- T1484.001
- T1053.005
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: search
`wineventlog_security`
EventID=5145
ShareName="\\*\\SYSVOL"
RelativeTargetName="*\\ScheduledTasks\\ScheduledTasks.xml"
RelativeTargetName="*\\Policies\\*"
AccessList IN (
"*%%4417*",
"*%%4418*"
)
Stage 2: fillnull
| fillnull
Stage 3: stats
| stats count min(_time) as firstTime
max(_time) as lastTime
by Computer ShareName RelativeTargetName AccessList
Stage 4: rename
| rename Computer as dest
Stage 5: search
| `security_content_ctime(firstTime)`
Stage 6: search
| `security_content_ctime(lastTime)`
Stage 7: search
| `windows_scheduled_task_created_in_a_group_policy_object_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
AccessList | in |
| field:"AccessList" kind:in |
EventID | eq |
| field:"EventID" kind:eq value:"5145" |
RelativeTargetName | eq |
| field:"RelativeTargetName" kind:eq |
ShareName | eq |
| field:"ShareName" kind:eq value:"\*\SYSVOL" |
Windows SQL Spawning CertUtil
#The following analytic detects the use of certutil to download software, specifically when spawned by SQL-related processes. This detection leverages Endpoint Detection and Response (EDR) data, focusing on command-line executions involving certutil with parameters like urlcache and split. This activity is significant as it may indicate a compromise by threat actors, such as Flax Typhoon, who use certutil to establish persistent VPN connections. If confirmed malicious, this behavior could allow attackers to maintain access, monitor system availability, and potentially escalate to data theft or ransomware deployment.
Known False Positives
- The occurrence of false positives should be minimal, given that the SQL agent does not typically download software using CertUtil.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
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 SQL Spawning CertUtil
id: dfc18a5a-946e-44ee-a373-c0f60d06e676
version: 14
creation_date: '2023-08-25'
modification_date: '2026-05-13'
author: Michael Haag, Splunk
status: experimental
type: TTP
description: The following analytic detects the use of certutil to download software, specifically when spawned by SQL-related processes. This detection leverages Endpoint Detection and Response (EDR) data, focusing on command-line executions involving certutil with parameters like *urlcache* and *split*. This activity is significant as it may indicate a compromise by threat actors, such as Flax Typhoon, who use certutil to establish persistent VPN connections. If confirmed malicious, this behavior could allow attackers to maintain access, monitor system availability, and potentially escalate to data theft or ransomware deployment.
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 IN ("sqlservr.exe", "sqlagent.exe", "sqlps.exe", "launchpad.exe", "sqldumper.exe") `process_certutil` (Processes.process="*urlcache*"
OR
Processes.process="*verifyctl*")
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)`
| `windows_sql_spawning_certutil_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: The occurrence of false positives should be minimal, given that the SQL agent does not typically download software using CertUtil.
references:
- https://www.microsoft.com/en-us/security/blog/2023/08/24/flax-typhoon-using-legitimate-software-to-quietly-access-taiwanese-organizations/
finding:
title: $process_name$ was launched on $dest$ by $user$. This behavior is uncommon with the SQL process identified.
entity:
field: user
type: user
score: 50
intermediate_findings:
entities:
- field: dest
type: system
score: 50
message: $process_name$ was launched on $dest$ by $user$. This behavior is uncommon with the SQL process identified.
threat_objects:
- field: process_name
type: process_name
analytic_story:
- SQL Server Abuse
- Flax Typhoon
- Storm-2460 CLFS Zero Day Exploitation
asset_type: Endpoint
mitre_attack_id:
- T1105
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 IN ("sqlservr.exe", "sqlagent.exe", "sqlps.exe", "launchpad.exe", "sqldumper.exe") `process_certutil` (Processes.process="*urlcache*"
OR
Processes.process="*verifyctl*")
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
| `windows_sql_spawning_certutil_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Processes.original_file_name | eq |
| field:"OriginalFileName" kind:eq value:"CertUtil.exe" |
Processes.parent_process_name | in |
| field:"parent_process_basename" kind:in |
Processes.process | eq |
| field:"CommandLine" kind:eq |
Processes.process_name | eq |
| field:"process_basename" kind:eq value:"certutil.exe" |