Detection rules › Elastic

Elastic rules: 15

Discovery of Domain Groups

#
Status
production
Kind
building block (feeds higher-level correlation rules; not a standalone alert)
Severity
low
Time window
119m
Author
Elastic
Source
github.com/elastic/detection-rules

Identifies the execution of Linux built-in commands related to account or group enumeration. Adversaries may use account and group information to orient themselves before deciding how to act.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2023/08/23"
integration = ["endpoint", "auditd_manager", "crowdstrike"]
maturity = "production"
updated_date = "2026/03/24"

[rule]
author = ["Elastic"]
building_block_type = "default"
description = """
Identifies the execution of Linux built-in commands related to account or group enumeration. Adversaries may use account
and group information to orient themselves before deciding how to act.
"""
from = "now-119m"
index = ["logs-endpoint.events.*", "endgame-*", "auditbeat-*", "logs-auditd_manager.auditd-*", "logs-crowdstrike.fdr*"]
interval = "60m"
language = "eql"
license = "Elastic License v2"
name = "Discovery of Domain Groups"
risk_score = 21
rule_id = "b92d5eae-70bb-4b66-be27-f98ba9d0ccdc"
severity = "low"
tags = [
  "Domain: Endpoint",
  "OS: Linux",
  "Use Case: Threat Detection",
  "Tactic: Discovery",
  "Rule Type: BBR",
  "Data Source: Elastic Defend",
  "Data Source: Elastic Endgame",
  "Data Source: Auditd Manager",
  "Data Source: Crowdstrike",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "executed", "process_started", "ProcessRollup2")
 and (
  process.name in ("ldapsearch", "dscacheutil") or (process.name == "dscl" and process.args : "*-list*")
)
'''


[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1069"
name = "Permission Groups Discovery"
reference = "https://attack.mitre.org/techniques/T1069/"

[[rule.threat.technique.subtechnique]]
id = "T1069.002"
name = "Domain Groups"
reference = "https://attack.mitre.org/techniques/T1069/002/"

[rule.threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"

Stages and Predicates

Stage 1: process

process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "executed", "process_started", "ProcessRollup2")
 and (
  process.name in ("ldapsearch", "dscacheutil") or (process.name == "dscl" and process.args : "*-list*")
)

Indicators

These rows show field, operator, and value matches.

DLL Side Loading via a Copied Microsoft Executable

#
Time window
5m
Sequence by
file.path, process.executable, user.id
Source
github.com/elastic/protections-artifacts

Identifies when a Microsoft signed binary is copied to a directory and shortly followed by the loading of an unsigned DLL from the same directory. Adversaries may opt for moving Microsoft signed binaries to a random directory and use them as a host for malicious DLL sideloading during the installation phase.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
Identifies when a Microsoft signed binary is copied to a directory and shortly followed by the loading of an unsigned
DLL from the same directory. Adversaries may opt for moving Microsoft signed binaries to a random directory and use them
as a host for malicious DLL sideloading during the installation phase.
"""
id = "d84090d7-91e4-4063-84c1-c1f410dd717b"
license = "Elastic License v2"
name = "DLL Side Loading via a Copied Microsoft Executable"
os_list = ["windows"]
reference = [
    "https://www.elastic.co/security-labs/upping-the-ante-detecting-in-memory-threats-with-kernel-call-stacks",
    "https://www.microsoft.com/en-us/security/blog/2018/03/01/finfisher-exposed-a-researchers-tale-of-defeating-traps-tricks-and-complex-virtual-machines/",
]
version = "1.0.32"

query = '''
sequence by user.id with maxspan=5m
 [file where event.action != "deletion" and
  not user.id : ("S-1-5-18", "S-1-5-19", "S-1-5-20") and file.Ext.header_bytes : "4d5a*" and

  /* PE file copied */
  _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info: ("*CopyFileEx*", "*MoveFileExW*")) and 
  
  /* DismHost is copied by CleanMgr */
  not (file.name : "DismHost.exe" and process.thread.Ext.call_stack_summary : "*|dismcore.dll|*") and
       
  not (file.path : "?:\\Program Files*\\Microsoft\\EdgeUpdate\\*\\MicrosoftEdgeUpdateComRegisterShell*.exe" and 
       process.executable : "?:\\Program Files*\\Microsoft\\Temp\\*\\MicrosoftEdgeUpdate.exe") and

  not (process.executable : "?:\\Program Files*\\Common Files\\microsoft shared\\ClickToRun\\OfficeClickToRun.exe" and
       file.path : "?:\\Program Files*\\Common Files\\microsoft shared\\ClickToRun\\Updates\\*\\OfficeClickToRun.exe") and 

  not process.executable : ("?:\\Program Files\\Microsoft Visual Studio\\*\\Common?\\IDE\\devenv.exe", 
                            "?:\\Program Files (x86)\\Microsoft Visual Studio\\*\\Common?\\IDE\\devenv.exe", 
                            "?:\\Program Files\\Microsoft Visual Studio\\*\\MSBuild.exe", 
                            "?:\\Program Files\\dotnet\\dotnet.exe") and

  not (file.path : "C:\\SuperGrate\\mighost.exe" and process.executable : "D:\\SuperGrate\\SuperGrate.exe")

 ] by file.path
 [library where
  process.code_signature.subject_name : "Microsoft*" and process.code_signature.trusted == true and
  not startswith~(dll.name, process.name) and dll.hash.sha256 != null and 
  (dll.Ext.relative_file_creation_time <= 500 or dll.Ext.relative_file_name_modify_time <= 500) and
  not dll.code_signature.status : "trusted" and

  /* DLL loaded from the process.executable directory */
  endswith~(substring(dll.path, 0, length(dll.path) - (length(dll.name) + 1)), substring(process.executable, 0, length(process.executable) - (length(process.name) + 1))) and

  not dll.hash.sha256 :
              ("3e278f47c124c44e8e5a18a12364f3b7af723292b6a4c6011e8f558325bbd7cb",
               "bd7874d8b30a39e306d53f83588478622d3e152fe1c7d29a1e0e04fa8844b1e3",
               "ecd44288b475131a8cc14a1fff497af478bcb26a772e838fa711cd654835a233",
               "6c48d66731fcf6a60e7aef335c91e55ee27743df9912856c63302f7dfecde906",
               "2e0559d248a68402d209d65e6009c05628fe6c30f892a1047fa3365a89d7d9a6",
               "c7601b2f8b2439211433de59bda62a09347480bfdbbe03b4c560aa350c543e3a",
               "7e1a25b50775cb246303ae162bba86c9d5fe2bd7fa98044899ffb58919b4ed3a", 
               "44f3a05334de6ca0b43ebd17f6c7f1935630e026f049f28828566e364b7f41aa", 
               "45715793b8c8571554b0bfb4eccc29e2884c16481e1c7dbee78363bbe4da3dd9", 
               "99c109628e7d9bccf0961c0fd40d2f0e98e43fca59fe88e8467cd0f9be6bfdd9") and

  not (dll.path : "?:\\$WINDOWS.~BT\\Sources\\*.dll" and process.executable : "?:\\$WINDOWS.~BT\\Sources\\SetupHost.exe") and
  not dll.path : "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\*.dll"
  ] by process.executable
'''

min_endpoint_version = "8.7.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1

[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1574"
name = "Hijack Execution Flow"
reference = "https://attack.mitre.org/techniques/T1574/"
[[threat.technique.subtechnique]]
id = "T1574.001"
name = "DLL"
reference = "https://attack.mitre.org/techniques/T1574/001/"



[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "8.7.0"

Stages and Predicates

Ordered sequence: each step below must occur in order within 5m, correlated by file.path, process.executable, user.id.

Stage 1: file

[file where event.action != "deletion" and
  not user.id : ("S-1-5-18", "S-1-5-19", "S-1-5-20") and file.Ext.header_bytes : "4d5a*" and
  _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info: ("*CopyFileEx*", "*MoveFileExW*")) and
  not (file.name : "DismHost.exe" and process.thread.Ext.call_stack_summary : "*|dismcore.dll|*") and
  not (file.path : "?:\\Program Files*\\Microsoft\\EdgeUpdate\\*\\MicrosoftEdgeUpdateComRegisterShell*.exe" and
       process.executable : "?:\\Program Files*\\Microsoft\\Temp\\*\\MicrosoftEdgeUpdate.exe") and
  not (process.executable : "?:\\Program Files*\\Common Files\\microsoft shared\\ClickToRun\\OfficeClickToRun.exe" and
       file.path : "?:\\Program Files*\\Common Files\\microsoft shared\\ClickToRun\\Updates\\*\\OfficeClickToRun.exe") and
  not process.executable : ("?:\\Program Files\\Microsoft Visual Studio\\*\\Common?\\IDE\\devenv.exe",
                            "?:\\Program Files (x86)\\Microsoft Visual Studio\\*\\Common?\\IDE\\devenv.exe",
                            "?:\\Program Files\\Microsoft Visual Studio\\*\\MSBuild.exe",
                            "?:\\Program Files\\dotnet\\dotnet.exe") and
  not (file.path : "C:\\SuperGrate\\mighost.exe" and process.executable : "D:\\SuperGrate\\SuperGrate.exe")
 ] by file.path

Stage 2: library

[library where
  process.code_signature.subject_name : "Microsoft*" and process.code_signature.trusted == true and
  not startswith~(dll.name, process.name) and dll.hash.sha256 != null and
  (dll.Ext.relative_file_creation_time <= 500 or dll.Ext.relative_file_name_modify_time <= 500) and
  not dll.code_signature.status : "trusted" and
  endswith~(substring(dll.path, 0, length(dll.path) - (length(dll.name) + 1)), substring(process.executable, 0, length(process.executable) - (length(process.name) + 1))) and
  not dll.hash.sha256 :
              ("3e278f47c124c44e8e5a18a12364f3b7af723292b6a4c6011e8f558325bbd7cb",
               "bd7874d8b30a39e306d53f83588478622d3e152fe1c7d29a1e0e04fa8844b1e3",
               "ecd44288b475131a8cc14a1fff497af478bcb26a772e838fa711cd654835a233",
               "6c48d66731fcf6a60e7aef335c91e55ee27743df9912856c63302f7dfecde906",
               "2e0559d248a68402d209d65e6009c05628fe6c30f892a1047fa3365a89d7d9a6",
               "c7601b2f8b2439211433de59bda62a09347480bfdbbe03b4c560aa350c543e3a",
               "7e1a25b50775cb246303ae162bba86c9d5fe2bd7fa98044899ffb58919b4ed3a",
               "44f3a05334de6ca0b43ebd17f6c7f1935630e026f049f28828566e364b7f41aa",
               "45715793b8c8571554b0bfb4eccc29e2884c16481e1c7dbee78363bbe4da3dd9",
               "99c109628e7d9bccf0961c0fd40d2f0e98e43fca59fe88e8467cd0f9be6bfdd9") and
  not (dll.path : "?:\\$WINDOWS.~BT\\Sources\\*.dll" and process.executable : "?:\\$WINDOWS.~BT\\Sources\\SetupHost.exe") and
  not dll.path : "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\*.dll"
  ] by process.executable

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
file.nameeqDismHost.exeexcludes:file.name field:"file.name" value:"DismHost.exe"
process.thread.Ext.call_stack_summarymatch|dismcore.dll|excludes:process.thread.Ext.call_stack_summary field:"process.thread.Ext.call_stack_summary" value:"|dismcore.dll|"
file.patheqC:\SuperGrate\mighost.exeexcludes:file.path field:"file.path" value:"C:\SuperGrate\mighost.exe"
process.executableeqD:\SuperGrate\SuperGrate.exeexcludes:process.executable field:"process.executable" value:"D:\SuperGrate\SuperGrate.exe"
file.pathwildcard?:\Program Files*\Common Files\microsoft shared\ClickToRun\Updates\*\OfficeClickToRun.exeexcludes:file.path field:"file.path" value:"?:\Program Files*\Common Files\microsoft shared\ClickToRun\Updates\*\OfficeClickToRun.exe"
process.executablewildcard?:\Program Files*\Common Files\microsoft shared\ClickToRun\OfficeClickToRun.exeexcludes:process.executable field:"process.executable" value:"?:\Program Files*\Common Files\microsoft shared\ClickToRun\OfficeClickToRun.exe"
file.pathwildcard?:\Program Files*\Microsoft\EdgeUpdate\*\MicrosoftEdgeUpdateComRegisterShell*.exeexcludes:file.path field:"file.path" value:"?:\Program Files*\Microsoft\EdgeUpdate\*\MicrosoftEdgeUpdateComRegisterShell*.exe"
process.executablewildcard?:\Program Files*\Microsoft\Temp\*\MicrosoftEdgeUpdate.exeexcludes:process.executable field:"process.executable" value:"?:\Program Files*\Microsoft\Temp\*\MicrosoftEdgeUpdate.exe"
process.executablewildcard?:\Program Files\Microsoft Visual Studio\*\Common?\IDE\devenv.exe, ?:\Program Files (x86)\Microsoft Visual Studio\*\Common?\IDE\devenv.exe, ?:\Program Files\Microsoft Visual Studio\*\MSBuild.exe, ?:\Program Files\dotnet\dotnet.exeexcludes:process.executable
user.ideqS-1-5-18, S-1-5-19, S-1-5-20excludes:user.id field:"user.id" value:"S-1-5-18" field:"user.id" value:"S-1-5-19" field:"user.id" value:"S-1-5-20"
dll.pathwildcard?:\$WINDOWS.~BT\Sources\*.dllexcludes:dll.path field:"dll.path" value:"?:\$WINDOWS.~BT\Sources\*.dll"
process.executableeq?:\$WINDOWS.~BT\Sources\SetupHost.exeexcludes:process.executable field:"process.executable" value:"?:\$WINDOWS.~BT\Sources\SetupHost.exe"
dll.code_signature.statuseqtrustedexcludes:dll.code_signature.status field:"dll.code_signature.status" value:"trusted"
dll.hash.sha256eq3e278f47c124c44e8e5a18a12364f3b7af723292b6a4c6011e8f558325bbd7cb, bd7874d8b30a39e306d53f83588478622d3e152fe1c7d29a1e0e04fa8844b1e3, ecd44288b475131a8cc14a1fff497af478bcb26a772e838fa711cd654835a233, 6c48d66731fcf6a60e7aef335c91e55ee27743df9912856c63302f7dfecde906, 2e0559d248a68402d209d65e6009c05628fe6c30f892a1047fa3365a89d7d9a6, c7601b2f8b2439211433de59bda62a09347480bfdbbe03b4c560aa350c543e3a, 7e1a25b50775cb246303ae162bba86c9d5fe2bd7fa98044899ffb58919b4ed3a, 44f3a05334de6ca0b43ebd17f6c7f1935630e026f049f28828566e364b7f41aa, 45715793b8c8571554b0bfb4eccc29e2884c16481e1c7dbee78363bbe4da3dd9, 99c109628e7d9bccf0961c0fd40d2f0e98e43fca59fe88e8467cd0f9be6bfdd9excludes:dll.hash.sha256
dll.namestarts_withprocess.nameexcludes:dll.name field:"dll.name" value:"process.name"
dll.pathwildcardC:\Program Files (x86)\Microsoft Visual Studio\Installer\*.dllexcludes:dll.path field:"dll.path" value:"C:\Program Files (x86)\Microsoft Visual Studio\Installer\*.dll"

Entra ID Global Administrator Role Assigned

#
Status
production
Severity
high
Time window
9m
Author
Elastic
Source
github.com/elastic/detection-rules

In Microsoft Entra ID, permissions to manage resources are assigned using roles. The Global Administrator is a role that enables users to have access to all administrative features in Microsoft Entra ID and services that use Microsoft Entra ID identities like the Microsoft 365 Defender portal, the Microsoft 365 compliance center, Exchange, SharePoint Online, and Skype for Business Online. Attackers can add users as Global Administrators to maintain access and manage all subscriptions and their settings and resources. They can also elevate privilege to User Access Administrator to pivot into Azure resources.

MITRE ATT&CK Coverage

Telemetry Coverage

PlatformRecord / event type
AzureAdd member to role

Rules Detecting the Same Action

These rules filter on the same operation.

Rule Body

[metadata]
creation_date = "2022/01/06"
integration = ["azure"]
maturity = "production"
updated_date = "2026/04/10"

[rule]
author = ["Elastic"]
description = """
In Microsoft Entra ID, permissions to manage resources are assigned using roles. The Global Administrator
is a role that enables users to have access to all administrative features in Microsoft Entra ID and services that use Microsoft Entra ID
identities like the Microsoft 365 Defender portal, the Microsoft 365 compliance center, Exchange, SharePoint Online, and
Skype for Business Online. Attackers can add users as Global Administrators to maintain access and manage all
subscriptions and their settings and resources. They can also elevate privilege to User Access Administrator to pivot into Azure resources.
"""
from = "now-9m"
index = ["filebeat-*", "logs-azure.auditlogs-*"]
language = "kuery"
license = "Elastic License v2"
name = "Entra ID Global Administrator Role Assigned"
note = """## Triage and analysis

### Investigating Entra ID Global Administrator Role Assigned

Microsoft Entra ID's Global Administrator role grants comprehensive access to manage Microsoft Entra ID and associated services. Adversaries may exploit this by assigning themselves or others to this role, ensuring persistent control over resources. The detection rule identifies such unauthorized assignments by monitoring specific audit logs for role changes, focusing on the addition of members to the Global Administrator role, thus helping to mitigate potential security breaches.

### Possible investigation steps

- Review the Microsoft Entra ID audit logs to identify the user account that performed the "Add member to role" operation, focusing on the specific event dataset and operation name.
- Verify the identity of the user added to the Global Administrator role by examining the modified properties in the audit logs, specifically the new_value field indicating "Global Administrator".
- Check the history of role assignments for the identified user to determine if this is a recurring pattern or a one-time event.
- Investigate the source IP address and location associated with the role assignment event to assess if it aligns with expected user behavior or if it indicates potential unauthorized access.
- Review any recent changes or activities performed by the newly assigned Global Administrator to identify any suspicious actions or configurations that may have been altered.
- Consult with the organization's IT or security team to confirm if the role assignment was authorized and aligns with current administrative needs or projects.
- Correlate with Microsoft Entra ID sign-in logs to check for any unusual login patterns or failed login attempts associated with the user who assigned the role.
- Review the reported device to determine if it is a known and trusted device or if it raises any security concerns such as unexpected relationships with the source user.

### False positive analysis

- Routine administrative tasks may trigger alerts when legitimate IT staff are assigned the Global Administrator role temporarily for maintenance or configuration purposes. To manage this, create exceptions for known IT personnel or scheduled maintenance windows.
- Automated scripts or third-party applications that require elevated permissions might be flagged if they are configured to add users to the Global Administrator role. Review and whitelist these scripts or applications if they are verified as safe and necessary for operations.
- Organizational changes, such as mergers or restructuring, can lead to legitimate role assignments that appear suspicious. Implement a review process to verify these changes and exclude them from triggering alerts if they align with documented organizational changes.
- Training or onboarding sessions for new IT staff might involve temporary assignment to the Global Administrator role. Establish a protocol to document and exclude these training-related assignments from detection alerts.

### Response and remediation

- Immediately remove any unauthorized users from the Global Administrator role to prevent further unauthorized access and control over Azure AD resources.
- Conduct a thorough review of recent audit logs to identify any additional unauthorized changes or suspicious activities associated with the compromised account or role assignments.
- Reset the credentials of the affected accounts and enforce multi-factor authentication (MFA) to enhance security and prevent further unauthorized access.
- Notify the security operations team and relevant stakeholders about the incident for awareness and further investigation.
- Implement conditional access policies to restrict Global Administrator role assignments to specific, trusted locations or devices.
- Review and update role assignment policies to ensure that only a limited number of trusted personnel have the ability to assign Global Administrator roles.
- Enhance monitoring and alerting mechanisms to detect similar unauthorized role assignments in the future, ensuring timely response to potential threats.
"""
references = [
    "https://securitylabs.datadoghq.com/articles/i-spy-escalating-to-entra-id-global-admin/",
    "https://docs.microsoft.com/en-us/azure/active-directory/roles/permissions-reference#global-administrator",
    "https://www.microsoft.com/en-us/security/blog/2025/08/27/storm-0501s-evolving-techniques-lead-to-cloud-based-ransomware/"
]
risk_score = 73
rule_id = "04c5a96f-19c5-44fd-9571-a0b033f9086f"
severity = "high"
tags = [
    "Domain: Cloud",
    "Domain: Identity",
    "Data Source: Azure",
    "Data Source: Microsoft Entra ID",
    "Data Source: Microsoft Entra ID Audit Logs",
    "Use Case: Identity and Access Audit",
    "Tactic: Persistence",
    "Resources: Investigation Guide"
]
timestamp_override = "event.ingested"
type = "query"

query = '''
data_stream.dataset:azure.auditlogs and
    azure.auditlogs.properties.category:RoleManagement and
    azure.auditlogs.operation_name:"Add member to role" and
    azure.auditlogs.properties.target_resources.*.modified_properties.*.new_value: "\"Global Administrator\""
'''


[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1098"
name = "Account Manipulation"
reference = "https://attack.mitre.org/techniques/T1098/"

[[rule.threat.technique.subtechnique]]
id = "T1098.003"
name = "Additional Cloud Roles"
reference = "https://attack.mitre.org/techniques/T1098/003/"

[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1098"
name = "Account Manipulation"
reference = "https://attack.mitre.org/techniques/T1098/"

[[rule.threat.technique.subtechnique]]
id = "T1098.003"
name = "Additional Cloud Roles"
reference = "https://attack.mitre.org/techniques/T1098/003/"

[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"

Stages and Predicates

Stage 1: query

data_stream.dataset:azure.auditlogs and
    azure.auditlogs.properties.category:RoleManagement and
    azure.auditlogs.operation_name:"Add member to role" and
    azure.auditlogs.properties.target_resources.*.modified_properties.*.new_value: "\"Global Administrator\""

Indicators

These rows show field, operator, and value matches.

File Creation in World-Writable Directory by Unusual Process

#
Status
production
Severity
medium
Time window
9m
Group by
host.id, process.executable
Author
Elastic
Source
github.com/elastic/detection-rules

This rule detects the creation of files in world-writable directories by an unusual process. Attackers may attempt to hide their activities by creating files in world-writable directories, which are commonly used for temporary file storage. This behavior is often associated with lateral movement and can be an indicator of an attacker attempting to move laterally within a network.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2026/04/09"
integration = ["endpoint", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2026/07/10"

[rule]
author = ["Elastic"]
description = """
This rule detects the creation of files in world-writable directories by an unusual process. Attackers may
attempt to hide their activities by creating files in world-writable directories, which are commonly used
for temporary file storage. This behavior is often associated with lateral movement and can be an indicator
of an attacker attempting to move laterally within a network.
"""
from = "now-9m"
index = [
    "endgame-*",
    "logs-endpoint.events.file*",
    "logs-sentinel_one_cloud_funnel.*",
]
language = "kuery"
license = "Elastic License v2"
name = "File Creation in World-Writable Directory by Unusual Process"
note = """
## Triage and analysis

> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.

### Investigating File Creation in World-Writable Directory by Unusual Process

This alert flags a Linux process that normally should not stage content in shared writable locations such as /tmp, /var/tmp, /run, or /dev/shm. Attackers abuse these directories because many users and services can write there, which makes payloads and helper scripts easier to hide; for example, a compromised shell may use curl or python to drop an ELF backdoor into /dev/shm and execute it from that transient path.

### Possible investigation steps

- Reconstruct the full process lineage and execution context around the file creation to determine whether it originated from an interactive session, scheduled task, container, service account, or a parent process already running from an unusual location.
- Inspect the dropped file's type, permissions, ownership, hash, and contents to assess whether it is a script, ELF, archive, or disguised payload, and determine if it was later executed, renamed, or moved to a more persistent path.
- Correlate the alert with nearby authentication, privilege escalation, and network activity on the same host to identify signs of compromise such as recent SSH access, sudo use, remote command execution, or outbound connections to untrusted infrastructure.
- Validate whether the activity aligns with known administrative or software deployment behavior by checking package ownership, change records, automation tooling, and host or user prevalence, since one-off staging in shared writable paths is more suspicious than common fleetwide behavior.

### False positive analysis

- Legitimate package installation, OS update, or local maintenance script activity can use interpreters or utilities such as cp, mv, chmod, curl, or python to stage temporary files in /tmp or /var/tmp before moving them into place, so verify whether the process tree, user, and event time align with expected system change or package management activity on the host.
- Normal service startup or deployment automation may create transient files in /run or /dev/shm for configuration generation, caching, or runtime state, so confirm the file owner, contents, and parent process match a known application or boot-time workflow and that the same behavior is regularly seen on comparable systems.

### Response and remediation
- Isolate the affected Linux host from the network while preserving forensic access, stop the malicious process and any spawned tools, and collect copies of the dropped file before cleanup.
- Remove attacker footholds by deleting the dropped file.
- Restore the system to a known-good state by rebuilding from a trusted image or validated backup and verifying core packages, shell configuration files, scheduled tasks, and remote access settings match the approved baseline before reconnecting it.
- Escalate to incident response immediately if the file creation was followed by privilege escalation, credential access, outbound tool downloads, lateral movement over SSH, or the same behavior is identified on multiple hosts, and expand scoping to related accounts and systems.
"""
references = ["https://www.rapid7.com/blog/post/tr-new-whitepaper-stealthy-bpfdoor-variants/"]
risk_score = 47
rule_id = "1f56f548-94ec-4678-b1ed-b1a14cca4e3a"
setup = """## Setup

This rule requires data coming in from Elastic Defend.

### Elastic Defend Integration Setup
Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.

#### Prerequisite Requirements:
- Fleet is required for Elastic Defend.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).

#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
- Click "Add Elastic Defend".
- Configure the integration name and optionally add a description.
- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
- Click "Save and Continue".
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
"""
severity = "medium"
tags = [
    "Domain: Endpoint",
    "OS: Linux",
    "Use Case: Threat Detection",
    "Tactic: Defense Evasion",
    "Data Source: Elastic Defend",
    "Data Source: Elastic Endgame",
    "Data Source: SentinelOne",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
host.os.type:linux and event.category:file and event.type:creation and (
  process.name:("cp" or "mv") or
  process.executable:(
    ./* or /tmp/* or /var/tmp/* or /dev/shm/* or /run/user/* or /var/run/user/* or /boot/* or /sys/* or
    /lost+found/* or /proc/* or /var/mail/* or /var/www/*
  )
) and
file.path:(/run/* or /var/run/* or /dev/shm/* or /tmp/* or /var/tmp/*) and
not (
  file.path:(
    /var/tmp/dracut.* or /var/tmp/mkinitramfs_* or /tmp/.*-00000000.so or /run/udev/rules.d/* or
    /tmp/new_root/* or /tmp/newroot/* or /run/user/*/.bubblewrap/newroot/* or /tmp/tmp.*/docker-scout_* or
    /var/tmp/portage/* or /tmp/yarn--* or /run/k3s/containerd/* or /var/tmp/pamac-build-* or
    /tmp/mkinitcpio* or /run/user/*/netns/netns-* or /tmp/apt-key* or /tmp/tmp.*/pubring.orig.gpg or
    /tmp/CVU_19_* or /tmp/ut-backup-files.* or /tmp/tmp.*/terraform/* or
    /run/initramfs/* or /run/samba/* or /run/qemu/* or /var/run/qemu/* or /run/containerd/* or
    /var/run/sophos/* or /tmp/*sophos-tmpfs* or /tmp/*sophos_sensor*
  ) or
  file.extension:("json" or "txt" or "log" or "pid" or "conf" or "cnf" or "pem" or "lock" or "xml" or "bak" or "gz") or
  process.executable:(
    /tmp/par-* or /tmp/par_tmp.* or /tmp/snap.rootfs_* or /tmp/CVU_*/exectask or /tmp/.mount_*/usr/bin/QGroundControl or
    ./snap/snapd/*/usr/lib/snapd/snap-update-ns or "./usr/lib/snapd/snap-update-ns" or
    "/tmp/newroot/snap/snapd/current/usr/bin/snap" or /tmp/newroot/snap/snapd/*/usr/lib/snapd/snap-confine or
    "./usr/bin/podman" or "/tmp/newroot/usr/lib/systemd/systemd" or
    /tmp/pip-install-* or /tmp/pip-build-env-* or /tmp/*Actions*/* or /tmp/GridSetupActions*/*
  ) or
  process.name:("build-script-build" or "conftest" or "maturin")
)
'''

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1222"
name = "File and Directory Permissions Modification"
reference = "https://attack.mitre.org/techniques/T1222/"

[[rule.threat.technique.subtechnique]]
id = "T1222.002"
name = "Linux and Mac File and Directory Permissions Modification"
reference = "https://attack.mitre.org/techniques/T1222/002/"

[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[rule.new_terms]
field = "new_terms_fields"
value = ["host.id", "process.executable"]

[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-5d"

Stages and Predicates

Stage 1: new_terms

host.os.type:linux and event.category:file and event.type:creation and (
  process.name:("cp" or "mv") or
  process.executable:(
    ./* or /tmp/* or /var/tmp/* or /dev/shm/* or /run/user/* or /var/run/user/* or /boot/* or /sys/* or
    /lost+found/* or /proc/* or /var/mail/* or /var/www/*
  )
) and
file.path:(/run/* or /var/run/* or /dev/shm/* or /tmp/* or /var/tmp/*) and
not (
  file.path:(
    /var/tmp/dracut.* or /var/tmp/mkinitramfs_* or /tmp/.*-00000000.so or /run/udev/rules.d/* or
    /tmp/new_root.bubblewrap/newrootdocker-scout_* or
    /var/tmp/portage/* or /tmp/yarn--* or /run/k3s/containerd/* or /var/tmp/pamac-build-* or
    /tmp/mkinitcpio* or /run/userpubring.orig.gpg or
    /tmp/CVU_19_* or /tmp/ut-backup-files.* or /tmp/tmp.*/terraform/* or
    /run/initramfs/* or /run/samba/* or /run/qemu/* or /var/run/qemu/* or /run/containerd/* or
    /var/run/sophos/* or /tmp/*sophos-tmpfs* or /tmp/*sophos_sensor*
  ) or
  file.extension:("json" or "txt" or "log" or "pid" or "conf" or "cnf" or "pem" or "lock" or "xml" or "bak" or "gz") or
  process.executable:(
    /tmp/par-* or /tmp/par_tmp.* or /tmp/snap.rootfs_* or /tmp/CVU_*/exectask or /tmp/.mount_*/usr/bin/QGroundControl or
    ./snap/snapd/*/usr/lib/snapd/snap-update-ns or "./usr/lib/snapd/snap-update-ns" or
    "/tmp/newroot/snap/snapd/current/usr/bin/snap" or /tmp/newroot/snap/snapd/*/usr/lib/snapd/snap-confine or
    "./usr/bin/podman" or "/tmp/newroot/usr/lib/systemd/systemd" or
    /tmp/pip-install-* or /tmp/pip-build-env-* or /tmp* or /tmp/GridSetupActions*/*
  ) or
  process.name:("build-script-build" or "conftest" or "maturin")
)

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.categoryeq
  • file
field:"event.category" kind:eq value:"file"
event.typeeq
  • creation
field:"event.type" kind:eq value:"creation"
file.pathwildcard
  • /dev/shm/*
  • /run/*
  • /tmp/*
  • /var/run/*
  • /var/tmp/*
field:"TargetFilename" kind:wildcard
process.executablewildcard
  • ./*
  • /boot/*
  • /dev/shm/*
  • /lost+found/*
  • /proc/*
  • /run/user/*
  • /sys/*
  • /tmp/*
  • /var/mail/*
  • /var/run/user/*
  • /var/tmp/*
  • /var/www/*
field:"Image" kind:wildcard
process.namein
  • cp
  • mv
field:"process_basename" kind:in

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
file.extensioninbak, cnf, conf, gz, json, lock, log, pem, pid, txt, xmlexcludes:file.extension
file.pathstarts_with/run/containerd/excludes:file.path field:"file.path" value:"/run/containerd/"
file.pathstarts_with/run/initramfs/excludes:file.path field:"file.path" value:"/run/initramfs/"
file.pathstarts_with/run/k3s/containerd/excludes:file.path field:"file.path" value:"/run/k3s/containerd/"
file.pathstarts_with/run/qemu/excludes:file.path field:"file.path" value:"/run/qemu/"
file.pathstarts_with/run/samba/excludes:file.path field:"file.path" value:"/run/samba/"
file.pathstarts_with/run/udev/rules.d/excludes:file.path field:"file.path" value:"/run/udev/rules.d/"
file.pathstarts_with/tmp/CVU_19_excludes:file.path field:"file.path" value:"/tmp/CVU_19_"
file.pathstarts_with/tmp/apt-keyexcludes:file.path field:"file.path" value:"/tmp/apt-key"
file.pathstarts_with/tmp/mkinitcpioexcludes:file.path field:"file.path" value:"/tmp/mkinitcpio"
file.pathstarts_with/tmp/new_root/excludes:file.path field:"file.path" value:"/tmp/new_root/"
file.pathstarts_with/tmp/newroot/excludes:file.path field:"file.path" value:"/tmp/newroot/"
file.pathstarts_with/tmp/ut-backup-files.excludes:file.path field:"file.path" value:"/tmp/ut-backup-files."
file.pathstarts_with/tmp/yarn--excludes:file.path field:"file.path" value:"/tmp/yarn--"
file.pathstarts_with/var/run/qemu/excludes:file.path field:"file.path" value:"/var/run/qemu/"
file.pathstarts_with/var/run/sophos/excludes:file.path field:"file.path" value:"/var/run/sophos/"
file.pathstarts_with/var/tmp/dracut.excludes:file.path field:"file.path" value:"/var/tmp/dracut."
file.pathstarts_with/var/tmp/mkinitramfs_excludes:file.path field:"file.path" value:"/var/tmp/mkinitramfs_"
file.pathstarts_with/var/tmp/pamac-build-excludes:file.path field:"file.path" value:"/var/tmp/pamac-build-"
file.pathstarts_with/var/tmp/portage/excludes:file.path field:"file.path" value:"/var/tmp/portage/"
file.pathwildcard/run/user/*/.bubblewrap/newroot/*excludes:file.path field:"file.path" value:"/run/user/*/.bubblewrap/newroot/*"
file.pathwildcard/run/user/*/netns/netns-*excludes:file.path field:"file.path" value:"/run/user/*/netns/netns-*"
file.pathwildcard/tmp/*sophos-tmpfs*excludes:file.path field:"file.path" value:"/tmp/*sophos-tmpfs*"
file.pathwildcard/tmp/*sophos_sensor*excludes:file.path field:"file.path" value:"/tmp/*sophos_sensor*"
file.pathwildcard/tmp/.*-00000000.soexcludes:file.path field:"file.path" value:"/tmp/.*-00000000.so"
file.pathwildcard/tmp/tmp.*/docker-scout_*excludes:file.path field:"file.path" value:"/tmp/tmp.*/docker-scout_*"
file.pathwildcard/tmp/tmp.*/pubring.orig.gpgexcludes:file.path field:"file.path" value:"/tmp/tmp.*/pubring.orig.gpg"
file.pathwildcard/tmp/tmp.*/terraform/*excludes:file.path field:"file.path" value:"/tmp/tmp.*/terraform/*"
process.executableeq./usr/bin/podmanexcludes:process.executable field:"process.executable" value:"./usr/bin/podman"
process.executableeq./usr/lib/snapd/snap-update-nsexcludes:process.executable field:"process.executable" value:"./usr/lib/snapd/snap-update-ns"
process.executableeq/tmp/newroot/snap/snapd/current/usr/bin/snapexcludes:process.executable field:"process.executable" value:"/tmp/newroot/snap/snapd/current/usr/bin/snap"
process.executableeq/tmp/newroot/usr/lib/systemd/systemdexcludes:process.executable field:"process.executable" value:"/tmp/newroot/usr/lib/systemd/systemd"
process.executablestarts_with/tmp/par-excludes:process.executable field:"process.executable" value:"/tmp/par-"
process.executablestarts_with/tmp/par_tmp.excludes:process.executable field:"process.executable" value:"/tmp/par_tmp."
process.executablestarts_with/tmp/pip-build-env-excludes:process.executable field:"process.executable" value:"/tmp/pip-build-env-"
process.executablestarts_with/tmp/pip-install-excludes:process.executable field:"process.executable" value:"/tmp/pip-install-"
process.executablestarts_with/tmp/snap.rootfs_excludes:process.executable field:"process.executable" value:"/tmp/snap.rootfs_"
process.executablewildcard./snap/snapd/*/usr/lib/snapd/snap-update-nsexcludes:process.executable field:"process.executable" value:"./snap/snapd/*/usr/lib/snapd/snap-update-ns"
process.executablewildcard/tmp/*Actions*/*excludes:process.executable field:"process.executable" value:"/tmp/*Actions*/*"
process.executablewildcard/tmp/.mount_*/usr/bin/QGroundControlexcludes:process.executable field:"process.executable" value:"/tmp/.mount_*/usr/bin/QGroundControl"
process.executablewildcard/tmp/CVU_*/exectaskexcludes:process.executable field:"process.executable" value:"/tmp/CVU_*/exectask"
process.executablewildcard/tmp/GridSetupActions*/*excludes:process.executable field:"process.executable" value:"/tmp/GridSetupActions*/*"
process.executablewildcard/tmp/newroot/snap/snapd/*/usr/lib/snapd/snap-confineexcludes:process.executable field:"process.executable" value:"/tmp/newroot/snap/snapd/*/usr/lib/snapd/snap-confine"
process.nameinbuild-script-build, conftest, maturinexcludes:process.name field:"process.name" value:"build-script-build" field:"process.name" value:"conftest" field:"process.name" value:"maturin"

Forwarded Google Workspace Security Alert

#
Status
production
Severity
high
Time window
130m
Author
Elastic
Source
github.com/elastic/detection-rules

Identifies the occurrence of a security alert from the Google Workspace alerts center. Google Workspace's security alert center provides an overview of actionable alerts that may be affecting an organization's domain. An alert is a warning of a potential security issue that Google has detected.

Known False Positives

  • To tune this rule, add exceptions to exclude any google_workspace.alert.type or rule.name which should not trigger this rule.
  • For additional tuning, severity exceptions for google_workspace.alert.metadata.severity can be added.

Rule Body

[metadata]
creation_date = "2023/01/15"
integration = ["google_workspace"]
maturity = "production"
promotion = true
updated_date = "2026/05/19"

[rule]
author = ["Elastic"]
description = """
Identifies the occurrence of a security alert from the Google Workspace alerts center. Google Workspace's security alert
center provides an overview of actionable alerts that may be affecting an organization's domain. An alert is a warning
of a potential security issue that Google has detected.
"""
false_positives = [
    """
    To tune this rule, add exceptions to exclude any google_workspace.alert.type or rule.name which should not trigger this rule.
    """,
    "For additional tuning, severity exceptions for google_workspace.alert.metadata.severity can be added.",
]
from = "now-130m"
index = ["logs-google_workspace.alert-*"]
interval = "5m"
language = "kuery"
license = "Elastic License v2"
name = "Forwarded Google Workspace Security Alert"
note = """## Setup

## Triage and analysis

This is a promotion rule for Google Workspace security events, which are alertable events per the vendor.
Consult vendor documentation on interpreting specific events.
"""
references = [
    "https://workspace.google.com/products/admin/alert-center/",
    "https://www.elastic.co/security-labs/google-workspace-attack-surface-part-one",
    "https://www.elastic.co/security-labs/google-workspace-attack-surface-part-two"
]
risk_score = 73
rule_id = "f1a6d0f4-95b8-11ed-9517-f661ea17fbcc"
rule_name_override = "google_workspace.alert.type"
severity = "high"
tags = [
    "Domain: Cloud",
    "Data Source: Google Workspace",
    "Use Case: Log Auditing",
    "Use Case: Threat Detection",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "query"

query = '''
data_stream.dataset: google_workspace.alert
'''


[[rule.severity_mapping]]
field = "google_workspace.alert.metadata.severity"
operator = "equals"
severity = "low"
value = "LOW"

[[rule.severity_mapping]]
field = "google_workspace.alert.metadata.severity"
operator = "equals"
severity = "medium"
value = "MEDIUM"

[[rule.severity_mapping]]
field = "google_workspace.alert.metadata.severity"
operator = "equals"
severity = "high"
value = "HIGH"


Stages and Predicates

Stage 1: query

data_stream.dataset: google_workspace.alert

Indicators

These rows show field, operator, and value matches.

Manual Mount Discovery via /etc/exports or /etc/fstab

#
Status
production
Severity
medium
Time window
9m
Author
Elastic
Source
github.com/elastic/detection-rules

This rule detects manual mount discovery via the /etc/exports or /etc/fstab file on Linux systems. These files are used by NFS (Network File System) to define which directories are shared with remote hosts. Attackers may access this file to gather information about shared directories and potential targets for further exploitation.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2025/04/25"
integration = ["endpoint", "crowdstrike", "sentinel_one_cloud_funnel", "auditd_manager"]
maturity = "production"
updated_date = "2026/03/24"

[rule]
author = ["Elastic"]
description = """
This rule detects manual mount discovery via the /etc/exports or /etc/fstab file on Linux systems. These files are used
by NFS (Network File System) to define which directories are shared with remote hosts. Attackers may access this
file to gather information about shared directories and potential targets for further exploitation.
"""
from = "now-9m"
index = [
    "auditbeat-*",
    "endgame-*",
    "logs-crowdstrike.fdr*",
    "logs-endpoint.events.process*",
    "logs-sentinel_one_cloud_funnel.*",
    "logs-auditd_manager.auditd-*",
]
language = "eql"
license = "Elastic License v2"
name = "Manual Mount Discovery via /etc/exports or /etc/fstab"
note = """ ## Triage and analysis

> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.

### Investigating Manual Mount Discovery via /etc/exports or /etc/fstab

In Linux environments, the `/etc/exports` and `/etc/fstab` files are crucial for managing shared directories and mounting filesystems, respectively. Adversaries may exploit these files to identify shared resources and potential targets for lateral movement. The detection rule identifies suspicious processes accessing these files, using common command-line utilities, to flag potential reconnaissance activities by attackers.

### Possible investigation steps

- Review the process details to identify the user account associated with the suspicious activity, focusing on the process.name and process.command_line fields.
- Examine the command line arguments in the process.command_line field to determine the specific actions taken and whether they align with legitimate administrative tasks.
- Check the process start time and correlate it with other system activities to identify any unusual patterns or sequences of events.
- Investigate the source IP address or hostname if the process was initiated remotely, to assess whether it is a known or trusted entity.
- Look for any other related alerts or logs around the same timeframe to identify potential lateral movement or further reconnaissance activities.
- Verify if the accessed directories in /etc/exports or /etc/fstab are critical or sensitive, and assess the potential impact of unauthorized access.

### False positive analysis

- Routine system administration tasks may trigger alerts when administrators use command-line utilities to view or edit /etc/exports or /etc/fstab. To mitigate this, consider excluding processes executed by known administrator accounts or during scheduled maintenance windows.
- Automated scripts for system monitoring or configuration management might access these files regularly. Identify and whitelist these scripts by their process names or command-line patterns to reduce false positives.
- Backup operations often involve reading configuration files like /etc/exports or /etc/fstab. Exclude processes associated with backup software or services to prevent unnecessary alerts.
- Security tools or compliance checks may scan these files as part of their regular operations. Review and whitelist these tools based on their process names or command-line arguments to avoid false positives.
- Developers or testers might access these files in development environments for testing purposes. Consider excluding processes from development servers or specific user accounts associated with testing activities.

### Response and remediation

- Immediately isolate the affected system from the network to prevent potential lateral movement by the attacker.
- Conduct a thorough review of the `/etc/exports` and `/etc/fstab` files on the affected system to identify any unauthorized changes or suspicious entries.
- Revoke any unauthorized access to shared directories identified in the `/etc/exports` file and ensure that only trusted hosts have access.
- Reset credentials and review access permissions for users and services that have access to the affected system to prevent further unauthorized access.
- Monitor network traffic for any unusual activity originating from the affected system, focusing on connections to external IPs or unexpected internal hosts.
- Escalate the incident to the security operations team for further investigation and to determine if additional systems have been compromised.
- Implement enhanced monitoring and logging for access to critical configuration files like `/etc/exports` and `/etc/fstab` to detect similar threats in the future.
"""
risk_score = 47
rule_id = "bd18f4a3-c4c6-43b9-a1e4-b05e09998110"
setup = """## Setup

This rule requires data coming in from Elastic Defend.

### Elastic Defend Integration Setup
Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.

#### Prerequisite Requirements:
- Fleet is required for Elastic Defend.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).

#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
- Click "Add Elastic Defend".
- Configure the integration name and optionally add a description.
- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
- Click "Save and Continue".
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
"""
severity = "medium"
tags = [
    "Domain: Endpoint",
    "OS: Linux",
    "Use Case: Threat Detection",
    "Tactic: Discovery",
    "Data Source: Elastic Defend",
    "Data Source: Elastic Endgame",
    "Data Source: Crowdstrike",
    "Data Source: SentinelOne",
    "Data Source: Auditd Manager",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "linux" and event.type == "start" and
event.action in ("exec", "exec_event", "start", "ProcessRollup2", "executed", "process_started") and
process.name in ("cat", "grep", "tail", "less", "more", "egrep", "fgrep", "awk") and
process.command_line like ("/etc/exports", "/etc/fstab")
'''

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1082"
name = "System Information Discovery"
reference = "https://attack.mitre.org/techniques/T1082/"

[[rule.threat.technique]]
id = "T1135"
name = "Network Share Discovery"
reference = "https://attack.mitre.org/techniques/T1135/"

[rule.threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"

Stages and Predicates

Stage 1: process

process where host.os.type == "linux" and event.type == "start" and
event.action in ("exec", "exec_event", "start", "ProcessRollup2", "executed", "process_started") and
process.name in ("cat", "grep", "tail", "less", "more", "egrep", "fgrep", "awk") and
process.command_line like ("/etc/exports", "/etc/fstab")

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actionin
  • ProcessRollup2
  • exec
  • exec_event
  • executed
  • process_started
  • start
field:"EventType" kind:in
event.typeeq
  • start
field:"event.type" kind:eq value:"start"
process.command_linewildcard
  • /etc/exports
  • /etc/fstab
field:"CommandLine" kind:wildcard
process.namein
  • awk
  • cat
  • egrep
  • fgrep
  • grep
  • less
  • more
  • tail
field:"process_basename" kind:in

Memory Dump File with Unusual Extension

#
Status
production
Kind
building block (feeds higher-level correlation rules; not a standalone alert)
Severity
low
Time window
9m
Author
Elastic
Source
github.com/elastic/detection-rules

Identifies the creation of a memory dump file with an unusual extension, which can indicate an attempt to disguise a memory dump as another file type to bypass security defenses.

MITRE ATT&CK Coverage

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 11: FileCreate

Rule Body

[metadata]
bypass_bbr_timing = true
creation_date = "2023/09/21"
integration = ["endpoint"]
maturity = "production"
updated_date = "2024/05/21"

[rule]
author = ["Elastic"]
building_block_type = "default"
description = """
Identifies the creation of a memory dump file with an unusual extension, which can indicate an attempt to disguise a
memory dump as another file type to bypass security defenses.
"""
from = "now-9m"
index = ["logs-endpoint.events.file-*"]
language = "eql"
license = "Elastic License v2"
name = "Memory Dump File with Unusual Extension"
risk_score = 21
rule_id = "c0b9dc99-c696-4779-b086-0d37dc2b3778"
severity = "low"
tags = [
    "Domain: Endpoint",
    "OS: Windows",
    "Use Case: Threat Detection",
    "Tactic: Credential Access",
    "Tactic: Defense Evasion",
    "Data Source: Elastic Defend",
    "Rule Type: BBR",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
file where host.os.type == "windows" and event.type == "creation" and

  /* MDMP header */
  file.Ext.header_bytes : "4d444d50*" and
  not file.extension : ("dmp", "mdmp", "hdmp", "edmp", "full", "tdref", "cg", "tmp", "dat") and
  not 
  (
    process.executable : "?:\\Program Files\\Endgame\\esensor.exe" and
    process.code_signature.trusted == true and length(file.extension) == 0
  ) and
  not
  (
    process.name : "System" and file.extension : "tmpscan"
  )
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1003"
name = "OS Credential Dumping"
reference = "https://attack.mitre.org/techniques/T1003/"
[[rule.threat.technique.subtechnique]]
id = "T1003.001"
name = "LSASS Memory"
reference = "https://attack.mitre.org/techniques/T1003/001/"



[rule.threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1036"
name = "Masquerading"
reference = "https://attack.mitre.org/techniques/T1036/"
[[rule.threat.technique.subtechnique]]
id = "T1036.008"
name = "Masquerade File Type"
reference = "https://attack.mitre.org/techniques/T1036/008/"



[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

Stages and Predicates

Stage 1: file

file where host.os.type == "windows" and event.type == "creation" and
  file.Ext.header_bytes : "4d444d50*" and
  not file.extension : ("dmp", "mdmp", "hdmp", "edmp", "full", "tdref", "cg", "tmp", "dat") and
  not
  (
    process.executable : "?:\\Program Files\\Endgame\\esensor.exe" and
    process.code_signature.trusted == true and length(file.extension) == 0
  ) and
  not
  (
    process.name : "System" and file.extension : "tmpscan"
  )

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.typeeq
  • creation corpus 48 (elastic 48)
field:"event.type" kind:eq value:"creation"
file.Ext.header_byteswildcard
  • 4d444d50* corpus 2 (elastic 2)
field:"file.Ext.header_bytes" kind:wildcard value:"4d444d50*"

Exclusions

The rule actively suppresses these predicates.

Parallel NTDLL Loaded from Unbacked Memory

#
Source
github.com/elastic/protections-artifacts

Identifies the load of NTDLL for the second time and from an unbacked call stack. This may indicate the use of direct system calls to evade endpoint security solutions hooking Windows APIs.

MITRE ATT&CK Coverage

TacticTechniques
Stealth

Rule Body

[rule]
description = """
Identifies the load of NTDLL for the second time and from an unbacked call stack. This may indicate the use of direct
system calls to evade endpoint security solutions hooking Windows APIs.
"""
id = "69267bb2-e2d9-4621-9bf6-064ac885e49c"
license = "Elastic License v2"
name = "Parallel NTDLL Loaded from Unbacked Memory"
os_list = ["windows"]
reference = [
    "https://www.elastic.co/security-labs/upping-the-ante-detecting-in-memory-threats-with-kernel-call-stacks",
    "https://www.ired.team/offensive-security/defense-evasion/using-syscalls-directly-from-visual-studio-to-bypass-avs-edrs",
]
version = "1.0.20"

query = '''
library where dll.name : "ntdll.dll" and
 dll.Ext.load_index >= 2 and
 process.thread.Ext.call_stack_summary :
                   ("*kernelbase.dll|Unbacked*",
                    "Unbacked*",
                    "ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|Unbacked",
                    "ntdll.dll|Unbacked",
                    "ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|Unbacked|kernel32.dll|ntdll.dll",
                    "ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|Unbacked|clr.dll|mscorlib.ni.dll|Unbacked|clr.dll|mscorlib.ni.dll|Unbacked|clr.dll|mscoreei.dll|mscoree.dll|ntdll.dll") and
 not (process.code_signature.subject_name == "Check Point Software Technologies Ltd." and
      process.code_signature.trusted == true and process.thread.Ext.call_stack_summary : "ntdll.dll|Unbacked") and
 not (process.executable : "?:\\Windows\\System32\\taskhostw.exe" and user.id : "S-1-5-18" and
      process.thread.Ext.call_stack_summary : "Unbacked") and
 not process.executable : "C:\\Program Files (x86)\\Steam\\steamapps\\common\\MonsterHunterWilds\\MonsterHunterWilds.exe"
'''

min_endpoint_version = "8.7.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"


[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "8.7.0"

Stages and Predicates

Stage 1: library

library where dll.name : "ntdll.dll" and
 dll.Ext.load_index >= 2 and
 process.thread.Ext.call_stack_summary :
                   ("*kernelbase.dll|Unbacked*",
                    "Unbacked*",
                    "ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|Unbacked",
                    "ntdll.dll|Unbacked",
                    "ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|Unbacked|kernel32.dll|ntdll.dll",
                    "ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|Unbacked|clr.dll|mscorlib.ni.dll|Unbacked|clr.dll|mscorlib.ni.dll|Unbacked|clr.dll|mscoreei.dll|mscoree.dll|ntdll.dll") and
 not (process.code_signature.subject_name == "Check Point Software Technologies Ltd." and
      process.code_signature.trusted == true and process.thread.Ext.call_stack_summary : "ntdll.dll|Unbacked") and
 not (process.executable : "?:\\Windows\\System32\\taskhostw.exe" and user.id : "S-1-5-18" and
      process.thread.Ext.call_stack_summary : "Unbacked") and
 not process.executable : "C:\\Program Files (x86)\\Steam\\steamapps\\common\\MonsterHunterWilds\\MonsterHunterWilds.exe"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
dll.Ext.load_indexge
  • 2 transforms: number corpus 3 (elastic 3)
field:"dll.Ext.load_index" kind:ge value:"2"
dll.namewildcard
  • ntdll.dll corpus 6 (elastic 6)
field:"dll.name" kind:wildcard value:"ntdll.dll"
process.thread.Ext.call_stack_summarywildcard
  • *kernelbase.dll|Unbacked*
  • Unbacked*
  • ntdll.dll|Unbacked
  • ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|Unbacked corpus 2 (elastic 2)
  • ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|Unbacked|clr.dll|mscorlib.ni.dll|Unbacked|clr.dll|mscorlib.ni.dll|Unbacked|clr.dll|mscoreei.dll|mscoree.dll|ntdll.dll
  • ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|Unbacked|kernel32.dll|ntdll.dll corpus 2 (elastic 2)
field:"process.thread.Ext.call_stack_summary" kind:wildcard

Exclusions

The rule actively suppresses these predicates.

Potential Kerberos Attack via Bifrost

#
Source
github.com/elastic/protections-artifacts

Identifies use of Bifrost, a known macOS Kerberos pentesting tool, which can be used to dump cached Kerberos tickets or attempt unauthorized authentication techniques such as pass-the-ticket/hash and kerberoasting.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
Identifies use of Bifrost, a known macOS Kerberos pentesting tool, which can be used to dump cached Kerberos tickets or
attempt unauthorized authentication techniques such as pass-the-ticket/hash and kerberoasting.
"""
id = "fecebe4f-2d28-46e7-9bc1-71cdd8ecdd60"
license = "Elastic License v2"
name = "Potential Kerberos Attack via Bifrost"
os_list = ["macos"]
reference = ["https://github.com/its-a-feature/bifrost"]
version = "1.0.28"

query = '''
process where event.type == "start" and process.args like~ "-action" and
 (
  process.args like~ ("-kerberoast", "askhash", "asktgs", "asktgt", "s4u") or
  (process.args like~ "-ticket" and process.args like~ "ptt") or
  (process.args like~ "dump" and process.args in~ ("tickets", "keytab"))
  )
'''

min_endpoint_version = "8.10.2"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1558"
name = "Steal or Forge Kerberos Tickets"
reference = "https://attack.mitre.org/techniques/T1558/"
[[threat.technique.subtechnique]]
id = "T1558.003"
name = "Kerberoasting"
reference = "https://attack.mitre.org/techniques/T1558/003/"



[threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1550"
name = "Use Alternate Authentication Material"
reference = "https://attack.mitre.org/techniques/T1550/"
[[threat.technique.subtechnique]]
id = "T1550.003"
name = "Pass the Ticket"
reference = "https://attack.mitre.org/techniques/T1550/003/"



[threat.tactic]
id = "TA0008"
name = "Lateral Movement"
reference = "https://attack.mitre.org/tactics/TA0008/"

[internal]
min_endpoint_version = "8.10.2"

Stages and Predicates

Stage 1: process

process where event.type == "start" and process.args like~ "-action" and
 (
  process.args like~ ("-kerberoast", "askhash", "asktgs", "asktgt", "s4u") or
  (process.args like~ "-ticket" and process.args like~ "ptt") or
  (process.args like~ "dump" and process.args in~ ("tickets", "keytab"))
  )

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.typeeq
  • start
field:"event.type" kind:eq value:"start"
process.argsin
  • keytab
  • tickets
field:"process.args" kind:in
process.argswildcard
  • -action
  • -kerberoast
  • -ticket
  • askhash
  • asktgs
  • asktgt
  • dump
  • ptt
  • s4u
field:"process.args" kind:wildcard

Potential privilege escalation via CVE-2022-38028

#
Status
production
Severity
high
Time window
9m
Author
Elastic
Source
github.com/elastic/detection-rules

Identifies a potential privilege escalation attempt via CVE-2022-38028 through modification of the protected Print to PDF MPDW constraints script.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2024/04/23"
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
maturity = "production"
updated_date = "2026/05/03"

[rule]
author = ["Elastic"]
description = """
Identifies a potential privilege escalation attempt via CVE-2022-38028 through modification of the protected Print to PDF
MPDW constraints script.
"""
from = "now-9m"
index = [
    "logs-endpoint.events.file-*",
    "logs-windows.sysmon_operational-*",
    "endgame-*",
    "winlogbeat-*",
    "logs-m365_defender.event-*",
    "logs-sentinel_one_cloud_funnel.*",
    "logs-crowdstrike.fdr*",
]
language = "eql"
license = "Elastic License v2"
name = "Potential privilege escalation via CVE-2022-38028"
references = [
    "https://www.microsoft.com/en-us/security/blog/2024/04/22/analyzing-forest-blizzards-custom-post-compromise-tool-for-exploiting-cve-2022-38028-to-obtain-credentials/",
]
risk_score = 73
rule_id = "dffbd37c-d4c5-46f8-9181-5afdd9172b4c"
severity = "high"
tags = [
    "Domain: Endpoint",
    "OS: Windows",
    "Use Case: Threat Detection",
    "Tactic: Privilege Escalation",
    "Data Source: Elastic Endgame",
    "Data Source: Elastic Defend",
    "Data Source: Sysmon",
    "Data Source: Microsoft Defender XDR",
    "Data Source: SentinelOne",
    "Data Source: Crowdstrike",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
file where host.os.type == "windows" and event.type != "deletion" and
    file.name : "MPDW-constraints.js" and
    file.path : (
        "?:\\*\\Windows\\system32\\DriverStore\\FileRepository\\*\\MPDW-constraints.js",
        "?:\\*\\Windows\\WinSxS\\amd64_microsoft-windows-printing-printtopdf_*\\MPDW-constraints.js", 
        "\\Device\\HarddiskVolume*\\*\\Windows\\system32\\DriverStore\\FileRepository\\*\\MPDW-constraints.js",
        "\\Device\\HarddiskVolume*\\*\\Windows\\WinSxS\\amd64_microsoft-windows-printing-printtopdf_*\\MPDW-constraints.js"
    ) and
    not process.executable : (
          "?:\\$WINDOWS.~BT\\Sources\\SetupHost.exe",
          "?:\\Windows\\System32\\taskhostw.exe"
    ) and
    not file.path : (
        "?:\\$WINDOWS.~BT\\NewOS\\Windows\\WinSxS\\*\\MPDW-constraints.js",
        "\\Device\\HarddiskVolume*\\$WINDOWS.~BT\\NewOS\\Windows\\WinSxS\\*\\MPDW-constraints.js"
    )
'''

note = """## Triage and analysis

### Investigating Potential privilege escalation via CVE-2022-38028

#### Possible investigation steps

- Does the alert show protected-path MPDW-constraints.js placement outside Windows servicing?
  - Why: the rule proves a Print to PDF constraints-script write, not Print Spooler execution of the modified script.
  - Focus: confirm `file.path` is DriverStore or Print to PDF WinSxS for MPDW-constraints.js, then read `process.executable`, `process.command_line`, `process.parent.executable`, and `process.parent.command_line`. $investigate_0
  - Implication: escalate when the target is protected DriverStore or WinSxS and the writer is not Windows setup, repair, or print-component servicing; lower suspicion only when path, writer, parent, and surrounding servicing files match the same recognized OS or Print to PDF repair activity.
- Does the writer process look like GooseEgg staging rather than servicing?
  - Why: Microsoft observed GooseEgg launchers and batch scripts before Print Spooler redirection; writer identity and parentage separate servicing from exploit staging.
  - Focus: recover the writer start event with `process.entity_id`; compare `process.executable`, `process.hash.sha256`, `process.code_signature.subject_name`, `process.parent.executable`, and `process.parent.command_line`.
  - Implication: escalate when writer or parent is a batch/script host, user-writable or renamed binary, known GooseEgg launcher, or unsigned/unrecognized executable; lower suspicion when identity and lineage remain signed Windows servicing or recognized print-management tooling.
- Did the same writer stage GooseEgg files or copied driver-store content?
  - Why: published GooseEgg examples stage batch files, wayzgoose*.dll, and copied print-driver directories under version-like C:\\ProgramData\\<vendor>\\v#.#.# paths.
  - Focus: same `host.id` and `process.entity_id` file events: `file.path`, `file.name`, `file.Ext.original.path`, and `file.Ext.header_bytes` for staging, rename, or content clues. $investigate_1
  - Implication: escalate when those filenames, ProgramData version paths, copied driver-store directories, .save / .zip hive outputs, or rename chains appear around the writer; lower suspicion when the same-process file set is limited to recognized servicing content and no GooseEgg artifact family appears.
- If registry telemetry is available, did the writer create GooseEgg protocol or CLSID redirection?
  - Focus: same `host.id` and `process.entity_id` registry events, especially `registry.path`, `registry.value`, `registry.data.strings`, and `process.executable` for rogue protocol handler, CLSID, or wayzgoose*.dll paths. $investigate_2
  - Hint: missing registry telemetry is unresolved, not benign; continue with file, process, and spooler evidence.
  - Implication: escalate when registry changes register the rogue protocol or CLSID or point Print Spooler resolution to actor-controlled ProgramData content; lower suspicion only when available registry data remains recognized print-component configuration and file/process evidence is also clean.
- Did activation or spooler follow-on show SYSTEM-level execution?
  - Focus: process starts after the write on `host.id`: `process.name`, `process.parent.name`, `process.parent.executable`, `process.command_line`, and `process.Ext.token.integrity_level_name` for scheduled-task launch, spoolsv.exe, PrintIsolationHost.exe, or SYSTEM command tests. $investigate_3
  - Hint: with library telemetry, check `dll.name` and `dll.path` for wayzgoose*.dll or loads from the written driver-store path; missing library telemetry is unresolved for load proof, not benign.
  - Implication: escalate when the host shows scheduled-task activation as SYSTEM, spooler or print isolation child processes, a SYSTEM whoami test, or a wayzgoose*.dll load after the write; absence is no execution proof, not proof the write was benign.
- Does the suspicious artifact set recur enough to change scope?
  - Focus: after suspicious or unresolved local evidence, review recent alerts for `host.id`, then search `file.path`, suspicious `process.hash.sha256`, and GooseEgg filenames across hosts. $investigate_4
  - Implication: broaden containment and hunting when the same writer hash, ProgramData version path, wayzgoose*.dll, or protected MPDW-constraints.js placement appears on other hosts or pairs with spooler/privilege-escalation alerts; keep scope local when recurrence is absent and local evidence resolves to one recognized workflow.
- Escalate when protected-path placement aligns with non-servicing lineage or any GooseEgg, registry, scheduled-task, or spooler corroborator; close only when path, writer, parent, file set, user/host scope, and recovery bind to one recognized servicing or print workflow; preserve artifacts and escalate when evidence is mixed, missing, or contradictory.

### False positive analysis

- Windows servicing, Print to PDF repair, printer-driver packaging, image-build, or print-management workflows can touch these paths. Confirm `file.path`, writer, parent, signer, `host.id` cohort, surrounding file set, and spooler follow-on all bind to one such workflow, with no GooseEgg artifacts, rogue registry evidence, or spooler child-process anomalies. Change records, patch windows, build records, or management tickets can corroborate; if unavailable, close only when telemetry independently proves the bounded workflow.
- Before creating an exception, validate a stable benign workflow across prior alerts: keep writer identity, `process.parent.executable`, `file.path`, `host.id` cohort, and bounded file set stable. Avoid exceptions on MPDW-constraints.js alone, DriverStore or WinSxS paths alone, or spoolsv.exe activity alone.

### Response and remediation

- If confirmed benign, reverse temporary containment and record the `file.path`, writer identity, parent lineage, `host.id` cohort, and servicing or print-management file pattern that justified closure. Create an exception only for that recurring workflow.
- If suspicious but unconfirmed, preserve the written MPDW-constraints.js, its path and hash when available, the writer `process.entity_id`, `process.executable`, `process.command_line`, parent lineage, `user.id`, GooseEgg scripts or DLLs, ProgramData staging directories, scheduled-task evidence, and any registry or library corroboration before cleanup. Apply reversible containment first, such as pausing nonessential printing, limiting print-management access, isolating the host when business impact permits, or increasing monitoring. Avoid deleting files, stopping spoolsv.exe, or restoring registry state until the evidence is preserved.
- If confirmed malicious, preserve the same file, process, registry, library, scheduled-task, and spooler evidence first, then isolate the host through endpoint response when available and proportionate to host criticality. If direct response is unavailable, escalate with the preserved `file.path`, writer lineage, staging directory, registry redirection, and spooler follow-on evidence to the team that can act. After scope is clear, remove the malicious JavaScript, GooseEgg scripts, wayzgoose*.dll, ProgramData staging directory, scheduled task, and rogue registry/protocol state; restore affected print configuration, close the staging mechanism, and rotate credentials only for accounts or hives exposed by collected evidence.
- Post-incident hardening: apply the Microsoft security update for CVE-2022-38028, disable Print Spooler on systems that do not need it, restrict print-management rights, retain file/process coverage plus registry or library telemetry where it limited the investigation, and document the confirmed MPDW-constraints.js, ProgramData, wayzgoose, or scheduled-task pattern for future triage.
"""

setup = """## Setup

This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.

Setup instructions: https://ela.st/install-elastic-defend

### Additional data sources

This rule also supports the following third-party data sources. For setup instructions, refer to the links below:

- [CrowdStrike](https://ela.st/crowdstrike-integration)
- [Microsoft Defender XDR](https://ela.st/m365-defender)
- [SentinelOne Cloud Funnel](https://ela.st/sentinel-one-cloud-funnel)
- [Sysmon Event ID 11 - File Create](https://ela.st/sysmon-event-11-setup)
"""

[rule.investigation_fields]
field_names = [
    "@timestamp",
    "host.name",
    "host.id",
    "user.id",
    "process.executable",
    "process.command_line",
    "process.pid",
    "process.entity_id",
    "process.parent.executable",
    "process.parent.command_line",
    "process.hash.sha256",
    "process.code_signature.subject_name",
    "process.code_signature.trusted",
    "file.path",
    "file.name",
]

[transform]

[[transform.investigate]]
label = "File events for the same suspicious JavaScript path"
description = ""
providers = [
  [
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
    { excluded = false, field = "file.path", queryType = "phrase", value = "{{file.path}}", valueType = "string" }
  ]
]
relativeFrom = "now-2h"
relativeTo = "now"

[[transform.investigate]]
label = "File events from the writer process"
description = ""
providers = [
  [
    { excluded = false, field = "event.category", queryType = "phrase", value = "file", valueType = "string" },
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
    { excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.entity_id}}", valueType = "string" }
  ]
]
relativeFrom = "now-2h"
relativeTo = "now"

[[transform.investigate]]
label = "Registry events from the writer process"
description = ""
providers = [
  [
    { excluded = false, field = "event.category", queryType = "phrase", value = "registry", valueType = "string" },
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
    { excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.entity_id}}", valueType = "string" }
  ]
]
relativeFrom = "now-2h"
relativeTo = "now"

[[transform.investigate]]
label = "Process events after the protected file write"
description = ""
providers = [
  [
    { excluded = false, field = "event.category", queryType = "phrase", value = "process", valueType = "string" },
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" }
  ]
]
relativeFrom = "now"
relativeTo = "now"

[[transform.investigate]]
label = "Alerts associated with the host"
description = ""
providers = [
  [
    { excluded = false, field = "event.kind", queryType = "phrase", value = "signal", valueType = "string" },
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" }
  ]
]
relativeFrom = "now-48h/h"
relativeTo = "now"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1068"
name = "Exploitation for Privilege Escalation"
reference = "https://attack.mitre.org/techniques/T1068/"

[[rule.threat.technique]]
id = "T1574"
name = "Hijack Execution Flow"
reference = "https://attack.mitre.org/techniques/T1574/"

[[rule.threat.technique.subtechnique]]
id = "T1574.010"
name = "Services File Permissions Weakness"
reference = "https://attack.mitre.org/techniques/T1574/010/"

[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1036"
name = "Masquerading"
reference = "https://attack.mitre.org/techniques/T1036/"

[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

Stages and Predicates

Stage 1: file

file where host.os.type == "windows" and event.type != "deletion" and
    file.name : "MPDW-constraints.js" and
    file.path : (
        "?:\\*\\Windows\\system32\\DriverStore\\FileRepository\\*\\MPDW-constraints.js",
        "?:\\*\\Windows\\WinSxS\\amd64_microsoft-windows-printing-printtopdf_*\\MPDW-constraints.js", 
        "\\Device\\HarddiskVolume*\\*\\Windows\\system32\\DriverStore\\FileRepository\\*\\MPDW-constraints.js",
        "\\Device\\HarddiskVolume*\\*\\Windows\\WinSxS\\amd64_microsoft-windows-printing-printtopdf_*\\MPDW-constraints.js"
    ) and
    not process.executable : (
          "?:\\$WINDOWS.~BT\\Sources\\SetupHost.exe",
          "?:\\Windows\\System32\\taskhostw.exe"
    ) and
    not file.path : (
        "?:\\$WINDOWS.~BT\\NewOS\\Windows\\WinSxS\\*\\MPDW-constraints.js",
        "\\Device\\HarddiskVolume*\\$WINDOWS.~BT\\NewOS\\Windows\\WinSxS\\*\\MPDW-constraints.js"
    )

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.typene
  • deletion corpus 33 (elastic 33)
field:"event.type" kind:ne value:"deletion"
file.namewildcard
  • MPDW-constraints.js
field:"file.name" kind:wildcard value:"MPDW-constraints.js"
file.pathwildcard
  • ?:\*\Windows\WinSxS\amd64_microsoft-windows-printing-printtopdf_*\MPDW-constraints.js
  • ?:\*\Windows\system32\DriverStore\FileRepository\*\MPDW-constraints.js
  • \Device\HarddiskVolume*\*\Windows\WinSxS\amd64_microsoft-windows-printing-printtopdf_*\MPDW-constraints.js
  • \Device\HarddiskVolume*\*\Windows\system32\DriverStore\FileRepository\*\MPDW-constraints.js
field:"TargetFilename" kind:wildcard

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
file.pathwildcard?:\$WINDOWS.~BT\NewOS\Windows\WinSxS\*\MPDW-constraints.js, \Device\HarddiskVolume*\$WINDOWS.~BT\NewOS\Windows\WinSxS\*\MPDW-constraints.jsexcludes:file.path field:"file.path" value:"?:\$WINDOWS.~BT\NewOS\Windows\WinSxS\*\MPDW-constraints.js" field:"file.path" value:"\Device\HarddiskVolume*\$WINDOWS.~BT\NewOS\Windows\WinSxS\*\MPDW-constraints.js"
process.executableeq?:\$WINDOWS.~BT\Sources\SetupHost.exe, ?:\Windows\System32\taskhostw.exeexcludes:process.executable field:"process.executable" value:"?:\$WINDOWS.~BT\Sources\SetupHost.exe" field:"process.executable" value:"?:\Windows\System32\taskhostw.exe"

Potential Remote Code Injection

#
Time window
1m
Sequence by
Target.process.pid, process.Ext.api.parameters.address, process.entity_id
Source
github.com/elastic/protections-artifacts

Identifies attempt to allocate an executable memory region in a remote process followed by writing content to it. This behavior is consistent with remote code injection attacks.

MITRE ATT&CK Coverage

TacticTechniques
Stealth

Rule Body

[rule]
description = """
Identifies attempt to allocate an executable memory region in a remote process followed by writing content to it. This
behavior is consistent with remote code injection attacks.
"""
id = "f1d05929-4271-4d39-9cae-05eab6d4efca"
license = "Elastic License v2"
name = "Potential Remote Code Injection"
os_list = ["windows"]
version = "1.0.12"

query = '''
sequence by process.entity_id, process.Ext.api.parameters.address, Target.process.pid with maxspan=60s
 [api where process.Ext.api.behaviors == "cross-process" and not process.Ext.api.behaviors == "parent-child" and
  process.executable != null and process.thread.Ext.call_stack_final_user_module.name != null and 
  process.Ext.api.name in ("VirtualAllocEx", "MapViewOfFile", "MapViewOfFile2", "VirtualProtect", "VirtualProtectEx") and process.Ext.api.parameters.protection like "*X*" and
  (process.code_signature.trusted == false or process.code_signature.exists == false or process.name : "rundll32.exe" or 
   process.executable : ("?:\\Windows\\Microsoft.NET\\*", "?:\\Users\\Public")) and 
   not process.executable : ("?:\\Program Files\\*", "?:\\Program Files (x86)\\*") and 
   not _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info: "?:\\program files*\\cisco\\amp\\exprev\\protector*.dll*") and 
   not (process.code_signature.trusted == true and startswith~(process.thread.Ext.call_stack_final_user_module.path, process.executable)) and 
   not process.thread.Ext.call_stack_final_user_module.name in ("Unknown", "Undetermined", "Kernel") and
   not process.thread.Ext.call_stack_final_user_module.path like
                                         ("?:\\program files\\*",
                                          "?:\\program files (x86)\\*",
                                          "\\program files\\*", 
                                          "\\program files (x86)\\*",
                                          "?:\\windows\\microsoft.net\\framework*.dll", 
                                          "\\windows\\microsoft.net\\framework*.dll", 
                                          "?:\\windows\\system32\\*", 
                                          "\\windows\\system32\\*", 
                                          "?:\\windows\\winsxs\\*", 
                                          "\\windows\\winsxs\\*", 
                                          "?:\\windows\\syswow64\\*", 
                                          "\\windows\\syswow64\\*", 
                                          "?:\\windows\\assembly\\*",
                                          "\\windows\\assembly\\*",
                                          "?:\\windows\\veeamvsssupport\\veeamvsssupport.dll") and 
   not process.thread.Ext.call_stack_final_user_module.hash.sha256 in
                                          ("70a8c4ae129e3d79854c6658b199faf27590800cb2d7fa5681d6bfdbe0111993", 
                                           "13d8d9823d8f9e41247f32831e5a044fb4b09187571e498b807c07caa8c3004f", 
                                           "51409099241d9af2b9005a0de21081ae9dbb64c0c98eb4a6460e1d1946461ce0", 
                                           "6ad87a98d9e91e784fb1e275b9e37709a1ae85f8d6096cbf5a8ce3104314d5ed", 
                                           "d9070a90ea8a8bc1c9120397c2588d3e8f588bcce4a261cc9f0e9f0c37c8d726", 
                                           "2ac92e1b48ad518efa47313aac59b67950da234d20e651b221b7232e4ae9e65d", 
                                           "c8469c12a2cf76b8b4225d8910958810847e31263487df0065c8648b572467ef", 
                                           "9bb82a8b466b48176bd876a8fa7a9b3708cf3d86aa1b6c420cf73b003d41495d", 
                                           "c9f420fb873c8d26c134314cd2543442685b98349a79cb51f06bd364c16aa298", 
                                           "06e8f5fc9ac8ab8a9390531eebac30372fed6982cceac4d54bb6653f9f6603f7", 
                                           "27d34c6032491d4dce1060eb3bf8382357a8fde4909aed3855e5c250e0789433", 
                                           "31f65b7afe91e23ae88d8229fd54c5eb494ffd4594bdc3d6a91d2d69892b284b", 
                                           "91ff5261cd17ad19edfacfb905a375c300cc6e323e6eaa42446a005a701880b4", 
                                           "c8469c12a2cf76b8b4225d8910958810847e31263487df0065c8648b572467ef", 
                                           "e77507caca8b74b197329f3584a540d7015aad5a94d9aa29a3427959cf129bcd", 
                                           "cacf583a07df75fd7d76a43a78338c1d032833e1cc2d9945229df04385cfc10f", 
                                           "a1bbeed70452386d4d3b4383dd47180e9a96440011dbdcadcc6c48c3e1337eac", 
                                           "f71ae100e2c4a6de86033f7664db07dcba74319de4da0e72f9b5908f09257519", 
                                           "a63dffea3202a2499abef6c507a3a84aab04e1f43a086ba79784ccb29f4a3156", 
                                           "dd69b5adcc1832c449ee31ede33ba17dfafba278eb3627dbabf3a42b02a457d8", 
                                           "dd1eaa53b13e901e8236d034400e36bda7249bf7bb74f50b46d31ebe4896ebb9",
                                           "e3fdcd2b4c5215e74b0cabe91ce7fe2800cbf8e2a28157342960bca61bbd6b5d",
                                           "f24968ff313caf2d1f6a87b5b2265bcb7278ab598e414fd60b1037aa9b226370",
                                           "2a08e0247dcd2363430f48db72ca6c3d2f5d84486c7894cff54e6aae2eb45721",
                                           "e9f8a89ccb79d3ce6c148022f9ba830521ece008749fb98ea129c7073b9449f9",
                                           "3226b506e186e98c68d57b3dcd046695e59ab0b818a58b4fb9613cbe1e9049a0",
                                           "f30518fad5e56b63c807c306b3b3ab70f043eb24956aa128e96e1482380c5e80",
                                           "0723de6b33653635781c72d282552ad13d3a5dbe37ca6f4fd62b1f3173dc085d",
                                           "3a2a379f7fcea34ea52fe908c57cd5bb1c76bf58306261ea30aeef35ca17e4ed",
                                           "097a19028e711f08600ea254bbff08d03539f6d54accc297255cdd13dbede01e",
                                           "91744edcc8efb66deda82a2ac1e560da85cd84735b0ad42ad77d28e559741015",
                                           "ae04a881df5e2256eae703efda6f021145dbdde5230201e1501433c67f29dfb1",
                                           "4c5391497df553576490432e32dfc5dc2e7e195027cd6faa3c8058a63899d6ab",
                                           "c4ced30ef9ad364d35edca795bb03b128849bcdf9d4c958086309327341d7107",
                                           "2c5c370bd7c51e834784b97af7da480653eb3e61aa2e7c662d70c1875ace0c03",
                                           "2f8eb40944200c4b4ddf36c78a4d2e758d9ec6e43396cf85f03970ffa268c334",
                                           "77b08483aa5d9cc5ac6050169edff7293522ce865786f181edb6fcc2e41652ca",
                                           "ceafaeb950cae0fb4a6b8f6dd68aec8311ebad923f658335b6abc0f7114a62ac",
                                           "b50f97afb49255d1ca37968e3fdc51515b9b9ef447d0460744ece428dc0f850c",
                                           "e948b1c8189fbd76a85a0a4e50d7db33991ff2a0c3993d44ab54530bf8a0287e",
                                           "e0552b8681250e081dce00fc1745926106f5c638030d0a2bbe529b152960ae15",
                                           "5442ecad629b42c4ebc8df3c8fab67783bacbc0d4c5121845b91ef538099073d",
                                           "19c2b71f25587376e352aeb7a9f62ea52096b41461817fadc067a9e8b46379f2",
                                           "c729c4b5a6ad8d247acd4b0d32d5a5999647461ee5f565c618b26d339caebbca") and
   not _arraysearch(process.thread.Ext.call_stack_final_user_module.code_signature, $entry, $entry.trusted == true and
                  $entry.subject_name in ("Microsoft Windows Hardware Compatibility Publisher",
                                          "Microsoft Windows Software Compatibility Publisher",
                                          "Barco N.V.",
                                          "Eclipse.org Foundation, Inc.",
                                          "Shanghai Best Oray Information S&T Co. Ltd."))
  ]
 [api where process.Ext.api.behaviors : "cross-process" and 
  not process.Ext.api.behaviors == "parent-child" and process.Ext.api.name == "WriteProcessMemory"]
'''

min_endpoint_version = "8.10.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"


[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "8.10.0"

Stages and Predicates

Ordered sequence: each step below must occur in order within 1m, correlated by Target.process.pid, process.Ext.api.parameters.address, process.entity_id.

Stage 1: api

[api where process.Ext.api.behaviors == "cross-process" and not process.Ext.api.behaviors == "parent-child" and
  process.executable != null and process.thread.Ext.call_stack_final_user_module.name != null and 
  process.Ext.api.name in ("VirtualAllocEx", "MapViewOfFile", "MapViewOfFile2", "VirtualProtect", "VirtualProtectEx") and process.Ext.api.parameters.protection like "*X*" and
  (process.code_signature.trusted == false or process.code_signature.exists == false or process.name : "rundll32.exe" or 
   process.executable : ("?:\\Windows\\Microsoft.NET\\*", "?:\\Users\\Public")) and 
   not process.executable : ("?:\\Program Files\\*", "?:\\Program Files (x86)\\*") and 
   not _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info: "?:\\program files*\\cisco\\amp\\exprev\\protector*.dll*") and 
   not (process.code_signature.trusted == true and startswith~(process.thread.Ext.call_stack_final_user_module.path, process.executable)) and 
   not process.thread.Ext.call_stack_final_user_module.name in ("Unknown", "Undetermined", "Kernel") and
   not process.thread.Ext.call_stack_final_user_module.path like
                                         ("?:\\program files\\*",
                                          "?:\\program files (x86)\\*",
                                          "\\program files\\*", 
                                          "\\program files (x86)\\*",
                                          "?:\\windows\\microsoft.net\\framework*.dll", 
                                          "\\windows\\microsoft.net\\framework*.dll", 
                                          "?:\\windows\\system32\\*", 
                                          "\\windows\\system32\\*", 
                                          "?:\\windows\\winsxs\\*", 
                                          "\\windows\\winsxs\\*", 
                                          "?:\\windows\\syswow64\\*", 
                                          "\\windows\\syswow64\\*", 
                                          "?:\\windows\\assembly\\*",
                                          "\\windows\\assembly\\*",
                                          "?:\\windows\\veeamvsssupport\\veeamvsssupport.dll") and 
   not process.thread.Ext.call_stack_final_user_module.hash.sha256 in
                                          ("70a8c4ae129e3d79854c6658b199faf27590800cb2d7fa5681d6bfdbe0111993", 
                                           "13d8d9823d8f9e41247f32831e5a044fb4b09187571e498b807c07caa8c3004f", 
                                           "51409099241d9af2b9005a0de21081ae9dbb64c0c98eb4a6460e1d1946461ce0", 
                                           "6ad87a98d9e91e784fb1e275b9e37709a1ae85f8d6096cbf5a8ce3104314d5ed", 
                                           "d9070a90ea8a8bc1c9120397c2588d3e8f588bcce4a261cc9f0e9f0c37c8d726", 
                                           "2ac92e1b48ad518efa47313aac59b67950da234d20e651b221b7232e4ae9e65d", 
                                           "c8469c12a2cf76b8b4225d8910958810847e31263487df0065c8648b572467ef", 
                                           "9bb82a8b466b48176bd876a8fa7a9b3708cf3d86aa1b6c420cf73b003d41495d", 
                                           "c9f420fb873c8d26c134314cd2543442685b98349a79cb51f06bd364c16aa298", 
                                           "06e8f5fc9ac8ab8a9390531eebac30372fed6982cceac4d54bb6653f9f6603f7", 
                                           "27d34c6032491d4dce1060eb3bf8382357a8fde4909aed3855e5c250e0789433", 
                                           "31f65b7afe91e23ae88d8229fd54c5eb494ffd4594bdc3d6a91d2d69892b284b", 
                                           "91ff5261cd17ad19edfacfb905a375c300cc6e323e6eaa42446a005a701880b4", 
                                           "c8469c12a2cf76b8b4225d8910958810847e31263487df0065c8648b572467ef", 
                                           "e77507caca8b74b197329f3584a540d7015aad5a94d9aa29a3427959cf129bcd", 
                                           "cacf583a07df75fd7d76a43a78338c1d032833e1cc2d9945229df04385cfc10f", 
                                           "a1bbeed70452386d4d3b4383dd47180e9a96440011dbdcadcc6c48c3e1337eac", 
                                           "f71ae100e2c4a6de86033f7664db07dcba74319de4da0e72f9b5908f09257519", 
                                           "a63dffea3202a2499abef6c507a3a84aab04e1f43a086ba79784ccb29f4a3156", 
                                           "dd69b5adcc1832c449ee31ede33ba17dfafba278eb3627dbabf3a42b02a457d8", 
                                           "dd1eaa53b13e901e8236d034400e36bda7249bf7bb74f50b46d31ebe4896ebb9",
                                           "e3fdcd2b4c5215e74b0cabe91ce7fe2800cbf8e2a28157342960bca61bbd6b5d",
                                           "f24968ff313caf2d1f6a87b5b2265bcb7278ab598e414fd60b1037aa9b226370",
                                           "2a08e0247dcd2363430f48db72ca6c3d2f5d84486c7894cff54e6aae2eb45721",
                                           "e9f8a89ccb79d3ce6c148022f9ba830521ece008749fb98ea129c7073b9449f9",
                                           "3226b506e186e98c68d57b3dcd046695e59ab0b818a58b4fb9613cbe1e9049a0",
                                           "f30518fad5e56b63c807c306b3b3ab70f043eb24956aa128e96e1482380c5e80",
                                           "0723de6b33653635781c72d282552ad13d3a5dbe37ca6f4fd62b1f3173dc085d",
                                           "3a2a379f7fcea34ea52fe908c57cd5bb1c76bf58306261ea30aeef35ca17e4ed",
                                           "097a19028e711f08600ea254bbff08d03539f6d54accc297255cdd13dbede01e",
                                           "91744edcc8efb66deda82a2ac1e560da85cd84735b0ad42ad77d28e559741015",
                                           "ae04a881df5e2256eae703efda6f021145dbdde5230201e1501433c67f29dfb1",
                                           "4c5391497df553576490432e32dfc5dc2e7e195027cd6faa3c8058a63899d6ab",
                                           "c4ced30ef9ad364d35edca795bb03b128849bcdf9d4c958086309327341d7107",
                                           "2c5c370bd7c51e834784b97af7da480653eb3e61aa2e7c662d70c1875ace0c03",
                                           "2f8eb40944200c4b4ddf36c78a4d2e758d9ec6e43396cf85f03970ffa268c334",
                                           "77b08483aa5d9cc5ac6050169edff7293522ce865786f181edb6fcc2e41652ca",
                                           "ceafaeb950cae0fb4a6b8f6dd68aec8311ebad923f658335b6abc0f7114a62ac",
                                           "b50f97afb49255d1ca37968e3fdc51515b9b9ef447d0460744ece428dc0f850c",
                                           "e948b1c8189fbd76a85a0a4e50d7db33991ff2a0c3993d44ab54530bf8a0287e",
                                           "e0552b8681250e081dce00fc1745926106f5c638030d0a2bbe529b152960ae15",
                                           "5442ecad629b42c4ebc8df3c8fab67783bacbc0d4c5121845b91ef538099073d",
                                           "19c2b71f25587376e352aeb7a9f62ea52096b41461817fadc067a9e8b46379f2",
                                           "c729c4b5a6ad8d247acd4b0d32d5a5999647461ee5f565c618b26d339caebbca") and
   not _arraysearch(process.thread.Ext.call_stack_final_user_module.code_signature, $entry, $entry.trusted == true and
                  $entry.subject_name in ("Microsoft Windows Hardware Compatibility Publisher",
                                          "Microsoft Windows Software Compatibility Publisher",
                                          "Barco N.V.",
                                          "Eclipse.org Foundation, Inc.",
                                          "Shanghai Best Oray Information S&T Co. Ltd."))
  ]

Stage 2: api

[api where process.Ext.api.behaviors : "cross-process" and 
  not process.Ext.api.behaviors == "parent-child" and process.Ext.api.name == "WriteProcessMemory"]

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
process.Ext.api.behaviorseq
  • cross-process corpus 18 (elastic 18)
field:"process.Ext.api.behaviors" kind:eq value:"cross-process"
process.Ext.api.behaviorswildcard
  • cross-process corpus 3 (elastic 3)
field:"process.Ext.api.behaviors" kind:wildcard value:"cross-process"
process.Ext.api.nameeq
  • WriteProcessMemory corpus 14 (elastic 14)
field:"process.Ext.api.name" kind:eq value:"WriteProcessMemory"
process.Ext.api.namein
  • MapViewOfFile corpus 24 (elastic 24)
  • MapViewOfFile2 corpus 24 (elastic 24)
  • VirtualAllocEx corpus 22 (elastic 22)
  • VirtualProtect corpus 35 (elastic 35)
  • VirtualProtectEx corpus 29 (elastic 29)
field:"process.Ext.api.name" kind:in
process.Ext.api.parameters.protectionwildcard
  • *X* corpus 2 (elastic 2)
field:"process.Ext.api.parameters.protection" kind:wildcard value:"*X*"
process.code_signature.existseq
  • false transforms: boolean corpus 118 (elastic 118)
field:"process.code_signature.exists" kind:eq value:"false"
process.code_signature.trustedeq
  • false transforms: boolean corpus 114 (elastic 114)
field:"process.code_signature.trusted" kind:eq value:"false"
process.executableis_not_null
  • (no value, null check)
field:"Image" kind:is_not_null
process.executablewildcard
  • ?:\Users\Public
  • ?:\Windows\Microsoft.NET\* corpus 11 (elastic 11)
field:"Image" kind:wildcard
process.namewildcard
  • rundll32.exe corpus 123 (elastic 100, splunk 23)
field:"process_basename" kind:wildcard value:"rundll32.exe"
process.thread.Ext.call_stack_final_user_module.nameis_not_null
  • (no value, null check)
field:"process.thread.Ext.call_stack_final_user_module.name" kind:is_not_null

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.thread.Ext.call_stack_final_user_module.code_signaturearray_any(no value, null check)excludes:process.thread.Ext.call_stack_final_user_module.code_signature
process.code_signature.trustedeqtrueexcludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true"
process.thread.Ext.call_stack_final_user_module.pathstarts_withprocess.executableexcludes:process.thread.Ext.call_stack_final_user_module.path field:"process.thread.Ext.call_stack_final_user_module.path" value:"process.executable"
process.thread.Ext.call_stackarray_any(no value, null check)excludes:process.thread.Ext.call_stack
process.Ext.api.behaviorseqparent-childexcludes:process.Ext.api.behaviors field:"process.Ext.api.behaviors" value:"parent-child"
process.executablestarts_with?:\Program Files\, ?:\Program Files (x86)\excludes:process.executable field:"process.executable" value:"?:\Program Files\" field:"process.executable" value:"?:\Program Files (x86)\"
process.thread.Ext.call_stack_final_user_module.hash.sha256in06e8f5fc9ac8ab8a9390531eebac30372fed6982cceac4d54bb6653f9f6603f7, 0723de6b33653635781c72d282552ad13d3a5dbe37ca6f4fd62b1f3173dc085d, 097a19028e711f08600ea254bbff08d03539f6d54accc297255cdd13dbede01e, 13d8d9823d8f9e41247f32831e5a044fb4b09187571e498b807c07caa8c3004f, 19c2b71f25587376e352aeb7a9f62ea52096b41461817fadc067a9e8b46379f2, 27d34c6032491d4dce1060eb3bf8382357a8fde4909aed3855e5c250e0789433, 2a08e0247dcd2363430f48db72ca6c3d2f5d84486c7894cff54e6aae2eb45721, 2ac92e1b48ad518efa47313aac59b67950da234d20e651b221b7232e4ae9e65d, 2c5c370bd7c51e834784b97af7da480653eb3e61aa2e7c662d70c1875ace0c03, 2f8eb40944200c4b4ddf36c78a4d2e758d9ec6e43396cf85f03970ffa268c334, 31f65b7afe91e23ae88d8229fd54c5eb494ffd4594bdc3d6a91d2d69892b284b, 3226b506e186e98c68d57b3dcd046695e59ab0b818a58b4fb9613cbe1e9049a0, 3a2a379f7fcea34ea52fe908c57cd5bb1c76bf58306261ea30aeef35ca17e4ed, 4c5391497df553576490432e32dfc5dc2e7e195027cd6faa3c8058a63899d6ab, 51409099241d9af2b9005a0de21081ae9dbb64c0c98eb4a6460e1d1946461ce0, 5442ecad629b42c4ebc8df3c8fab67783bacbc0d4c5121845b91ef538099073d, 6ad87a98d9e91e784fb1e275b9e37709a1ae85f8d6096cbf5a8ce3104314d5ed, 70a8c4ae129e3d79854c6658b199faf27590800cb2d7fa5681d6bfdbe0111993, 77b08483aa5d9cc5ac6050169edff7293522ce865786f181edb6fcc2e41652ca, 91744edcc8efb66deda82a2ac1e560da85cd84735b0ad42ad77d28e559741015, 91ff5261cd17ad19edfacfb905a375c300cc6e323e6eaa42446a005a701880b4, 9bb82a8b466b48176bd876a8fa7a9b3708cf3d86aa1b6c420cf73b003d41495d, a1bbeed70452386d4d3b4383dd47180e9a96440011dbdcadcc6c48c3e1337eac, a63dffea3202a2499abef6c507a3a84aab04e1f43a086ba79784ccb29f4a3156, ae04a881df5e2256eae703efda6f021145dbdde5230201e1501433c67f29dfb1, b50f97afb49255d1ca37968e3fdc51515b9b9ef447d0460744ece428dc0f850c, c4ced30ef9ad364d35edca795bb03b128849bcdf9d4c958086309327341d7107, c729c4b5a6ad8d247acd4b0d32d5a5999647461ee5f565c618b26d339caebbca, c8469c12a2cf76b8b4225d8910958810847e31263487df0065c8648b572467ef, c9f420fb873c8d26c134314cd2543442685b98349a79cb51f06bd364c16aa298, cacf583a07df75fd7d76a43a78338c1d032833e1cc2d9945229df04385cfc10f, ceafaeb950cae0fb4a6b8f6dd68aec8311ebad923f658335b6abc0f7114a62ac, d9070a90ea8a8bc1c9120397c2588d3e8f588bcce4a261cc9f0e9f0c37c8d726, dd1eaa53b13e901e8236d034400e36bda7249bf7bb74f50b46d31ebe4896ebb9, dd69b5adcc1832c449ee31ede33ba17dfafba278eb3627dbabf3a42b02a457d8, e0552b8681250e081dce00fc1745926106f5c638030d0a2bbe529b152960ae15, e3fdcd2b4c5215e74b0cabe91ce7fe2800cbf8e2a28157342960bca61bbd6b5d, e77507caca8b74b197329f3584a540d7015aad5a94d9aa29a3427959cf129bcd, e948b1c8189fbd76a85a0a4e50d7db33991ff2a0c3993d44ab54530bf8a0287e, e9f8a89ccb79d3ce6c148022f9ba830521ece008749fb98ea129c7073b9449f9, f24968ff313caf2d1f6a87b5b2265bcb7278ab598e414fd60b1037aa9b226370, f30518fad5e56b63c807c306b3b3ab70f043eb24956aa128e96e1482380c5e80, f71ae100e2c4a6de86033f7664db07dcba74319de4da0e72f9b5908f09257519excludes:process.thread.Ext.call_stack_final_user_module.hash.sha256
process.thread.Ext.call_stack_final_user_module.nameinKernel, Undetermined, Unknownexcludes:process.thread.Ext.call_stack_final_user_module.name field:"process.thread.Ext.call_stack_final_user_module.name" value:"Kernel" field:"process.thread.Ext.call_stack_final_user_module.name" value:"Undetermined" field:"process.thread.Ext.call_stack_final_user_module.name" value:"Unknown"
process.thread.Ext.call_stack_final_user_module.pathwildcard?:\program files\*, ?:\program files (x86)\*, \program files\*, \program files (x86)\*, ?:\windows\microsoft.net\framework*.dll, \windows\microsoft.net\framework*.dll, ?:\windows\system32\*, \windows\system32\*, ?:\windows\winsxs\*, \windows\winsxs\*, ?:\windows\syswow64\*, \windows\syswow64\*, ?:\windows\assembly\*, \windows\assembly\*, ?:\windows\veeamvsssupport\veeamvsssupport.dllexcludes:process.thread.Ext.call_stack_final_user_module.path

Quarantine Cleared via Xattr Followed by Ad-hoc Codesign

#
Time window
30s
Sequence by
process.parent.entity_id
Source
github.com/elastic/protections-artifacts

Identifies recursive clearing of extended attributes with xattr -rc immediately followed by ad-hoc codesigning using a dash identity (codesign --sign -). Malware and stealers use this chain to remove the quarantine flag from downloaded payloads and apply an ad-hoc signature so binaries can run with fewer Gatekeeper prompts.

MITRE ATT&CK Coverage

TacticTechniques
Defense Impairment

Telemetry Coverage

Rule Body

[rule]
description = """
Identifies recursive clearing of extended attributes with xattr -rc immediately followed by ad-hoc codesigning using a
dash identity (codesign --sign -). Malware and stealers use this chain to remove the quarantine flag from downloaded
payloads and apply an ad-hoc signature so binaries can run with fewer Gatekeeper prompts.
"""
id = "2b792fe4-bcda-4ee7-ba6c-4a90c7fc9c4e"
license = "Elastic License v2"
name = "Quarantine Cleared via Xattr Followed by Ad-hoc Codesign"
os_list = ["macos"]
version = "1.0.1"

query = '''
sequence by process.parent.entity_id with maxspan=30s
  [process where event.type == "start" and event.action == "exec" and process.name == "xattr" and 
   (
     process.args in ("-rc", "-cr") or 
     (process.args == "-r" and process.args == "-c") or 
     (process.args == "-d" and process.args == "com.apple.quarantine")
    ) and 
    
   /* https://github.com/NousResearch/hermes-agent/blob/main/scripts/install.sh#L2349 */
   not process.Ext.effective_parent.executable like "/Volumes/Hermes*/Hermes.app/Contents/MacOS/Hermes-Setup" and 
   not process.args like "/Users/*/.hermes/hermes-agent/apps/desktop/release/mac-arm64/Hermes.app" and 

   not process.Ext.effective_parent.executable == "/Applications/Cursor.app/Contents/MacOS/Cursor"
   ]
  [process where event.type == "start" and event.action == "exec" and
   process.name == "codesign" and
   process.args in ("--sign", "-s") and process.args in ("--force", "-f") and process.args == "--deep"]
'''

min_endpoint_version = "8.11.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1

[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1553"
name = "Subvert Trust Controls"
reference = "https://attack.mitre.org/techniques/T1553/"
[[threat.technique.subtechnique]]
id = "T1553.001"
name = "Gatekeeper Bypass"
reference = "https://attack.mitre.org/techniques/T1553/001/"



[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "8.11.0"

Stages and Predicates

Ordered sequence: each step below must occur in order within 30s, correlated by process.parent.entity_id.

Stage 1: process

[process where event.type == "start" and event.action == "exec" and process.name == "xattr" and
   (
     process.args in ("-rc", "-cr") or
     (process.args == "-r" and process.args == "-c") or
     (process.args == "-d" and process.args == "com.apple.quarantine")
    ) and
   not process.Ext.effective_parent.executable like "/Volumes/Hermes*/Hermes.app/Contents/MacOS/Hermes-Setup" and
   not process.args like "/Users/*/.hermes/hermes-agent/apps/desktop/release/mac-arm64/Hermes.app" and
   not process.Ext.effective_parent.executable == "/Applications/Cursor.app/Contents/MacOS/Cursor"
   ]

Stage 2: process

[process where event.type == "start" and event.action == "exec" and
   process.name == "codesign" and
   process.args in ("--sign", "-s") and process.args in ("--force", "-f") and process.args == "--deep"]

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • exec corpus 547 (elastic 547)
field:"EventType" kind:eq value:"exec"
event.typeeq
  • start corpus 1036 (elastic 1036)
field:"event.type" kind:eq value:"start"
process.argseq
  • --deep corpus 2 (elastic 2)
  • -c corpus 91 (elastic 91)
  • -d corpus 8 (elastic 8)
  • -r corpus 9 (elastic 9)
  • com.apple.quarantine corpus 2 (elastic 2)
field:"process.args" kind:eq
process.argsin
  • --force corpus 2 (elastic 2)
  • --sign corpus 2 (elastic 2)
  • -cr
  • -f corpus 3 (elastic 3)
  • -rc
  • -s corpus 6 (elastic 6)
field:"process.args" kind:in
process.nameeq
  • codesign corpus 2 (elastic 2)
  • xattr corpus 2 (elastic 2)
field:"process_basename" kind:eq

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.Ext.effective_parent.executableeq/Applications/Cursor.app/Contents/MacOS/Cursorexcludes:process.Ext.effective_parent.executable field:"process.Ext.effective_parent.executable" value:"/Applications/Cursor.app/Contents/MacOS/Cursor"
process.Ext.effective_parent.executablewildcard/Volumes/Hermes*/Hermes.app/Contents/MacOS/Hermes-Setupexcludes:process.Ext.effective_parent.executable field:"process.Ext.effective_parent.executable" value:"/Volumes/Hermes*/Hermes.app/Contents/MacOS/Hermes-Setup"
process.argswildcard/Users/*/.hermes/hermes-agent/apps/desktop/release/mac-arm64/Hermes.appexcludes:process.args field:"process.args" value:"/Users/*/.hermes/hermes-agent/apps/desktop/release/mac-arm64/Hermes.app"

Statistical Model Detected C2 Beaconing Activity

#
Status
production
Severity
low
Time window
1h
Author
Elastic
Source
github.com/elastic/detection-rules

A statistical model has identified command-and-control (C2) beaconing activity. Beaconing can help attackers maintain stealthy communication with their C2 servers, receive instructions and payloads, exfiltrate data and maintain persistence in a network.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2023/09/22"
integration = ["beaconing", "endpoint"]
maturity = "production"
updated_date = "2026/07/27"

[rule]
author = ["Elastic"]
description = """
A statistical model has identified command-and-control (C2) beaconing activity. Beaconing can help attackers maintain
stealthy communication with their C2 servers, receive instructions and payloads, exfiltrate data and maintain
persistence in a network.
"""
from = "now-1h"
index = ["ml_beaconing.all"]
language = "kuery"
license = "Elastic License v2"
name = "Statistical Model Detected C2 Beaconing Activity"
references = [
    "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html",
    "https://docs.elastic.co/en/integrations/beaconing",
    "https://www.elastic.co/security-labs/identifying-beaconing-malware-using-elastic",
]
risk_score = 21
rule_id = "5397080f-34e5-449b-8e9c-4c8083d7ccc6"
setup = """## Setup

The rule requires the Network Beaconing Identification integration assets to be installed, as well as network logs collected by the Elastic Defend integration.

### Network Beaconing Identification Setup
The Network Beaconing Identification integration consists of a statistical framework to identify C2 beaconing activity in network logs.

#### Prerequisite Requirements:
- Fleet is required for Network Beaconing Identification.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
- Network events collected by the [Elastic Defend](https://docs.elastic.co/en/integrations/endpoint) integration.
- To install Elastic Defend, refer to the [documentation](https://www.elastic.co/guide/en/security/current/install-endpoint.html).

#### The following steps should be executed to install assets associated with the Network Beaconing Identification integration:
- Go to the Kibana homepage. Under Management, click Integrations.
- In the query bar, search for Network Beaconing Identification and select the integration to see more details about it.
- Follow the instructions under the **Installation** section.
"""
severity = "low"
tags = [
    "Domain: Network",
    "Data Source: Elastic Defend",
    "Use Case: C2 Beaconing Detection",
    "Tactic: Command and Control",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "query"

query = '''
beacon_stats.is_beaconing: true and
not process.name: ("WaAppAgent.exe" or "metricbeat.exe" or "packetbeat.exe" or "WindowsAzureGuestAgent.exe" or "HealthService.exe" or "Widgets.exe" or "lsass.exe" or "msedgewebview2.exe" or
                   "MsMpEng.exe" or "OUTLOOK.EXE" or "msteams.exe" or "FileSyncHelper.exe" or "SearchProtocolHost.exe" or "Creative Cloud.exe" or "ms-teams.exe" or "ms-teamsupdate.exe" or
                   "curl.exe" or "rundll32.exe" or "MsSense.exe" or "wermgr.exe" or "java" or "olk.exe" or "iexplore.exe" or "NetworkManager" or "packetbeat" or "Ssms.exe" or "NisSrv.exe" or
                   "gamingservices.exe" or "appidcertstorecheck.exe" or "POWERPNT.EXE" or "miiserver.exe" or "Grammarly.Desktop.exe" or "SnagitEditor.exe" or "CRWindowsClientService.exe" or
                   "agentbeat" or "dnf" or "yum" or "apt"
                  )
'''
note = """## Triage and analysis

> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.

### Investigating Statistical Model Detected C2 Beaconing Activity

Statistical models analyze network traffic patterns to identify anomalies indicative of C2 beaconing, a tactic used by attackers to maintain covert communication with compromised systems. Adversaries exploit this by sending periodic signals to C2 servers, often mimicking legitimate traffic. The detection rule leverages statistical analysis to flag unusual beaconing while excluding known benign processes, thus highlighting potential threats without overwhelming analysts with false positives.

### Possible investigation steps

- Review the network traffic logs to identify the source and destination IP addresses associated with the beaconing activity flagged by the statistical model.
- Cross-reference the identified IP addresses with threat intelligence databases to determine if they are associated with known malicious C2 servers.
- Analyze the frequency and pattern of the beaconing signals to assess whether they mimic legitimate traffic or exhibit characteristics typical of C2 communication.
- Investigate the processes running on the source system to identify any suspicious or unauthorized applications that may be responsible for the beaconing activity.
- Check for any recent changes or anomalies in the system's configuration or installed software that could indicate a compromise.
- Examine the historical network activity of the source system to identify any other unusual patterns or connections that may suggest a broader compromise.

### False positive analysis

- The rule may flag legitimate processes that exhibit periodic network communication patterns similar to C2 beaconing. Processes like "metricbeat.exe" and "packetbeat.exe" are known to generate regular network traffic for monitoring purposes.
- Users can manage these false positives by adding exceptions for these known benign processes in the detection rule, ensuring they are not flagged as threats.
- Regularly review and update the list of excluded processes to include any new legitimate applications that may mimic beaconing behavior, reducing unnecessary alerts.
- Consider implementing a whitelist approach for processes that are verified as non-threatening, allowing the statistical model to focus on truly anomalous activities.
- Engage with network and security teams to understand the normal traffic patterns of your environment, which can help in refining the detection rule and minimizing false positives.

### Response and remediation

- Isolate the affected system from the network to prevent further communication with the C2 server and limit potential data exfiltration.
- Terminate any suspicious processes identified by the alert that are not part of the known benign list, ensuring that any malicious activity is halted.
- Conduct a thorough scan of the isolated system using updated antivirus and anti-malware tools to identify and remove any malicious software or files.
- Review and analyze network logs to identify any other systems that may have communicated with the same C2 server, and apply similar containment measures to those systems.
- Restore the affected system from a known good backup to ensure that any persistent threats are removed, and verify the integrity of the restored system.
- Implement network segmentation to limit the ability of compromised systems to communicate with critical infrastructure and sensitive data.
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if additional measures are needed to prevent recurrence."""


[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"

[[rule.threat.technique]]
id = "T1102"
name = "Web Service"
reference = "https://attack.mitre.org/techniques/T1102/"

[[rule.threat.technique.subtechnique]]
id = "T1102.002"
name = "Bidirectional Communication"
reference = "https://attack.mitre.org/techniques/T1102/002/"

[rule.threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"

Stages and Predicates

Stage 1: query

beacon_stats.is_beaconing: true and
not process.name: ("WaAppAgent.exe" or "metricbeat.exe" or "packetbeat.exe" or "WindowsAzureGuestAgent.exe" or "HealthService.exe" or "Widgets.exe" or "lsass.exe" or "msedgewebview2.exe" or
                   "MsMpEng.exe" or "OUTLOOK.EXE" or "msteams.exe" or "FileSyncHelper.exe" or "SearchProtocolHost.exe" or "Creative Cloud.exe" or "ms-teams.exe" or "ms-teamsupdate.exe" or
                   "curl.exe" or "rundll32.exe" or "MsSense.exe" or "wermgr.exe" or "java" or "olk.exe" or "iexplore.exe" or "NetworkManager" or "packetbeat" or "Ssms.exe" or "NisSrv.exe" or
                   "gamingservices.exe" or "appidcertstorecheck.exe" or "POWERPNT.EXE" or "miiserver.exe" or "Grammarly.Desktop.exe" or "SnagitEditor.exe" or "CRWindowsClientService.exe" or
                   "agentbeat" or "dnf" or "yum" or "apt"
                  )

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.nameinCRWindowsClientService.exe, Creative Cloud.exe, FileSyncHelper.exe, Grammarly.Desktop.exe, HealthService.exe, MsMpEng.exe, MsSense.exe, NetworkManager, NisSrv.exe, OUTLOOK.EXE, POWERPNT.EXE, SearchProtocolHost.exe, SnagitEditor.exe, Ssms.exe, WaAppAgent.exe, Widgets.exe, WindowsAzureGuestAgent.exe, agentbeat, appidcertstorecheck.exe, apt, curl.exe, dnf, gamingservices.exe, iexplore.exe, java, lsass.exe, metricbeat.exe, miiserver.exe, ms-teams.exe, ms-teamsupdate.exe, msedgewebview2.exe, msteams.exe, olk.exe, packetbeat, packetbeat.exe, rundll32.exe, wermgr.exe, yumexcludes:process.name

Suspicious Image Load by System Protected Process

#
Sequence by
process.entity_id
Source
github.com/elastic/protections-artifacts

Identifies when a System protected process loads a library from a network file share. This may indicate an attempt to bypass PPL protection and inject malicious code into a protected process or disable security software.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
Identifies when a System protected process loads a library from a network file share. This may indicate an attempt to
bypass PPL protection and inject malicious code into a protected process or disable security software.
"""
id = "5007b805-0cee-44e8-b807-22c95d5d2998"
license = "Elastic License v2"
name = "Suspicious Image Load by System Protected Process"
os_list = ["windows"]
reference = [
    "https://learn.microsoft.com/en-us/windows/win32/services/protecting-anti-malware-services-",
    "https://github.com/gabriellandau/PPLFault",
    "https://www.blackhat.com/asia-23/briefings/schedule/#ppldump-is-dead-long-live-ppldump-31052",
    "https://www.elastic.co/security-labs/forget-vulnerable-drivers-admin-is-all-you-need",
]
version = "1.0.14"

query = '''
sequence by process.entity_id
 [process where event.action == "start" and process.Ext.protection : "PsProtected*" and 
  not (process.executable : "?:\\Windows\\Microsoft.NET\\Framework\\*\\mscorsvw.exe" and 
       process.parent.executable : "?:\\Windows\\Microsoft.NET\\Framework*\\ngen.exe" and 
       process.Ext.protection : "PsProtectedSignerCodeGen-Light")]
 [library where dll.path : ("\\Device\\Mup\\*", "\\\\127.*\\*")]
  until [process where event.action:"end"]
'''

min_endpoint_version = "8.7.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1211"
name = "Exploitation for Defense Evasion"
reference = "https://attack.mitre.org/techniques/T1211/"

[[threat.technique]]
id = "T1574"
name = "Hijack Execution Flow"
reference = "https://attack.mitre.org/techniques/T1574/"


[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "8.7.0"

Stages and Predicates

Ordered sequence: each step below must occur in order, correlated by process.entity_id.

Stage 1: process

[process where event.action == "start" and process.Ext.protection : "PsProtected*" and 
  not (process.executable : "?:\\Windows\\Microsoft.NET\\Framework\\*\\mscorsvw.exe" and 
       process.parent.executable : "?:\\Windows\\Microsoft.NET\\Framework*\\ngen.exe" and 
       process.Ext.protection : "PsProtectedSignerCodeGen-Light")]

Stage 2: library

[library where dll.path : ("\\Device\\Mup\\*", "\\\\127.*\\*")]

Until: process

until [process where event.action:"end"]

Ends the sequence: the steps above must complete before an event matching this clause occurs.

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.Ext.protectioneqPsProtectedSignerCodeGen-Lightexcludes:process.Ext.protection field:"process.Ext.protection" value:"PsProtectedSignerCodeGen-Light"
process.executablewildcard?:\Windows\Microsoft.NET\Framework\*\mscorsvw.exeexcludes:process.executable field:"process.executable" value:"?:\Windows\Microsoft.NET\Framework\*\mscorsvw.exe"
process.parent.executablewildcard?:\Windows\Microsoft.NET\Framework*\ngen.exeexcludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\Microsoft.NET\Framework*\ngen.exe"

Suspicious macOS MS Office Child Process

#
Status
production
Severity
medium
Time window
9m
Author
Elastic
Source
github.com/elastic/detection-rules

Identifies suspicious child processes of frequently targeted Microsoft Office applications (Word, PowerPoint, and Excel). These child processes are often launched during exploitation of Office applications or by documents with malicious macros.

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

[metadata]
creation_date = "2021/01/04"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/05/07"

[rule]
author = ["Elastic"]
description = """
Identifies suspicious child processes of frequently targeted Microsoft Office applications (Word, PowerPoint, and
Excel). These child processes are often launched during exploitation of Office applications or by documents with
malicious macros.
"""
from = "now-9m"
index = ["logs-endpoint.events.process*"]
language = "eql"
license = "Elastic License v2"
name = "Suspicious macOS MS Office Child Process"
references = ["https://blog.malwarebytes.com/cybercrime/2017/02/microsoft-office-macro-malware-targets-macs/"]
risk_score = 47
rule_id = "66da12b1-ac83-40eb-814c-07ed1d82b7b9"
setup = """## Setup

This rule requires data coming in from Elastic Defend.

### Elastic Defend Integration Setup
Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.

#### Prerequisite Requirements:
- Fleet is required for Elastic Defend.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).

#### The following steps should be executed in order to add the Elastic Defend integration on a macOS System:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
- Click "Add Elastic Defend".
- Configure the integration name and optionally add a description.
- Select the type of environment you want to protect, for MacOS it is recommended to select "Traditional Endpoints".
- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
- Click "Save and Continue".
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
"""
severity = "medium"
tags = [
    "Domain: Endpoint",
    "OS: macOS",
    "Use Case: Threat Detection",
    "Tactic: Initial Access",
    "Data Source: Elastic Defend",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
process where event.action == "exec" and host.os.type == "macos" and
    process.parent.name: (
      "Microsoft Word",
      "Microsoft Outlook",
      "Microsoft Excel",
      "Microsoft PowerPoint",
      "Microsoft OneNote"
    ) and
  process.name : (
    "curl",
    "nscurl",
    "bash",
    "sh",
    "osascript",
    "python*",
    "perl*",
    "mktemp",
    "chmod",
    "php",
    "nohup",
    "openssl",
    "plutil",
    "PlistBuddy",
    "xattr",
    "mktemp",
    "sqlite3",
    "funzip",
    "popen"
  ) and

  // Filter FPs related to product version discovery and Office error reporting behavior
  not process.args:
    (
      "ProductVersion",
      "hw.model",
      "ioreg",
      "ProductName",
      "ProductUserVisibleVersion",
      "ProductBuildVersion",
      "/Library/Application Support/Microsoft/MERP*/Microsoft Error Reporting.app/Contents/MacOS/Microsoft Error Reporting",
      "open -a Safari *",
      "defaults read *",
      "sysctl hw.model*",
      "ioreg -d2 -c IOPlatformExpertDevice *",
      "ps aux | grep 'ToDesk_Desktop' | grep -v grep",
      "PIPE=\"$CFFIXED_USER_HOME/.zoteroIntegrationPipe*"
    ) and

   not process.parent.executable :
        (
          "/Applications/ToDesk.app/Contents/MacOS/ToDesk_Service",
          "/usr/local/Privacy-i/PISupervisor",
          "/Library/Addigy/lan-cache",
          "/Library/Elastic/Agent/*",
          "/opt/jc/bin/jumpcloud-agent",
          "/usr/sbin/networksetup"
        ) and
   not (process.name : "sh" and process.command_line : "*$CFFIXED_USER_HOME/.zoteroIntegrationPipe*") and

   not process.Ext.effective_parent.executable : (
        "/Applications/ToDesk.app/Contents/MacOS/ToDesk_Service",
        "/usr/local/Privacy-i/PISupervisor",
        "/Library/Addigy/auditor",
        "/Library/Elastic/Agent/*",
        "/opt/jc/bin/jumpcloud-agent",
        "/usr/sbin/networksetup"
      ) and
    not (
      process.name in ("sh", "bash") and
      process.command_line like "*com.microsoft.Outlook/Data/tmp/Outlook*Temp*" and
      process.parent.executable in (
        "/Applications/Microsoft Outlook.app/Contents/MacOS/Microsoft Outlook",
        "/Applications/Microsoft Outlook 2.app/Contents/MacOS/Microsoft Outlook",
        "/Applications/Microsoft/Microsoft Outlook.app/Contents/MacOS/Microsoft Outlook"
      )
    )
'''
note = """## Triage and analysis

> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.

### Investigating Suspicious macOS MS Office Child Process

Microsoft Office applications on macOS can be exploited by adversaries to execute malicious child processes, often through malicious macros or document exploits. These child processes may include scripting languages or utilities that can be leveraged for unauthorized actions. The detection rule identifies such suspicious activity by monitoring for unexpected child processes spawned by Office apps, while filtering out known benign behaviors and false positives, thus helping to pinpoint potential threats.

### Possible investigation steps

- Review the parent process name and executable path to confirm if the Office application is legitimate and expected on the host.
- Examine the child process name and command line arguments to identify any potentially malicious or unexpected behavior, such as the use of scripting languages or network utilities like curl or nscurl.
- Check the process arguments for any indicators of compromise or suspicious patterns that are not filtered out by the rule, such as unexpected network connections or file modifications.
- Investigate the effective parent executable path to ensure it is not associated with known benign applications or services that are excluded by the rule.
- Correlate the alert with any recent phishing attempts or suspicious email activity that might have led to the execution of malicious macros or document exploits.
- Analyze the host's recent activity and system logs to identify any other anomalies or related alerts that could provide additional context or evidence of compromise.

### False positive analysis

- Product version discovery commands can trigger false positives. Exclude processes with arguments like "ProductVersion" and "ProductBuildVersion" to reduce noise.
- Office error reporting may cause alerts. Exclude paths related to Microsoft Error Reporting to prevent unnecessary alerts.
- Network setup and management tools such as "/usr/sbin/networksetup" can be benign. Exclude these executables if they are part of regular system operations.
- Third-party applications like ToDesk and JumpCloud Agent might be flagged. Exclude their executables if they are verified as safe and part of normal operations.
- Zotero integration can cause false positives with shell processes. Exclude specific command lines involving "CFFIXED_USER_HOME/.zoteroIntegrationPipe" to avoid these alerts.

### Response and remediation

- Immediately isolate the affected macOS device from the network to prevent further malicious activity or lateral movement.
- Terminate any suspicious child processes identified by the alert, such as those involving scripting languages or utilities like curl, bash, or osascript.
- Conduct a thorough review of the parent Microsoft Office application and associated documents to identify and remove any malicious macros or document exploits.
- Restore the affected system from a known good backup if malicious activity has compromised system integrity or data.
- Update all Microsoft Office applications to the latest version to patch any known vulnerabilities that could be exploited by similar threats.
- Implement application whitelisting to restrict the execution of unauthorized scripts and utilities, reducing the risk of exploitation through Office applications.
- Escalate the incident to the security operations team for further investigation and to assess the potential impact on other systems within the network."""


[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1566"
name = "Phishing"
reference = "https://attack.mitre.org/techniques/T1566/"

[[rule.threat.technique.subtechnique]]
id = "T1566.001"
name = "Spearphishing Attachment"
reference = "https://attack.mitre.org/techniques/T1566/001/"

[rule.threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"

[[rule.threat.technique.subtechnique]]
id = "T1059.002"
name = "AppleScript"
reference = "https://attack.mitre.org/techniques/T1059/002/"

[[rule.threat.technique.subtechnique]]
id = "T1059.004"
name = "Unix Shell"
reference = "https://attack.mitre.org/techniques/T1059/004/"

[[rule.threat.technique.subtechnique]]
id = "T1059.006"
name = "Python"
reference = "https://attack.mitre.org/techniques/T1059/006/"

[[rule.threat.technique]]
id = "T1203"
name = "Exploitation for Client Execution"
reference = "https://attack.mitre.org/techniques/T1203/"

[[rule.threat.technique]]
id = "T1204"
name = "User Execution"
reference = "https://attack.mitre.org/techniques/T1204/"

[[rule.threat.technique.subtechnique]]
id = "T1204.002"
name = "Malicious File"
reference = "https://attack.mitre.org/techniques/T1204/002/"

[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"

Stages and Predicates

Stage 1: process

process where event.action == "exec" and host.os.type == "macos" and
    process.parent.name: (
      "Microsoft Word",
      "Microsoft Outlook",
      "Microsoft Excel",
      "Microsoft PowerPoint",
      "Microsoft OneNote"
    ) and
  process.name : (
    "curl",
    "nscurl",
    "bash",
    "sh",
    "osascript",
    "python*",
    "perl*",
    "mktemp",
    "chmod",
    "php",
    "nohup",
    "openssl",
    "plutil",
    "PlistBuddy",
    "xattr",
    "mktemp",
    "sqlite3",
    "funzip",
    "popen"
  ) and
  not process.args:
    (
      "ProductVersion",
      "hw.model",
      "ioreg",
      "ProductName",
      "ProductUserVisibleVersion",
      "ProductBuildVersion",
      "/Library/Application Support/Microsoft/MERP*/Microsoft Error Reporting.app/Contents/MacOS/Microsoft Error Reporting",
      "open -a Safari *",
      "defaults read *",
      "sysctl hw.model*",
      "ioreg -d2 -c IOPlatformExpertDevice *",
      "ps aux | grep 'ToDesk_Desktop' | grep -v grep",
      "PIPE=\"$CFFIXED_USER_HOME/.zoteroIntegrationPipe*"
    ) and
   not process.parent.executable :
        (
          "/Applications/ToDesk.app/Contents/MacOS/ToDesk_Service",
          "/usr/local/Privacy-i/PISupervisor",
          "/Library/Addigy/lan-cache",
          "/Library/Elastic/Agent/*",
          "/opt/jc/bin/jumpcloud-agent",
          "/usr/sbin/networksetup"
        ) and
   not (process.name : "sh" and process.command_line : "*$CFFIXED_USER_HOME/.zoteroIntegrationPipe*") and
   not process.Ext.effective_parent.executable : (
        "/Applications/ToDesk.app/Contents/MacOS/ToDesk_Service",
        "/usr/local/Privacy-i/PISupervisor",
        "/Library/Addigy/auditor",
        "/Library/Elastic/Agent/*",
        "/opt/jc/bin/jumpcloud-agent",
        "/usr/sbin/networksetup"
      ) and
    not (
      process.name in ("sh", "bash") and
      process.command_line like "*com.microsoft.Outlook/Data/tmp/Outlook*Temp*" and
      process.parent.executable in (
        "/Applications/Microsoft Outlook.app/Contents/MacOS/Microsoft Outlook",
        "/Applications/Microsoft Outlook 2.app/Contents/MacOS/Microsoft Outlook",
        "/Applications/Microsoft/Microsoft Outlook.app/Contents/MacOS/Microsoft Outlook"
      )
    )

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • exec corpus 547 (elastic 547)
field:"EventType" kind:eq value:"exec"
process.namewildcard
  • PlistBuddy corpus 3 (elastic 3)
  • bash corpus 33 (elastic 33)
  • chmod corpus 7 (elastic 7)
  • curl corpus 28 (elastic 28)
  • funzip corpus 4 (elastic 4)
  • mktemp corpus 4 (elastic 4)
  • nohup corpus 5 (elastic 5)
  • nscurl corpus 15 (elastic 15)
  • openssl corpus 12 (elastic 12)
  • osascript corpus 31 (elastic 31)
  • perl* corpus 22 (elastic 22)
  • php corpus 4 (elastic 4)
  • plutil corpus 3 (elastic 3)
  • popen corpus 2 (elastic 2)
  • python* corpus 51 (elastic 51)
  • sh corpus 33 (elastic 33)
  • sqlite3 corpus 3 (elastic 3)
  • xattr corpus 6 (elastic 6)
field:"process_basename" kind:wildcard
process.parent.namewildcard
  • Microsoft Excel
  • Microsoft OneNote
  • Microsoft Outlook
  • Microsoft PowerPoint
  • Microsoft Word
field:"parent_process_basename" kind:wildcard

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.command_linematch$CFFIXED_USER_HOME/.zoteroIntegrationPipeexcludes:process.command_line field:"process.command_line" value:"$CFFIXED_USER_HOME/.zoteroIntegrationPipe"
process.nameeqshexcludes:process.name field:"process.name" value:"sh"
process.command_linewildcard*com.microsoft.Outlook/Data/tmp/Outlook*Temp*excludes:process.command_line field:"process.command_line" value:"*com.microsoft.Outlook/Data/tmp/Outlook*Temp*"
process.nameinbash, shexcludes:process.name field:"process.name" value:"bash" field:"process.name" value:"sh"
process.parent.executablein/Applications/Microsoft Outlook 2.app/Contents/MacOS/Microsoft Outlook, /Applications/Microsoft Outlook.app/Contents/MacOS/Microsoft Outlook, /Applications/Microsoft/Microsoft Outlook.app/Contents/MacOS/Microsoft Outlookexcludes:process.parent.executable field:"process.parent.executable" value:"/Applications/Microsoft Outlook 2.app/Contents/MacOS/Microsoft Outlook" field:"process.parent.executable" value:"/Applications/Microsoft Outlook.app/Contents/MacOS/Microsoft Outlook" field:"process.parent.executable" value:"/Applications/Microsoft/Microsoft Outlook.app/Contents/MacOS/Microsoft Outlook"
process.Ext.effective_parent.executablewildcard/Applications/ToDesk.app/Contents/MacOS/ToDesk_Service, /usr/local/Privacy-i/PISupervisor, /Library/Addigy/auditor, /Library/Elastic/Agent/*, /opt/jc/bin/jumpcloud-agent, /usr/sbin/networksetupexcludes:process.Ext.effective_parent.executable
process.argswildcardProductVersion, hw.model, ioreg, ProductName, ProductUserVisibleVersion, ProductBuildVersion, /Library/Application Support/Microsoft/MERP*/Microsoft Error Reporting.app/Contents/MacOS/Microsoft Error Reporting, open -a Safari *, defaults read *, sysctl hw.model*, ioreg -d2 -c IOPlatformExpertDevice *, ps aux | grep 'ToDesk_Desktop' | grep -v grep, PIPE="$CFFIXED_USER_HOME/.zoteroIntegrationPipe*excludes:process.args
process.parent.executablewildcard/Applications/ToDesk.app/Contents/MacOS/ToDesk_Service, /usr/local/Privacy-i/PISupervisor, /Library/Addigy/lan-cache, /Library/Elastic/Agent/*, /opt/jc/bin/jumpcloud-agent, /usr/sbin/networksetupexcludes:process.parent.executable

Suspicious PHP Command Execution

#
Source
github.com/elastic/protections-artifacts

This rule monitors for suspicious PHP command executions by detecting the start of a PHP process with a command line argument that contains keywords commonly used by attackers to execute malicious code. These command line arguments include operations to execute code, create subprocesses, and encode or decode data.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
This rule monitors for suspicious PHP command executions by detecting the start of a PHP process with a command line
argument that contains keywords commonly used by attackers to execute malicious code. These command line arguments
include operations to execute code, create subprocesses, and encode or decode data.
"""
id = "d00bd50b-577e-47a7-9234-b4bfaa599791"
license = "Elastic License v2"
name = "Suspicious PHP Command Execution"
os_list = ["linux"]
version = "1.0.12"

query = '''
process where event.type == "start" and event.action == "exec" and process.parent.executable != null and
process.executable like ("/bin/php*", "/usr/bin/php*", "/usr/local/bin/php*") and
process.args == "-r" and process.command_line like~ (
  "*exec(*", "*system(*", "*shell_exec(*", "*passthru(*", "*proc_open(*", "*pcntl_exec(*", "*popen(*", 
  "*eval(*", "*assert(*", "*create_function(*", "*preg_replace(*e*", "*include(*", "*require(*",
  "*base64_decode(*", "*gzinflate(*", "*gzuncompress(*", "*str_rot13(*", "*urldecode(*", "*chr(*", 
  "*ord(*", "*strrev(*", "*strtr(*", "*pack(*", "*unpack(*", "*curl_exec(*", "*curl_multi_exec(*",
  "*file_get_contents(*", "*fopen(*", "*fsockopen(*", "*pfsockopen(*", "*stream_socket_client(*",
  "*socket_create(*", "*socket_connect(*", "*socket_write(*", "*socket_read(*", "*mail(*",
  "*move_uploaded_file(*"
) and not (
  // Exclude web server processes as these are covered by other rules
  process.working_directory like (
    "/var/www/*", "/builds/*", "/home/*/jenkins/*", "/home/*/public_html*", "/var/lib/ldap-account-manager/config",
    "/workspace/*", "/mnt/*", "/srv/www/*"
  ) or
  process.parent.args like (
    "/var/www/html/*", "source /home/*/.claude/shell*", "scripts/ci/render_build_configs.sh", "scripts/ci/build_package_vendor_cache.sh",
    "../source/scripts/ci/build_package_vendor_cache.sh", "/usr/local/bin/ncp-notify-update", "/usr/local/bin/ncp-notify-unattended-upgrade",
    "/usr/local/bin/ncp-check-nc-version", "/usr/local/bin/ncp-check-version"
  ) or
  process.args like "/usr/local/cpanel/*" or
  process.command_line like (
    "*https://composer.github.io/installer.sig*",
    "*json_decode(file_get_contents('php://stdin')*",
    "php -r exit(@fsockopen(getenv('DB_HOST')?:'postgres', (int)(getenv('DB_PORT')?:5432)) ? 0 : 1);",
    "php -r exit(@fsockopen(\"127.0.0.1\", 9501) ? 0 : 1);",
    "php -r echo urldecode(stream_get_contents(STDIN));",
    "*include(\"/var/www/nextcloud/config/config.php\")*"
  ) or
process.parent.command_line == "runc init" or
process.parent.executable in ("/opt/teleport/system/bin/teleport", "/usr/sbin/sshd") or
  (
    process.executable == "/usr/local/bin/php" and
    process.command_line == "php -r exit(@fsockopen('127.0.0.1', 9000) ? 0 : 1);"
  )
)
'''

min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"


[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"

[internal]
min_endpoint_version = "7.15.0"

Stages and Predicates

Stage 1: process

process where event.type == "start" and event.action == "exec" and process.parent.executable != null and
process.executable like ("/bin/php*", "/usr/bin/php*", "/usr/local/bin/php*") and
process.args == "-r" and process.command_line like~ (
  "*exec(*", "*system(*", "*shell_exec(*", "*passthru(*", "*proc_open(*", "*pcntl_exec(*", "*popen(*",
  "*eval(*", "*assert(*", "*create_function(*", "*preg_replace(*e*", "*include(*", "*require(*",
  "*base64_decode(*", "*gzinflate(*", "*gzuncompress(*", "*str_rot13(*", "*urldecode(*", "*chr(*",
  "*ord(*", "*strrev(*", "*strtr(*", "*pack(*", "*unpack(*", "*curl_exec(*", "*curl_multi_exec(*",
  "*file_get_contents(*", "*fopen(*", "*fsockopen(*", "*pfsockopen(*", "*stream_socket_client(*",
  "*socket_create(*", "*socket_connect(*", "*socket_write(*", "*socket_read(*", "*mail(*",
  "*move_uploaded_file(*"
) and not (
  process.working_directory like (
    "/var/www/*", "/builds/*", "/home/*/jenkins/*", "/home/*/public_html*", "/var/lib/ldap-account-manager/config",
    "/workspace/*", "/mnt/*", "/srv/www/*"
  ) or
  process.parent.args like (
    "/var/www/html/*", "source /home/*/.claude/shell*", "scripts/ci/render_build_configs.sh", "scripts/ci/build_package_vendor_cache.sh",
    "../source/scripts/ci/build_package_vendor_cache.sh", "/usr/local/bin/ncp-notify-update", "/usr/local/bin/ncp-notify-unattended-upgrade",
    "/usr/local/bin/ncp-check-nc-version", "/usr/local/bin/ncp-check-version"
  ) or
  process.args like "/usr/local/cpanel/*" or
  process.command_line like (
    "*https://composer.github.io/installer.sig*",
    "*json_decode(file_get_contents('php://stdin')*",
    "php -r exit(@fsockopen(getenv('DB_HOST')?:'postgres', (int)(getenv('DB_PORT')?:5432)) ? 0 : 1);",
    "php -r exit(@fsockopen(\"127.0.0.1\", 9501) ? 0 : 1);",
    "php -r echo urldecode(stream_get_contents(STDIN));",
    "*include(\"/var/www/nextcloud/config/config.php\")*"
  ) or
process.parent.command_line == "runc init" or
process.parent.executable in ("/opt/teleport/system/bin/teleport", "/usr/sbin/sshd") or
  (
    process.executable == "/usr/local/bin/php" and
    process.command_line == "php -r exit(@fsockopen('127.0.0.1', 9000) ? 0 : 1);"
  )
)

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • exec
field:"EventType" kind:eq value:"exec"
event.typeeq
  • start
field:"event.type" kind:eq value:"start"
process.argseq
  • -r
field:"process.args" kind:eq value:"-r"
process.command_linewildcard
  • *assert(*
  • *base64_decode(*
  • *chr(*
  • *create_function(*
  • *curl_exec(*
  • *curl_multi_exec(*
  • *eval(*
  • *exec(*
  • *file_get_contents(*
  • *fopen(*
  • *fsockopen(*
  • *gzinflate(*
  • *gzuncompress(*
  • *include(*
  • *mail(*
  • *move_uploaded_file(*
  • *ord(*
  • *pack(*
  • *passthru(*
  • *pcntl_exec(*
  • *pfsockopen(*
  • *popen(*
  • *preg_replace(*e*
  • *proc_open(*
  • *require(*
  • *shell_exec(*
  • *socket_connect(*
  • *socket_create(*
  • *socket_read(*
  • *socket_write(*
  • *str_rot13(*
  • *stream_socket_client(*
  • *strrev(*
  • *strtr(*
  • *system(*
  • *unpack(*
  • *urldecode(*
field:"CommandLine" kind:wildcard
process.executablewildcard
  • /bin/php*
  • /usr/bin/php*
  • /usr/local/bin/php*
field:"Image" kind:wildcard
process.parent.executableis_not_null
  • (no value, null check)
field:"ParentImage" kind:is_not_null

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.command_lineeqphp -r exit(@fsockopen('127.0.0.1', 9000) ? 0 : 1);excludes:process.command_line field:"process.command_line" value:"php -r exit(@fsockopen('127.0.0.1', 9000) ? 0 : 1);"
process.executableeq/usr/local/bin/phpexcludes:process.executable field:"process.executable" value:"/usr/local/bin/php"
process.argsstarts_with/usr/local/cpanel/excludes:process.args field:"process.args" value:"/usr/local/cpanel/"
process.command_linewildcard*https://composer.github.io/installer.sig*, *json_decode(file_get_contents('php://stdin')*, php -r exit(@fsockopen(getenv('DB_HOST')?:'postgres', (int)(getenv('DB_PORT')?:5432)) ? 0 : 1);, php -r exit(@fsockopen("127.0.0.1", 9501) ? 0 : 1);, php -r echo urldecode(stream_get_contents(STDIN));, *include("/var/www/nextcloud/config/config.php")*excludes:process.command_line
process.parent.argswildcard/var/www/html/*, source /home/*/.claude/shell*, scripts/ci/render_build_configs.sh, scripts/ci/build_package_vendor_cache.sh, ../source/scripts/ci/build_package_vendor_cache.sh, /usr/local/bin/ncp-notify-update, /usr/local/bin/ncp-notify-unattended-upgrade, /usr/local/bin/ncp-check-nc-version, /usr/local/bin/ncp-check-versionexcludes:process.parent.args
process.parent.command_lineeqrunc initexcludes:process.parent.command_line field:"process.parent.command_line" value:"runc init"
process.parent.executablein/opt/teleport/system/bin/teleport, /usr/sbin/sshdexcludes:process.parent.executable field:"process.parent.executable" value:"/opt/teleport/system/bin/teleport" field:"process.parent.executable" value:"/usr/sbin/sshd"
process.working_directorywildcard/var/www/*, /builds/*, /home/*/jenkins/*, /home/*/public_html*, /var/lib/ldap-account-manager/config, /workspace/*, /mnt/*, /srv/www/*excludes:process.working_directory

Suspicious Script or Process Execution from Mounted Device

#
Time window
30s
Source
github.com/elastic/protections-artifacts

Detects potential execution of a script or unsigned macOS binary from a mounted device. Malware may abuse DMG files to deliver malicious code or scripts to gain initial access.

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

[rule]
description = """
Detects potential execution of a script or unsigned macOS binary from a mounted device. Malware may abuse DMG files to
deliver malicious code or scripts to gain initial access.
"""
id = "c6ee0cc0-efc4-4353-bbfc-da16ebc4e1a5"
license = "Elastic License v2"
name = "Suspicious Script or Process Execution from Mounted Device"
os_list = ["macos"]
version = "1.0.45"

query = '''
sequence with maxspan=30s
 [file where event.action == "mount" and
  not (process.executable like "/usr/libexec/lsd" and file.path like~ "/private/var/folders/*/AppTranslocation/*") and
  not file.path like~ ("/Volumes/*/Contents/MacOS/*", "/Library/Developer/CoreSimulator/Volumes/*")] as event0
 [process where event.action == "exec" and 
  (stringcontains~(process.executable, event0.file.path) or 
   stringcontains~(process.parent.executable, event0.file.path)) and
   (
     /* Focus on truly suspicious patterns */
     (process.code_signature.trusted == false and process.code_signature.exists == true and process.args_count >= 2) or
     /* Shells executing inline commands with suspicious content */
     (process.name in ("bash", "sh", "zsh") and process.args == "-c" and 
      process.args like~ ("*curl*http*", "*wget*", "*python*-c*", "*perl*-e*", "*base64*", "*chmod*+x*")) or
     /* Scripting interpreters with suspicious args */
     (process.name like~ "python*" and (process.args == "-c" or process.args : "*exec(*" or process.args : "*eval(*")) or
     (process.name == "perl" and process.args == "-e") or
     (process.name == "osascript" and process.args == "-e") or
     /* chmod making things executable */
     (process.name == "chmod" and process.args in ("+x", "a+x", "0777", "777") and process.args like "/Volumes/*")
   ) and 
  /* Legitimate installer patterns */
  not process.executable like~ ("/Volumes/*/Contents/MacOS/*",
                                "/Volumes/*/*.app/Contents/MacOS/*",
                                "/private/tmp/PKInstallSandbox.*",
                                "/Applications/Solarwinds Discovery Agent.app/Contents/Resources/agent/ruby/bin/ruby",
                                "/opt/homebrew/Cellar/*") and
  not process.args like~ ("/tmp/PKInstallSandbox.*/Scripts/*", 
                         "/Library/Apple/System/Library/InstallerSandboxes/.*",
                         "/private/tmp/dmg.*/.PKInstallSandboxManager-SystemSoftware/*") and
  /* Legitimate parent processes */
  not process.parent.executable like~ ("/sbin/launchd",
                                       "/usr/bin/sudo",
                                       "/Library/PrivilegedHelperTools/*",
                                       "/System/Library/*") and
  not (process.parent.code_signature.team_id in ("5C3VHX9RG5", "UBF8T346G9") and
       process.parent.code_signature.trusted == true) and
  /* Legitimate management tools - consolidated */
  not process.Ext.effective_parent.executable like~ ("/usr/local/jamf/bin/*",
                                                     "/Library/Application Support/JAMF/*",
                                                     "/Library/Kandji/*",
                                                     "/Library/Application Support/Mosyle/*",
                                                     "/Applications/NinjaRMMAgent/*",
                                                     "/Library/Application Support/com.atera.ateraagent/*")]
'''

min_endpoint_version = "8.11.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1

[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 1

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1204"
name = "User Execution"
reference = "https://attack.mitre.org/techniques/T1204/"
[[threat.technique.subtechnique]]
id = "T1204.002"
name = "Malicious File"
reference = "https://attack.mitre.org/techniques/T1204/002/"



[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"

[internal]
min_endpoint_version = "8.11.0"

Stages and Predicates

Stage 1: file

[file where event.action == "mount" and
  not (process.executable like "/usr/libexec/lsd" and file.path like~ "/private/var/folders/*/AppTranslocation/*") and
  not file.path like~ ("/Volumes/*/Contents/MacOS/*", "/Library/Developer/CoreSimulator/Volumes/*")] as event0

Stage 2: process

[process where event.action == "exec" and
  (stringcontains~(process.executable, event0.file.path) or
   stringcontains~(process.parent.executable, event0.file.path)) and
   (
     (process.code_signature.trusted == false and process.code_signature.exists == true and process.args_count >= 2) or
     (process.name in ("bash", "sh", "zsh") and process.args == "-c" and
      process.args like~ ("*curl*http*", "*wget*", "*python*-c*", "*perl*-e*", "*base64*", "*chmod*+x*")) or
     (process.name like~ "python*" and (process.args == "-c" or process.args : "*exec(*" or process.args : "*eval(*")) or
     (process.name == "perl" and process.args == "-e") or
     (process.name == "osascript" and process.args == "-e") or
     (process.name == "chmod" and process.args in ("+x", "a+x", "0777", "777") and process.args like "/Volumes/*")
   ) and
  not process.executable like~ ("/Volumes/*/Contents/MacOS/*",
                                "/Volumes/*/*.app/Contents/MacOS/*",
                                "/private/tmp/PKInstallSandbox.*",
                                "/Applications/Solarwinds Discovery Agent.app/Contents/Resources/agent/ruby/bin/ruby",
                                "/opt/homebrew/Cellar/*") and
  not process.args like~ ("/tmp/PKInstallSandbox.*/Scripts/*",
                         "/Library/Apple/System/Library/InstallerSandboxes/.*",
                         "/private/tmp/dmg.*/.PKInstallSandboxManager-SystemSoftware/*") and
  not process.parent.executable like~ ("/sbin/launchd",
                                       "/usr/bin/sudo",
                                       "/Library/PrivilegedHelperTools/*",
                                       "/System/Library/*") and
  not (process.parent.code_signature.team_id in ("5C3VHX9RG5", "UBF8T346G9") and
       process.parent.code_signature.trusted == true) and
  not process.Ext.effective_parent.executable like~ ("/usr/local/jamf/bin/*",
                                                     "/Library/Application Support/JAMF/*",
                                                     "/Library/Kandji/*",
                                                     "/Library/Application Support/Mosyle/*",
                                                     "/Applications/NinjaRMMAgent/*",
                                                     "/Library/Application Support/com.atera.ateraagent/*")]

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • exec corpus 547 (elastic 547)
  • mount corpus 2 (elastic 2)
field:"EventType" kind:eq
process.argseq
  • -c corpus 91 (elastic 91)
  • -e corpus 42 (elastic 42)
field:"process.args" kind:eq
process.argsin
  • +x corpus 7 (elastic 7)
  • 0777 corpus 4 (elastic 4)
  • 777 corpus 7 (elastic 7)
  • a+x corpus 4 (elastic 4)
field:"process.args" kind:in
process.argswildcard
  • *base64* corpus 2 (elastic 2)
  • *chmod*+x*
  • *curl*http*
  • *eval(* corpus 2 (elastic 2)
  • *exec(* corpus 2 (elastic 2)
  • *perl*-e*
  • *python*-c*
  • *wget*
  • /Volumes/* corpus 5 (elastic 5)
field:"process.args" kind:wildcard
process.args_countge
  • 2 transforms: number corpus 18 (elastic 18)
field:"process.args_count" kind:ge value:"2"
process.code_signature.existseq
  • true transforms: boolean corpus 2 (elastic 2)
field:"process.code_signature.exists" kind:eq value:"true"
process.code_signature.trustedeq
  • false transforms: boolean corpus 114 (elastic 114)
field:"process.code_signature.trusted" kind:eq value:"false"
process.executablecontains
  • event0.file.path (field reference)
field:"Image" kind:contains value:"event0.file.path"
process.nameeq
  • chmod corpus 10 (elastic 10)
  • osascript corpus 41 (elastic 41)
  • perl corpus 7 (elastic 7)
field:"process_basename" kind:eq
process.namein
  • bash corpus 181 (elastic 181)
  • sh corpus 180 (elastic 180)
  • zsh corpus 180 (elastic 180)
field:"process_basename" kind:in
process.namewildcard
  • python* corpus 55 (elastic 55)
field:"process_basename" kind:wildcard value:"python*"
process.parent.executablecontains
  • event0.file.path (field reference)
field:"ParentImage" kind:contains value:"event0.file.path"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
file.pathwildcard/private/var/folders/*/AppTranslocation/*excludes:file.path field:"file.path" value:"/private/var/folders/*/AppTranslocation/*"
process.executableeq/usr/libexec/lsdexcludes:process.executable field:"process.executable" value:"/usr/libexec/lsd"
file.pathwildcard/Volumes/*/Contents/MacOS/*, /Library/Developer/CoreSimulator/Volumes/*excludes:file.path field:"file.path" value:"/Volumes/*/Contents/MacOS/*" field:"file.path" value:"/Library/Developer/CoreSimulator/Volumes/*"
process.parent.code_signature.team_idin5C3VHX9RG5, UBF8T346G9excludes:process.parent.code_signature.team_id field:"process.parent.code_signature.team_id" value:"5C3VHX9RG5" field:"process.parent.code_signature.team_id" value:"UBF8T346G9"
process.parent.code_signature.trustedeqtrueexcludes:process.parent.code_signature.trusted field:"process.parent.code_signature.trusted" value:"true"
process.Ext.effective_parent.executablestarts_with/usr/local/jamf/bin/, /Library/Application Support/JAMF/, /Library/Kandji/, /Library/Application Support/Mosyle/, /Applications/NinjaRMMAgent/, /Library/Application Support/com.atera.ateraagent/excludes:process.Ext.effective_parent.executable
process.argswildcard/tmp/PKInstallSandbox.*/Scripts/*, /Library/Apple/System/Library/InstallerSandboxes/.*, /private/tmp/dmg.*/.PKInstallSandboxManager-SystemSoftware/*excludes:process.args field:"process.args" value:"/tmp/PKInstallSandbox.*/Scripts/*" field:"process.args" value:"/Library/Apple/System/Library/InstallerSandboxes/.*" field:"process.args" value:"/private/tmp/dmg.*/.PKInstallSandboxManager-SystemSoftware/*"
process.executablewildcard/Volumes/*/Contents/MacOS/*, /Volumes/*/*.app/Contents/MacOS/*, /private/tmp/PKInstallSandbox.*, /Applications/Solarwinds Discovery Agent.app/Contents/Resources/agent/ruby/bin/ruby, /opt/homebrew/Cellar/*excludes:process.executable
process.parent.executablewildcard/sbin/launchd, /usr/bin/sudo, /Library/PrivilegedHelperTools/*, /System/Library/*excludes:process.parent.executable

Suspicious Suspended Process Creation

#
Source
github.com/elastic/protections-artifacts

Identifies suspicious attempts to create a process in suspended state by an unsigned or untrusted binary. This behavior is consistent with remote code injection attacks.

MITRE ATT&CK Coverage

TacticTechniques
Stealth

Rule Body

[rule]
description = """
Identifies suspicious attempts to create a process in suspended state by an unsigned or untrusted binary. This behavior
is consistent with remote code injection attacks.
"""
id = "391f1e23-9ee0-4fa4-82b7-a54bebfa077d"
license = "Elastic License v2"
name = "Suspicious Suspended Process Creation"
os_list = ["windows"]
version = "1.0.8"

query = '''
process where event.action == "start" and

 process.Ext.created_suspended == true and process.parent.executable != null and

 process.parent.thread.Ext.call_stack_contains_unbacked == true and

 process.parent.thread.Ext.call_stack_summary : ("*ntdll.dll|kernelbase.dll|Unbacked*", "*kernel32.dll|Unbacked*", "ntdll.dll|Unbacked*") and

 (process.parent.code_signature.status != "trusted" or process.parent.name : "rundll32.exe") and
 (
  /* process starts a signed MS binary in suspended state */
  process.code_signature.subject_name : ("Microsoft Windows", "Microsoft Corporation") or

  /* process starts a suspended instance of itself */
  (startswith~(process.executable, process.parent.executable) and
   (
    (process.Ext.device.product_id : ("Virtual DVD-ROM", "Virtual Disk") and not process.executable : "C:\\*") or
    process.Ext.relative_file_creation_time <= 500)
    )
    and not process.parent.thread.Ext.call_stack_summary : "*system.ni.dll|Unbacked*"
  ) and

  not (process.name : "rundll32.exe" and process.args :  "C:\\Program Files\\Rapid7\\Insight Agent\\components\\armor\\common\\Armor\\mvarmor32.dll,#1") and

  not process.parent.executable :
              ("?:\\Program Files\\rs2\\rs2Client\\rs2ClientService.exe",
               "?:\\Program Files (x86)\\Steam\\steamapps\\common\\*.exe",
               "?:\\Program Files (x86)\\MEDITECH\\EIH.Universe\\EIH.LIVEF.Ring\\System\\Magic.exe",
               "?:\\SWATCUP-Premium\\SwatCup.exe") and
  not (process.command_line : "rundll32.exe \"C:\\Program Files\\Rapid7\\Insight Agent\\components\\armor\\common\\Armor\\mvarmor32.dll\",#1" and
    process.parent.thread.Ext.call_stack_summary == "ntdll.dll|kernelbase.dll|mvarmor64dynamic.dll|kernel32.dll|Unbacked") and
  not process.executable : ("?:\\Program Files (x86)\\Microsoft Visual Studio\\*.exe",
                            "?:\\Program Files\\Microsoft Visual Studio\\*.exe",
                            "?:\\Program Files (x86)\\Windows Kits\\*\\x64\\rc.exe") and
  not (process.executable : "C:\\Windows\\SysWOW64\\rundll32.exe" and
       process.parent.executable : "C:\\Windows\\SysWOW64\\rundll32.exe" and process.parent.args == "--enable-speech-input") and
  not (process.executable : "C:\\Windows\\System32\\msiexec.exe" and process.parent.executable : "C:\\ProgramData\\CentraStage*\\AEMAgent\\RMM.AdvancedSoftwareManagement\\*\\smclient\\SmClient.exe") and
  not _arraysearch(process.parent.thread.Ext.call_stack, $entry,
                    $entry.callsite_trailing_bytes :
                            ("8945d08b45d08945f4837df400741a8b45fc8b80*",
                             "8944246c8b44246c89442460488b8424b0050000*",
                             "488b5560c6420c01*", 
                             "488b9588000000c6420c01833d*", 
                             "488b9580000000c6420c01*",
                             "*85f60f95c10fb6c9898d940000004883bdd8000000007420*",
                             "*85ff0f95c00fb6c0488b9540ffffff488956104881c4e80000005b5e5f415c415d415e415f5d*", 
                             "c22c0090b8c4000000bac06c8077ffd2*", 
                             "8945e48b55f48b45e48942088b4df88b5130ffd2*",
                             "c6430c01833d*33c085f60f95c00fb6c0488b8d38ffffff48894b104881c4f80000005b5e5f415c415d415e41",
                             "c22000cccccccccccccccccccccccccccc8b4c2424518b4c2424528b542424518b4c2424528b542424518b4c2424528b542424518b4c2424528b542424518b48"))
'''

min_endpoint_version = "8.13.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"


[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "8.13.0"

Stages and Predicates

Stage 1: process

process where event.action == "start" and
 process.Ext.created_suspended == true and process.parent.executable != null and
 process.parent.thread.Ext.call_stack_contains_unbacked == true and
 process.parent.thread.Ext.call_stack_summary : ("*ntdll.dll|kernelbase.dll|Unbacked*", "*kernel32.dll|Unbacked*", "ntdll.dll|Unbacked*") and
 (process.parent.code_signature.status != "trusted" or process.parent.name : "rundll32.exe") and
 (
  process.code_signature.subject_name : ("Microsoft Windows", "Microsoft Corporation") or
  (startswith~(process.executable, process.parent.executable) and
   (
    (process.Ext.device.product_id : ("Virtual DVD-ROM", "Virtual Disk") and not process.executable : "C:\\*") or
    process.Ext.relative_file_creation_time <= 500)
    )
    and not process.parent.thread.Ext.call_stack_summary : "*system.ni.dll|Unbacked*"
  ) and
  not (process.name : "rundll32.exe" and process.args :  "C:\\Program Files\\Rapid7\\Insight Agent\\components\\armor\\common\\Armor\\mvarmor32.dll,#1") and
  not process.parent.executable :
              ("?:\\Program Files\\rs2\\rs2Client\\rs2ClientService.exe",
               "?:\\Program Files (x86)\\Steam\\steamapps\\common\\*.exe",
               "?:\\Program Files (x86)\\MEDITECH\\EIH.Universe\\EIH.LIVEF.Ring\\System\\Magic.exe",
               "?:\\SWATCUP-Premium\\SwatCup.exe") and
  not (process.command_line : "rundll32.exe \"C:\\Program Files\\Rapid7\\Insight Agent\\components\\armor\\common\\Armor\\mvarmor32.dll\",#1" and
    process.parent.thread.Ext.call_stack_summary == "ntdll.dll|kernelbase.dll|mvarmor64dynamic.dll|kernel32.dll|Unbacked") and
  not process.executable : ("?:\\Program Files (x86)\\Microsoft Visual Studio\\*.exe",
                            "?:\\Program Files\\Microsoft Visual Studio\\*.exe",
                            "?:\\Program Files (x86)\\Windows Kits\\*\\x64\\rc.exe") and
  not (process.executable : "C:\\Windows\\SysWOW64\\rundll32.exe" and
       process.parent.executable : "C:\\Windows\\SysWOW64\\rundll32.exe" and process.parent.args == "--enable-speech-input") and
  not (process.executable : "C:\\Windows\\System32\\msiexec.exe" and process.parent.executable : "C:\\ProgramData\\CentraStage*\\AEMAgent\\RMM.AdvancedSoftwareManagement\\*\\smclient\\SmClient.exe") and
  not _arraysearch(process.parent.thread.Ext.call_stack, $entry,
                    $entry.callsite_trailing_bytes :
                            ("8945d08b45d08945f4837df400741a8b45fc8b80*",
                             "8944246c8b44246c89442460488b8424b0050000*",
                             "488b5560c6420c01*",
                             "488b9588000000c6420c01833d*",
                             "488b9580000000c6420c01*",
                             "*85f60f95c10fb6c9898d940000004883bdd8000000007420*",
                             "*85ff0f95c00fb6c0488b9540ffffff488956104881c4e80000005b5e5f415c415d415e415f5d*",
                             "c22c0090b8c4000000bac06c8077ffd2*",
                             "8945e48b55f48b45e48942088b4df88b5130ffd2*",
                             "c6430c01833d*33c085f60f95c00fb6c0488b8d38ffffff48894b104881c4f80000005b5e5f415c415d415e41",
                             "c22000cccccccccccccccccccccccccccc8b4c2424518b4c2424528b542424518b4c2424528b542424518b4c2424528b542424518b4c2424528b542424518b48"))

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 388 (elastic 388)
field:"EventType" kind:eq value:"start"
process.Ext.created_suspendedeq
  • true transforms: boolean
field:"process.Ext.created_suspended" kind:eq value:"true"
process.Ext.device.product_idwildcard
  • Virtual DVD-ROM corpus 13 (elastic 13)
  • Virtual Disk corpus 13 (elastic 13)
field:"process.Ext.device.product_id" kind:wildcard
process.Ext.relative_file_creation_timele
  • 500 transforms: number corpus 28 (elastic 28)
field:"process.Ext.relative_file_creation_time" kind:le value:"500"
process.code_signature.subject_namewildcard
  • Microsoft Corporation corpus 2 (elastic 2)
  • Microsoft Windows
field:"Signature" kind:wildcard
process.executablestarts_with
  • process.parent.executable (field reference)
field:"Image" kind:starts_with value:"process.parent.executable"
process.parent.code_signature.statusne
  • trusted
field:"process.parent.code_signature.status" kind:ne value:"trusted"
process.parent.executableis_not_null
  • (no value, null check)
field:"ParentImage" kind:is_not_null
process.parent.namewildcard
  • rundll32.exe corpus 20 (elastic 20)
field:"parent_process_basename" kind:wildcard value:"rundll32.exe"
process.parent.thread.Ext.call_stack_contains_unbackedeq
  • true transforms: boolean corpus 7 (elastic 7)
field:"process.parent.thread.Ext.call_stack_contains_unbacked" kind:eq value:"true"
process.parent.thread.Ext.call_stack_summarywildcard
  • *kernel32.dll|Unbacked*
  • *ntdll.dll|kernelbase.dll|Unbacked*
  • ntdll.dll|Unbacked*
field:"process.parent.thread.Ext.call_stack_summary" kind:wildcard

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argseqC:\Program Files\Rapid7\Insight Agent\components\armor\common\Armor\mvarmor32.dll,#1excludes:process.args field:"process.args" value:"C:\Program Files\Rapid7\Insight Agent\components\armor\common\Armor\mvarmor32.dll,#1"
process.nameeqrundll32.exeexcludes:process.name field:"process.name" value:"rundll32.exe"
process.command_lineeqrundll32.exe "C:\Program Files\Rapid7\Insight Agent\components\armor\common\Armor\mvarmor32.dll",#1excludes:process.command_line
process.parent.thread.Ext.call_stack_summaryeqntdll.dll|kernelbase.dll|mvarmor64dynamic.dll|kernel32.dll|Unbackedexcludes:process.parent.thread.Ext.call_stack_summary field:"process.parent.thread.Ext.call_stack_summary" value:"ntdll.dll|kernelbase.dll|mvarmor64dynamic.dll|kernel32.dll|Unbacked"
process.executableeqC:\Windows\SysWOW64\rundll32.exeexcludes:process.executable field:"process.executable" value:"C:\Windows\SysWOW64\rundll32.exe"
process.parent.argseq--enable-speech-inputexcludes:process.parent.args field:"process.parent.args" value:"--enable-speech-input"
process.parent.executableeqC:\Windows\SysWOW64\rundll32.exeexcludes:process.parent.executable field:"process.parent.executable" value:"C:\Windows\SysWOW64\rundll32.exe"
process.executableeqC:\Windows\System32\msiexec.exeexcludes:process.executable field:"process.executable" value:"C:\Windows\System32\msiexec.exe"
process.parent.executablewildcardC:\ProgramData\CentraStage*\AEMAgent\RMM.AdvancedSoftwareManagement\*\smclient\SmClient.exeexcludes:process.parent.executable field:"process.parent.executable" value:"C:\ProgramData\CentraStage*\AEMAgent\RMM.AdvancedSoftwareManagement\*\smclient\SmClient.exe"
process.parent.thread.Ext.call_stackarray_any(no value, null check)excludes:process.parent.thread.Ext.call_stack
process.executablewildcard?:\Program Files (x86)\Microsoft Visual Studio\*.exe, ?:\Program Files\Microsoft Visual Studio\*.exe, ?:\Program Files (x86)\Windows Kits\*\x64\rc.exeexcludes:process.executable field:"process.executable" value:"?:\Program Files (x86)\Microsoft Visual Studio\*.exe" field:"process.executable" value:"?:\Program Files\Microsoft Visual Studio\*.exe" field:"process.executable" value:"?:\Program Files (x86)\Windows Kits\*\x64\rc.exe"
process.parent.executablewildcard?:\Program Files\rs2\rs2Client\rs2ClientService.exe, ?:\Program Files (x86)\Steam\steamapps\common\*.exe, ?:\Program Files (x86)\MEDITECH\EIH.Universe\EIH.LIVEF.Ring\System\Magic.exe, ?:\SWATCUP-Premium\SwatCup.exeexcludes:process.parent.executable

Web Server Potential SQL Injection Request

#
Status
production
Severity
high
Time window
9m
Author
Elastic
Source
github.com/elastic/detection-rules

This rule detects potential SQL injection attempts in web server requests by identifying common SQL injection patterns in URLs. Such activity may indicate reconnaissance or exploitation attempts by attackers trying to manipulate backend databases or extract sensitive information.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2025/11/19"
integration = ["nginx", "apache", "apache_tomcat", "iis", "traefik", "zeek"]
maturity = "production"
updated_date = "2026/08/09"

[rule]
author = ["Elastic"]
description = """
This rule detects potential SQL injection attempts in web server requests by identifying common SQL injection patterns
in URLs. Such activity may indicate reconnaissance or exploitation attempts by attackers trying to manipulate backend
databases or extract sensitive information.
"""
from = "now-9m"
index = [
        "logs-nginx.access-*",
        "logs-apache.access-*",
        "logs-apache_tomcat.access-*",
        "logs-iis.access-*",
        "logs-traefik.access-*", 
        "logs-zeek.http-*"
]
language = "eql"
license = "Elastic License v2"
name = "Web Server Potential SQL Injection Request"
risk_score = 73
rule_id = "7f7a0ee1-7b6f-466a-85b4-110fb105f5e2"
severity = "high"
tags = [
    "Domain: Web",
    "Domain: Network",
    "Use Case: Threat Detection",
    "Tactic: Reconnaissance",
    "Tactic: Credential Access",
    "Tactic: Persistence",
    "Tactic: Execution",
    "Tactic: Command and Control",
    "Data Source: Nginx",
    "Data Source: Apache",
    "Data Source: Apache Tomcat",
    "Data Source: IIS",
    "Data Source: Traefik",
    "Data Source: Zeek", 
    "Resources: Investigation Guide"
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
any where (
url.original like~ (
    "*dbms_pipe.receive_message%28chr%*",
    "*waitfor%20delay%20%270%3a0%3a*",
    "*%28select%28sleep%285*", "*%28select%20*from%20pg_sleep%285*", "*%3bselect%20pg_sleep%285*",
    "*and%20sleep%28*%29*", "*or%20sleep%28*%29*", "*case%20when*then%20sleep%28*", "*if%28sleep%28*%29*",
    "*benchmark%28*%2c*md5%28*",
    "*convert%28int%2c%28select%20char%28*",
    "*char%28*char%28*char%28*char%28*",
    "*concat%28concat%28char%28*",
    "*case%20when%20%28*%3d*%29%20then*else*end*",
    "*elt%28*%3d*%2c1%29%29*",
    "*union%20select%20null%2cnull*", "*union%20all%20select%20null*",
    "*union%20all%20select%20*concat%28md5%28*",
    "*extractvalue%28*concat%280x*", "*updatexml%28*concat%280x*",
    "*procedure%2f%2a%2a%2fanalyse%28extractvalue%28*",
    "*gtid_subset%28concat%280x*", "*gtid_subtract%28concat%280x*",
    "*mid%28ifnull%28session_user%28%29*",
    "*'qq'%2b%28%28select%20@@version%29%29%2b'qq'*",
    "*%27%20or%20%271%27%3d%271*", "*%22%20or%20%221%22%3d%221*", "*%27%20or%20%27a%27%3d%27a*",
    "*and%201%3d1--*", "*and%201%3d2--*",
    "*%29%3bselect*if%28%28ord%28mid%28*",
    "*xp_cmdshell*",
    "*select%20*into%20outfile*", "*select%20*into%20dumpfile*",
    "*load_file%28*", "*load%5ffile%28*",
    "*select%20*from%20information_schema.tables*", "*from%20information_schema.columns%20where%20table_schema*",
    "*dbms_pipe%2ereceive_message*", "*dbms_lock%2esleep*",
    "*select%20@@version*", "*select%20user%28%29*", "*select%20current_user%28%29*", "*select%20database%28%29*",
    "*sp_executesql%20*exec%20*", "*xp_dirtree*"
  )
  or
  url.query like~ (
    "*dbms_pipe.receive_message(chr*",
    "*waitfor delay '0:0:*",
    "*(select(sleep(5*", "*(select*from pg_sleep(5*", "*;select pg_sleep(5*",
    "*and sleep(*)*", "*or sleep(*)*", "*case when*then sleep(*", "*if(sleep(*)*",
    "*benchmark(*,*md5(*",
    "*convert(int,(select char(*",
    "*char(*char(*char(*char(*",
    "*concat(concat(char(*",
    "*case when (*=*) then*else*end*",
    "*elt(*=*,1))*",
    "*union select null,null*", "*union all select null*",
    "*union all select*concat(md5(*",
    "*extractvalue(*concat(0x*", "*updatexml(*concat(0x*",
    "*procedure/**/analyse(extractvalue(*",
    "*gtid_subset(concat(0x*", "*gtid_subtract(concat(0x*",
    "*mid(ifnull(session_user()*",
    "*'qq'+((select @@version))+'qq'*",
    "*' or '1'='1*", "*\" or \"1\"=\"1*", "*' or 'a'='a*",
    "*and 1=1--*", "*and 1=2--*",
    "*);select*if((ord(mid(*",
    "*xp_cmdshell*",
    "*select*into outfile*", "*select*into dumpfile*",
    "*load_file(*",
    "*select*from information_schema.tables*", "*from information_schema.columns where table_schema*",
    "*dbms_pipe.receive_message*", "*dbms_lock.sleep*",
    "*select @@version*", "*select user()*", "*select current_user()*", "*select database()*",
    "*sp_executesql*exec*", "*xp_dirtree*"
  )
) and
not user_agent.original like~ (
    "*Nessus*", "*Qualys*", "*Acunetix*",  "*Tenable*", "*CensysInspect*", "*Detectify*",
    "*Assetnote*", "*ExposureScan*", "*RecordedFuture*", "*AppSpider*", "*WebInspect*",
    "*Rapid7*", "*InsightVM*", "*Probely*"
)
'''
note = """## Triage and analysis

### Investigating Web Server Potential SQL Injection Request

SQL injection (SQLi) attempts to manipulate backend database queries via unsanitized
input passed through web request parameters. This rule flags requests whose URL or
query string contains structural patterns characteristic of automated SQLi tooling
(sqlmap and similar) or manual exploitation techniques, spanning boolean-blind,
time-based, error-based, and UNION-based extraction methods across MySQL, MSSQL,
PostgreSQL, and Oracle syntax.

#### Possible investigation steps

- Identify the full request and response context:
  - `url.original` / `url.query` — full injected payload
  - `http.request.method`, `http.response.status_code` — was the request accepted (2xx) or rejected (4xx/5xx/WAF block)?
  - `source.ip`, `source.as.organization.name`, `source.geo.*` — is this a known scanner IP, hosting/VPS ASN, or unexpected geography for this application's userbase?
  - `user_agent.original` — check for tool signatures (`sqlmap`, `Assetnote`, `Nessus`, `Nuclei`, etc.) vs. a spoofed browser UA
- Determine which SQLi technique is present, since it changes the likely intent and next steps:
  - **Boolean-blind** (`AND 1=1--`, `CASE WHEN...THEN...ELSE`) — attacker inferring true/false conditions one bit/char at a time; usually high request volume against the same parameter
  - **Time-based blind** (`SLEEP`, `BENCHMARK`, `WAITFOR DELAY`, `pg_sleep`) — look for abnormal response latency on matching requests to confirm exploitation succeeded vs. was blocked
  - **Error-based** (`EXTRACTVALUE`, `UPDATEXML`, `GTID_SUBSET`, `CONVERT(INT,...)`) — check `http.response.status_code`/body for a 500 or a reflected DB error message; if present, the attacker likely received leaked data directly
  - **UNION-based** (`UNION SELECT NULL,...`, `UNION ALL SELECT...CONCAT(MD5(...`) — attacker is enumerating column count or confirming a reflection point to pull data directly into the page body
  - **Stacked queries** (`;SELECT...`, `;EXEC xp_cmdshell`) — most severe; if the DB driver allows multiple statements, this can lead to command execution (`xp_cmdshell`) rather than just data disclosure
- Pivot on the target parameter and endpoint (e.g. `url.path`, the specific query-string key such as `id=`, `sort=`, `column=`) to see:
  - How many distinct payloads/techniques were tried against the same parameter (suggests automated technique-fuzzing by a single tool run)
  - Whether the same `source.ip` hit multiple endpoints/parameters (broader scan) or repeatedly refined one payload (targeted exploitation attempt)
- Check for a correlated spike in requests from the same IP/ASN in a tight time window — sqlmap and similar tools generate many rapid, near-identical requests when fuzzing technique/column count/character position.
- If the backend database technology is known, cross-check the payload's SQL dialect (MySQL vs. MSSQL vs. PostgreSQL functions) against what the application actually runs — a payload using the wrong dialect's functions will simply error out and fail, lowering severity.
- If available, correlate with database-side audit logs (e.g. MSSQL Audit `event.code: 33205`, slow query logs) for the same timeframe/client IP to confirm whether the payload actually reached and executed against the database.

### False positive analysis

- **Vulnerability scanners and security tooling** are the most common source of noise: Assetnote, Burp Suite, Qualys, Nessus, Acunetix, and similar tools intentionally send these exact payloads as part of authorized scanning. Check `user_agent.original` for scanner signatures and cross-reference `source.ip`/ASN against your organization's known scanning infrastructure or third-party ASM vendor.
- Legitimate application traffic containing SQL-like keywords is rare given the specificity of these patterns (chained `CHAR()` calls, `ELT(n=n,1)` self-comparisons, hex-delimited `CONCAT`), but verify against applications that accept raw SQL fragments as legitimate input (e.g., internal admin/reporting tools with a "custom query" field) if any exist in your environment.
- Consider adding a suppression/exception for confirmed, recurring authorized scanning sources rather than tuning the query patterns themselves, to avoid reducing detection coverage against real attackers using the same tools.

### Response and remediation

- If the request reached the application layer unblocked (`event.outcome: success` / 2xx response) and the payload matches an error-based or UNION-based technique, treat as a potential confirmed data exposure — check application/database logs for evidence of returned sensitive data.
- If a stacked-query or `xp_cmdshell` payload succeeded, escalate immediately — this can lead to OS-level command execution, not just data disclosure.
- Validate that the affected endpoint uses parameterized queries/prepared statements; SQL injection at this scale of tooling almost always indicates raw string concatenation in the query layer.
- If exploitation is confirmed, review the database account's privileges used by the web application (least privilege should prevent `xp_cmdshell`, `INFORMATION_SCHEMA` enumeration, or cross-database access even if injection succeeds).
- Block or rate-limit the source IP/ASN at the WAF or reverse proxy if not already filtered, and consider a virtual-patch WAF rule for the specific vulnerable parameter while the application fix is developed.
- Review other requests from the same source IP across the retention window for prior reconnaissance (e.g., directory enumeration, parameter fuzzing) that may have preceded the injection attempt.
"""

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1505"
name = "Server Software Component"
reference = "https://attack.mitre.org/techniques/T1505/"

[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"

[[rule.threat.technique.subtechnique]]
id = "T1059.004"
name = "Unix Shell"
reference = "https://attack.mitre.org/techniques/T1059/004/"

[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"

[rule.threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1595"
name = "Active Scanning"
reference = "https://attack.mitre.org/techniques/T1595/"

[[rule.threat.technique.subtechnique]]
id = "T1595.002"
name = "Vulnerability Scanning"
reference = "https://attack.mitre.org/techniques/T1595/002/"

[[rule.threat.technique.subtechnique]]
id = "T1595.003"
name = "Wordlist Scanning"
reference = "https://attack.mitre.org/techniques/T1595/003/"

[rule.threat.tactic]
id = "TA0043"
name = "Reconnaissance"
reference = "https://attack.mitre.org/tactics/TA0043/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1190"
name = "Exploit Public-Facing Application"
reference = "https://attack.mitre.org/techniques/T1190/"

[rule.threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"

Stages and Predicates

Stage 1: any

any where (
url.original like~ (
    "*dbms_pipe.receive_message%28chr%*",
    "*waitfor%20delay%20%270%3a0%3a*",
    "*%28select%28sleep%285*", "*%28select%20*from%20pg_sleep%285*", "*%3bselect%20pg_sleep%285*",
    "*and%20sleep%28*%29*", "*or%20sleep%28*%29*", "*case%20when*then%20sleep%28*", "*if%28sleep%28*%29*",
    "*benchmark%28*%2c*md5%28*",
    "*convert%28int%2c%28select%20char%28*",
    "*char%28*char%28*char%28*char%28*",
    "*concat%28concat%28char%28*",
    "*case%20when%20%28*%3d*%29%20then*else*end*",
    "*elt%28*%3d*%2c1%29%29*",
    "*union%20select%20null%2cnull*", "*union%20all%20select%20null*",
    "*union%20all%20select%20*concat%28md5%28*",
    "*extractvalue%28*concat%280x*", "*updatexml%28*concat%280x*",
    "*procedure%2f%2a%2a%2fanalyse%28extractvalue%28*",
    "*gtid_subset%28concat%280x*", "*gtid_subtract%28concat%280x*",
    "*mid%28ifnull%28session_user%28%29*",
    "*'qq'%2b%28%28select%20@@version%29%29%2b'qq'*",
    "*%27%20or%20%271%27%3d%271*", "*%22%20or%20%221%22%3d%221*", "*%27%20or%20%27a%27%3d%27a*",
    "*and%201%3d1--*", "*and%201%3d2--*",
    "*%29%3bselect*if%28%28ord%28mid%28*",
    "*xp_cmdshell*",
    "*select%20*into%20outfile*", "*select%20*into%20dumpfile*",
    "*load_file%28*", "*load%5ffile%28*",
    "*select%20*from%20information_schema.tables*", "*from%20information_schema.columns%20where%20table_schema*",
    "*dbms_pipe%2ereceive_message*", "*dbms_lock%2esleep*",
    "*select%20@@version*", "*select%20user%28%29*", "*select%20current_user%28%29*", "*select%20database%28%29*",
    "*sp_executesql%20*exec%20*", "*xp_dirtree*"
  )
  or
  url.query like~ (
    "*dbms_pipe.receive_message(chr*",
    "*waitfor delay '0:0:*",
    "*(select(sleep(5*", "*(select*from pg_sleep(5*", "*;select pg_sleep(5*",
    "*and sleep(*)*", "*or sleep(*)*", "*case when*then sleep(*", "*if(sleep(*)*",
    "*benchmark(*,*md5(*",
    "*convert(int,(select char(*",
    "*char(*char(*char(*char(*",
    "*concat(concat(char(*",
    "*case when (*=*) then*else*end*",
    "*elt(*=*,1))*",
    "*union select null,null*", "*union all select null*",
    "*union all select*concat(md5(*",
    "*extractvalue(*concat(0x*", "*updatexml(*concat(0x*",
    "*procedure/**/analyse(extractvalue(*",
    "*gtid_subset(concat(0x*", "*gtid_subtract(concat(0x*",
    "*mid(ifnull(session_user()*",
    "*'qq'+((select @@version))+'qq'*",
    "*' or '1'='1*", "*\" or \"1\"=\"1*", "*' or 'a'='a*",
    "*and 1=1--*", "*and 1=2--*",
    "*);select*if((ord(mid(*",
    "*xp_cmdshell*",
    "*select*into outfile*", "*select*into dumpfile*",
    "*load_file(*",
    "*select*from information_schema.tables*", "*from information_schema.columns where table_schema*",
    "*dbms_pipe.receive_message*", "*dbms_lock.sleep*",
    "*select @@version*", "*select user()*", "*select current_user()*", "*select database()*",
    "*sp_executesql*exec*", "*xp_dirtree*"
  )
) and
not user_agent.original like~ (
    "*Nessus*", "*Qualys*", "*Acunetix*",  "*Tenable*", "*CensysInspect*", "*Detectify*",
    "*Assetnote*", "*ExposureScan*", "*RecordedFuture*", "*AppSpider*", "*WebInspect*",
    "*Rapid7*", "*InsightVM*", "*Probely*"
)

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
url.originalwildcard
  • *%22%20or%20%221%22%3d%221*
  • *%27%20or%20%271%27%3d%271*
  • *%27%20or%20%27a%27%3d%27a*
  • *%28select%20*from%20pg_sleep%285*
  • *%28select%28sleep%285*
  • *%29%3bselect*if%28%28ord%28mid%28*
  • *%3bselect%20pg_sleep%285*
  • *'qq'%2b%28%28select%20@@version%29%29%2b'qq'*
  • *and%201%3d1--*
  • *and%201%3d2--*
  • *and%20sleep%28*%29*
  • *benchmark%28*%2c*md5%28*
  • *case%20when%20%28*%3d*%29%20then*else*end*
  • *case%20when*then%20sleep%28*
  • *char%28*char%28*char%28*char%28*
  • *concat%28concat%28char%28*
  • *convert%28int%2c%28select%20char%28*
  • *dbms_lock%2esleep*
  • *dbms_pipe%2ereceive_message*
  • *dbms_pipe.receive_message%28chr%*
  • *elt%28*%3d*%2c1%29%29*
  • *extractvalue%28*concat%280x*
  • *from%20information_schema.columns%20where%20table_schema*
  • *gtid_subset%28concat%280x*
  • *gtid_subtract%28concat%280x*
  • *if%28sleep%28*%29*
  • *load%5ffile%28*
  • *load_file%28*
  • *mid%28ifnull%28session_user%28%29*
  • *or%20sleep%28*%29*
  • *procedure%2f%2a%2a%2fanalyse%28extractvalue%28*
  • *select%20*from%20information_schema.tables*
  • *select%20*into%20dumpfile*
  • *select%20*into%20outfile*
  • *select%20@@version*
  • *select%20current_user%28%29*
  • *select%20database%28%29*
  • *select%20user%28%29*
  • *sp_executesql%20*exec%20*
  • *union%20all%20select%20*concat%28md5%28*
  • *union%20all%20select%20null*
  • *union%20select%20null%2cnull*
  • *updatexml%28*concat%280x*
  • *waitfor%20delay%20%270%3a0%3a*
  • *xp_cmdshell*
  • *xp_dirtree*
field:"url.original" kind:wildcard
url.querywildcard
  • *" or "1"="1*
  • *' or '1'='1*
  • *' or 'a'='a*
  • *'qq'+((select @@version))+'qq'*
  • *(select(sleep(5*
  • *(select*from pg_sleep(5*
  • *);select*if((ord(mid(*
  • *;select pg_sleep(5*
  • *and 1=1--*
  • *and 1=2--*
  • *and sleep(*)*
  • *benchmark(*,*md5(*
  • *case when (*=*) then*else*end*
  • *case when*then sleep(*
  • *char(*char(*char(*char(*
  • *concat(concat(char(*
  • *convert(int,(select char(*
  • *dbms_lock.sleep*
  • *dbms_pipe.receive_message(chr*
  • *dbms_pipe.receive_message*
  • *elt(*=*,1))*
  • *extractvalue(*concat(0x*
  • *from information_schema.columns where table_schema*
  • *gtid_subset(concat(0x*
  • *gtid_subtract(concat(0x*
  • *if(sleep(*)*
  • *load_file(*
  • *mid(ifnull(session_user()*
  • *or sleep(*)*
  • *procedure/**/analyse(extractvalue(*
  • *select @@version*
  • *select current_user()*
  • *select database()*
  • *select user()*
  • *select*from information_schema.tables*
  • *select*into dumpfile*
  • *select*into outfile*
  • *sp_executesql*exec*
  • *union all select null*
  • *union all select*concat(md5(*
  • *union select null,null*
  • *updatexml(*concat(0x*
  • *waitfor delay '0:0:*
  • *xp_cmdshell*
  • *xp_dirtree*
field:"url.query" kind:wildcard

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
user_agent.originalmatchNessus, Qualys, Acunetix, Tenable, CensysInspect, Detectify, Assetnote, ExposureScan, RecordedFuture, AppSpider, WebInspect, Rapid7, InsightVM, Probelyexcludes:user_agent.original

Web Shell Detection: Script Process Child of Common Web Processes

#
Status
production
Severity
high
Time window
9m
Group by
host.id, process.command_line
Author
Elastic
Source
github.com/elastic/detection-rules

Identifies suspicious commands executed via a web server, which may suggest a vulnerability and remote shell access.

Known False Positives

  • Security audits, maintenance, and network administrative scripts may trigger this alert only when parent context, child identity, command scope, service identity, and available artifact or destination evidence align to the same bounded workflow.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2021/08/24"
integration = ["endpoint", "windows", "system", "sentinel_one_cloud_funnel", "m365_defender", "crowdstrike"]
maturity = "production"
updated_date = "2026/05/03"

[rule]
author = ["Elastic"]
description = "Identifies suspicious commands executed via a web server, which may suggest a vulnerability and remote shell access."
false_positives = [
    """
    Security audits, maintenance, and network administrative scripts may trigger this alert only when parent context,
    child identity, command scope, service identity, and available artifact or destination evidence align to the same
    bounded workflow.
    """,
]
from = "now-9m"
index = [
    "endgame-*",
    "logs-crowdstrike.fdr*",
    "logs-endpoint.events.process-*",
    "logs-m365_defender.event-*",
    "logs-sentinel_one_cloud_funnel.*",
    "logs-system.security*",
    "logs-windows.sysmon_operational-*",
    "winlogbeat-*",
]
language = "kuery"
license = "Elastic License v2"
name = "Web Shell Detection: Script Process Child of Common Web Processes"
references = [
    "https://www.microsoft.com/security/blog/2020/02/04/ghost-in-the-shell-investigating-web-shell-attacks/",
    "https://www.elastic.co/security-labs/elastic-response-to-the-the-spring4shell-vulnerability-cve-2022-22965",
    "https://www.elastic.co/security-labs/hunting-for-persistence-using-elastic-security-part-1",
]
risk_score = 73
rule_id = "2917d495-59bd-4250-b395-c29409b76086"
severity = "high"
tags = [
    "Domain: Endpoint",
    "OS: Windows",
    "Use Case: Threat Detection",
    "Tactic: Persistence",
    "Resources: Investigation Guide",
    "Data Source: Elastic Endgame",
    "Data Source: Elastic Defend",
    "Data Source: SentinelOne",
    "Data Source: Windows Security Event Logs",
    "Data Source: Microsoft Defender XDR",
    "Data Source: Sysmon",
    "Data Source: Crowdstrike",
]
timestamp_override = "event.ingested"
type = "new_terms"

query = '''
host.os.type:windows and event.category:process and event.type:start and process.args : * and
  process.parent.name:("w3wp.exe" or "httpd.exe" or "nginx.exe" or "php.exe" or "php-cgi.exe" or "tomcat.exe" or "ArcSOC.exe") and
  (
    process.name : ("cmd.exe" or "cscript.exe" or "powershell.exe" or "pwsh.exe" or "powershell_ise.exe" or "wmic.exe" or "wscript.exe") or
    process.name.caseless : ("cmd.exe" or "cscript.exe" or "powershell.exe" or "pwsh.exe" or "powershell_ise.exe" or "wmic.exe" or "wscript.exe")
  ) and
  not
  (
    process.command_line : (
      "cmd.exe /c mode CON" or
      "cmd.exe /s /c \"mode CON\"" or
      "cmd.exe /c \"mode\"" or
      "cmd.exe /s /c \"tput colors 2>&1\"" or
      "cmd.exe /s /c \"stty 2> NUL\"" or
      "cmd.exe /s /c \"stty 2>&1\"" or
      "cmd.exe /c \"stty 2>&1\"" or
      "cmd.exe /s /c \"ipconfig /all 2>&1\"" or
      "cmd.exe /s /c \"echo '%os%'\"" or
      *.\\install\\awk.exe*
    ) or
    process.args : (\(git or (*artisan* and *queue\:work*) or *rmdir* or "mode CON" or ver or ls or mode or dir) or

    (process.name:cmd.exe and process.parent.args : "c:\\\\xampp\\\\htdocs\\\\open-audit\\\\index.php") or

    (process.name:cmd.exe and process.args:("/V:ON" and "--header-html")) or

    (process.parent.args:"WebCession" and process.args:E\:\\Data\\CLM\\cession\\*.bat) or

    (process.parent.executable :"D:\\AiDKlinik\\php\\php-cgi.exe" and process.args:D\:\\AiDKlinik\\web*) or

    (process.parent.args :"E:/wamp64/bin/apache/apache2.4.62.1" and process.args:node*) or

    (process.parent.name:"php.exe" and process.name:"cmd.exe" and process.args:("/V:ON" and "/E:ON"))
  )
'''

note = """## Triage and analysis

#### Possible investigation steps

- What execution path did the alert capture?
  - Focus: child `process.executable` / `process.command_line`; web-parent `process.parent.name`, `process.parent.executable`, and `process.parent.command_line` for IIS/Apache/nginx/PHP CGI/Tomcat/ArcGIS.
  - Implication: escalate when a web-facing parent launches a shell, script host, downloader, archive tool, or admin utility outside bounded tasks; lower only when parent context, child path, and command match one exact deployment, health-check, log rotation, or support task.
- Is the child command administration or post-exploitation?
  - Focus: `process.command_line`: WMIC, download cradles, archive creation, account/system discovery, service control, credential access, script-host flags, or web-root/temp/backup/app-content paths.
  - Hint: for PowerShell, reconstruct script blocks by `host.id` and `process.pid` via `powershell.file.script_block_text`, `powershell.sequence`, and `powershell.total`; missing PowerShell telemetry is unresolved, not benign.
  - Implication: escalate when the command stages payloads, runs discovery, creates accounts, changes services, or writes to web-accessible or temp paths; lower suspicion when bounded to one recognized deployment, health-check, log rotation, or support task.
- Is user context human admin or service identity?
  - Why: web-process children often inherit app-pool or service identity; `user.id`, `user.name`, and `user.domain` do not prove human initiation.
  - Focus: `@timestamp`, `user.id`, `user.name`, `process.Ext.session_info.logon_type`, and `process.parent.command_line`.
  - Implication: escalate when service or network logon context launches interactive troubleshooting, remote administration, or off-hours shell activity without a matching window; lower suspicion when identity, logon type, parent pool/service, and command scope fit one exact workflow.
- Does child binary identity fit its command?
  - Focus: `process.executable`, `process.pe.original_file_name`, `process.hash.sha256`, `process.code_signature.subject_name`, and `process.code_signature.trusted`.
  - Implication: escalate when the child is renamed, unsigned/untrusted, user-writable, or mismatched to original file name; lower suspicion when identity and path match stable tooling, but continue because trusted binaries can carry web-shell commands.
- Did file telemetry show web-shell placement, staging, or config changes?
  - Focus: if file telemetry exists, review `host.id` file events for child `process.entity_id` or `process.pid`, checking `file.path`, `file.Ext.original.path`, and `file.Ext.windows.zone_identifier`. $investigate_1
  - Hint: web-root script writes without later child starts are adjacent-variant evidence; if the child writes a script or executable, query starts where `process.executable` equals that path on same `host.id`.
  - Implication: escalate when the child writes ASPX, ASP, PHP, JSP, JS, BAT, PS1, EXE, DLL, JAR, WAR, or archives to web-accessible/temp/user-writable paths, or a written artifact later executes; missing file telemetry is unresolved, not benign, and absence does not close.
- Did the child launch second-stage processes?
  - Focus: child starts on `host.id` where `process.parent.entity_id` equals child `process.entity_id`, checking `process.executable`, `process.command_line`, and `process.hash.sha256`. $investigate_2
  - Implication: escalate when descendants include shells, script hosts, downloaders, archive tools, credential utilities, service control, or persistence tooling; absence only narrows impact when command, file, network, and related alerts also fit a benign workflow.
- Did DNS/network telemetry show retrieval or control?
  - Focus: if DNS/network telemetry exists, review child `process.entity_id` events on `host.id`, separating `dns.question.name` / `dns.resolved_ip` from `destination.ip` / `destination.port`; compare role with command intent. $investigate_3
  - Hint: map DNS results to later connection IPs before linking query and connection; if a third-party alert lacks `process.entity_id`, recover the child by `host.id`, `process.pid`, and `@timestamp`. Missing network/DNS telemetry is unresolved, not benign.
  - Implication: escalate when the child retrieves tools from public infrastructure, reaches rare/misaligned destinations, or connects outside web-server administration; decide from alert-local process evidence and corroboration when DNS/network telemetry is unavailable.
- Do related alerts show broader compromise?
  - Focus: same-web-parent starts and 48h `host.id` alerts for web-shell, credential-access, discovery, archive, lateral-movement, persistence, or anti-forensics.
    - $investigate_4
    - $investigate_0
  - Implication: escalate scope when alerts cluster around the same server role, child command family, or staged artifacts; absence only narrows response scope when local parent-child, command, identity, file, and network evidence are explained.
- What disposition fits?
  - Implication: escalate on unexplained server-side execution, exploit-like command intent, suspicious child identity, payload staging, rare destinations, or broader compromise; do not wait for optional pivots when alert-local process evidence is unsafe. Close only when same-host alert-window telemetry proves one exact benign web-server workflow; use outside confirmation for legitimacy gaps. If evidence is mixed or visibility incomplete, preserve artifacts and escalate.

### False positive analysis

- Web deployment, post-install validation, health checks, vendor extension install, ArcGIS publishing, or maintenance can spawn "cmd.exe", PowerShell, or "wscript.exe" from web components. Confirm only when parent, child, command, service identity, and artifact/destination evidence describe the same alert-window workflow with no unexpected web-content writes, rare callbacks, or contradictions.
- If telemetry proves shape but not legitimacy, require matching change, deployment, runbook, vendor, or owner confirmation; use prior occurrences post-closure to test exception stability.
- Build exceptions from minimum confirmed pattern: web parent command, child executable/hash/signature, command line, `user.id`, `host.id`, and bounded content path or destination when decisive. Avoid parent name, `process.name`, or `host.id` alone.

### Response and remediation

- If confirmed benign, reverse temporary containment, document exact parent, child, command, service identity, artifact/destination evidence, and confirmation, and create exceptions only from that pattern.
- If suspicious but unconfirmed, preserve the alert/export, process tree, child/parent entity IDs, command lines, hash, staged-file copies, destinations, related alerts, and web/app logs around `@timestamp` before containment or cleanup.
- Apply reversible containment tied to evidence: block confirmed malicious destinations, restrict affected site/app access, disable exposed extension or virtual directory, or increase `host.id` monitoring. Isolate only when evidence and server criticality permit.
- If confirmed malicious, contain the host or terminate the child only after preservation; if direct response is unavailable, escalate with process/artifact/destination/server-log evidence to the team that can contain the server, disable the exposed path, or stop the service.
- Before deletion/restoration, hunt for the same hash, child command, staged path, domain, IP, and port across hosts/accounts. Then remove web shells, scripts, archives, scheduled tasks, dropped utilities, and persistence; restore known-good content/config; rotate exposed service, app, or admin credentials if secrets may be exposed.
- After containment, patch the implicated app, extension, framework, or server component; review the internet-exposed site/service that launched the child; retain endpoint, network, and web logs; document script-only variants or logging gaps.
"""

setup = """## Setup

This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.

Setup instructions: https://ela.st/install-elastic-defend

### Additional data sources

This rule also supports the following third-party data sources. For setup instructions, refer to the links below:

- [CrowdStrike](https://ela.st/crowdstrike-integration)
- [Microsoft Defender XDR](https://ela.st/m365-defender)
- [SentinelOne Cloud Funnel](https://ela.st/sentinel-one-cloud-funnel)
- [Sysmon Event ID 1 - Process Creation](https://ela.st/sysmon-event-1-setup)
- [Windows Process Creation Logs](https://ela.st/audit-process-creation)
"""

[[rule.filters]]
[rule.filters.meta]
negate = true
[rule.filters.query.wildcard."process.command_line"]
case_insensitive = true
value = "*?:\\\\Program Files\\\\*"

[[rule.filters]]
[rule.filters.meta]
negate = true
[rule.filters.query.wildcard."process.command_line"]
case_insensitive = true
value = "*?:\\\\Program Files (x86)\\\\*"

[rule.investigation_fields]
field_names = [
    "@timestamp",
    "host.name",
    "host.id",
    "user.id",
    "process.entity_id",
    "process.pid",
    "process.executable",
    "process.command_line",
    "process.Ext.session_info.logon_type",
    "process.pe.original_file_name",
    "process.code_signature.subject_name",
    "process.code_signature.trusted",
    "process.hash.sha256",
    "process.parent.executable",
    "process.parent.command_line",
]

[transform]

[[transform.investigate]]
label = "Alerts associated with the host"
description = ""
providers = [
  [
    { excluded = false, field = "event.kind", queryType = "phrase", value = "signal", valueType = "string" },
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" }
  ]
]
relativeFrom = "now-48h/h"
relativeTo = "now"

[[transform.investigate]]
label = "File events for the suspicious child process"
description = ""
providers = [
  [
    { excluded = false, field = "event.category", queryType = "phrase", value = "file", valueType = "string" },
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
    { excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.entity_id}}", valueType = "string" }
  ],
  [
    { excluded = false, field = "event.category", queryType = "phrase", value = "file", valueType = "string" },
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
    { excluded = false, field = "process.pid", queryType = "phrase", value = "{{process.pid}}", valueType = "string" }
  ]
]
relativeFrom = "now-1h"
relativeTo = "now"

[[transform.investigate]]
label = "Child process events from the suspicious child"
description = ""
providers = [
  [
    { excluded = false, field = "event.category", queryType = "phrase", value = "process", valueType = "string" },
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
    { excluded = false, field = "process.parent.entity_id", queryType = "phrase", value = "{{process.entity_id}}", valueType = "string" }
  ]
]
relativeFrom = "now-1h"
relativeTo = "now"

[[transform.investigate]]
label = "Network events for the suspicious child process"
description = ""
providers = [
  [
    { excluded = false, field = "event.category", queryType = "phrase", value = "network", valueType = "string" },
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
    { excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.entity_id}}", valueType = "string" }
  ],
  [
    { excluded = false, field = "event.category", queryType = "phrase", value = "network", valueType = "string" },
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
    { excluded = false, field = "process.pid", queryType = "phrase", value = "{{process.pid}}", valueType = "string" }
  ]
]
relativeFrom = "now-1h"
relativeTo = "now"

[[transform.investigate]]
label = "Process events from the same web parent"
description = ""
providers = [
  [
    { excluded = false, field = "event.category", queryType = "phrase", value = "process", valueType = "string" },
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
    { excluded = false, field = "process.parent.entity_id", queryType = "phrase", value = "{{process.parent.entity_id}}", valueType = "string" }
  ]
]
relativeFrom = "now-1h"
relativeTo = "now"

[rule.new_terms]
field = "new_terms_fields"
value = ["host.id", "process.command_line"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-7d"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1505"
name = "Server Software Component"
reference = "https://attack.mitre.org/techniques/T1505/"

[[rule.threat.technique.subtechnique]]
id = "T1505.003"
name = "Web Shell"
reference = "https://attack.mitre.org/techniques/T1505/003/"

[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1190"
name = "Exploit Public-Facing Application"
reference = "https://attack.mitre.org/techniques/T1190/"

[rule.threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1047"
name = "Windows Management Instrumentation"
reference = "https://attack.mitre.org/techniques/T1047/"

[[rule.threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"

[[rule.threat.technique.subtechnique]]
id = "T1059.001"
name = "PowerShell"
reference = "https://attack.mitre.org/techniques/T1059/001/"

[[rule.threat.technique.subtechnique]]
id = "T1059.003"
name = "Windows Command Shell"
reference = "https://attack.mitre.org/techniques/T1059/003/"

[[rule.threat.technique.subtechnique]]
id = "T1059.005"
name = "Visual Basic"
reference = "https://attack.mitre.org/techniques/T1059/005/"

[[rule.threat.technique.subtechnique]]
id = "T1059.007"
name = "JavaScript"
reference = "https://attack.mitre.org/techniques/T1059/007/"

[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"

Stages and Predicates

Stage 1: new_terms

host.os.type:windows and event.category:process and event.type:start and process.args : * and
  process.parent.name:("w3wp.exe" or "httpd.exe" or "nginx.exe" or "php.exe" or "php-cgi.exe" or "tomcat.exe" or "ArcSOC.exe") and
  (
    process.name : ("cmd.exe" or "cscript.exe" or "powershell.exe" or "pwsh.exe" or "powershell_ise.exe" or "wmic.exe" or "wscript.exe") or
    process.name.caseless : ("cmd.exe" or "cscript.exe" or "powershell.exe" or "pwsh.exe" or "powershell_ise.exe" or "wmic.exe" or "wscript.exe")
  ) and
  not
  (
    process.command_line : (
      "cmd.exe /c mode CON" or
      "cmd.exe /s /c \"mode CON\"" or
      "cmd.exe /c \"mode\"" or
      "cmd.exe /s /c \"tput colors 2>&1\"" or
      "cmd.exe /s /c \"stty 2> NUL\"" or
      "cmd.exe /s /c \"stty 2>&1\"" or
      "cmd.exe /c \"stty 2>&1\"" or
      "cmd.exe /s /c \"ipconfig /all 2>&1\"" or
      "cmd.exe /s /c \"echo '%os%'\"" or
      *.\\install\\awk.exe*
    ) or
    process.args : (\(git or (*artisan* and *queue\:work*) or *rmdir* or "mode CON" or ver or ls or mode or dir) or

    (process.name:cmd.exe and process.parent.args : "c:\\\\xampp\\\\htdocs\\\\open-audit\\\\index.php") or

    (process.name:cmd.exe and process.args:("/V:ON" and "--header-html")) or

    (process.parent.args:"WebCession" and process.args:E\:\\Data\\CLM\\cession\\*.bat) or

    (process.parent.executable :"D:\\AiDKlinik\\php\\php-cgi.exe" and process.args:D\:\\AiDKlinik\\web*) or

    (process.parent.args :"E:/wamp64/bin/apache/apache2.4.62.1" and process.args:node*) or

    (process.parent.name:"php.exe" and process.name:"cmd.exe" and process.args:("/V:ON" and "/E:ON"))
  )

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.categoryeq
  • process corpus 105 (elastic 105)
field:"event.category" kind:eq value:"process"
event.typeeq
  • start corpus 67 (elastic 67)
field:"event.type" kind:eq value:"start"
process.argsis_not_null
  • (no value, null check)
field:"process.args" kind:is_not_null
process.namein
  • cmd.exe corpus 24 (splunk 17, elastic 6, kusto 1)
  • cscript.exe corpus 24 (splunk 16, elastic 8)
  • powershell.exe corpus 31 (splunk 19, elastic 11, kusto 1)
  • powershell_ise.exe corpus 9 (splunk 7, elastic 2)
  • pwsh.exe corpus 22 (splunk 19, elastic 3)
  • wmic.exe corpus 15 (splunk 14, elastic 1)
  • wscript.exe corpus 28 (elastic 14, splunk 14)
field:"process_basename" kind:in
process.name.caselessin
  • cmd.exe
  • cscript.exe
  • powershell.exe corpus 2 (elastic 2)
  • powershell_ise.exe corpus 2 (elastic 2)
  • pwsh.exe corpus 2 (elastic 2)
  • wmic.exe
  • wscript.exe
field:"process.name.caseless" kind:in
process.parent.namein
  • ArcSOC.exe
  • httpd.exe corpus 2 (elastic 1, splunk 1)
  • nginx.exe corpus 2 (elastic 1, splunk 1)
  • php-cgi.exe corpus 2 (elastic 1, splunk 1)
  • php.exe
  • tomcat.exe
  • w3wp.exe corpus 3 (splunk 2, elastic 1)
field:"parent_process_basename" kind:in

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argseq--header-htmlexcludes:process.args field:"process.args" value:"--header-html"
process.argseq/V:ONexcludes:process.args field:"process.args" value:"/V:ON"
process.nameeqcmd.exeexcludes:process.name field:"process.name" value:"cmd.exe"
process.argseq/E:ONexcludes:process.args field:"process.args" value:"/E:ON"
process.parent.nameeqphp.exeexcludes:process.parent.name field:"process.parent.name" value:"php.exe"
process.argsmatchartisanexcludes:process.args field:"process.args" value:"artisan"
process.argsmatchqueue:workexcludes:process.args field:"process.args" value:"queue:work"
process.argsstarts_withD:\AiDKlinik\webexcludes:process.args field:"process.args" value:"D:\AiDKlinik\web"
process.parent.executableeqD:\AiDKlinik\php\php-cgi.exeexcludes:process.parent.executable field:"process.parent.executable" value:"D:\AiDKlinik\php\php-cgi.exe"
process.argsstarts_withnodeexcludes:process.args field:"process.args" value:"node"
process.parent.argseqE:/wamp64/bin/apache/apache2.4.62.1excludes:process.parent.args field:"process.parent.args" value:"E:/wamp64/bin/apache/apache2.4.62.1"
process.argswildcardE:\Data\CLM\cession\*.batexcludes:process.args field:"process.args" value:"E:\Data\CLM\cession\*.bat"
process.parent.argseqWebCessionexcludes:process.parent.args field:"process.parent.args" value:"WebCession"
process.parent.argseqc:\\xampp\\htdocs\\open-audit\\index.phpexcludes:process.parent.args field:"process.parent.args" value:"c:\\xampp\\htdocs\\open-audit\\index.php"
process.argseq(gitexcludes:process.args field:"process.args" value:"(git"
process.argseqdirexcludes:process.args field:"process.args" value:"dir"
process.argseqlsexcludes:process.args field:"process.args" value:"ls"
process.argseqmode CONexcludes:process.args field:"process.args" value:"mode CON"
process.argseqmodeexcludes:process.args field:"process.args" value:"mode"
process.argseqverexcludes:process.args field:"process.args" value:"ver"
process.argsmatchrmdirexcludes:process.args field:"process.args" value:"rmdir"
process.command_lineeqcmd.exe /c "mode"excludes:process.command_line
process.command_lineeqcmd.exe /c "stty 2>&1"excludes:process.command_line
process.command_lineeqcmd.exe /c mode CONexcludes:process.command_line field:"process.command_line" value:"cmd.exe /c mode CON"
process.command_lineeqcmd.exe /s /c "echo '%os%'"excludes:process.command_line
process.command_lineeqcmd.exe /s /c "ipconfig /all 2>&1"excludes:process.command_line
process.command_lineeqcmd.exe /s /c "mode CON"excludes:process.command_line
process.command_lineeqcmd.exe /s /c "stty 2> NUL"excludes:process.command_line
process.command_lineeqcmd.exe /s /c "stty 2>&1"excludes:process.command_line
process.command_lineeqcmd.exe /s /c "tput colors 2>&1"excludes:process.command_line
process.command_linematch.\install\awk.exeexcludes:process.command_line field:"process.command_line" value:".\install\awk.exe"

Back to all Elastic rules