Detection rules › Elastic

Elastic rules: 1t

DLL Dropped by MSIEXEC followed by SideLoad

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

Identifies the creation of an unsigned or untrusted DLL and subsequently loaded by a trusted binary. This behavior is consistent with some malwares leveraging malicious Windows installers to sideload malicious DLLs.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
Identifies the creation of an unsigned or untrusted DLL and subsequently loaded by a trusted binary. This behavior is
consistent with some malwares leveraging malicious Windows installers to sideload malicious DLLs.
"""
id = "1543ed0b-2d7b-42f9-93d2-bf9bfd8759e3"
license = "Elastic License v2"
name = "DLL Dropped by MSIEXEC followed by SideLoad"
os_list = ["windows"]
version = "1.0.27"

query = '''
sequence by user.id with maxspan=1m
[file where event.action == "creation" and file.extension : "dll" and process.name : "msiexec.exe"] by file.path
[library where

   (dll.Ext.relative_file_creation_time < 5000 or dll.Ext.relative_file_name_modify_time < 5000) and

   process.code_signature.status :"trusted" and not dll.code_signature.status : ("trusted", "errorCode_endpoint*") and
   not dll.path : ("?:\\Windows\\Installer\\*",
                   "?:\\Windows\\System32\\DriverStore\\FileRepository\\*",
                   "?:\\Windows\\SysWOW64\\DriverStore\\FileRepository\\*",
                   "?:\\Program Files\\*", "?:\\Program Files (x86)\\*",
                   "?:\\Windows\\assembly\\*",
                   "?:\\Users\\*\\AppData\\Local\\Microsoft\\Windows\\INetCache\\IE\\*") and
   not dll.hash.sha256 : 
                ("8dc562cda7217a3a52db898243de3e2ed68b80e62ddcb8619545ed0b4e7f65a8", 
                 "06cad1e73c3e0976d3b85df7299891a6bf3fadd166972af431e74673305ea12a", 
                 "4cb634e37c2622afbcddf706868f4e992db59b7bbb6f99820ec636307f833c32", 
                 "1da5bf4f88d663f11c110c191dc56b0970c4fce5cb80b8e094f0023478e0995b", 
                 "273bd97fc9c42a07a7e44a285243f0ee38f8668c2a22f095c99d8a3f44146843", 
                 "4bf70e90594a6d3fbc042747bb314f541e84c0d5f7ec1cf82beac0afd94b5348",
                 "dd3f06ea143ccc6aba3a05a7093bc6aac6868086a596c015f4e0279df8b97e7e",
                 "e71745fbe166d319711a68478161d746c9aabf7a3de60513cb924dda1184c083",
                 "75d93037c940e3a1de752c73f1d91ae440bf68a236874890506d078f1b4209ec",
                 "f801bb80401c20b582219b2793a80411230a10bbceea4da032b7c9840dbf1f83") and
   not dll.pe.imphash : "c1c7505e1e6e929ebb6b9100e55b050a" and
   not process.executable :
             ("?:\\Program Files\\*.exe", "?:\\Program Files (x86)\\*.exe", "?:\\Windows\\Explorer.exe",
              "?:\\Windows\\SysWOW64\\*", "?:\\Windows\\System32\\*", "?:\\Windows\\splwow64.exe", "?:\\Windows\\Microsoft.NET\\*") and

   /* DLL loaded from the process.executable current 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 (process.code_signature.subject_name:
                        ("Johannes Schindelin",
                         "Datto Inc",
                         "IFS World Operations AB",
                         "RingCentral, Inc.", "Net Health Systems, Inc.",
                         "Mobatek",
                         "Red Gate Software Ltd",
                         "Signal Messenger, LLC",
                         "KYLIN INC.",
                         "Cricut, Inc.",
                         "Clevercontrol LLC",
                         "VNG CORPORATION",
                         "Citrix Systems, Inc.",
                         "Reincubate Ltd",
                         "Google LLC",
                         "Corsair Memory, Inc.",
                         "PreVeil, Inc",
                         "Blue Jeans Network, Inc.",
                         "Fortinet Technologies*",
                         "Viber Media S.à r.l.",
                         "Krisp Technologies, Inc",
                         "KASEYA HOLDINGS INC.",
                         "Accenture LLP",
                         "Bizagi Corp.",
                         "Viber Media S.à r.l.",
                         "Fiserv",
                         "KASEYA HOLDINGS INC.",
                         "Sadas Srl",
                         "Viber Media S.à r.l.",
                         "Cisco Systems, Inc.",
                         "Wickr LLC",
                         "Suse LLC",
                         "JACK HENRY & ASSOCIATES, INC.",
                         "Digium, Inc.",
                         "OneSpan North America Inc.",
                         "PortSIP Solutions, Inc.", 
                         "Zoom Video Communications, Inc.",
                         "ETM professional control GmbH") and process.code_signature.trusted == true) and
    not dll.pe.imphash :
               ("dae02f32a21e03ce65412f6e56942daa",
                "d41d8cd98f00b204e9800998ecf8427e",
                "f0abbc6494af9b08bf997ec9670d9ede")] by dll.path
'''

min_endpoint_version = "8.10.0"
reputation = true
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1
tree = true

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

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[[threat.technique.subtechnique]]
id = "T1218.007"
name = "Msiexec"
reference = "https://attack.mitre.org/techniques/T1218/007/"


[[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.10.0"

Stages and Predicates

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

Stage 1: file

[file where event.action == "creation" and file.extension : "dll" and process.name : "msiexec.exe"] by file.path

Stage 2: library

[library where
   (dll.Ext.relative_file_creation_time < 5000 or dll.Ext.relative_file_name_modify_time < 5000) and
   process.code_signature.status :"trusted" and not dll.code_signature.status : ("trusted", "errorCode_endpoint*") and
   not dll.path : ("?:\\Windows\\Installer\\*",
                   "?:\\Windows\\System32\\DriverStore\\FileRepository\\*",
                   "?:\\Windows\\SysWOW64\\DriverStore\\FileRepository\\*",
                   "?:\\Program Files\\*", "?:\\Program Files (x86)\\*",
                   "?:\\Windows\\assembly\\*",
                   "?:\\Users\\*\\AppData\\Local\\Microsoft\\Windows\\INetCache\\IE\\*") and
   not dll.hash.sha256 :
                ("8dc562cda7217a3a52db898243de3e2ed68b80e62ddcb8619545ed0b4e7f65a8",
                 "06cad1e73c3e0976d3b85df7299891a6bf3fadd166972af431e74673305ea12a",
                 "4cb634e37c2622afbcddf706868f4e992db59b7bbb6f99820ec636307f833c32",
                 "1da5bf4f88d663f11c110c191dc56b0970c4fce5cb80b8e094f0023478e0995b",
                 "273bd97fc9c42a07a7e44a285243f0ee38f8668c2a22f095c99d8a3f44146843",
                 "4bf70e90594a6d3fbc042747bb314f541e84c0d5f7ec1cf82beac0afd94b5348",
                 "dd3f06ea143ccc6aba3a05a7093bc6aac6868086a596c015f4e0279df8b97e7e",
                 "e71745fbe166d319711a68478161d746c9aabf7a3de60513cb924dda1184c083",
                 "75d93037c940e3a1de752c73f1d91ae440bf68a236874890506d078f1b4209ec",
                 "f801bb80401c20b582219b2793a80411230a10bbceea4da032b7c9840dbf1f83") and
   not dll.pe.imphash : "c1c7505e1e6e929ebb6b9100e55b050a" and
   not process.executable :
             ("?:\\Program Files\\*.exe", "?:\\Program Files (x86)\\*.exe", "?:\\Windows\\Explorer.exe",
              "?:\\Windows\\SysWOW64\\*", "?:\\Windows\\System32\\*", "?:\\Windows\\splwow64.exe", "?:\\Windows\\Microsoft.NET\\*") 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 (process.code_signature.subject_name:
                        ("Johannes Schindelin",
                         "Datto Inc",
                         "IFS World Operations AB",
                         "RingCentral, Inc.", "Net Health Systems, Inc.",
                         "Mobatek",
                         "Red Gate Software Ltd",
                         "Signal Messenger, LLC",
                         "KYLIN INC.",
                         "Cricut, Inc.",
                         "Clevercontrol LLC",
                         "VNG CORPORATION",
                         "Citrix Systems, Inc.",
                         "Reincubate Ltd",
                         "Google LLC",
                         "Corsair Memory, Inc.",
                         "PreVeil, Inc",
                         "Blue Jeans Network, Inc.",
                         "Fortinet Technologies*",
                         "Viber Media S.à r.l.",
                         "Krisp Technologies, Inc",
                         "KASEYA HOLDINGS INC.",
                         "Accenture LLP",
                         "Bizagi Corp.",
                         "Viber Media S.à r.l.",
                         "Fiserv",
                         "KASEYA HOLDINGS INC.",
                         "Sadas Srl",
                         "Viber Media S.à r.l.",
                         "Cisco Systems, Inc.",
                         "Wickr LLC",
                         "Suse LLC",
                         "JACK HENRY & ASSOCIATES, INC.",
                         "Digium, Inc.",
                         "OneSpan North America Inc.",
                         "PortSIP Solutions, Inc.",
                         "Zoom Video Communications, Inc.",
                         "ETM professional control GmbH") and process.code_signature.trusted == true) and
    not dll.pe.imphash :
               ("dae02f32a21e03ce65412f6e56942daa",
                "d41d8cd98f00b204e9800998ecf8427e",
                "f0abbc6494af9b08bf997ec9670d9ede")] by dll.path

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.code_signature.subject_namewildcardJohannes Schindelin, Datto Inc, IFS World Operations AB, RingCentral, Inc., Net Health Systems, Inc., Mobatek, Red Gate Software Ltd, Signal Messenger, LLC, KYLIN INC., Cricut, Inc., Clevercontrol LLC, VNG CORPORATION, Citrix Systems, Inc., Reincubate Ltd, Google LLC, Corsair Memory, Inc., PreVeil, Inc, Blue Jeans Network, Inc., Fortinet Technologies*, Viber Media S.à r.l., Krisp Technologies, Inc, KASEYA HOLDINGS INC., Accenture LLP, Bizagi Corp., Viber Media S.à r.l., Fiserv, KASEYA HOLDINGS INC., Sadas Srl, Viber Media S.à r.l., Cisco Systems, Inc., Wickr LLC, Suse LLC, JACK HENRY & ASSOCIATES, INC., Digium, Inc., OneSpan North America Inc., PortSIP Solutions, Inc., Zoom Video Communications, Inc., ETM professional control GmbHexcludes:process.code_signature.subject_name
process.code_signature.trustedeqtrueexcludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true"
dll.code_signature.statuswildcardtrusted, errorCode_endpoint*excludes:dll.code_signature.status field:"dll.code_signature.status" value:"trusted" field:"dll.code_signature.status" value:"errorCode_endpoint*"
dll.hash.sha256eq8dc562cda7217a3a52db898243de3e2ed68b80e62ddcb8619545ed0b4e7f65a8, 06cad1e73c3e0976d3b85df7299891a6bf3fadd166972af431e74673305ea12a, 4cb634e37c2622afbcddf706868f4e992db59b7bbb6f99820ec636307f833c32, 1da5bf4f88d663f11c110c191dc56b0970c4fce5cb80b8e094f0023478e0995b, 273bd97fc9c42a07a7e44a285243f0ee38f8668c2a22f095c99d8a3f44146843, 4bf70e90594a6d3fbc042747bb314f541e84c0d5f7ec1cf82beac0afd94b5348, dd3f06ea143ccc6aba3a05a7093bc6aac6868086a596c015f4e0279df8b97e7e, e71745fbe166d319711a68478161d746c9aabf7a3de60513cb924dda1184c083, 75d93037c940e3a1de752c73f1d91ae440bf68a236874890506d078f1b4209ec, f801bb80401c20b582219b2793a80411230a10bbceea4da032b7c9840dbf1f83excludes:dll.hash.sha256
dll.pathwildcard?:\Windows\Installer\*, ?:\Windows\System32\DriverStore\FileRepository\*, ?:\Windows\SysWOW64\DriverStore\FileRepository\*, ?:\Program Files\*, ?:\Program Files (x86)\*, ?:\Windows\assembly\*, ?:\Users\*\AppData\Local\Microsoft\Windows\INetCache\IE\*excludes:dll.path
dll.pe.imphasheqc1c7505e1e6e929ebb6b9100e55b050aexcludes:dll.pe.imphash field:"dll.pe.imphash" value:"c1c7505e1e6e929ebb6b9100e55b050a"
dll.pe.imphasheqdae02f32a21e03ce65412f6e56942daa, d41d8cd98f00b204e9800998ecf8427e, f0abbc6494af9b08bf997ec9670d9edeexcludes:dll.pe.imphash field:"dll.pe.imphash" value:"dae02f32a21e03ce65412f6e56942daa" field:"dll.pe.imphash" value:"d41d8cd98f00b204e9800998ecf8427e" field:"dll.pe.imphash" value:"f0abbc6494af9b08bf997ec9670d9ede"
process.executablewildcard?:\Program Files\*.exe, ?:\Program Files (x86)\*.exe, ?:\Windows\Explorer.exe, ?:\Windows\SysWOW64\*, ?:\Windows\System32\*, ?:\Windows\splwow64.exe, ?:\Windows\Microsoft.NET\*excludes:process.executable

Entra ID Sharepoint or OneDrive Accessed by Unusual Client

#
Status
production
Severity
medium
Time window
9m
Group by
azure.signinlogs.properties.app_id, azure.signinlogs.properties.tenant_id
Author
Elastic
Source
github.com/elastic/detection-rules

Identifies when an application accesses SharePoint Online or OneDrive for Business for the first time in the tenant within a specified timeframe. This detects successful OAuth phishing campaigns, illicit consent grants, or compromised third-party applications gaining initial access to file storage. Adversaries often use malicious OAuth applications or phishing techniques to gain consent from users, allowing persistent access to organizational data repositories without traditional credential theft.

Known False Positives

  • New legitimate applications or integrations recently deployed in the environment may trigger this detection during initial setup or rollout phases.
  • Third-party SaaS applications with SharePoint integration may appear as new app IDs when users first authorize access.
  • Developers testing new applications or OAuth flows in non-production tenants may generate alerts during development cycles.

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

[metadata]
creation_date = "2025/05/01"
integration = ["azure"]
maturity = "production"
updated_date = "2026/08/12"

[rule]
author = ["Elastic"]
description = """
Identifies when an application accesses SharePoint Online or OneDrive for Business for the first time in the tenant within a specified timeframe.
This detects successful OAuth phishing campaigns, illicit consent grants, or compromised third-party applications
gaining initial access to file storage. Adversaries often use malicious OAuth applications or phishing techniques to
gain consent from users, allowing persistent access to organizational data repositories without traditional credential
theft.
"""
false_positives = [
    """
    New legitimate applications or integrations recently deployed in the environment may trigger this detection during
    initial setup or rollout phases.
    """,
    """
    Third-party SaaS applications with SharePoint integration may appear as new app IDs when users first authorize
    access.
    """,
    """
    Developers testing new applications or OAuth flows in non-production tenants may generate alerts during development
    cycles.
    """,
]
from = "now-9m"
index = ["logs-azure.signinlogs-*"]
language = "kuery"
license = "Elastic License v2"
name = "Entra ID Sharepoint or OneDrive Accessed by Unusual Client"
note = """## Triage and analysis

### Investigating Entra ID Sharepoint or OneDrive Accessed by Unusual Client

This rule identifies when an application accesses SharePoint Online or OneDrive for Business for the first time in the tenant. This is a critical signal for detecting successful OAuth phishing campaigns, where adversaries trick users into granting consent to malicious applications. Once consent is granted, the malicious app can persistently access file storage without further user interaction. This detection also catches illicit consent grants, compromised third-party applications, or custom malicious apps registered by adversaries.

### Possible Investigation Steps:

- Identify the Application: Review `azure.signinlogs.properties.app_id` and `azure.signinlogs.properties.app_display_name` to determine which application accessed SharePoint. Cross-reference with known legitimate applications in your environment.
- Check Application Registration: Search Entra ID app registrations for the app ID. Determine if it's a first-party Microsoft app, known third-party integration, or suspicious/unknown application.
- Review Consent History: Investigate when and how consent was granted. Check `azure.auditlogs` for recent `Consent to application` events matching this app ID. Identify which user granted consent and whether it was admin or user consent.
- Analyze Permissions Granted: Review the OAuth scopes and permissions granted to the application. Look for overly broad permissions (e.g., `Files.ReadWrite.All`, `Sites.ReadWrite.All`) that exceed business requirements.
- Correlate with User Activity: Check if the user who granted consent recently received phishing emails, clicked suspicious links, or reported potential phishing attempts.
- Inspect Source IP and Location: Review `source.ip` and `source.geo.*` fields. Determine if the sign-in originated from expected locations or suspicious infrastructure (VPNs, data centers, anonymizers).
- Review Application Publisher: Check if the application is verified by Microsoft or has a suspicious/generic publisher name. Unverified applications with generic names (e.g., "File Viewer", "Document Manager") are common in phishing.
- Check for Data Access: Review subsequent SharePoint audit logs to see what files/sites the application accessed after gaining consent.
- Conditional Access Evaluation: Review `azure.signinlogs.properties.applied_conditional_access_policies` to determine if any security controls were bypassed or if the application should have been blocked.

### False Positive Analysis

- New Legitimate Integrations: Newly deployed third-party SaaS applications (e.g., document management, collaboration tools) that integrate with SharePoint will trigger this detection during initial setup. Validate with IT/procurement teams.
- Microsoft First-Party Applications: This rule excludes known SharePoint, OneDrive, Outlook Web, and Teams web or service clients that commonly access SharePoint. It also excludes service-principal sign-ins when the application is owned by Microsoft's tenant. User sign-ins from reusable first-party clients such as Outlook Mobile, Microsoft Teams, and Microsoft Office remain detectable because adversaries can abuse these clients in OAuth phishing.
- Development/Testing: Developers testing OAuth flows or building internal applications may generate alerts in development or staging environments.
- Organizational Changes: Mergers, acquisitions, or tenant migrations may introduce legitimate applications from partner organizations accessing SharePoint for the first time.

### Response and Remediation

- Immediate Actions if Malicious:
  - Revoke consent for the malicious application immediately via Entra ID > Enterprise Applications
  - Revoke all active sessions and refresh tokens for affected users
  - Disable the application's service principal to prevent further access
  - Review and remediate any data accessed by the application using SharePoint audit logs
- User Notification: Contact users who granted consent to inform them of the phishing attempt and provide security awareness training on identifying malicious OAuth consent requests
- Conditional Access Hardening: Implement or strengthen Conditional Access policies to:
  - Require admin consent for high-risk permissions (Files.ReadWrite.All, Sites.ReadWrite.All)
  - Block unverified publishers from accessing sensitive resources
  - Enforce device compliance and MFA for application access
- Tenant-Wide Review: Audit all application consents across the tenant to identify other potentially malicious applications that may have gained access through similar campaigns
- Monitor for Campaign Patterns: Check if the same malicious application targeted multiple users, indicating an organized phishing campaign. Coordinate with email security teams to identify and block phishing emails used in the campaign.

"""
references = [
    "https://www.volexity.com/blog/2025/04/22/phishing-for-codes-russian-threat-actors-target-microsoft-365-oauth-workflows/",
    "https://www.microsoft.com/en-us/security/blog/2022/09/22/malicious-oauth-applications-used-to-compromise-email-servers-and-spread-spam/",
    "https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/manage-consent-requests",
    "https://github.com/merill/microsoft-info/blob/main/_info/MicrosoftApps.json",
]
risk_score = 47
rule_id = "a3cc60d8-2701-11f0-accf-f661ea17fbcd"
setup = """#### Required Microsoft Entra ID Sign-In Logs
To use this rule, ensure that Microsoft Entra ID Sign-In Logs are being collected and streamed into the Elastic Stack via the Azure integration.
"""
severity = "medium"
tags = [
    "Domain: Cloud",
    "Domain: Identity",
    "Domain: Storage",
    "Use Case: Identity and Access Audit",
    "Tactic: Collection",
    "Tactic: Initial Access",
    "Data Source: Azure",
    "Data Source: Microsoft Entra ID",
    "Data Source: Microsoft Entra ID Sign-in Logs",
    "Resources: Investigation Guide",
    "Rule Type: New Terms",
]
timestamp_override = "event.ingested"
type = "new_terms"

query = '''
data_stream.dataset:azure.signinlogs and
azure.signinlogs.properties.resource_id:(
    00000003-0000-0ff1-ce00-000000000000 or
    6a9b9266-8161-4a7b-913a-a9eda19da220
) and
azure.signinlogs.properties.app_id:(* and not (
    00000003-0000-0ff1-ce00-000000000000 or
    08e18876-6177-487e-b8b5-cf950c1e598c or
    5e3ce6c0-2b1f-4285-8d4b-75ee78787346 or
    9199bf20-a13f-4107-85dc-02114787ef48 or
    ab9b8c07-8f02-4f72-87fa-80105867a763 or
    af124e86-4e96-495a-b70a-90f90ab96707 or
    cc15fd57-2c6c-4117-a88c-83b1d56b4bbe
)) and
not (
    azure.signinlogs.properties.app_owner_tenant_id:f8cdef31-a31e-4b4a-93e4-5f571e91255a and
    azure.signinlogs.category:MicrosoftServicePrincipalSignInLogs
) and
azure.signinlogs.properties.tenant_id:* and
event.outcome:success
'''

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

[[rule.threat.technique]]
id = "T1213"
name = "Data from Information Repositories"
reference = "https://attack.mitre.org/techniques/T1213/"

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

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

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

[[rule.threat.technique]]
id = "T1078"
name = "Valid Accounts"
reference = "https://attack.mitre.org/techniques/T1078/"

[[rule.threat.technique.subtechnique]]
id = "T1078.004"
name = "Cloud Accounts"
reference = "https://attack.mitre.org/techniques/T1078/004/"

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

[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 = "T1098"
name = "Account Manipulation"
reference = "https://attack.mitre.org/techniques/T1098/"

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

[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[rule.new_terms]
field = "new_terms_fields"
value = ["azure.signinlogs.properties.app_id", "azure.signinlogs.properties.tenant_id"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-7d"


Stages and Predicates

Stage 1: new_terms

data_stream.dataset:azure.signinlogs and
azure.signinlogs.properties.resource_id:(
    00000003-0000-0ff1-ce00-000000000000 or
    6a9b9266-8161-4a7b-913a-a9eda19da220
) and
azure.signinlogs.properties.app_id:(* and not (
    00000003-0000-0ff1-ce00-000000000000 or
    08e18876-6177-487e-b8b5-cf950c1e598c or
    5e3ce6c0-2b1f-4285-8d4b-75ee78787346 or
    9199bf20-a13f-4107-85dc-02114787ef48 or
    ab9b8c07-8f02-4f72-87fa-80105867a763 or
    af124e86-4e96-495a-b70a-90f90ab96707 or
    cc15fd57-2c6c-4117-a88c-83b1d56b4bbe
)) and
not (
    azure.signinlogs.properties.app_owner_tenant_id:f8cdef31-a31e-4b4a-93e4-5f571e91255a and
    azure.signinlogs.category:MicrosoftServicePrincipalSignInLogs
) and
azure.signinlogs.properties.tenant_id:* and
event.outcome:success

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
azure.signinlogs.properties.app_idis_not_null
  • (no value, null check)
field:"azure_ad::app_id" kind:is_not_null
azure.signinlogs.properties.resource_idin
  • 00000003-0000-0ff1-ce00-000000000000 corpus 3 (elastic 3)
  • 6a9b9266-8161-4a7b-913a-a9eda19da220 corpus 2 (elastic 2)
field:"azure_ad::resource_id" kind:in
azure.signinlogs.properties.tenant_idis_not_null
  • (no value, null check)
field:"azure.signinlogs.properties.tenant_id" kind:is_not_null
data_stream.dataseteq
  • azure.signinlogs corpus 26 (elastic 26)
field:"data_stream.dataset" kind:eq value:"azure.signinlogs"
event.outcomeeq
  • success corpus 306 (elastic 306)
field:"event.outcome" kind:eq value:"success"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
azure.signinlogs.categoryeqMicrosoftServicePrincipalSignInLogsexcludes:azure.signinlogs.category field:"azure.signinlogs.category" value:"MicrosoftServicePrincipalSignInLogs"
azure.signinlogs.properties.app_owner_tenant_ideqf8cdef31-a31e-4b4a-93e4-5f571e91255aexcludes:azure.signinlogs.properties.app_owner_tenant_id field:"azure.signinlogs.properties.app_owner_tenant_id" value:"f8cdef31-a31e-4b4a-93e4-5f571e91255a"
azure.signinlogs.properties.app_idin00000003-0000-0ff1-ce00-000000000000, 08e18876-6177-487e-b8b5-cf950c1e598c, 5e3ce6c0-2b1f-4285-8d4b-75ee78787346, 9199bf20-a13f-4107-85dc-02114787ef48, ab9b8c07-8f02-4f72-87fa-80105867a763, af124e86-4e96-495a-b70a-90f90ab96707, cc15fd57-2c6c-4117-a88c-83b1d56b4bbeexcludes:azure.signinlogs.properties.app_id

Kubelet Pod Discovery Detected via Defend for Containers

#
Status
production
Severity
low
Time window
5s
Group by
container.id, user.id
Author
Elastic
Source
github.com/elastic/detection-rules

This rule detects the use of built-in utilities to discover running pods on a Kubernetes cluster. The utilities used are du, nice, find, locate, and ls. These utilities are commonly used to discover running pods on a Kubernetes cluster. The "/var/lib/kubelet/pods" directory is the default location for Kubelet pod information.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2026/02/06"
integration = ["cloud_defend"]
maturity = "production"
min_stack_comments = "Defend for Containers integration was re-introduced in 9.3.0"
min_stack_version = "9.3.0"
updated_date = "2026/07/29"

[rule]
author = ["Elastic"]
description = """
This rule detects the use of built-in utilities to discover running pods on a Kubernetes cluster. The utilities used
are du, nice, find, locate, and ls. These utilities are commonly used to discover running pods on a Kubernetes cluster.
The "/var/lib/kubelet/pods" directory is the default location for Kubelet pod information.
"""
from = "now-6m"
index = ["logs-cloud_defend.file*", "logs-cloud_defend.process*"]
interval = "5m"
language = "eql"
license = "Elastic License v2"
name = "Kubelet Pod Discovery Detected via Defend for Containers"
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 Kubelet Pod Discovery Detected via Defend for Containers

This rule detects use of common Linux utilities (ls, find, du, locate, nice) repeatedly targeting the Kubelet pods directory, including direct access to `/var/lib/kubelet/pods/*`. This matters because enumerating that path reveals pod IDs, volumes, and runtime artifacts that can accelerate container and cluster discovery. A typical pattern is an attacker in a compromised container running `ls /var/lib/kubelet/pods/` followed by `find /var/lib/kubelet/pods -maxdepth 2` to map workloads and hunt for mounted secrets.

### Possible investigation steps

- Identify the originating workload (pod/namespace/node) and how the interactive session was obtained (e.g., kubectl exec, SSH to node, or container runtime attach) to determine whether access was expected.  
- Review the container’s security context and mounts to confirm whether `/var/lib/kubelet` was exposed via hostPath/privileged settings and assess whether this indicates a node breakout risk.  
- Correlate the discovery activity with nearby events for follow-on actions such as reading service account tokens, kubeconfig files, or secrets/volumes under pod directories that would indicate credential harvesting.  
- Validate the actor by mapping the involved user/service account to recent Kubernetes API audit activity and RBAC permissions to determine whether the behavior aligns with normal administration.  
- Check for persistence or lateral movement attempts from the same container or node (new processes, outbound connections, package/tool downloads, or cron/systemd changes) to scope impact beyond discovery.

### False positive analysis

- An interactive troubleshooting session by a cluster administrator inside a privileged/host-mounted container uses `ls`, `find`, or `du` against `/var/lib/kubelet/pods/*` multiple times to confirm pod volume mounts, disk usage, or pod UID-to-workload mapping during an incident or maintenance window.  
- An engineer running an interactive shell on the node or in a hostPID/hostPath-enabled container repeatedly inspects `/var/lib/kubelet/pods/*` with built-in utilities to validate kubelet behavior (e.g., orphaned pod directories, cleanup after pod churn, or verifying that expected pods are present) as part of routine operational checks.

### Response and remediation

- Contain by terminating the interactive session and isolating the originating pod (scale to zero or delete) and, if the container had hostPath access to `/var/lib/kubelet` or was privileged/hostPID, cordon and drain the node to stop further inspection of `/var/lib/kubelet/pods/*`.  
- Scope and eradicate by reviewing recent commands and file reads under `/var/lib/kubelet/pods/` for access to mounted secrets, service account tokens, kubeconfig files, or pod volume contents, and remove any dropped tools/scripts or unauthorized cron/systemd changes on the affected node.  
- Recover by rotating potentially exposed Kubernetes credentials (service account tokens, kubeconfigs, cloud/IAM keys) used by the affected workload and redeploying the application from a known-good image after validating no unexpected containers, DaemonSets, or mounts remain.  
- Escalate to incident response immediately if you confirm reads of token/secret material within pod directories, discovery occurs from a privileged or host-mounted container, or you observe follow-on actions such as outbound connections, new binaries, or attempts to exec into additional pods/namespaces.  
- Harden by eliminating unnecessary hostPath mounts to `/var/lib/kubelet` (and other node paths), enforcing non-root and read-only root filesystems, disabling interactive shells in production where feasible, and applying admission controls to block privileged/hostPID containers and restrict debug tooling to approved break-glass workflows."""
references = [
    "https://heilancoos.github.io/research/2025/12/16/kubernetes.html#kubelet-api",
    "https://www.cyberark.com/resources/threat-research-blog/using-kubelet-client-to-attack-the-kubernetes-cluster",
    "https://www.aquasec.com/blog/kubernetes-exposed-exploiting-the-kubelet-api/"
]
risk_score = 21
rule_id = "f596175f-b8fd-43ac-b9e9-ea2a96bb55d8"
severity = "low"
tags = [
    "Data Source: Elastic Defend for Containers",
    "Domain: Container",
    "OS: Linux",
    "Use Case: Threat Detection",
    "Tactic: Discovery",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
sequence by container.id, user.id with maxspan=5s
  [any where host.os.type == "linux" and event.category in ("file", "process") and container.id like "*" and (
    (event.category == "file" and event.type == "change" and event.action == "open" and file.path like "/var/lib/kubelet/pods/*") or
    (event.category == "process" and event.type == "start" and event.action == "exec" and (
      (process.name in ("du", "nice", "find", "locate", "ls")) or
      (process.args in (
        "du", "/bin/du", "/usr/bin/du", "/usr/local/bin/du",
        "nice", "/bin/nice", "/usr/bin/nice", "/usr/local/bin/nice",
        "find", "/bin/find", "/usr/bin/find", "/usr/local/bin/find",
        "locate", "/bin/locate", "/usr/bin/locate", "/usr/local/bin/locate",
        "ls", "/bin/ls", "/usr/bin/ls", "/usr/local/bin/ls"
      ))
    ) and process.args like "*/var/lib/kubelet/pods/*")
  )] with runs=5
'''

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

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

[[rule.threat.technique]]
id = "T1613"
name = "Container and Resource Discovery"
reference = "https://attack.mitre.org/techniques/T1613/"

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

Stages and Predicates

Stage 1: any ×5

[any where host.os.type == "linux" and event.category in ("file", "process") and container.id like "*" and (
    (event.category == "file" and event.type == "change" and event.action == "open" and file.path like "/var/lib/kubelet/pods/*") or
    (event.category == "process" and event.type == "start" and event.action == "exec" and (
      (process.name in ("du", "nice", "find", "locate", "ls")) or
      (process.args in (
        "du", "/bin/du", "/usr/bin/du", "/usr/local/bin/du",
        "nice", "/bin/nice", "/usr/bin/nice", "/usr/local/bin/nice",
        "find", "/bin/find", "/usr/bin/find", "/usr/local/bin/find",
        "locate", "/bin/locate", "/usr/bin/locate", "/usr/local/bin/locate",
        "ls", "/bin/ls", "/usr/bin/ls", "/usr/local/bin/ls"
      ))
    ) and process.args like "*/var/lib/kubelet/pods/*")
  )] with runs=5

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
container.idwildcard
  • *
field:"container.id" kind:wildcard value:"*"
event.actioneq
  • exec
  • open
field:"EventType" kind:eq
event.categoryeq
  • file
  • process
field:"event.category" kind:eq
event.categoryin
  • file
  • process
field:"event.category" kind:in
event.typeeq
  • change
  • start
field:"event.type" kind:eq
file.pathwildcard
  • /var/lib/kubelet/pods/*
field:"TargetFilename" kind:wildcard value:"/var/lib/kubelet/pods/*"
process.argsin
  • /bin/du
  • /bin/find
  • /bin/locate
  • /bin/ls
  • /bin/nice
  • /usr/bin/du
  • /usr/bin/find
  • /usr/bin/locate
  • /usr/bin/ls
  • /usr/bin/nice
  • /usr/local/bin/du
  • /usr/local/bin/find
  • /usr/local/bin/locate
  • /usr/local/bin/ls
  • /usr/local/bin/nice
  • du
  • find
  • locate
  • ls
  • nice
field:"process.args" kind:in
process.argswildcard
  • */var/lib/kubelet/pods/*
field:"process.args" kind:wildcard value:"*/var/lib/kubelet/pods/*"
process.namein
  • du
  • find
  • locate
  • ls
  • nice
field:"process_basename" kind:in

Kubernetes Secret Access via Unusual User Agent

#
Status
production
Severity
low
Group by
source.ip, user.name, user_agent.original
Author
Elastic
Source
github.com/elastic/detection-rules

This rule detects when secrets are accessed via an unusual user agent, user name and source IP. Attackers may attempt to access secrets in a Kubernetes cluster to gain access to sensitive information after gaining access to the cluster.

MITRE ATT&CK Coverage

TacticTechniques
Credential Access

Telemetry Coverage

Rules Detecting the Same Action

These rules filter on the same operation.

Rule Body

[metadata]
creation_date = "2026/03/26"
integration = ["kubernetes"]
maturity = "production"
updated_date = "2026/04/10"

[rule]
author = ["Elastic"]
description = """
This rule detects when secrets are accessed via an unusual user agent, user name and source IP. Attackers
may attempt to access secrets in a Kubernetes cluster to gain access to sensitive information after gaining
access to the cluster.
"""
index = ["logs-kubernetes.audit_logs-*"]
language = "kuery"
license = "Elastic License v2"
name = "Kubernetes Secret Access via Unusual User Agent"
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 Kubernetes Secret Access via Unusual User Agent

This rule flags requests to read or enumerate Kubernetes secrets when they come from an uncommon client profile, account, and network source, which can expose tokens, keys, and passwords that unlock wider cluster or cloud access. A common attacker pattern is to compromise a pod or steal a kubeconfig, then use curl or a custom script from a new host to pull service-account tokens, registry credentials, or application secrets for follow-on movement.

### Possible investigation steps

- Determine whether the requesting identity, source IP, and user agent align with a known administrator workstation, CI/CD runner, controller, or approved automation path by validating change records, VPN or proxy logs, and asset ownership.
- Review the exact secret names and namespaces accessed to assess impact, prioritizing service-account tokens, registry credentials, cloud keys, kubeconfigs, and secrets tied to production or highly privileged workloads.
- Compare the event to the identity’s historical Kubernetes activity to confirm whether the client pattern, originating network, targeted namespaces, or access volume are new or unusually broad for that account.
- Correlate nearby cluster and cloud activity from the same identity or source for signs of follow-on actions such as pod exec, token creation, role binding changes, API discovery bursts, or authentication attempts using newly exposed credentials.
- If the access is not clearly authorized, contain by revoking or rotating the exposed secrets and linked credentials, then inspect the originating host or pod and its RBAC permissions for evidence of compromise or misuse.

### False positive analysis

- A cluster administrator may legitimately use curl, a browser, or a custom script from a newly assigned workstation or bastion host to inspect a secret during troubleshooting, so verify the activity against approved maintenance records and confirm the source IP and user identity map to that authorized host and user.
- A workload or internal automation can access secrets through a nonstandard Kubernetes API client after a deployment, restart, or credential rotation, so confirm the service account, namespace, and RBAC scope match the application’s expected behavior and correlate the timing with recent operational changes.

### Response and remediation

- Isolate the source of the secret access by quarantining the implicated workstation or pod, cordoning the hosting node if needed, and temporarily blocking its network path to the Kubernetes API server and other sensitive services.
- Revoke the attacker’s access by disabling the abused user or service account, deleting exposed or suspicious kubeconfigs, API tokens, CronJobs, DaemonSets, backdoor pods, and any newly created RoleBindings or ClusterRoleBindings tied to the activity.
- Rotate every secret that was read or listed and all downstream credentials it protects, including service-account tokens, registry passwords, cloud IAM keys, database credentials, and application secrets, then restart affected workloads so they load the new values from trusted sources.
- Restore the cluster to a known-good state by redeploying affected workloads from trusted images and manifests, validating namespaces and mounts against approved baselines, and removing any unauthorized containers or helper utilities left behind for persistence.
- Escalate to incident response immediately if the access touched production namespaces, cluster-admin or cloud-linked credentials, multiple namespaces, or was followed by pod exec, token creation, or lateral movement from the same host or account.
- Harden against recurrence by reducing secret-read permissions to only required service accounts, forcing administrative access through approved bastions, enforcing short-lived credentials with regular rotation, and alerting on nonstandard clients or sudden secret enumeration activity.
"""
risk_score = 21
rule_id = "cbda9a0e-2be4-4eaa-9571-8d6a503e9828"
severity = "low"
tags = [
    "Data Source: Kubernetes",
    "Domain: Kubernetes",
    "Domain: Cloud",
    "Use Case: Threat Detection",
    "Tactic: Credential Access",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
data_stream.dataset:"kubernetes.audit_logs" and kubernetes.audit.objectRef.resource:"secrets" and
kubernetes.audit.verb:("get" or "list") and user_agent.original:(* and not (*kubernetes/$Format))
'''

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

[[rule.threat.technique]]
id = "T1552"
name = "Unsecured Credentials"
reference = "https://attack.mitre.org/techniques/T1552/"

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

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

[rule.new_terms]
field = "new_terms_fields"
value = ["source.ip", "user.name", "user_agent.original"]

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

Stages and Predicates

Stage 1: new_terms

data_stream.dataset:"kubernetes.audit_logs" and kubernetes.audit.objectRef.resource:"secrets" and
kubernetes.audit.verb:("get" or "list") and user_agent.original:(* and not (*kubernetes/$Format))

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
user_agent.originalends_withkubernetes/$Formatexcludes:user_agent.original field:"user_agent.original" value:"kubernetes/$Format"

Osascript Execution via Piped AppleScript

#
Source
github.com/elastic/protections-artifacts

Detects when AppleScript is directly piped to the Osascript binary for execution. Threat actors utilize this method in order to avoid traditional Osascript detections and perform various tasks on the system.

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

[rule]
description = """
Detects when AppleScript is directly piped to the Osascript binary for execution. Threat actors utilize this method in
order to avoid traditional Osascript detections and perform various tasks on the system.
"""
id = "e955b5d2-2396-4af2-9540-680aa390c547"
license = "Elastic License v2"
name = "Osascript Execution via Piped AppleScript"
os_list = ["macos"]
reference = ["https://blog.kandji.io/malware-cuckoo-infostealer-spyware"]
version = "1.0.5"

query = '''
process where event.type == "start" and event.action == "exec" and (process.name in ("sh", "bash", "zsh", "dash", "csh", "tcsh", "ksh", "tclsh", "fish") or process.name like "tclsh*") and
 process.args == "-c" and process.command_line like~ "*osascript*<<EOD*"
'''

min_endpoint_version = "8.10.2"
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.technique.subtechnique]]
id = "T1059.002"
name = "AppleScript"
reference = "https://attack.mitre.org/techniques/T1059/002/"



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

[internal]
min_endpoint_version = "8.10.2"

Stages and Predicates

Stage 1: process

process where event.type == "start" and event.action == "exec" and (process.name in ("sh", "bash", "zsh", "dash", "csh", "tcsh", "ksh", "tclsh", "fish") or process.name like "tclsh*") and
 process.args == "-c" and process.command_line like~ "*osascript*<<EOD*"

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
  • -c corpus 91 (elastic 91)
field:"process.args" kind:eq value:"-c"
process.command_linewildcard
  • *osascript*<<EOD*
field:"CommandLine" kind:wildcard value:"*osascript*<<EOD*"
process.namein
  • bash corpus 181 (elastic 181)
  • csh corpus 148 (elastic 148)
  • dash corpus 150 (elastic 150)
  • fish corpus 151 (elastic 151)
  • ksh corpus 149 (elastic 149)
  • sh corpus 180 (elastic 180)
  • tclsh corpus 28 (elastic 28)
  • tcsh corpus 145 (elastic 145)
  • zsh corpus 180 (elastic 180)
field:"process_basename" kind:in
process.namewildcard
  • tclsh* corpus 23 (elastic 23)
field:"process_basename" kind:wildcard value:"tclsh*"

Potential NetNTLMv1 Downgrade Attack

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

Identifies registry modification to force the system to fall back to NTLMv1 for authentication. This modification is possible with local administrator privileges and is commonly referred to as a NetNTLMv1 downgrade attack.

MITRE ATT&CK Coverage

Rules Detecting the Same Action

These rules filter on the same operation.

Rule Body

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

[rule]
author = ["Elastic"]
description = """
Identifies registry modification to force the system to fall back to NTLMv1 for authentication. This modification is
possible with local administrator privileges and is commonly referred to as a `NetNTLMv1 downgrade attack`.
"""
from = "now-9m"
index = [
    "logs-endpoint.events.registry-*",
    "endgame-*",
    "logs-m365_defender.event-*",
    "logs-sentinel_one_cloud_funnel.*",
    "logs-windows.sysmon_operational-*",
    "logs-crowdstrike.fdr*",
]
language = "eql"
license = "Elastic License v2"
name = "Potential NetNTLMv1 Downgrade Attack"
note = """## Triage and analysis

### Investigating Potential NetNTLMv1 Downgrade Attack


### Possible investigation steps

- Review the registry event logs to confirm the modification of the LmCompatibilityLevel value in the specified registry paths, ensuring the change was not part of a legitimate administrative action.
- Identify the user account and process responsible for the registry modification by examining the event logs for associated user and process information.
- Check for any recent remote authentication attempts or sessions on the affected host to determine if unauthorized access was achieved.
- Investigate the timeline of the registry change to correlate with any other suspicious activities or alerts on the host, such as the execution of unusual processes or network connections.
- Evaluate the security posture of the affected system, including patch levels and existing security controls, to identify potential vulnerabilities that could have been exploited.

### False positive analysis

- Administrative changes to LmCompatibilityLevel settings can trigger false positives when IT personnel intentionally modify registry settings for legitimate purposes. To handle this, create exceptions for known administrative activities by documenting and excluding these specific registry changes from alerts.
- Software updates or installations that modify NTLM settings might be flagged as false positives. To mitigate this, maintain a list of trusted software and their expected registry changes, and configure the detection system to ignore these during update windows.
- Automated scripts or management tools that adjust NTLM configurations for compliance or performance reasons can also cause false positives. Identify these tools and their expected behavior, then set up exclusions for their registry modifications to prevent unnecessary alerts.

### Response and remediation

- Immediately isolate the affected system from the network to prevent further unauthorized access or lateral movement by the adversary.
- Re-enable NTLMv2 on the affected system by modifying the registry value back to its secure state.
- Conduct a thorough review of recent user activity and system logs to identify any unauthorized access or changes made during the period NLA was disabled.
- Reset passwords for all accounts that have accessed the affected system to mitigate potential credential compromise.
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if additional systems are affected.
- Implement enhanced monitoring on the affected system and similar endpoints to detect any further attempts to disable NLA or other suspicious activities.
"""

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 Registry Events](https://ela.st/sysmon-event-reg-setup)
"""

references = [
    "https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/network-security-lan-manager-authentication-level",
]
risk_score = 47
rule_id = "4d169db7-0323-4157-9ad3-ea5ece9019c9"
severity = "medium"
tags = [
    "Domain: Endpoint",
    "OS: Windows",
    "Use Case: Threat Detection",
    "Tactic: Defense Evasion",
    "Data Source: Elastic Defend",
    "Data Source: Elastic Endgame",
    "Data Source: Microsoft Defender XDR",
    "Data Source: SentinelOne",
    "Data Source: Sysmon",
    "Data Source: Crowdstrike",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
registry where host.os.type == "windows" and event.action != "deletion" and
 registry.value == "LmCompatibilityLevel" and registry.data.strings in ("2", "1", "0", "0x00000002", "0x00000001", "0x00000000")
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1112"
name = "Modify Registry"
reference = "https://attack.mitre.org/techniques/T1112/"

[[rule.threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"
[[rule.threat.technique.subtechnique]]
id = "T1562.010"
name = "Downgrade Attack"
reference = "https://attack.mitre.org/techniques/T1562/010/"



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

Stages and Predicates

Stage 1: registry

registry where host.os.type == "windows" and event.action != "deletion" and
 registry.value == "LmCompatibilityLevel" and registry.data.strings in ("2", "1", "0", "0x00000002", "0x00000001", "0x00000000")

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actionne
  • deletion corpus 90 (elastic 90)
field:"EventType" kind:ne value:"deletion"
registry.data.stringsin
  • 0 corpus 2 (elastic 2)
  • 0x00000000
  • 0x00000001
  • 0x00000002
  • 1 corpus 2 (elastic 2)
  • 2 corpus 2 (elastic 2)
field:"Details" kind:in
registry.valueeq
  • LmCompatibilityLevel corpus 2 (elastic 2)
field:"registry_value_name" kind:eq value:"LmCompatibilityLevel"

Potential Privilege Escalation via a Parent Process Sequence

#
Status
production
Severity
high
Time window
15s
Sequence by
host.id, process.parent.entity_id
Author
Elastic
Source
github.com/elastic/detection-rules

Detects a potential privilege escalation sequence via a parent process relationship. This rule checks for non-root execution of a process executable in a user or world-writable directory followed by a UID change event to 0 (root). This sequence is indicative of a potential local privilege escalation exploit.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2026/07/02"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/07/02"

[rule]
author = ["Elastic"]
description = """
Detects a potential privilege escalation sequence via a parent process relationship. This rule checks for
non-root execution of a process executable in a user or world-writable directory followed by a UID change
event to 0 (root). This sequence is indicative of a potential local privilege escalation exploit.
"""
from = "now-6m"
index = ["logs-endpoint.events.process*"]
language = "eql"
license = "Elastic License v2"
name = "Potential Privilege Escalation via a Parent Process Sequence"
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 Potential Privilege Escalation via a Parent Process Sequence

This alert flags a Linux process chain where a non-root program launched from a user- or world-writable location is quickly followed by the same lineage switching to root, a strong sign of local privilege escalation and full host compromise risk. A common pattern is an attacker dropping or compiling an exploit in /tmp or a home directory, executing it as an unprivileged user, and then spawning a root shell or privileged helper within seconds.

### Possible investigation steps

- Reconstruct the full process tree around the sequence to identify the originating user session, the exact binary or script launched from the writable location, and any immediate root-level child such as a shell, package tool, or file-modification utility.
- Validate whether the executed file and its parent are expected by reviewing file ownership, permissions, hashes, and recent write or compile times to determine if a malicious binary was dropped, replaced, or staged locally.
- Determine what the elevated process did next by examining follow-on root activity for signs of compromise such as interactive shells, edits to authentication files, SUID or capability changes, new services, cron jobs, or SSH key placement.
- Review nearby host telemetry for exploit preparation or execution indicators, including compiler usage, archive extraction, access to kernel or polkit-related components, suspicious temporary files, or errors and crashes consistent with privilege escalation attempts.
- Scope the incident by searching for the same user account, file hash, writable-path executable, or related lineage on other Linux systems, and contain the host quickly if the activity is not explained by approved administration or software deployment.

### False positive analysis

- Administrators or developers may run locally built installers, update scripts, or test binaries from `/tmp`, `/var/tmp`, or a home directory that legitimately invoke a setuid-root helper during maintenance; verify the file is owned by the expected user, matches a known change window, and that the resulting root process only performed the intended configuration or install actions.
- User login or session initialization scripts stored under `/home/*` or `/run/user/*` can legitimately launch privileged built-in utilities such as password-change or mount helpers, creating a brief non-root-to-root process chain; confirm the alert coincides with an interactive user action and that the elevated child process is an expected system binary with benign follow-on activity.

### Response and remediation

- Isolate the affected Linux host from the network immediately while keeping EDR and forensic access available so the attacker cannot use the new root context for lateral movement, data theft, or cleanup.
- Terminate the malicious process tree and quarantine or remove the exploit binary, script, or archive from the writable path it launched from, then delete attacker persistence such as new systemd services, cron entries, modified `rc.local`, added `authorized_keys`, altered `sudoers` files, and any unexpected SUID bits or Linux capabilities.
- Restore the host to a known-good state from a trusted image or snapshot instead of relying on in-place cleanup, and verify core system binaries, PAM modules, startup scripts, and package integrity before returning it to service.
- Rotate all credentials and secrets exposed on the host, including local passwords, SSH keys, API tokens, and service account secrets, because a root-level compromise may have allowed the attacker to read `/etc/shadow`, shell histories, application configs, and private keys.
- Escalate to incident response immediately if the root process spawned an interactive shell, modified `/etc/passwd` or `/etc/shadow`, installed a backdoor service, added an SSH key, or if the same user, binary hash, or writable-path execution pattern appears on more than one host.
- Harden the environment by patching the exploited local privilege escalation vector, restricting or removing unnecessary setuid/setcap helpers, mounting temporary and user-writable directories with `noexec,nosuid,nodev` where feasible, and increasing monitoring for executions from writable paths followed by privileged child activity.
"""
risk_score = 73
rule_id = "eb8abab8-dea4-4903-a0ad-dfcb09224488"
severity = "high"
tags = [
    "Data Source: Elastic Defend",
    "Domain: Endpoint",
    "OS: Linux",
    "Use Case: Threat Detection",
    "Tactic: Privilege Escalation",
    "Resources: Investigation Guide",
]
type = "eql"
query = '''
sequence by host.id, process.parent.entity_id with maxspan=15s
  [process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
  user.id != "0" and process.parent.user.id != "0" and process.parent.group.id != "0" and
  (
    process.executable like (".*", "/tmp/*", "/dev/shm/*", "/var/tmp/*", "/run/user/*", "/var/run/user/*", "/home/*/*") or
    process.parent.executable like (".*", "/tmp/*", "/dev/shm/*", "/var/tmp/*", "/home/*/*", "/run/user/*", "/var/run/user/*")
  )]
  [process where host.os.type == "linux" and event.type == "change" and event.action == "uid_change" and
  user.id == "0" and process.parent.user.id != "0" and process.parent.group.id != "0" and
  not process.executable in ("/usr/bin/sudo", "/bin/sudo")]
'''

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

[[rule.threat.technique]]
id = "T1548"
name = "Abuse Elevation Control Mechanism"
reference = "https://attack.mitre.org/techniques/T1548/"

[[rule.threat.technique.subtechnique]]
id = "T1548.001"
name = "Setuid and Setgid"
reference = "https://attack.mitre.org/techniques/T1548/001/"


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

Stages and Predicates

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

Stage 1: process

[process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
  user.id != "0" and process.parent.user.id != "0" and process.parent.group.id != "0" and
  (
    process.executable like (".*", "/tmp/*", "/dev/shm/*", "/var/tmp/*", "/run/user/*", "/var/run/user/*", "/home/*/*") or
    process.parent.executable like (".*", "/tmp/*", "/dev/shm/*", "/var/tmp/*", "/home/*/*", "/run/user/*", "/var/run/user/*")
  )]

Stage 2: process

[process where host.os.type == "linux" and event.type == "change" and event.action == "uid_change" and
  user.id == "0" and process.parent.user.id != "0" and process.parent.group.id != "0" and
  not process.executable in ("/usr/bin/sudo", "/bin/sudo")]

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

Potential Reverse Shell via Powershell

#
Source
github.com/elastic/protections-artifacts

Identifies the execution of a PowerShell script that may allow remote commands execution via TCP, UDP or ICMP reverse shell.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
Identifies the execution of a PowerShell script that may allow remote commands execution via TCP, UDP or ICMP reverse
shell.
"""
id = "a4a0537b-040e-4319-afce-a71ea547d45d"
license = "Elastic License v2"
name = "Potential Reverse Shell via Powershell"
os_list = ["windows"]
reference = ["https://github.com/samratashok/nishang/tree/master/Shells"]
version = "1.0.2"

query = '''
api where process.Ext.api.name == "AmsiScanBuffer" and
 (process.name in~ ("powershell.exe") or process.Ext.api.parameters.app_name == "PowerShell") and
  process.Ext.api.parameters.buffer : ("*Sockets.TCPClient(*", "*Sockets.UDPClient(*", "*Net.NetworkInformation.Ping*") and
  process.Ext.api.parameters.buffer : ("*while(*", "*while (*") and process.Ext.api.parameters.buffer : ("*.GetStream()*", "*.GetBytes(*") and
  process.Ext.api.parameters.buffer : ("*.Read(*", "*.Receive(*", "*.GetString(*") and process.Ext.api.parameters.buffer : ("*.Write(*", "*.Send(*")
'''

min_endpoint_version = "8.16.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
tree = true

[[optional_actions]]
action = "rollback"
field = "process.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.technique.subtechnique]]
id = "T1059.001"
name = "PowerShell"
reference = "https://attack.mitre.org/techniques/T1059/001/"



[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"


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

[internal]
min_endpoint_version = "8.16.0"

Stages and Predicates

Stage 1: api

api where process.Ext.api.name == "AmsiScanBuffer" and
 (process.name in~ ("powershell.exe") or process.Ext.api.parameters.app_name == "PowerShell") and
  process.Ext.api.parameters.buffer : ("*Sockets.TCPClient(*", "*Sockets.UDPClient(*", "*Net.NetworkInformation.Ping*") and
  process.Ext.api.parameters.buffer : ("*while(*", "*while (*") and process.Ext.api.parameters.buffer : ("*.GetStream()*", "*.GetBytes(*") and
  process.Ext.api.parameters.buffer : ("*.Read(*", "*.Receive(*", "*.GetString(*") and process.Ext.api.parameters.buffer : ("*.Write(*", "*.Send(*")

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
process.Ext.api.nameeq
  • AmsiScanBuffer corpus 18 (elastic 18)
field:"process.Ext.api.name" kind:eq value:"AmsiScanBuffer"
process.Ext.api.parameters.app_nameeq
  • PowerShell corpus 10 (elastic 10)
field:"process.Ext.api.parameters.app_name" kind:eq value:"PowerShell"
process.Ext.api.parameters.bufferwildcard
  • *.GetBytes(*
  • *.GetStream()*
  • *.GetString(*
  • *.Read(*
  • *.Receive(*
  • *.Send(*
  • *.Write(*
  • *Net.NetworkInformation.Ping*
  • *Sockets.TCPClient(*
  • *Sockets.UDPClient(*
  • *while (* corpus 2 (elastic 2)
  • *while(* corpus 2 (elastic 2)
field:"process.Ext.api.parameters.buffer" kind:wildcard
process.namein
  • powershell.exe corpus 187 (elastic 140, splunk 44, kusto 3)
field:"process_basename" kind:in value:"powershell.exe"

PowerShell Execution from WinGet Configuration Remoting Server

#
Source
github.com/elastic/protections-artifacts

Identifies PowerShell script execution where the hosting process is ConfigurationRemotingServer.exe (the WinGet Configuration remoting worker). This may indicate the abuse of the WinGet Configuration COM API to run attacker-controlled DSC through Microsoft-signed binaries.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
Identifies PowerShell script execution where the hosting process is ConfigurationRemotingServer.exe (the WinGet
Configuration remoting worker). This may indicate the abuse of the WinGet Configuration COM API to run
attacker-controlled DSC through Microsoft-signed binaries.
"""
id = "f1a2b3c4-d5e6-4789-a012-3456789abcde"
license = "Elastic License v2"
name = "PowerShell Execution from WinGet Configuration Remoting Server"
os_list = ["windows"]
reference = ["https://github.com/DylanDavis1/DSCourier"]
version = "1.0.1"

query = '''
api where process.name : "ConfigurationRemotingServer.exe" and
  process.Ext.api.name == "AmsiScanBuffer" and
  process.Ext.api.parameters.app_name == "PowerShell" and 
  not process.Ext.api.parameters.buffer in ("$false", "$PSHome") and 
  not process.Ext.api.parameters.content_name : 
               ("?:\\Users\\*\\AppData\\Local\\Microsoft\\WinGet\\Configuration\\Modules\\PSDesiredStateConfiguration\\*.psm1", 
                "?:\\Program Files\\WindowsApps\\Microsoft.DesktopAppInstaller_*.psm1") and 
  not (process.Ext.api.parameters.size >= 20000 and process.Ext.api.parameters.buffer : "################*Microsoft Corporation*##############*") and  
  not (process.Ext.api.parameters.size == 1782 and process.Ext.api.parameters.buffer : "*Localized MSFT_ScriptResource.strings.psd1*")
'''

min_endpoint_version = "8.16.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.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.technique.subtechnique]]
id = "T1059.001"
name = "PowerShell"
reference = "https://attack.mitre.org/techniques/T1059/001/"



[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"


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

[internal]
min_endpoint_version = "8.16.0"

Stages and Predicates

Stage 1: api

api where process.name : "ConfigurationRemotingServer.exe" and
  process.Ext.api.name == "AmsiScanBuffer" and
  process.Ext.api.parameters.app_name == "PowerShell" and 
  not process.Ext.api.parameters.buffer in ("$false", "$PSHome") and 
  not process.Ext.api.parameters.content_name : 
               ("?:\\Users\\*\\AppData\\Local\\Microsoft\\WinGet\\Configuration\\Modules\\PSDesiredStateConfiguration\\*.psm1", 
                "?:\\Program Files\\WindowsApps\\Microsoft.DesktopAppInstaller_*.psm1") and 
  not (process.Ext.api.parameters.size >= 20000 and process.Ext.api.parameters.buffer : "################*Microsoft Corporation*##############*") and  
  not (process.Ext.api.parameters.size == 1782 and process.Ext.api.parameters.buffer : "*Localized MSFT_ScriptResource.strings.psd1*")

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

Privileges Elevation via Parent Process PID Spoofing

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

Identifies parent process spoofing used to create an elevated child process. Adversaries may spoof the parent process identifier (PPID) of a new process to evade process-monitoring defenses or to elevate privileges.

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

[metadata]
creation_date = "2022/10/20"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/07/03"

[rule]
author = ["Elastic"]
description = """
Identifies parent process spoofing used to create an elevated child process. Adversaries may spoof the parent process
identifier (PPID) of a new process to evade process-monitoring defenses or to elevate privileges.
"""
from = "now-9m"
index = ["logs-endpoint.events.process-*"]
language = "eql"
license = "Elastic License v2"
name = "Privileges Elevation via Parent Process PID Spoofing"
references = [
    "https://gist.github.com/xpn/a057a26ec81e736518ee50848b9c2cd6",
    "https://blog.didierstevens.com/2017/03/20/that-is-not-my-child-process/",
    "https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-updateprocthreadattribute",
    "https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1134.002/T1134.002.md",
]
risk_score = 73
rule_id = "26b01043-4f04-4d2f-882a-5a1d2e95751b"
severity = "high"
tags = [
    "Domain: Endpoint",
    "OS: Windows",
    "Use Case: Threat Detection",
    "Tactic: Privilege Escalation",
    "Data Source: Elastic Defend",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
/* This rule is compatible with Elastic Endpoint only */

process where host.os.type == "windows" and event.action == "start" and

 /* process creation via seclogon */
 process.parent.Ext.real.pid > 0 and process.parent.executable != null and

 /* PrivEsc to SYSTEM */
 user.id : "S-1-5-18"  and

 /* Common FPs - evasion via hollowing is possible, should be covered by code injection */
 not process.executable : ("?:\\Windows\\System32\\WerFault.exe",
                           "?:\\Windows\\SysWOW64\\WerFault.exe",
                           "?:\\Windows\\System32\\WerFaultSecure.exe",
                           "?:\\Windows\\SysWOW64\\WerFaultSecure.exe",
                           "?:\\Windows\\System32\\Wermgr.exe",
                           "?:\\Windows\\SysWOW64\\Wermgr.exe",
                           "?:\\Windows\\SoftwareDistribution\\Download\\Install\\securityhealthsetup.exe") and
 /* Logon Utilities */
 not (process.parent.executable : "?:\\Windows\\System32\\Utilman.exe" and
     process.executable : ("?:\\Windows\\System32\\osk.exe",
                           "?:\\Windows\\System32\\Narrator.exe",
                           "?:\\Windows\\System32\\Magnify.exe",
                           "?:\\Windows\\System32\\VoiceAccess.exe")) and

 not process.parent.executable : "?:\\Windows\\System32\\AtBroker.exe" and

 not (process.code_signature.subject_name in
           ("philandro Software GmbH", "Freedom Scientific Inc.", "TeamViewer Germany GmbH", "Projector.is, Inc.",
            "TeamViewer GmbH", "Cisco WebEx LLC", "Dell Inc") and process.code_signature.trusted == true) and

 /* AM_Delta_Patch Windows Update */
 not (process.executable : ("?:\\Windows\\System32\\MpSigStub.exe", "?:\\Windows\\SysWOW64\\MpSigStub.exe") and
      process.parent.executable : ("?:\\Windows\\System32\\wuauclt.exe",
                                   "?:\\Windows\\SysWOW64\\wuauclt.exe",
                                   "?:\\Windows\\UUS\\Packages\\Preview\\*\\wuaucltcore.exe",
                                   "?:\\Windows\\UUS\\amd64\\wuauclt.exe",
                                   "?:\\Windows\\UUS\\amd64\\wuaucltcore.exe",
                                   "?:\\ProgramData\\Microsoft\\Windows\\UUS\\*\\wuaucltcore.exe")) and

 /* Other third party SW */
 not process.parent.executable :
                   ("?:\\Program Files (x86)\\HEAT Software\\HEAT Remote\\HEATRemoteServer.exe",
                    "?:\\Program Files (x86)\\VisualCron\\VisualCronService.exe",
                    "?:\\Program Files\\BinaryDefense\\Vision\\Agent\\bds-vision-agent-app.exe",
                    "?:\\Program Files\\Tablet\\Wacom\\WacomHost.exe",
                    "?:\\Program Files (x86)\\LogMeIn\\x64\\LogMeIn.exe",
                    "?:\\Program Files (x86)\\EMC Captiva\\Captiva Cloud Runtime\\Emc.Captiva.WebCaptureRunner.exe",
                    "?:\\Program Files\\Freedom Scientific\\*.exe",
                    "?:\\Program Files (x86)\\Google\\Chrome Remote Desktop\\*\\remoting_host.exe",
                    "?:\\Program Files (x86)\\GoToAssist Remote Support Customer\\*\\g2ax_comm_customer.exe") and
 not (
    process.code_signature.trusted == true and process.code_signature.subject_name == "Netwrix Corporation" and
    process.name : ("adcrcpy.exe", "addumpcaller.exe") and process.parent.name : (
      "Netwrix.ADA.EventCollector.exe",
      "Netwrix.ADA.Analyzer.exe"
    )
 )
'''

note = """## Triage and analysis

### Investigating Privileges Elevation via Parent Process PID Spoofing

#### Possible investigation steps

- Does the alert show a SYSTEM child with a spoofed parent relationship?
  - Focus: `user.id`, token integrity, `process.parent.pid`, `process.parent.Ext.real.pid`, and `process.parent.executable`.
  - Implication: escalate when a SYSTEM child has a nonzero real-creator PID that differs from the reported parent, especially when that parent gives trusted system, service, or desktop cover; treat a recognized broker or authorized test as only a candidate benign path until creator and child intent are checked.
  - Why: PPID spoofing can make process-tree views show the selected parent instead of the process that requested creation.
- Which process actually requested the spoofed launch?
  - Focus: recovered creator for `process.parent.Ext.real.pid`: `process.entity_id`, `process.executable`, `process.command_line`, signer, and trust state.
  - Implication: escalate when the creator is unsigned, user-writable, a shell or script launcher, or unrelated to the reported parent; lower suspicion only for a stable signed vendor, update, accessibility, audit, or test component tied to the same workflow.
  - Why: the Windows parent-process attribute can select a parent handle, so the recovered creator is the actor path the visible parent may hide.
  - Hint: search the same `host.id` around `@timestamp` for `process.pid` = `process.parent.Ext.real.pid`; keep PID windows tight because PIDs are reused. $investigate_0
- Does the SYSTEM child identity and command line fit the recovered creator workflow?
  - Focus: `process.executable`, `process.command_line`, `process.pe.original_file_name`, signer, and trust state.
  - Implication: escalate when the child is a shell, script host, renamed binary, user-writable executable, unsigned or untrusted, or has commands that do not belong to the recovered creator; trusted signing reduces identity concern but does not clear PPID spoofing without launch-context fit.
- Did the spoofed SYSTEM child launch follow-on activity?
  - Focus: child process events from `process.entity_id`, reviewing `process.executable`, `process.command_line`, and `user.id`. $investigate_1
  - Implication: escalate when it spawns shells, scripting, credential, service, or lateral-movement tooling under SYSTEM; no descendants lowers immediate impact but does not clear a suspicious creator or child identity.
  - Hint: if `process.entity_id` is unavailable, fall back to `host.id`, `process.pid`, and a tight alert-time window.
- If escalation is likely, what is the immediate scope?
  - Focus: prior process alerts for `host.id` and `user.id` with matching child executable or hash, reported parent, and real-creator PID.
    - $investigate_2
    - $investigate_3
  - Implication: expand containment and scoping when the same child or creator appears on other hosts or unrelated users; keep scope local when the tuple is isolated and no descendant activity contradicts it. Do not use recurrence alone to close.
  - Range: use a lookback that fits endpoint retention.

Disposition: escalate when PPID spoofing to SYSTEM has an unrecognized creator, suspicious child, misleading parent, SYSTEM follow-on activity, or cross-host scope. Close only when alert and recovered telemetry tie the event to one exact recognized broker or authorized test and no descendant evidence contradicts it; preserve evidence and escalate when recovery is incomplete or evidence conflicts.

### False positive analysis

- Signed broker cases require the exact telemetry tuple: child path, signer, and command; reported parent path; recovered creator path, signer, and command; and host/user cohort. Authorized PPID-spoofing tests require exact host, time, tester, test binary, parent PID, real creator PID, and child command line. Without that tie to one product or test, treat as suspicious because the rule already filters common Windows Error Reporting, update, accessibility, remote-support, and Netwrix patterns.
- Build exceptions only from the minimum confirmed tuple: `process.hash.sha256` or `process.code_signature.thumbprint_sha256`, `process.executable`, `process.parent.executable`, recovered creator identity, `host.id` or managed host group, and the test or product command pattern. Avoid exceptions on `process.name`, `process.parent.name`, or signer alone.

### Response and remediation

- If confirmed benign: document the exact child, reported parent, real creator, signer, command line, host, and user evidence that proved the workflow; reverse any temporary containment and create only a narrow exception for the same tuple.
- If suspicious but unconfirmed: preserve the alert, process event, recovered creator and descendant process records, process entity IDs and PIDs, command lines, hashes, signers, and current process state before containment. Use reversible containment such as host isolation or temporary policy controls based on host criticality; avoid killing the child or creator until evidence is preserved.
- If confirmed malicious: isolate the affected host when identity, lineage, or descendant evidence shows unauthorized SYSTEM execution. Before termination, record `process.entity_id`, `process.parent.Ext.real.pid`, `process.command_line`, and `process.hash.sha256`; then terminate malicious child or descendant processes and remove only the binaries, scripts, services, or persistence found during follow-on investigation.
- Reset or rotate credentials only for accounts, services, or remote-access paths whose misuse is confirmed by additional evidence. Do not treat SYSTEM context alone as proof that a named user credential was compromised.
- Post-incident hardening: restrict administrative paths that can obtain parent-process creation privileges, review who can run PPID-spoofing test tools, and document the confirmed tuple or malicious artifact set so future analysts can separate repeated product behavior from repeated abuse."""

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
"""

[rule.investigation_fields]
field_names = [
    "@timestamp",
    "host.id",
    "user.id",
    "process.entity_id",
    "process.pid",
    "process.executable",
    "process.command_line",
    "process.Ext.token.integrity_level_name",
    "process.Ext.token.elevation_level",
    "process.parent.pid",
    "process.parent.Ext.real.pid",
    "process.parent.executable",
    "process.hash.sha256",
    "process.code_signature.trusted",
    "process.code_signature.subject_name",
]

[transform]

[[transform.investigate]]
label = "Real creator process event"
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.pid", queryType = "phrase", value = "{{process.parent.Ext.real.pid}}", valueType = "string" }
  ]
]
relativeFrom = "now-15m"
relativeTo = "now"

[[transform.investigate]]
label = "Descendant process events for the spoofed 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 = "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 = "Alerts associated with the user"
description = ""
providers = [
  [
    { excluded = false, field = "event.kind", queryType = "phrase", value = "signal", valueType = "string" },
    { excluded = false, field = "user.id", queryType = "phrase", value = "{{user.id}}", valueType = "string" }
  ]
]
relativeFrom = "now-48h/h"
relativeTo = "now"

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

[[rule.threat.technique]]
id = "T1134"
name = "Access Token Manipulation"
reference = "https://attack.mitre.org/techniques/T1134/"

[[rule.threat.technique.subtechnique]]
id = "T1134.002"
name = "Create Process with Token"
reference = "https://attack.mitre.org/techniques/T1134/002/"

[[rule.threat.technique.subtechnique]]
id = "T1134.004"
name = "Parent PID Spoofing"
reference = "https://attack.mitre.org/techniques/T1134/004/"

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

Stages and Predicates

Stage 1: process

process where host.os.type == "windows" and event.action == "start" and
 process.parent.Ext.real.pid > 0 and process.parent.executable != null and
 user.id : "S-1-5-18"  and
 not process.executable : ("?:\\Windows\\System32\\WerFault.exe",
                           "?:\\Windows\\SysWOW64\\WerFault.exe",
                           "?:\\Windows\\System32\\WerFaultSecure.exe",
                           "?:\\Windows\\SysWOW64\\WerFaultSecure.exe",
                           "?:\\Windows\\System32\\Wermgr.exe",
                           "?:\\Windows\\SysWOW64\\Wermgr.exe",
                           "?:\\Windows\\SoftwareDistribution\\Download\\Install\\securityhealthsetup.exe") and
 not (process.parent.executable : "?:\\Windows\\System32\\Utilman.exe" and
     process.executable : ("?:\\Windows\\System32\\osk.exe",
                           "?:\\Windows\\System32\\Narrator.exe",
                           "?:\\Windows\\System32\\Magnify.exe",
                           "?:\\Windows\\System32\\VoiceAccess.exe")) and
 not process.parent.executable : "?:\\Windows\\System32\\AtBroker.exe" and
 not (process.code_signature.subject_name in
           ("philandro Software GmbH", "Freedom Scientific Inc.", "TeamViewer Germany GmbH", "Projector.is, Inc.",
            "TeamViewer GmbH", "Cisco WebEx LLC", "Dell Inc") and process.code_signature.trusted == true) and
 not (process.executable : ("?:\\Windows\\System32\\MpSigStub.exe", "?:\\Windows\\SysWOW64\\MpSigStub.exe") and
      process.parent.executable : ("?:\\Windows\\System32\\wuauclt.exe",
                                   "?:\\Windows\\SysWOW64\\wuauclt.exe",
                                   "?:\\Windows\\UUS\\Packages\\Preview\\*\\wuaucltcore.exe",
                                   "?:\\Windows\\UUS\\amd64\\wuauclt.exe",
                                   "?:\\Windows\\UUS\\amd64\\wuaucltcore.exe",
                                   "?:\\ProgramData\\Microsoft\\Windows\\UUS\\*\\wuaucltcore.exe")) and
 not process.parent.executable :
                   ("?:\\Program Files (x86)\\HEAT Software\\HEAT Remote\\HEATRemoteServer.exe",
                    "?:\\Program Files (x86)\\VisualCron\\VisualCronService.exe",
                    "?:\\Program Files\\BinaryDefense\\Vision\\Agent\\bds-vision-agent-app.exe",
                    "?:\\Program Files\\Tablet\\Wacom\\WacomHost.exe",
                    "?:\\Program Files (x86)\\LogMeIn\\x64\\LogMeIn.exe",
                    "?:\\Program Files (x86)\\EMC Captiva\\Captiva Cloud Runtime\\Emc.Captiva.WebCaptureRunner.exe",
                    "?:\\Program Files\\Freedom Scientific\\*.exe",
                    "?:\\Program Files (x86)\\Google\\Chrome Remote Desktop\\*\\remoting_host.exe",
                    "?:\\Program Files (x86)\\GoToAssist Remote Support Customer\\*\\g2ax_comm_customer.exe") and
 not (
    process.code_signature.trusted == true and process.code_signature.subject_name == "Netwrix Corporation" and
    process.name : ("adcrcpy.exe", "addumpcaller.exe") and process.parent.name : (
      "Netwrix.ADA.EventCollector.exe",
      "Netwrix.ADA.Analyzer.exe"
    )
 )

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 388 (elastic 388)
field:"EventType" kind:eq value:"start"
process.parent.Ext.real.pidgt
  • 0 transforms: number corpus 11 (elastic 11)
field:"process.parent.Ext.real.pid" kind:gt value:"0"
process.parent.executableis_not_null
  • (no value, null check)
field:"ParentImage" kind:is_not_null
user.idwildcard
  • S-1-5-18 corpus 13 (elastic 13)
field:"user.id" kind:wildcard value:"S-1-5-18"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.code_signature.subject_nameeqNetwrix Corporationexcludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Netwrix Corporation"
process.code_signature.trustedeqtrueexcludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true"
process.nameeqadcrcpy.exe, addumpcaller.exeexcludes:process.name field:"process.name" value:"adcrcpy.exe" field:"process.name" value:"addumpcaller.exe"
process.parent.nameeqNetwrix.ADA.EventCollector.exe, Netwrix.ADA.Analyzer.exeexcludes:process.parent.name field:"process.parent.name" value:"Netwrix.ADA.EventCollector.exe" field:"process.parent.name" value:"Netwrix.ADA.Analyzer.exe"
process.code_signature.subject_nameinCisco WebEx LLC, Dell Inc, Freedom Scientific Inc., Projector.is, Inc., TeamViewer Germany GmbH, TeamViewer GmbH, philandro Software GmbHexcludes:process.code_signature.subject_name
process.executableeq?:\Windows\System32\MpSigStub.exe, ?:\Windows\SysWOW64\MpSigStub.exeexcludes:process.executable field:"process.executable" value:"?:\Windows\System32\MpSigStub.exe" field:"process.executable" value:"?:\Windows\SysWOW64\MpSigStub.exe"
process.parent.executablewildcard?:\Windows\System32\wuauclt.exe, ?:\Windows\SysWOW64\wuauclt.exe, ?:\Windows\UUS\Packages\Preview\*\wuaucltcore.exe, ?:\Windows\UUS\amd64\wuauclt.exe, ?:\Windows\UUS\amd64\wuaucltcore.exe, ?:\ProgramData\Microsoft\Windows\UUS\*\wuaucltcore.exeexcludes:process.parent.executable
process.executableeq?:\Windows\System32\osk.exe, ?:\Windows\System32\Narrator.exe, ?:\Windows\System32\Magnify.exe, ?:\Windows\System32\VoiceAccess.exeexcludes:process.executable
process.parent.executableeq?:\Windows\System32\Utilman.exeexcludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\System32\Utilman.exe"
process.executableeq?:\Windows\System32\WerFault.exe, ?:\Windows\SysWOW64\WerFault.exe, ?:\Windows\System32\WerFaultSecure.exe, ?:\Windows\SysWOW64\WerFaultSecure.exe, ?:\Windows\System32\Wermgr.exe, ?:\Windows\SysWOW64\Wermgr.exe, ?:\Windows\SoftwareDistribution\Download\Install\securityhealthsetup.exeexcludes:process.executable
process.parent.executableeq?:\Windows\System32\AtBroker.exeexcludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\System32\AtBroker.exe"
process.parent.executablewildcard?:\Program Files (x86)\HEAT Software\HEAT Remote\HEATRemoteServer.exe, ?:\Program Files (x86)\VisualCron\VisualCronService.exe, ?:\Program Files\BinaryDefense\Vision\Agent\bds-vision-agent-app.exe, ?:\Program Files\Tablet\Wacom\WacomHost.exe, ?:\Program Files (x86)\LogMeIn\x64\LogMeIn.exe, ?:\Program Files (x86)\EMC Captiva\Captiva Cloud Runtime\Emc.Captiva.WebCaptureRunner.exe, ?:\Program Files\Freedom Scientific\*.exe, ?:\Program Files (x86)\Google\Chrome Remote Desktop\*\remoting_host.exe, ?:\Program Files (x86)\GoToAssist Remote Support Customer\*\g2ax_comm_customer.exeexcludes:process.parent.executable

Screensaver Plist File Modified by Unexpected Process

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

Identifies when a screensaver plist file is modified by an unexpected process. An adversary can maintain persistence on a macOS endpoint by creating a malicious screensaver (.saver) file and configuring the screensaver plist file to execute code each time the screensaver is activated.

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

[metadata]
creation_date = "2021/10/05"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/03/24"

[rule]
author = ["Elastic"]
description = """
Identifies when a screensaver plist file is modified by an unexpected process. An adversary can maintain persistence on
a macOS endpoint by creating a malicious screensaver (.saver) file and configuring the screensaver plist file to execute
code each time the screensaver is activated.
"""
from = "now-9m"
index = ["logs-endpoint.events.file*"]
language = "eql"
license = "Elastic License v2"
name = "Screensaver Plist File Modified by Unexpected Process"
note = """## Triage and analysis

- Analyze the plist file modification event to identify whether the change was expected or not
- Investigate the process that modified the plist file for malicious code or other suspicious behavior
- Identify if any suspicious or known malicious screensaver (.saver) files were recently written to or modified on the host
"""
references = [
    "https://posts.specterops.io/saving-your-access-d562bf5bf90b",
    "https://github.com/D00MFist/PersistentJXA",
]
risk_score = 47
rule_id = "e6e8912f-283f-4d0d-8442-e0dcaf49944b"
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: Persistence",
    "Data Source: Elastic Defend",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
file where host.os.type == "macos" and event.action == "modification" and
  file.name like~ "com.apple.screensaver.*.plist" and
   file.path like (
      "/Users/*/Library/Preferences/ByHost/*",
      "/Library/Managed Preferences/*",
      "/System/Library/Preferences/*"
      ) and
  (
    process.code_signature.trusted == false or
    process.code_signature.exists == false or

    /* common script interpreters and abused native macOS bins */
    process.name like~ (
      "curl",
      "mktemp",
      "tail",
      "funzip",
      "python*",
      "osascript",
      "perl"
      )
   ) and

  /* Filter OS processes modifying screensaver plist files */
  not process.executable like (
    "/usr/sbin/cfprefsd",
    "/usr/libexec/xpcproxy",
    "/System/Library/CoreServices/ManagedClient.app/Contents/Resources/MCXCompositor",
    "/System/Library/CoreServices/ManagedClient.app/Contents/MacOS/ManagedClient"
    )
'''


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

[[rule.threat.technique]]
id = "T1546"
name = "Event Triggered Execution"
reference = "https://attack.mitre.org/techniques/T1546/"

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

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

Stages and Predicates

Stage 1: file

file where host.os.type == "macos" and event.action == "modification" and
  file.name like~ "com.apple.screensaver.*.plist" and
   file.path like (
      "/Users/*/Library/Preferences/ByHost/*",
      "/Library/Managed Preferences/*",
      "/System/Library/Preferences/*"
      ) and
  (
    process.code_signature.trusted == false or
    process.code_signature.exists == false or
    process.name like~ (
      "curl",
      "mktemp",
      "tail",
      "funzip",
      "python*",
      "osascript",
      "perl"
      )
   ) and
  not process.executable like (
    "/usr/sbin/cfprefsd",
    "/usr/libexec/xpcproxy",
    "/System/Library/CoreServices/ManagedClient.app/Contents/Resources/MCXCompositor",
    "/System/Library/CoreServices/ManagedClient.app/Contents/MacOS/ManagedClient"
    )

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • modification corpus 72 (elastic 72)
field:"EventType" kind:eq value:"modification"
file.namewildcard
  • com.apple.screensaver.*.plist
field:"file.name" kind:wildcard value:"com.apple.screensaver.*.plist"
file.pathwildcard
  • /Library/Managed Preferences/* corpus 2 (elastic 2)
  • /System/Library/Preferences/* corpus 2 (elastic 2)
  • /Users/*/Library/Preferences/ByHost/* corpus 2 (elastic 2)
field:"TargetFilename" kind:wildcard
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.namewildcard
  • curl corpus 28 (elastic 28)
  • funzip corpus 4 (elastic 4)
  • mktemp corpus 4 (elastic 4)
  • osascript corpus 31 (elastic 31)
  • perl corpus 10 (elastic 10)
  • python* corpus 51 (elastic 51)
  • tail
field:"process_basename" kind:wildcard

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.executableeq/usr/sbin/cfprefsd, /usr/libexec/xpcproxy, /System/Library/CoreServices/ManagedClient.app/Contents/Resources/MCXCompositor, /System/Library/CoreServices/ManagedClient.app/Contents/MacOS/ManagedClientexcludes:process.executable

Sensitive File Access via Rsync

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

Detects the rsync process accessing files, which may indicate data collection and potential exfiltration activities. Threat actors leverage rsync, which is natively installed on macOS, to copy and synchronize sensitive files for data theft. This technique has been observed in campaigns by groups like BlueNoroff.

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

[rule]
description = """
Detects the rsync process accessing files, which may indicate data collection and potential exfiltration activities.
Threat actors leverage rsync, which is natively installed on macOS, to copy and synchronize sensitive files for data
theft. This technique has been observed in campaigns by groups like BlueNoroff.
"""
id = "bbd9fa06-36fa-4007-bf45-dab9678207a1"
license = "Elastic License v2"
name = "Sensitive File Access via Rsync"
os_list = ["macos"]
reference = ["https://fieldeffect.com/blog/zoom-doom-bluenoroff-call-opens-the-door"]
version = "1.0.4"

query = '''
sequence by process.entity_id with maxspan=10s
[process where event.type == "start" and event.action == "exec" and process.name == "rsync"]
[file where event.action == "open" and process.name == "rsync"]
'''

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

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1005"
name = "Data from Local System"
reference = "https://attack.mitre.org/techniques/T1005/"


[threat.tactic]
id = "TA0009"
name = "Collection"
reference = "https://attack.mitre.org/tactics/TA0009/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1048"
name = "Exfiltration Over Alternative Protocol"
reference = "https://attack.mitre.org/techniques/T1048/"


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

[internal]
min_endpoint_version = "8.16.0"

Stages and Predicates

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

Stage 1: process

[process where event.type == "start" and event.action == "exec" and process.name == "rsync"]

Stage 2: file

[file where event.action == "open" and process.name == "rsync"]

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • exec corpus 547 (elastic 547)
  • open corpus 49 (elastic 49)
field:"EventType" kind:eq
event.typeeq
  • start corpus 1036 (elastic 1036)
field:"event.type" kind:eq value:"start"
process.nameeq
  • rsync corpus 2 (elastic 2)
field:"process_basename" kind:eq value:"rsync"

Suspicious Component Object Model Registry Modification

#
Time window
1m
Sequence by
process.entity_id
Source
github.com/elastic/protections-artifacts

Identifies Component Object Model (COM) hijacking via registry modification. Adversaries may establish persistence by executing malicious content triggered by hijacked references to COM objects.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
Identifies Component Object Model (COM) hijacking via registry modification. Adversaries may establish persistence by
executing malicious content triggered by hijacked references to COM objects.
"""
id = "d02ebf45-64b8-4824-96b3-d7b9e27ab980"
license = "Elastic License v2"
name = "Suspicious Component Object Model Registry Modification"
os_list = ["windows"]
reference = [
    "https://bohops.com/2018/08/18/abusing-the-com-registry-structure-part-2-loading-techniques-for-evasion-and-persistence/",
]
version = "1.0.12"

query = '''
sequence by process.entity_id with maxspan=1m
 [process where event.action == "start" and
  (
   (process.Ext.relative_file_creation_time <= 600 and not process.code_signature.status like ("trusted", "errorExpired", "errorCode_endpoint*")) or
   process.name in~ ("cscript.exe", "wscript.exe", "powershell.exe", "rundll32.exe")
  ) and
  not process.executable : ("?:\\Program Files (x86)\\*.exe", "?:\\Program Files\\*.exe", "?:\\Windows\\Installer\\MSI*.tmp") and
  not (process.name : "rundll32.exe" and process.args : "?:\\WINDOWS\\Installer\\MSI*.tmp,zzzzInvokeManagedCustomActionOutOfProc") and
  not process.executable : "\\Device\\HarddiskVolume*.exe" and
  not (process.name == "rundll32.exe" and process.args in ("printui.dll,PrintUIEntryDPIAware", "fdprint,InvokeTask")) and
  not process.hash.sha256 in ("49833d2820afb1d7409dfbd916480f2cdf5787d2e2d94166725beb9064922d5d",
                              "2cea4ede340af90ace6f7ad569170a3741bb18f22b9c9c306cab37397f74144a",
                              "a9774d76822597777e1beaaad9d3a1e441b266836d6ca97a4b7bd908e8a3f518",
                              "c9fe835d7f6fb610c78cb4e3b89bdc9e242d422cceb854fadf88f77c49fa8ff3")]
 [registry where event.action == "modification" and
  process.executable != null and registry.data.strings != null and
  registry.path : ("HKEY_USERS\\*Classes\\*\\InprocServer32\\",
                   "HKEY_USERS\\*Classes\\*\\DelegateExecute\\",
                   "HKEY_USERS\\*Classes\\*\\TreatAs\\",
                   "HKEY_USERS\\*Classes\\CLSID\\*\\ScriptletURL\\") and
   not registry.data.strings :
             ("dfshim.dll",
              "mscoree.dll",
              "*:\\Program Files\\*",
              "*:\\Program Files (x86)\\*",
              "*:\\PROGRA~2\\*",
              "*:\\PROGRA~1\\*",
              "%SystemRoot%\\Sys*\\shdocvw.dll",
              "%SYSTEMROOT%\\sys*\\shell32.dll",
              " %SystemRoot%\\system32\\shdocvw.dll",
              "?:\\WINDOWS\\Sys*\\mscoree.dll",
              "C:\\Hansen\\HV*.ocx",
              "C:\\Atlog\\Land2Map\\Land2Map 2018\\*",
              "C:\\TraffiCAD Print and Cut\\bridge32.exe",
              "?:\\Windows\\system32\\jscript.dll",
              "?:\\Windows\\system32\\urlmon.dll",
              "{EDBF22EA-0810-46C208519-6FE5077DA965}",
              "C:\\WINDOWS\\TEMP\\ControlCredentialProvider\\ControlCredentialProvider.dll",
              "?:\\windows\\SysWow64\\*.OCX",
              "?:\\Users\\*\\AppData\\Local\\Microsoft\\BingWallpaperApp\\BingVisualSearchContextMenu.dll",
              "?:\\Users\\*\\AppData\\Local\\Microsoft\\OneDrive\\*\\FileSyncShell*.dll")]
'''

min_endpoint_version = "8.4.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 = "T1546"
name = "Event Triggered Execution"
reference = "https://attack.mitre.org/techniques/T1546/"
[[threat.technique.subtechnique]]
id = "T1546.015"
name = "Component Object Model Hijacking"
reference = "https://attack.mitre.org/techniques/T1546/015/"



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

[internal]
min_endpoint_version = "8.4.0"

Stages and Predicates

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

Stage 1: process

[process where event.action == "start" and
  (
   (process.Ext.relative_file_creation_time <= 600 and not process.code_signature.status like ("trusted", "errorExpired", "errorCode_endpoint*")) or
   process.name in~ ("cscript.exe", "wscript.exe", "powershell.exe", "rundll32.exe")
  ) and
  not process.executable : ("?:\\Program Files (x86)\\*.exe", "?:\\Program Files\\*.exe", "?:\\Windows\\Installer\\MSI*.tmp") and
  not (process.name : "rundll32.exe" and process.args : "?:\\WINDOWS\\Installer\\MSI*.tmp,zzzzInvokeManagedCustomActionOutOfProc") and
  not process.executable : "\\Device\\HarddiskVolume*.exe" and
  not (process.name == "rundll32.exe" and process.args in ("printui.dll,PrintUIEntryDPIAware", "fdprint,InvokeTask")) and
  not process.hash.sha256 in ("49833d2820afb1d7409dfbd916480f2cdf5787d2e2d94166725beb9064922d5d",
                              "2cea4ede340af90ace6f7ad569170a3741bb18f22b9c9c306cab37397f74144a",
                              "a9774d76822597777e1beaaad9d3a1e441b266836d6ca97a4b7bd908e8a3f518",
                              "c9fe835d7f6fb610c78cb4e3b89bdc9e242d422cceb854fadf88f77c49fa8ff3")]

Stage 2: registry

[registry where event.action == "modification" and
  process.executable != null and registry.data.strings != null and
  registry.path : ("HKEY_USERS\\*Classes\\*\\InprocServer32\\",
                   "HKEY_USERS\\*Classes\\*\\DelegateExecute\\",
                   "HKEY_USERS\\*Classes\\*\\TreatAs\\",
                   "HKEY_USERS\\*Classes\\CLSID\\*\\ScriptletURL\\") and
   not registry.data.strings :
             ("dfshim.dll",
              "mscoree.dll",
              "*:\\Program Files\\*",
              "*:\\Program Files (x86)\\*",
              "*:\\PROGRA~2\\*",
              "*:\\PROGRA~1\\*",
              "%SystemRoot%\\Sys*\\shdocvw.dll",
              "%SYSTEMROOT%\\sys*\\shell32.dll",
              " %SystemRoot%\\system32\\shdocvw.dll",
              "?:\\WINDOWS\\Sys*\\mscoree.dll",
              "C:\\Hansen\\HV*.ocx",
              "C:\\Atlog\\Land2Map\\Land2Map 2018\\*",
              "C:\\TraffiCAD Print and Cut\\bridge32.exe",
              "?:\\Windows\\system32\\jscript.dll",
              "?:\\Windows\\system32\\urlmon.dll",
              "{EDBF22EA-0810-46C208519-6FE5077DA965}",
              "C:\\WINDOWS\\TEMP\\ControlCredentialProvider\\ControlCredentialProvider.dll",
              "?:\\windows\\SysWow64\\*.OCX",
              "?:\\Users\\*\\AppData\\Local\\Microsoft\\BingWallpaperApp\\BingVisualSearchContextMenu.dll",
              "?:\\Users\\*\\AppData\\Local\\Microsoft\\OneDrive\\*\\FileSyncShell*.dll")]

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • modification corpus 72 (elastic 72)
  • start corpus 388 (elastic 388)
field:"EventType" kind:eq
process.Ext.relative_file_creation_timele
  • 600 transforms: number corpus 3 (elastic 3)
field:"process.Ext.relative_file_creation_time" kind:le value:"600"
process.executableis_not_null
  • (no value, null check)
field:"Image" kind:is_not_null
process.namein
  • cscript.exe corpus 24 (splunk 16, elastic 8)
  • powershell.exe corpus 31 (splunk 19, elastic 11, kusto 1)
  • rundll32.exe corpus 17 (splunk 12, elastic 5)
  • wscript.exe corpus 28 (elastic 14, splunk 14)
field:"process_basename" kind:in
registry.data.stringsis_not_null
  • (no value, null check)
field:"Details" kind:is_not_null
registry.pathwildcard
  • HKEY_USERS\*Classes\*\DelegateExecute\ corpus 3 (elastic 3)
  • HKEY_USERS\*Classes\*\InprocServer32\ corpus 4 (elastic 4)
  • HKEY_USERS\*Classes\*\TreatAs\ corpus 3 (elastic 3)
  • HKEY_USERS\*Classes\CLSID\*\ScriptletURL\ corpus 3 (elastic 3)
field:"TargetObject" kind:wildcard

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argsinfdprint,InvokeTask, printui.dll,PrintUIEntryDPIAwareexcludes:process.args field:"process.args" value:"fdprint,InvokeTask" field:"process.args" value:"printui.dll,PrintUIEntryDPIAware"
process.nameeqrundll32.exeexcludes:process.name field:"process.name" value:"rundll32.exe"
process.argswildcard?:\WINDOWS\Installer\MSI*.tmp,zzzzInvokeManagedCustomActionOutOfProcexcludes:process.args field:"process.args" value:"?:\WINDOWS\Installer\MSI*.tmp,zzzzInvokeManagedCustomActionOutOfProc"
process.executablewildcard?:\Program Files (x86)\*.exe, ?:\Program Files\*.exe, ?:\Windows\Installer\MSI*.tmpexcludes:process.executable field:"process.executable" value:"?:\Program Files (x86)\*.exe" field:"process.executable" value:"?:\Program Files\*.exe" field:"process.executable" value:"?:\Windows\Installer\MSI*.tmp"
process.executablewildcard\Device\HarddiskVolume*.exeexcludes:process.executable field:"process.executable" value:"\Device\HarddiskVolume*.exe"
process.hash.sha256in2cea4ede340af90ace6f7ad569170a3741bb18f22b9c9c306cab37397f74144a, 49833d2820afb1d7409dfbd916480f2cdf5787d2e2d94166725beb9064922d5d, a9774d76822597777e1beaaad9d3a1e441b266836d6ca97a4b7bd908e8a3f518, c9fe835d7f6fb610c78cb4e3b89bdc9e242d422cceb854fadf88f77c49fa8ff3excludes:process.hash.sha256
registry.data.stringswildcarddfshim.dll, mscoree.dll, *:\Program Files\*, *:\Program Files (x86)\*, *:\PROGRA~2\*, *:\PROGRA~1\*, %SystemRoot%\Sys*\shdocvw.dll, %SYSTEMROOT%\sys*\shell32.dll, %SystemRoot%\system32\shdocvw.dll, ?:\WINDOWS\Sys*\mscoree.dll, C:\Hansen\HV*.ocx, C:\Atlog\Land2Map\Land2Map 2018\*, C:\TraffiCAD Print and Cut\bridge32.exe, ?:\Windows\system32\jscript.dll, ?:\Windows\system32\urlmon.dll, {EDBF22EA-0810-46C208519-6FE5077DA965}, C:\WINDOWS\TEMP\ControlCredentialProvider\ControlCredentialProvider.dll, ?:\windows\SysWow64\*.OCX, ?:\Users\*\AppData\Local\Microsoft\BingWallpaperApp\BingVisualSearchContextMenu.dll, ?:\Users\*\AppData\Local\Microsoft\OneDrive\*\FileSyncShell*.dllexcludes:registry.data.strings

Suspicious Kernel Feature Activity

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

This rule detects the modification and reading of kernel features through built-in commands. Attackers may collect information, disable or weaken Linux kernel protections. For example, an attacker may modify ASLR protection by disabling kernel.randomize_va_space, allow ptrace by setting kernel.yama.ptrace_scope to 0, or disable the NMI watchdog by setting kernel.nmi_watchdog to 0. These changes may be used to impair defenses and evade detection.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2025/04/29"
integration = ["endpoint", "crowdstrike"]
maturity = "production"
updated_date = "2026/06/17"

[rule]
author = ["Elastic"]
description = """
This rule detects the modification and reading of kernel features through built-in commands. Attackers may collect
information, disable or weaken Linux kernel protections. For example, an attacker may modify ASLR protection by
disabling kernel.randomize_va_space, allow ptrace by setting kernel.yama.ptrace_scope to 0, or disable the
NMI watchdog by setting kernel.nmi_watchdog to 0. These changes may be used to impair defenses and evade detection.
"""
from = "now-9m"
index = [
  "logs-endpoint.events.process*",
  "logs-crowdstrike.fdr*",
]
language = "eql"
license = "Elastic License v2"
name = "Suspicious Kernel Feature Activity"
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 Kernel Feature Activity

Kernel features in Linux systems are critical for maintaining security and stability. They control various system behaviors, such as memory randomization and process tracing. Adversaries may exploit these features to weaken defenses, for instance, by disabling address space layout randomization (ASLR) or enabling unrestricted process tracing. The detection rule identifies suspicious activities by monitoring command executions that modify or read kernel settings, focusing on unusual patterns or contexts that suggest malicious intent.

### Possible investigation steps

- Review the process command line to identify which specific kernel feature was accessed or modified, focusing on entries like kernel.randomize_va_space or kernel.yama.ptrace_scope.
- Examine the parent process executable and name to determine the context in which the suspicious command was executed, checking for unusual or unauthorized parent processes.
- Investigate the user account associated with the process execution to assess whether the activity aligns with expected behavior for that user.
- Check for any recent changes in the /etc/sysctl.conf or /etc/sysctl.d/ directories that might indicate unauthorized modifications to kernel settings.
- Analyze the system's process execution history to identify any patterns or sequences of commands that suggest a broader attack or compromise.
- Correlate the alert with other security events or logs to determine if this activity is part of a larger attack campaign or isolated incident.

### False positive analysis

- System administrators or automated scripts may frequently modify kernel settings for legitimate purposes such as performance tuning or system maintenance. To handle these, identify and whitelist known administrative scripts or processes that regularly perform these actions.
- Security tools or monitoring solutions might execute commands that read kernel settings as part of their normal operation. Review and exclude these tools from triggering alerts by adding them to an exception list based on their process names or command patterns.
- Developers and testers might disable certain kernel features temporarily during debugging or testing phases. Coordinate with development teams to document these activities and exclude them from detection by specifying the relevant process names or command lines.
- Some system management tools may use commands like sysctl to apply configuration changes across multiple systems. If these tools are verified as non-threatening, exclude their specific command patterns or parent processes from triggering the rule.
- Regular system updates or configuration management processes might involve reading or modifying kernel settings. Identify these processes and add them to an exception list to prevent unnecessary alerts.

### Response and remediation

- Immediately isolate the affected system from the network to prevent further exploitation or lateral movement by the adversary.
- Review and revert any unauthorized changes to kernel settings, such as ASLR, ptrace scope, or NMI watchdog, to their secure defaults using sysctl or by editing configuration files.
- Conduct a thorough examination of the system for signs of compromise, including checking for unauthorized access, unusual processes, or modifications to critical files.
- Restore the system from a known good backup if the integrity of the system is compromised and cannot be reliably remediated.
- Implement additional monitoring and logging for kernel feature modifications to detect similar activities in the future, ensuring alerts are configured for immediate response.
- Escalate the incident to the security operations center (SOC) or relevant security team for further investigation and correlation with other potential threats across the network.
- Review and update security policies and configurations to prevent unauthorized kernel modifications, including enforcing stricter access controls and auditing procedures.
"""
risk_score = 47
rule_id = "3aff6ab1-18bd-427e-9d4c-c5732110c261"
severity = "medium"
tags = [
  "Domain: Endpoint",
  "OS: Linux",
  "Use Case: Threat Detection",
  "Tactic: Defense Evasion",
  "Tactic: Discovery",
  "Data Source: Elastic Defend",
  "Resources: Investigation Guide",
  "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", "ProcessRollup2") and
process.command_line : (
  "*/etc/sysctl.conf*", "*/etc/sysctl.d/*", "*/proc/sys/kernel/nmi_watchdog*",
  "*/proc/sys/vm/nr_hugepages*", "*/proc/sys/kernel/yama/ptrace_scope*",
  "*/proc/sys/kernel/randomize_va_space*", "*/proc/sys/vm/drop_caches*",
  "*/proc/sys/kernel/sysrq*", "*grsecurity*", "*exec-shield*",
  "*kernel.randomize_va_space*", "*kernel.yama.ptrace_scope*",
  "*kernel.nmi_watchdog*", "*vm.nr_hugepages*", "*vm.drop_caches*",
  "*kernel.sysrq*"
) and
?process.parent.executable != null and 
(
  (process.name == "tee" and process.args like "-*a*") or // also detects --append
  (process.name == "cat" and not process.parent.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish")) or
  (process.name == "grep" and process.args_count == 3 and not process.parent.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish")) or
  (process.name == "sysctl" and process.args like ("*-w*", "*--write*", "*=*")) or
  (process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and process.args == "-c" and process.args : "*echo *")
) and
not (
  process.parent.executable in (
    "/opt/novell/groupwise/agents/bin/gwia", "/opt/novell/groupwise/agents/bin/gwmta", "/opt/novell/groupwise/agents/bin/gwpoa",
    "/opt/illumio_ven/system/etc/init.d/illumio-firewall", "/usr/bin/oracle-database-preinstall-19c-verify", "/usr/bin/make",
    "/usr/local/qualys/cloud-agent/bin/qualys-scan-util"
  ) or
  process.parent.executable like "/tmp/CVU_19_resource*/checkmemlock.sh" or
  process.parent.args == "/usr/share/mysql/mysql-systemd-start" or
  process.parent.command_line like "*ansible*" or
  (process.parent.name in ("crond", "cron") and process.command_line like "*drop_caches*") or
  (process.parent.name == "python.original" and process.parent.args == "/usr/lib/venv-salt-minion/bin/salt-minion")
)
'''
[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1553"
name = "Subvert Trust Controls"
reference = "https://attack.mitre.org/techniques/T1553/"

[[rule.threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"

[[rule.threat.technique.subtechnique]]
id = "T1562.001"
name = "Disable or Modify Tools"
reference = "https://attack.mitre.org/techniques/T1562/001/"

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

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

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

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

[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", "ProcessRollup2") and
process.command_line : (
  "*/etc/sysctl.conf*", "*/etc/sysctl.d/*", "*/proc/sys/kernel/nmi_watchdog*",
  "*/proc/sys/vm/nr_hugepages*", "*/proc/sys/kernel/yama/ptrace_scope*",
  "*/proc/sys/kernel/randomize_va_space*", "*/proc/sys/vm/drop_caches*",
  "*/proc/sys/kernel/sysrq*", "*grsecurity*", "*exec-shield*",
  "*kernel.randomize_va_space*", "*kernel.yama.ptrace_scope*",
  "*kernel.nmi_watchdog*", "*vm.nr_hugepages*", "*vm.drop_caches*",
  "*kernel.sysrq*"
) and
?process.parent.executable != null and
(
  (process.name == "tee" and process.args like "-*a*") or
  (process.name == "cat" and not process.parent.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish")) or
  (process.name == "grep" and process.args_count == 3 and not process.parent.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish")) or
  (process.name == "sysctl" and process.args like ("*-w*", "*--write*", "*=*")) or
  (process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and process.args == "-c" and process.args : "*echo *")
) and
not (
  process.parent.executable in (
    "/opt/novell/groupwise/agents/bin/gwia", "/opt/novell/groupwise/agents/bin/gwmta", "/opt/novell/groupwise/agents/bin/gwpoa",
    "/opt/illumio_ven/system/etc/init.d/illumio-firewall", "/usr/bin/oracle-database-preinstall-19c-verify", "/usr/bin/make",
    "/usr/local/qualys/cloud-agent/bin/qualys-scan-util"
  ) or
  process.parent.executable like "/tmp/CVU_19_resource*/checkmemlock.sh" or
  process.parent.args == "/usr/share/mysql/mysql-systemd-start" or
  process.parent.command_line like "*ansible*" or
  (process.parent.name in ("crond", "cron") and process.command_line like "*drop_caches*") or
  (process.parent.name == "python.original" and process.parent.args == "/usr/lib/venv-salt-minion/bin/salt-minion")
)

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actionin
  • ProcessRollup2
  • exec
field:"EventType" kind:in
event.typeeq
  • start
field:"event.type" kind:eq value:"start"
process.argseq
  • -c
field:"process.args" kind:eq value:"-c"
process.argswildcard
  • *--write*
  • *-w*
  • *=*
  • *echo *
  • -*a*
field:"process.args" kind:wildcard
process.args_counteq
  • 3 transforms: number
field:"process.args_count" kind:eq value:"3"
process.command_linewildcard
  • */etc/sysctl.conf*
  • */etc/sysctl.d/*
  • */proc/sys/kernel/nmi_watchdog*
  • */proc/sys/kernel/randomize_va_space*
  • */proc/sys/kernel/sysrq*
  • */proc/sys/kernel/yama/ptrace_scope*
  • */proc/sys/vm/drop_caches*
  • */proc/sys/vm/nr_hugepages*
  • *exec-shield*
  • *grsecurity*
  • *kernel.nmi_watchdog*
  • *kernel.randomize_va_space*
  • *kernel.sysrq*
  • *kernel.yama.ptrace_scope*
  • *vm.drop_caches*
  • *vm.nr_hugepages*
field:"CommandLine" kind:wildcard
process.nameeq
  • cat
  • grep
  • sysctl
  • tee
field:"process_basename" kind:eq
process.namein
  • bash
  • csh
  • dash
  • fish
  • ksh
  • sh
  • tcsh
  • zsh
field:"process_basename" kind:in
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_linematchdrop_cachesexcludes:process.command_line field:"process.command_line" value:"drop_caches"
process.parent.nameincron, crondexcludes:process.parent.name field:"process.parent.name" value:"cron" field:"process.parent.name" value:"crond"
process.parent.argseq/usr/lib/venv-salt-minion/bin/salt-minionexcludes:process.parent.args field:"process.parent.args" value:"/usr/lib/venv-salt-minion/bin/salt-minion"
process.parent.nameeqpython.originalexcludes:process.parent.name field:"process.parent.name" value:"python.original"
process.parent.argseq/usr/share/mysql/mysql-systemd-startexcludes:process.parent.args field:"process.parent.args" value:"/usr/share/mysql/mysql-systemd-start"
process.parent.command_linematchansibleexcludes:process.parent.command_line field:"process.parent.command_line" value:"ansible"
process.parent.executablein/opt/illumio_ven/system/etc/init.d/illumio-firewall, /opt/novell/groupwise/agents/bin/gwia, /opt/novell/groupwise/agents/bin/gwmta, /opt/novell/groupwise/agents/bin/gwpoa, /usr/bin/make, /usr/bin/oracle-database-preinstall-19c-verify, /usr/local/qualys/cloud-agent/bin/qualys-scan-utilexcludes:process.parent.executable
process.parent.executablewildcard/tmp/CVU_19_resource*/checkmemlock.shexcludes:process.parent.executable field:"process.parent.executable" value:"/tmp/CVU_19_resource*/checkmemlock.sh"

Suspicious Python Package Child Process Execution

#
Time window
1m
Sequence by
process.entity_id, process.parent.entity_id
Source
github.com/elastic/protections-artifacts

Detects the suspicious execution of a suspcious process by a Python package. This activity could indicate the existence of a malicious Python package installed on the system.

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

[rule]
description = """
Detects the suspicious execution of a suspcious process by a Python package. This activity could indicate the existence
of a malicious Python package installed on the system.
"""
id = "d8cbba0d-7275-4bcd-be22-79ee6fea2951"
license = "Elastic License v2"
name = "Suspicious Python Package Child Process Execution"
os_list = ["macos"]
reference = [
    "https://blog.sonatype.com/new-pymafka-malicious-package-drops-cobalt-strike-on-macos-windows-linux",
]
version = "1.0.23"

query = '''
sequence with maxspan=1m
[process where event.type == "start" and process.name like~ "python*" and process.args like~ "*/lib/python*/site-packages/*" and not
 process.args like~ ("*/lib/python*/site-packages/pip", 
                     "*/lib/python*/site-packages/pipenv/*", 
                     "/Users/*/.platformio/packages/*", 
                     "*/lib/python*/site-packages/pip/*", 
                     "/Applications/*", 
                     "/private/var/folders/*")] by process.entity_id
[process where event.type == "start" and event.action == "exec" and process.parent.name like~ "python*" and 
  (((process.name in ("bash", "sh", "zsh", "dash", "csh", "tcsh", "ksh", "tclsh", "fish") or process.name like "tclsh*") and process.args == "-c" and process.command_line like ("*curl*", "*wget*", "*osascript*", "*whoami*", "*nohup*")) or
  (process.name == "osascript") or (process.name == "curl") or (process.name == "wget") or 
  (process.name == "cp") or (process.name == "mv"))] by process.parent.entity_id
'''

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

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

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

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



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

[internal]
min_endpoint_version = "8.10.2"

Stages and Predicates

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

Stage 1: process

[process where event.type == "start" and process.name like~ "python*" and process.args like~ "*/lib/python*/site-packages/*" and not
 process.args like~ ("*/lib/python*/site-packages/pip", 
                     "*/lib/python*/site-packages/pipenv/*", 
                     "/Users/*/.platformio/packages/*", 
                     "*/lib/python*/site-packages/pip/*", 
                     "/Applications/*", 
                     "/private/var/folders/*")] by process.entity_id

Stage 2: process

[process where event.type == "start" and event.action == "exec" and process.parent.name like~ "python*" and 
  (((process.name in ("bash", "sh", "zsh", "dash", "csh", "tcsh", "ksh", "tclsh", "fish") or process.name like "tclsh*") and process.args == "-c" and process.command_line like ("*curl*", "*wget*", "*osascript*", "*whoami*", "*nohup*")) or
  (process.name == "osascript") or (process.name == "curl") or (process.name == "wget") or 
  (process.name == "cp") or (process.name == "mv"))] by process.parent.entity_id

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
  • -c corpus 91 (elastic 91)
field:"process.args" kind:eq value:"-c"
process.argswildcard
  • */lib/python*/site-packages/*
field:"process.args" kind:wildcard value:"*/lib/python*/site-packages/*"
process.command_linewildcard
  • *curl* corpus 2 (elastic 2)
  • *nohup*
  • *osascript*
  • *wget* corpus 2 (elastic 2)
  • *whoami* corpus 3 (elastic 3)
field:"CommandLine" kind:wildcard
process.nameeq
  • cp corpus 5 (elastic 5)
  • curl corpus 13 (elastic 13)
  • mv
  • osascript corpus 41 (elastic 41)
  • wget corpus 9 (elastic 9)
field:"process_basename" kind:eq
process.namein
  • bash corpus 181 (elastic 181)
  • csh corpus 148 (elastic 148)
  • dash corpus 150 (elastic 150)
  • fish corpus 151 (elastic 151)
  • ksh corpus 149 (elastic 149)
  • sh corpus 180 (elastic 180)
  • tclsh corpus 28 (elastic 28)
  • tcsh corpus 145 (elastic 145)
  • zsh corpus 180 (elastic 180)
field:"process_basename" kind:in
process.namewildcard
  • python* corpus 55 (elastic 55)
  • tclsh* corpus 23 (elastic 23)
field:"process_basename" kind:wildcard
process.parent.namewildcard
  • python* corpus 19 (elastic 19)
field:"parent_process_basename" kind:wildcard value:"python*"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argswildcard*/lib/python*/site-packages/pip, */lib/python*/site-packages/pipenv/*, /Users/*/.platformio/packages/*, */lib/python*/site-packages/pip/*, /Applications/*, /private/var/folders/*excludes:process.args

Suspicious System Commands Executed by Previously Unknown Executable

#
Status
production
Severity
low
Time window
9m
Group by
process.parent.name
Author
Elastic
Source
github.com/elastic/detection-rules

This rule monitors for the execution of several commonly used system commands executed by a previously unknown executable located in commonly abused directories. An alert from this rule can indicate the presence of potentially malicious activity, such as the execution of unauthorized or suspicious processes attempting to run malicious code. Detecting and investigating such behavior can help identify and mitigate potential security threats, protecting the system and its data from potential compromise.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2023/06/14"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/03/24"

[rule]
author = ["Elastic"]
description = """
This rule monitors for the execution of several commonly used system commands executed by a previously unknown
executable located in commonly abused directories. An alert from this rule can indicate the presence of potentially
malicious activity, such as the execution of unauthorized or suspicious processes attempting to run malicious code.
Detecting and investigating such behavior can help identify and mitigate potential security threats, protecting the
system and its data from potential compromise.
"""
from = "now-9m"
index = ["logs-endpoint.events.*", "endgame-*"]
language = "kuery"
license = "Elastic License v2"
name = "Suspicious System Commands Executed by Previously Unknown Executable"
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 System Commands Executed by Previously Unknown Executable

In Linux environments, system commands are essential for managing processes and configurations. Adversaries exploit this by executing commands via unknown executables in vulnerable directories, aiming to run unauthorized code. The detection rule identifies such anomalies by monitoring command executions from unfamiliar sources, excluding known safe processes, thus highlighting potential threats for further investigation.

### Possible investigation steps

- Review the process.executable path to determine if it is located in a commonly abused directory such as /tmp, /dev/shm, or /var/tmp, which may indicate malicious intent.
- Examine the process.args to identify which specific system command was executed (e.g., hostname, id, ifconfig) and assess whether its execution is typical for the system's normal operations.
- Check the process.parent.executable to understand the parent process that initiated the suspicious command execution, ensuring it is not a known safe process or a legitimate system service.
- Investigate the user account associated with the process to determine if it has the necessary permissions and if the activity aligns with the user's typical behavior.
- Correlate the event with other logs or alerts from the same host to identify any patterns or additional suspicious activities that may indicate a broader compromise.
- Assess the risk score and severity in the context of the environment to prioritize the investigation and response efforts accordingly.

### False positive analysis

- System maintenance scripts or automated tasks may trigger alerts if they execute common system commands from directories like /tmp or /var/tmp. To handle this, identify these scripts and add their executables to the exclusion list.
- Custom user scripts that perform routine checks using commands like ls or ps might be flagged. Review these scripts and consider adding their paths to the known safe processes to prevent unnecessary alerts.
- Development or testing environments often use temporary executables in directories such as /dev/shm. If these are known and non-threatening, include their paths in the exception list to reduce false positives.
- Some monitoring tools or agents might execute commands like uptime or whoami from non-standard locations. Verify these tools and update the exclusion criteria to include their executables or parent processes.
- In environments with containerized applications, processes running from /run/containerd or similar paths might be incorrectly flagged. Ensure these paths are accounted for in the exclusion settings if they are part of legitimate operations.

### Response and remediation

- Isolate the affected system from the network to prevent further unauthorized access or lateral movement by the adversary.
- Terminate any suspicious processes identified by the alert, especially those originating from unknown executables in commonly abused directories.
- Conduct a thorough review of the affected directories (e.g., /tmp, /var/tmp, /dev/shm) to identify and remove any unauthorized or malicious files or executables.
- Restore any altered system configurations or files from a known good backup to ensure system integrity.
- Implement stricter access controls and permissions on the directories identified in the alert to prevent unauthorized executable placement.
- Monitor the system for any signs of persistence mechanisms, such as cron jobs or startup scripts, and remove any that are unauthorized.
- Escalate the incident to the security operations team for further analysis and to determine if additional systems may be compromised."""
risk_score = 21
rule_id = "e9001ee6-2d00-4d2f-849e-b8b1fb05234c"
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 = "low"
tags = [
    "Domain: Endpoint",
    "OS: Linux",
    "Use Case: Threat Detection",
    "Tactic: Execution",
    "Data Source: Elastic Endgame",
    "Data Source: Elastic Defend",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
host.os.type:linux and event.category:process and event.action:(exec or exec_event or fork or fork_event) and
process.executable:(* and (
  /etc/crontab or /bin/* or /boot/* or /dev/shm/* or /etc/cron.*/* or /etc/init.d/* or /etc/rc*.d/* or /etc/update-motd.d/* or
  /home/*/.* or /tmp/* or /usr/bin/* or /usr/lib/update-notifier/* or /usr/share/* or /var/tmp/* or /sbin/* or /usr/sbin/* or
  /usr/local/sbin/* or /usr/local/bin/* or /var/lib/* or /var/run/* or /var/cache/* or /var/log/* or /dev/shm/* or /var/tmp/*
) and not /tmp/go-build*) and
process.args:(hostname or id or ifconfig or ls or netstat or ps or pwd or route or top or uptime or whoami) and
not (process.name:
  (apt or dnf or docker or dockerd or dpkg or hostname or id or ls or netstat or ps or pwd or rpm or snap or
  snapd or sudo or top or uptime or which or whoami or yum or sh or bash or ip or dash or find or podman or env or
  busybox or aws or timeout or nmcli or dpkg-query or nsenter or pw-cli or node or npm or gnome-calculator or pidof or
  steamerrorreporter or ssh or grep or xargs or apt-get or numactl or entrypoint or flatpak-spawn or logger or command or
  login or sshpass or docker-compose or whereis or rbd or basename or ifconfig or tar or crictl or su) or
process.parent.executable:(
  /opt/cassandra/bin/cassandra or /opt/nessus/sbin/nessusd or /opt/nessus_agent/sbin/nessus-agent-module or /opt/puppetlabs/puppet/bin/puppet or
  /opt/puppetlabs/puppet/bin/ruby or /usr/libexec/platform-python or /usr/local/cloudamize/bin/CCAgent or /usr/sbin/sshd or /bin/* or
  /etc/network/* or /opt/Elastic/* or /opt/TrendMicro* or /opt/aws/* or /opt/eset/* or /opt/rapid7/* or /run/containerd/* or /run/k3s/* or
  /snap/* or /tmp/dpkg-licenses* or /tmp/newroot/* or /usr/bin/* or /var/lib/amagent/* or /var/lib/docker/* or /vz/* or
  "/usr/sbin/sshd" or "./runc" or "/opt/gitlab/embedded/bin/ruby" or /opt/saltstack/salt/bin/python* or "/usr/lib/rabbitmq/bin/rabbitmqctl"
  ) or
  process.executable:(/run/containerd/* or /srv/snp/docker/* or /tmp/.criu*)
)
'''

[[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 = "T1016"
name = "System Network Configuration Discovery"
reference = "https://attack.mitre.org/techniques/T1016/"

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

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

[[rule.threat.technique]]
id = "T1057"
name = "Process Discovery"
reference = "https://attack.mitre.org/techniques/T1057/"

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

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

[rule.threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"
[rule.new_terms]
field = "new_terms_fields"
value = ["process.parent.name"]

[[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:process and event.action:(exec or exec_event or fork or fork_event) and
process.executable:(* and (
  /etc/crontab or /bin* or /etc/init.d/* or /etc/rc*.d/* or /etc/update-motd.d/* or
  /home/*/.* or /tmp/* or /usr/bin/* or /usr/lib/update-notifier/* or /usr/share/* or /var/tmp/* or /sbin/* or /usr/sbin/* or
  /usr/local/sbin/* or /usr/local/bin/* or /var/lib/* or /var/run/* or /var/cache/* or /var/log/* or /dev/shm/* or /var/tmp/*
) and not /tmp/go-build*) and
process.args:(hostname or id or ifconfig or ls or netstat or ps or pwd or route or top or uptime or whoami) and
not (process.name:
  (apt or dnf or docker or dockerd or dpkg or hostname or id or ls or netstat or ps or pwd or rpm or snap or
  snapd or sudo or top or uptime or which or whoami or yum or sh or bash or ip or dash or find or podman or env or
  busybox or aws or timeout or nmcli or dpkg-query or nsenter or pw-cli or node or npm or gnome-calculator or pidof or
  steamerrorreporter or ssh or grep or xargs or apt-get or numactl or entrypoint or flatpak-spawn or logger or command or
  login or sshpass or docker-compose or whereis or rbd or basename or ifconfig or tar or crictl or su) or
process.parent.executable:(
  /opt/cassandra/bin/cassandra or /opt/nessus/sbin/nessusd or /opt/nessus_agent/sbin/nessus-agent-module or /opt/puppetlabs/puppet/bin/puppet or
  /opt/puppetlabs/puppet/bin/ruby or /usr/libexec/platform-python or /usr/local/cloudamize/bin/CCAgent or /usr/sbin/sshd or /bin/* or
  /etc/network/* or /opt/Elastic/* or /opt/TrendMicro* or /opt/aws/* or /opt/eset/* or /opt/rapid7/* or /run/containerd/* or /run/k3s/* or
  /snap/* or /tmp/dpkg-licenses* or /tmp/newroot/* or /usr/bin/* or /var/lib/amagent/* or /var/lib/docker/* or /vz/* or
  "/usr/sbin/sshd" or "./runc" or "/opt/gitlab/embedded/bin/ruby" or /opt/saltstack/salt/bin/python* or "/usr/lib/rabbitmq/bin/rabbitmqctl"
  ) or
  process.executable:(/run/containerd/* or /srv/snp/docker/* or /tmp/.criu*)
)

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actionin
  • exec
  • exec_event
  • fork
  • fork_event
field:"EventType" kind:in
event.categoryeq
  • process
field:"event.category" kind:eq value:"process"
process.argsin
  • hostname
  • id
  • ifconfig
  • ls
  • netstat
  • ps
  • pwd
  • route
  • top
  • uptime
  • whoami
field:"process.args" kind:in
process.executableeq
  • /etc/crontab
field:"Image" kind:eq value:"/etc/crontab"
process.executableis_not_null
  • (no value, null check)
field:"Image" kind:is_not_null
process.executablewildcard
  • /bin/*
  • /boot/*
  • /dev/shm/*
  • /etc/cron.*/*
  • /etc/init.d/*
  • /etc/rc*.d/*
  • /etc/update-motd.d/*
  • /home/*/.*
  • /sbin/*
  • /tmp/*
  • /usr/bin/*
  • /usr/lib/update-notifier/*
  • /usr/local/bin/*
  • /usr/local/sbin/*
  • /usr/sbin/*
  • /usr/share/*
  • /var/cache/*
  • /var/lib/*
  • /var/log/*
  • /var/run/*
  • /var/tmp/*
field:"Image" kind:wildcard

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.executablestarts_with/run/containerd/excludes:process.executable field:"process.executable" value:"/run/containerd/"
process.executablestarts_with/srv/snp/docker/excludes:process.executable field:"process.executable" value:"/srv/snp/docker/"
process.executablestarts_with/tmp/.criuexcludes:process.executable field:"process.executable" value:"/tmp/.criu"
process.nameinapt, apt-get, aws, basename, bash, busybox, command, crictl, dash, dnf, docker, docker-compose, dockerd, dpkg, dpkg-query, entrypoint, env, find, flatpak-spawn, gnome-calculator, grep, hostname, id, ifconfig, ip, logger, login, ls, netstat, nmcli, node, npm, nsenter, numactl, pidof, podman, ps, pw-cli, pwd, rbd, rpm, sh, snap, snapd, ssh, sshpass, steamerrorreporter, su, sudo, tar, timeout, top, uptime, whereis, which, whoami, xargs, yumexcludes:process.name
process.parent.executableeq./runcexcludes:process.parent.executable field:"process.parent.executable" value:"./runc"
process.parent.executableeq/opt/cassandra/bin/cassandraexcludes:process.parent.executable field:"process.parent.executable" value:"/opt/cassandra/bin/cassandra"
process.parent.executableeq/opt/gitlab/embedded/bin/rubyexcludes:process.parent.executable field:"process.parent.executable" value:"/opt/gitlab/embedded/bin/ruby"
process.parent.executableeq/opt/nessus/sbin/nessusdexcludes:process.parent.executable field:"process.parent.executable" value:"/opt/nessus/sbin/nessusd"
process.parent.executableeq/opt/nessus_agent/sbin/nessus-agent-moduleexcludes:process.parent.executable field:"process.parent.executable" value:"/opt/nessus_agent/sbin/nessus-agent-module"
process.parent.executableeq/opt/puppetlabs/puppet/bin/puppetexcludes:process.parent.executable field:"process.parent.executable" value:"/opt/puppetlabs/puppet/bin/puppet"
process.parent.executableeq/opt/puppetlabs/puppet/bin/rubyexcludes:process.parent.executable field:"process.parent.executable" value:"/opt/puppetlabs/puppet/bin/ruby"
process.parent.executableeq/usr/lib/rabbitmq/bin/rabbitmqctlexcludes:process.parent.executable field:"process.parent.executable" value:"/usr/lib/rabbitmq/bin/rabbitmqctl"
process.parent.executableeq/usr/libexec/platform-pythonexcludes:process.parent.executable field:"process.parent.executable" value:"/usr/libexec/platform-python"
process.parent.executableeq/usr/local/cloudamize/bin/CCAgentexcludes:process.parent.executable field:"process.parent.executable" value:"/usr/local/cloudamize/bin/CCAgent"
process.parent.executableeq/usr/sbin/sshdexcludes:process.parent.executable field:"process.parent.executable" value:"/usr/sbin/sshd"
process.parent.executablestarts_with/bin/excludes:process.parent.executable field:"process.parent.executable" value:"/bin/"
process.parent.executablestarts_with/etc/network/excludes:process.parent.executable field:"process.parent.executable" value:"/etc/network/"
process.parent.executablestarts_with/opt/Elastic/excludes:process.parent.executable field:"process.parent.executable" value:"/opt/Elastic/"
process.parent.executablestarts_with/opt/TrendMicroexcludes:process.parent.executable field:"process.parent.executable" value:"/opt/TrendMicro"
process.parent.executablestarts_with/opt/aws/excludes:process.parent.executable field:"process.parent.executable" value:"/opt/aws/"
process.parent.executablestarts_with/opt/eset/excludes:process.parent.executable field:"process.parent.executable" value:"/opt/eset/"
process.parent.executablestarts_with/opt/rapid7/excludes:process.parent.executable field:"process.parent.executable" value:"/opt/rapid7/"
process.parent.executablestarts_with/opt/saltstack/salt/bin/pythonexcludes:process.parent.executable field:"process.parent.executable" value:"/opt/saltstack/salt/bin/python"
process.parent.executablestarts_with/run/containerd/excludes:process.parent.executable field:"process.parent.executable" value:"/run/containerd/"
process.parent.executablestarts_with/run/k3s/excludes:process.parent.executable field:"process.parent.executable" value:"/run/k3s/"
process.parent.executablestarts_with/snap/excludes:process.parent.executable field:"process.parent.executable" value:"/snap/"
process.parent.executablestarts_with/tmp/dpkg-licensesexcludes:process.parent.executable field:"process.parent.executable" value:"/tmp/dpkg-licenses"
process.parent.executablestarts_with/tmp/newroot/excludes:process.parent.executable field:"process.parent.executable" value:"/tmp/newroot/"
process.parent.executablestarts_with/usr/bin/excludes:process.parent.executable field:"process.parent.executable" value:"/usr/bin/"
process.parent.executablestarts_with/var/lib/amagent/excludes:process.parent.executable field:"process.parent.executable" value:"/var/lib/amagent/"
process.parent.executablestarts_with/var/lib/docker/excludes:process.parent.executable field:"process.parent.executable" value:"/var/lib/docker/"
process.parent.executablestarts_with/vz/excludes:process.parent.executable field:"process.parent.executable" value:"/vz/"
process.executablestarts_with/tmp/go-buildexcludes:process.executable field:"process.executable" value:"/tmp/go-build"

Suspicious TCC Access Granted for User Folders

#
Status
production
Severity
high
Time window
9m
Group by
Effective_process.entity_id, Effective_process.executable, host.name, user.name
Author
Elastic
Source
github.com/elastic/detection-rules

Detects when TCC access is granted for multiple user folders like Desktop, Downloads and Documents in quick succession. Many information stealers require TCC permissions to access these locations and will prompt users to grant access for data exfiltration.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2026/01/30"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/03/24"

[rule]
author = ["Elastic"]
description = """
Detects when TCC access is granted for multiple user folders like Desktop, Downloads and Documents 
in quick succession. Many information stealers require TCC permissions to access these locations and 
will prompt users to grant access for data exfiltration.
"""
from = "now-9m"
language = "esql"
license = "Elastic License v2"
name = "Suspicious TCC Access Granted for User Folders"
risk_score = 73
rule_id = "ffd8b5e9-aa63-42b3-aead-6fdb170da9a3"
severity = "high"
tags = [
    "Domain: Endpoint",
    "OS: macOS",
    "Use Case: Threat Detection",
    "Tactic: Defense Evasion",
    "Tactic: Collection",
    "Data Source: Elastic Defend",
    "Resources: Investigation Guide"
]
type = "esql"
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 TCC Access Granted for User Folders

The Transparency, Consent, and Control (TCC) framework is macOS's privacy protection mechanism that controls application access to sensitive resources like the Desktop, Documents, and Downloads folders. Threat actors may manipulate the TCC database to grant unauthorized access to these protected locations, enabling data theft without triggering user consent prompts. This detection rule identifies when scripting interpreters or command-line tools create multiple TCC permission grants in rapid succession, indicating potential automated TCC manipulation.

### Possible investigation steps

- Review the Effective_process.name and Effective_process.executable fields to identify which process is creating TCC permission grants and assess whether this is expected behavior.
- Examine the Tcc.service values to understand which protected folders (Desktop, Documents, Downloads) were granted access and evaluate the sensitivity of data in those locations.
- Investigate the Effective_process.parent.executable and command_line to trace how the TCC-modifying process was launched and identify the initial execution vector.
- Review the timing and count of TCC grants to determine if this is an automated batch operation characteristic of malicious activity.
- Check the TCC.db database directly using sqlite3 to review all permission grants and identify any unauthorized entries.
- Correlate with file access events to determine if the granted permissions were subsequently used to access sensitive data.
- Review the user.name associated with the activity and verify whether they would have legitimate reasons to grant these permissions.

### False positive analysis

- Legitimate applications during first launch or installation may request TCC access, but typically through standard user prompts rather than direct database modification. Verify if application installation was expected.
- Enterprise MDM solutions may configure TCC permissions during device setup or policy enforcement. Confirm with IT operations if MDM deployments were scheduled.
- Automation and scripting workflows may require TCC access for legitimate file operations. Review with the script owner to confirm legitimacy.
- System administration tasks may involve TCC manipulation for specific operational requirements. Verify with IT staff before dismissing.

### Response and remediation

- Immediately revoke the unauthorized TCC access grants by removing the malicious entries from the TCC.db database or resetting TCC permissions for the affected application.
- Terminate the suspicious process that created the TCC grants and prevent it from restarting.
- Isolate the affected macOS system to prevent potential data exfiltration using the newly granted permissions.
- Conduct a forensic review of file access events to determine if sensitive data was accessed using the unauthorized TCC permissions.
- Scan the system for additional malware, persistence mechanisms, or indicators of compromise.
- Reset TCC permissions to their default state using tccutil reset or by deleting and recreating the TCC.db database.
- Review other systems in the environment for similar TCC manipulation activity.
- Escalate to the incident response team for comprehensive investigation if data theft is suspected.
"""
query = '''
FROM logs-endpoint.events.*
| WHERE host.os.type == "macos" 
    AND event.action == "tcc_modify" 
    AND Tcc.right == "allowed"
    AND Tcc.update_type == "create"
    AND Tcc.service IN ("SystemPolicyDocumentsFolder", "SystemPolicyDownloadsFolder", "SystemPolicyDesktopFolder")
    AND Effective_process.name RLIKE "(bash|zsh|sh|osascript|python.*|perl.*|ruby.*|node|Terminal|iTerm2|ghostty)"
| STATS 
    Esql.grant_count = COUNT(*),
    Esql.unique_folders = COUNT_DISTINCT(Tcc.service),  
    Esql.folders = VALUES(Tcc.service)
  BY Effective_process.entity_id, Effective_process.executable, host.name, user.name
| WHERE Esql.unique_folders >= 2
| KEEP Esql.*, Effective_process.entity_id, Effective_process.executable, host.name, user.name
'''

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

[[rule.threat.technique]]
id = "T1548"
name = "Abuse Elevation Control Mechanism"
reference = "https://attack.mitre.org/techniques/T1548/"

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

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

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

[[rule.threat.technique]]
id = "T1005"
name = "Data from Local System"
reference = "https://attack.mitre.org/techniques/T1005/"

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

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

[[rule.threat.technique]]
id = "T1548"
name = "Abuse Elevation Control Mechanism"
reference = "https://attack.mitre.org/techniques/T1548/"

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

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

Stages and Predicates

Stage 1: from

FROM logs-endpoint.events.*

Stage 2: where

| WHERE host.os.type == "macos" 
    AND event.action == "tcc_modify" 
    AND Tcc.right == "allowed"
    AND Tcc.update_type == "create"
    AND Tcc.service IN ("SystemPolicyDocumentsFolder", "SystemPolicyDownloadsFolder", "SystemPolicyDesktopFolder")
    AND Effective_process.name RLIKE "(bash|zsh|sh|osascript|python.*|perl.*|ruby.*|node|Terminal|iTerm2|ghostty)"

Stage 3: stats

| STATS 
    Esql.grant_count = COUNT(*),
    Esql.unique_folders = COUNT_DISTINCT(Tcc.service),  
    Esql.folders = VALUES(Tcc.service)
  BY Effective_process.entity_id, Effective_process.executable, host.name, user.name

Stage 4: where

| WHERE Esql.unique_folders >= 2

Stage 5: keep

| KEEP Esql.*, Effective_process.entity_id, Effective_process.executable, host.name, user.name

Indicators

These rows show field, operator, and value matches.

Output Fields

These fields are emitted when the rule matches.

FieldSource
Esql.*KEEP Esql.*
Effective_process.entity_idKEEP Effective_process.entity_id
Effective_process.executableKEEP Effective_process.executable
host.nameKEEP host.name
user.nameKEEP user.name

Suspicious WerFault Child Process

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

A suspicious WerFault child process was detected, which may indicate an attempt to run via the SilentProcessExit registry key manipulation. Verify process details such as command line, network connections and file writes.

Known False Positives

  • Custom Windows error reporting debugger or applications restarted by WerFault after a crash.

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

[metadata]
creation_date = "2020/08/24"
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender"]
maturity = "production"
updated_date = "2026/05/04"

[rule]
author = ["Elastic"]
description = """
A suspicious WerFault child process was detected, which may indicate an attempt to run via the SilentProcessExit
registry key manipulation. Verify process details such as command line, network connections and file writes.
"""
false_positives = ["Custom Windows error reporting debugger or applications restarted by WerFault after a crash."]
from = "now-9m"
index = [
    "winlogbeat-*",
    "logs-endpoint.events.process-*",
    "logs-windows.sysmon_operational-*",
    "endgame-*",
    "logs-sentinel_one_cloud_funnel.*",
    "logs-m365_defender.event-*",
]
language = "eql"
license = "Elastic License v2"
name = "Suspicious WerFault Child 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 Suspicious WerFault Child Process

WerFault.exe is a Windows error reporting tool that handles application crashes. Adversaries may exploit it by manipulating the SilentProcessExit registry key to execute malicious processes stealthily. The detection rule identifies unusual child processes of WerFault.exe, focusing on specific command-line arguments indicative of this abuse, while excluding known legitimate executables, thus highlighting potential threats.

### Possible investigation steps

- Review the command line arguments of the suspicious child process to confirm the presence of "-s", "-t", and "-c" flags, which indicate potential abuse of the SilentProcessExit mechanism.
- Examine the process executable path to ensure it is not one of the known legitimate executables ("?:\\Windows\\SysWOW64\\Initcrypt.exe", "?:\\Program Files (x86)\\Heimdal\\Heimdal.Guard.exe") that are excluded from the detection rule.
- Investigate the network connections established by the suspicious process to identify any unusual or unauthorized external communications.
- Analyze file writes and modifications made by the process to detect any unauthorized changes or potential indicators of compromise.
- Check the parent process tree to understand the context of how WerFault.exe was invoked and identify any preceding suspicious activities or processes.
- Correlate the event with other security alerts or logs from data sources like Elastic Endgame, Elastic Defend, Microsoft Defender XDR, Sysmon, or SentinelOne to gather additional context and assess the scope of the potential threat.

### False positive analysis

- Legitimate software updates or installations may trigger WerFault.exe with command-line arguments similar to those used in the SilentProcessExit mechanism. Users should verify the digital signature of the executable and check if it aligns with known update processes.
- Security software or system management tools might use WerFault.exe for legitimate purposes. Users can create exceptions for these known tools by adding their executables to the exclusion list in the detection rule.
- Custom scripts or enterprise applications that utilize WerFault.exe for error handling could be flagged. Review the process details and, if verified as non-threatening, add these scripts or applications to the exclusion list.
- Frequent occurrences of the same process being flagged can indicate a benign pattern. Users should monitor these patterns and, if consistently verified as safe, update the rule to exclude these specific processes.

### Response and remediation

- Isolate the affected system from the network to prevent further potential malicious activity and lateral movement.
- Terminate the suspicious child process of WerFault.exe immediately to halt any ongoing malicious actions.
- Conduct a thorough review of the SilentProcessExit registry key to identify and remove any unauthorized entries that may have been used to execute the malicious process.
- Restore any altered or deleted files from a known good backup to ensure system integrity and recover any lost data.
- Update and run a full antivirus and anti-malware scan on the affected system to detect and remove any additional threats or remnants of the attack.
- Monitor network traffic and system logs for any signs of persistence mechanisms or further attempts to exploit the SilentProcessExit mechanism.
- Escalate the incident to the security operations center (SOC) or incident response team for further analysis and to determine if additional systems are affected."""
references = [
    "https://www.hexacorn.com/blog/2019/09/19/silentprocessexit-quick-look-under-the-hood/",
    "https://www.hexacorn.com/blog/2019/09/20/werfault-command-line-switches-v0-1/",
    "https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/blob/master/Persistence/persistence_SilentProcessExit_ImageHijack_sysmon_13_1.evtx",
    "http://web.archive.org/web/20230530011556/https://blog.menasec.net/2021/01/",
]
risk_score = 47
rule_id = "ac5012b8-8da8-440b-aaaf-aedafdea2dff"
severity = "medium"
tags = [
    "Domain: Endpoint",
    "OS: Windows",
    "Use Case: Threat Detection",
    "Tactic: Defense Evasion",
    "Tactic: Persistence",
    "Tactic: Privilege Escalation",
    "Data Source: Elastic Endgame",
    "Data Source: Elastic Defend",
    "Data Source: Microsoft Defender XDR",
    "Data Source: Sysmon",
    "Data Source: SentinelOne",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
process where host.os.type == "windows" and event.type == "start" and

  process.parent.name : "WerFault.exe" and

  /* args -s and -t used to execute a process via SilentProcessExit mechanism */
  (process.parent.args : "-s" and process.parent.args : "-t" and process.parent.args : "-c") and

  not process.executable : ("?:\\Windows\\SysWOW64\\Initcrypt.exe", "?:\\Program Files (x86)\\Heimdal\\Heimdal.Guard.exe")
'''

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:

- [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)
"""


[[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/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1546"
name = "Event Triggered Execution"
reference = "https://attack.mitre.org/techniques/T1546/"
[[rule.threat.technique.subtechnique]]
id = "T1546.012"
name = "Image File Execution Options Injection"
reference = "https://attack.mitre.org/techniques/T1546/012/"



[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1546"
name = "Event Triggered Execution"
reference = "https://attack.mitre.org/techniques/T1546/"
[[rule.threat.technique.subtechnique]]
id = "T1546.012"
name = "Image File Execution Options Injection"
reference = "https://attack.mitre.org/techniques/T1546/012/"



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

Stages and Predicates

Stage 1: process

process where host.os.type == "windows" and event.type == "start" and
  process.parent.name : "WerFault.exe" and
  (process.parent.args : "-s" and process.parent.args : "-t" and process.parent.args : "-c") and
  not process.executable : ("?:\\Windows\\SysWOW64\\Initcrypt.exe", "?:\\Program Files (x86)\\Heimdal\\Heimdal.Guard.exe")

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.typeeq
  • start corpus 1036 (elastic 1036)
field:"event.type" kind:eq value:"start"
process.parent.argswildcard
  • -c corpus 3 (elastic 3)
  • -s
  • -t
field:"process.parent.args" kind:wildcard
process.parent.namewildcard
  • WerFault.exe corpus 2 (elastic 2)
field:"parent_process_basename" kind:wildcard value:"WerFault.exe"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.executableeq?:\Windows\SysWOW64\Initcrypt.exe, ?:\Program Files (x86)\Heimdal\Heimdal.Guard.exeexcludes:process.executable field:"process.executable" value:"?:\Windows\SysWOW64\Initcrypt.exe" field:"process.executable" value:"?:\Program Files (x86)\Heimdal\Heimdal.Guard.exe"

Suspicious Windows API Call from Virtual Disk or USB

#
Time window
2m
Sequence by
process.entity_id
Source
github.com/elastic/protections-artifacts

Identifies calls to Memory injection related Windows APIs from a process executing from a mounted virtual disk or a removable device. This may indicate an attempt to get initial access via malicious ISO or USB devices.

MITRE ATT&CK Coverage

TacticTechniques
Stealth

Rule Body

[rule]
description = """
Identifies calls to Memory injection related Windows APIs from a process executing from a mounted virtual disk or a
removable device. This may indicate an attempt to get initial access via malicious ISO or USB devices.
"""
id = "9d5f965f-6f77-45df-9733-8707e40d1d71"
license = "Elastic License v2"
name = "Suspicious Windows API Call from Virtual Disk or USB"
os_list = ["windows"]
reference = ["https://www.elastic.co/security-labs/doubling-down-etw-callstacks"]
version = "1.0.19"

query = '''
sequence by process.entity_id with maxspan=2m
[process where event.action == "start" and
   process.Ext.device.product_id like ("Virtual DVD-ROM", "Virtual Disk", "USB *") and
   not process.executable : "C:\\*" and not process.Ext.device.nt_name: "\\Device\\HarddiskVolume*" and 
   not process.Ext.device.vendor_id == "Citrix" and 
   not (process.code_signature.subject_name in ("Veeam Software Group GmbH", "VMware, Inc.") and process.code_signature.trusted == true) and
   not (process.executable : "?:\\FirefoxPortable\\App\\Firefox\\firefox.exe" and 
        process.code_signature.subject_name == "Mozilla Corporation" and process.code_signature.trusted == true)]
[api where event.category == "intrusion_detection" and
  process.Ext.api.behaviors in ("shellcode", "allocate_shellcode", "execute_shellcode") and
  not process.Ext.api.name in ("SetWindowsHookEx", "NtQueueApcThread") and process.Ext.api.parameters.size > 4096 and
  not process.Ext.api.summary like
                      ("VirtualProtect( user32.dll,*)",
                       "VirtualProtect( clr.dll,*",
                       "VirtualProtect( mscorwks.dll,*",
                       "VirtualProtect( pidgenx.dll,*",
                       "VirtualProtect( sop_check.dll,*",
                       "VirtualProtect( 7-zip.dll,*",
                       "VirtualProtect( umppc*",
                       "VirtualProtect( brc???.tmp,*") and
  not _arraysearch(process.thread.Ext.call_stack, $entry,
                   $entry.protection_provenance like ("Kernel", "Kernel|*", "hmpalert.dll", "bdhkm32.dll", "tmmon.dll", "ftapihook32.dll")) and
  not process.thread.Ext.call_stack_summary like
        ("ntdll.dll|Unknown|umppc*.dll|ntdll.dll",
         "ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|wow64cpu.dll|wow64.dll|ntdll.dll|kernelbase.dll|ftapihook32.dll|ntdll.dll|kernelbase.dll|ntdll.dll")]
'''

min_endpoint_version = "8.8.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.8.0"

Stages and Predicates

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

Stage 1: process

[process where event.action == "start" and
   process.Ext.device.product_id like ("Virtual DVD-ROM", "Virtual Disk", "USB *") and
   not process.executable : "C:\\*" and not process.Ext.device.nt_name: "\\Device\\HarddiskVolume*" and 
   not process.Ext.device.vendor_id == "Citrix" and 
   not (process.code_signature.subject_name in ("Veeam Software Group GmbH", "VMware, Inc.") and process.code_signature.trusted == true) and
   not (process.executable : "?:\\FirefoxPortable\\App\\Firefox\\firefox.exe" and 
        process.code_signature.subject_name == "Mozilla Corporation" and process.code_signature.trusted == true)]

Stage 2: api

[api where event.category == "intrusion_detection" and
  process.Ext.api.behaviors in ("shellcode", "allocate_shellcode", "execute_shellcode") and
  not process.Ext.api.name in ("SetWindowsHookEx", "NtQueueApcThread") and process.Ext.api.parameters.size > 4096 and
  not process.Ext.api.summary like
                      ("VirtualProtect( user32.dll,*)",
                       "VirtualProtect( clr.dll,*",
                       "VirtualProtect( mscorwks.dll,*",
                       "VirtualProtect( pidgenx.dll,*",
                       "VirtualProtect( sop_check.dll,*",
                       "VirtualProtect( 7-zip.dll,*",
                       "VirtualProtect( umppc*",
                       "VirtualProtect( brc???.tmp,*") and
  not _arraysearch(process.thread.Ext.call_stack, $entry,
                   $entry.protection_provenance like ("Kernel", "Kernel|*", "hmpalert.dll", "bdhkm32.dll", "tmmon.dll", "ftapihook32.dll")) and
  not process.thread.Ext.call_stack_summary like
        ("ntdll.dll|Unknown|umppc*.dll|ntdll.dll",
         "ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|wow64cpu.dll|wow64.dll|ntdll.dll|kernelbase.dll|ftapihook32.dll|ntdll.dll|kernelbase.dll|ntdll.dll")]

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 388 (elastic 388)
field:"EventType" kind:eq value:"start"
event.categoryeq
  • intrusion_detection corpus 2 (elastic 2)
field:"event.category" kind:eq value:"intrusion_detection"
process.Ext.api.behaviorsin
  • allocate_shellcode corpus 15 (elastic 15)
  • execute_shellcode corpus 10 (elastic 10)
  • shellcode corpus 15 (elastic 15)
field:"process.Ext.api.behaviors" kind:in
process.Ext.api.parameters.sizegt
  • 4096 transforms: number corpus 5 (elastic 5)
field:"process.Ext.api.parameters.size" kind:gt value:"4096"
process.Ext.device.product_idwildcard
  • USB *
  • Virtual DVD-ROM
  • Virtual Disk
field:"process.Ext.device.product_id" kind:wildcard

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.code_signature.subject_nameeqMozilla Corporationexcludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Mozilla Corporation"
process.code_signature.trustedeqtrueexcludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true"
process.executableeq?:\FirefoxPortable\App\Firefox\firefox.exeexcludes:process.executable field:"process.executable" value:"?:\FirefoxPortable\App\Firefox\firefox.exe"
process.code_signature.subject_nameinVMware, Inc., Veeam Software Group GmbHexcludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"VMware, Inc." field:"process.code_signature.subject_name" value:"Veeam Software Group GmbH"
process.Ext.device.nt_namestarts_with\Device\HarddiskVolumeexcludes:process.Ext.device.nt_name field:"process.Ext.device.nt_name" value:"\Device\HarddiskVolume"
process.Ext.device.vendor_ideqCitrixexcludes:process.Ext.device.vendor_id field:"process.Ext.device.vendor_id" value:"Citrix"
process.executablestarts_withC:\excludes:process.executable field:"process.executable" value:"C:\"
process.thread.Ext.call_stackarray_any(no value, null check)excludes:process.thread.Ext.call_stack
process.Ext.api.nameinNtQueueApcThread, SetWindowsHookExexcludes:process.Ext.api.name field:"process.Ext.api.name" value:"NtQueueApcThread" field:"process.Ext.api.name" value:"SetWindowsHookEx"
process.Ext.api.summarywildcardVirtualProtect( user32.dll,*), VirtualProtect( clr.dll,*, VirtualProtect( mscorwks.dll,*, VirtualProtect( pidgenx.dll,*, VirtualProtect( sop_check.dll,*, VirtualProtect( 7-zip.dll,*, VirtualProtect( umppc*, VirtualProtect( brc???.tmp,*excludes:process.Ext.api.summary
process.thread.Ext.call_stack_summarywildcardntdll.dll|Unknown|umppc*.dll|ntdll.dll, ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|wow64cpu.dll|wow64.dll|ntdll.dll|kernelbase.dll|ftapihook32.dll|ntdll.dll|kernelbase.dll|ntdll.dllexcludes:process.thread.Ext.call_stack_summary field:"process.thread.Ext.call_stack_summary" value:"ntdll.dll|Unknown|umppc*.dll|ntdll.dll" field:"process.thread.Ext.call_stack_summary" value:"ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|wow64cpu.dll|wow64.dll|ntdll.dll|kernelbase.dll|ftapihook32.dll|ntdll.dll|kernelbase.dll|ntdll.dll"

Unusual Remote File Size

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

A machine learning job has detected an unusually high file size shared by a remote host indicating potential lateral movement activity. One of the primary goals of attackers after gaining access to a network is to locate and exfiltrate valuable information. Instead of multiple small transfers that can raise alarms, attackers might choose to bundle data into a single large file transfer.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2023/10/12"
integration = ["lmd", "endpoint"]
maturity = "production"
updated_date = "2026/07/27"
min_stack_version = "9.4.0"
min_stack_comments = "Use EA (Entity Analytics) fields"

[rule]
anomaly_threshold = 70
author = ["Elastic"]
description = """
A machine learning job has detected an unusually high file size shared by a remote host indicating potential lateral
movement activity. One of the primary goals of attackers after gaining access to a network is to locate and exfiltrate
valuable information. Instead of multiple small transfers that can raise alarms, attackers might choose to bundle data
into a single large file transfer.
"""
from = "now-90m"
interval = "15m"
license = "Elastic License v2"
machine_learning_job_id = "lmd_high_file_size_remote_file_transfer_ea"
name = "Unusual Remote File Size"
references = [
    "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html",
    "https://docs.elastic.co/en/integrations/lmd",
    "https://www.elastic.co/blog/detecting-lateral-movement-activity-a-new-kibana-integration",
    "https://www.elastic.co/blog/remote-desktop-protocol-connections-elastic-security",
]
risk_score = 21
rule_id = "0678bc9c-b71a-433b-87e6-2f664b6b3131"
setup = """## Setup

This rule requires the `host.ip` field to be populated.
For **Elastic Defend** events on versions **8.18 and above**, this field is **disabled by default**.

If you are using **Elastic Defend**, ensure host IP collection is enabled by following the configuration steps in the
[helper guide](https://www.elastic.co/docs/solutions/security/configure-elastic-defend/configure-data-volume-for-elastic-endpoint#host-fields).

The rule requires the Lateral Movement Detection integration assets to be installed, as well as file and Windows RDP process events collected by the Elastic Defend integration.

### Lateral Movement Detection Setup
The Lateral Movement Detection integration detects lateral movement activity by identifying abnormalities in file and Windows RDP events. Anomalies are detected using Elastic's Anomaly Detection feature.

#### Prerequisite Requirements:
- Fleet is required for Lateral Movement Detection.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
- File 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 Lateral Movement Detection integration:
- Go to the Kibana homepage. Under Management, click Integrations.
- In the query bar, search for Lateral Movement Detection and select the integration to see more details about it.
- Follow the instructions under the **Installation** section.
- For this rule to work, complete the instructions through **Add preconfigured anomaly detection jobs**.
"""
severity = "low"
tags = [
    "Data Source: Elastic Defend",
    "Use Case: Lateral Movement Detection",
    "Rule Type: ML",
    "Rule Type: Machine Learning",
    "Tactic: Lateral Movement",
    "Resources: Investigation Guide",
]
type = "machine_learning"
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 Unusual Remote File Size
Machine learning models in security environments analyze file transfer patterns to identify anomalies, such as unusually large files shared remotely. Adversaries exploit this by aggregating data into large files to avoid detection during lateral movement. The 'Unusual Remote File Size' rule leverages ML to flag these anomalies, aiding in early detection of potential data exfiltration activities.

### Possible investigation steps

- Review the alert details to identify the specific remote host and file size involved in the anomaly.
- Check the historical file transfer patterns of the identified remote host to determine if this large file size is truly unusual.
- Investigate the contents and purpose of the large file, if accessible, to assess whether it contains sensitive or valuable information.
- Analyze network logs to trace the origin and destination of the file transfer, looking for any unauthorized or suspicious connections.
- Correlate the event with other security alerts or logs to identify any concurrent suspicious activities that might indicate lateral movement or data exfiltration.
- Verify the user account associated with the file transfer to ensure it has not been compromised or misused.

### False positive analysis

- Large file transfers related to legitimate business operations, such as backups or data migrations, can trigger false positives. Users should identify and whitelist these routine activities to prevent unnecessary alerts.
- Software updates or patches distributed across the network may also appear as unusually large file transfers. Establishing a baseline for expected file sizes during these updates can help in distinguishing them from potential threats.
- Remote file sharing services used for collaboration might generate alerts if large files are shared frequently. Monitoring and excluding these services from the rule can reduce false positives.
- Automated data processing tasks that involve transferring large datasets between systems should be documented and excluded from the rule to avoid false alarms.
- Regularly review and update the list of known safe hosts and services that are permitted to transfer large files, ensuring that only legitimate activities are excluded from detection.

### Response and remediation

- Isolate the affected host immediately to prevent further lateral movement and potential data exfiltration. Disconnect it from the network to contain the threat.
- Conduct a thorough analysis of the large file transfer to determine its contents and origin. Verify if sensitive data was included and assess the potential impact.
- Review and terminate any unauthorized remote sessions or connections identified during the investigation to prevent further exploitation.
- Reset credentials and review access permissions for the affected host and any associated accounts to mitigate the risk of compromised credentials being used for further attacks.
- Implement network segmentation to limit the ability of attackers to move laterally within the network, reducing the risk of similar incidents in the future.
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to ensure comprehensive remediation actions are taken.
- Enhance monitoring and logging for unusual file transfer activities and remote access attempts to improve early detection of similar threats in the future."""
[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1210"
name = "Exploitation of Remote Services"
reference = "https://attack.mitre.org/techniques/T1210/"

[[rule.threat.technique]]
id = "T1570"
name = "Lateral Tool Transfer"
reference = "https://attack.mitre.org/techniques/T1570/"

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

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

[[rule.threat.technique]]
id = "T1039"
name = "Data from Network Shared Drive"
reference = "https://attack.mitre.org/techniques/T1039/"

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

Windows Server Update Service Spawning Suspicious Processes

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

Identifies suspicious processes being spawned by the Windows Server Update Service. This activity may indicate exploitation activity or access to an existing web shell backdoor.

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

[metadata]
creation_date = "2025/10/24"
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2026/05/03"

[rule]
author = ["Elastic"]
description = """
Identifies suspicious processes being spawned by the Windows Server Update Service.
This activity may indicate exploitation activity or access to an existing web shell backdoor.
"""
from = "now-9m"
index = [
    "logs-endpoint.events.process-*",
    "winlogbeat-*",
    "logs-windows.sysmon_operational-*",
    "endgame-*",
    "logs-m365_defender.event-*",
    "logs-sentinel_one_cloud_funnel.*",
]
language = "eql"
license = "Elastic License v2"
name = "Windows Server Update Service Spawning Suspicious Processes"
references = [
    "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-59287",
    "https://hawktrace.com/blog/CVE-2025-59287"
]
risk_score = 73
rule_id = "1ac027c2-8c60-4715-af73-927b9c219e20"
severity = "high"
tags = [
    "Domain: Endpoint",
    "OS: Windows",
    "Use Case: Threat Detection",
    "Tactic: Initial Access",
    "Data Source: Elastic Endgame",
    "Data Source: Elastic Defend",
    "Data Source: Sysmon",
    "Data Source: Microsoft Defender XDR",
    "Data Source: SentinelOne",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
process where host.os.type == "windows" and event.type == "start" and
  process.name : ("cmd.exe", "powershell.exe", "pwsh.exe", "powershell_ise.exe", "rundll32.exe", "curl.exe") and
  (
   (process.parent.name : "w3wp.exe" and process.parent.args : "WsusPool") or
   process.parent.name : "WsusService.exe"
   )
'''

note = """## Triage and analysis

### Investigating Windows Server Update Service Spawning Suspicious Processes

#### Possible investigation steps

- What does the alert-local WSUS parent-child path show?
  - Focus: child `process.executable` and `process.command_line`, plus `process.parent.name`, `process.parent.executable`, and `process.parent.args`, especially "w3wp.exe" with "WsusPool" or "WsusService.exe".
  - Implication: escalate when a WSUS web or service component launches a shell, PowerShell, "rundll32.exe", or "curl.exe" for interpreter, download, or proxy-execution behavior; lower suspicion only when the parent-child pair and arguments match a narrow recognized WSUS setup, cleanup, or repair pattern.
- Does the child command and binary identity fit bounded WSUS maintenance?
  - Why: WSUS children can inherit service context; visible user fields may not prove human initiation.
  - Focus: `process.command_line`, `process.executable`, `process.pe.original_file_name`, `process.code_signature.subject_name`/`trusted`, and child processes. $investigate_1
  - Hint: for PowerShell with script-block telemetry, anchor on `host.id` + `process.entity_id` or `host.id` + `process.pid` in a tight alert window. Reconstruct `powershell.file.script_block_id`, `powershell.total`, `powershell.sequence`, and `powershell.file.script_block_text`; missing script-block telemetry is unresolved, not benign.
  - Implication: escalate on encoded script content, external retrieval, discovery, archive, remote-admin, temp-path DLL activity, or a renamed/unsigned/mismatched child; lower suspicion only when command scope, path, PE identity, and signer all match the same narrow WSUS task. Identity alone does not clear the launch chain.
- Did the child stage payloads or WSUS-content artifacts?
  - Focus: process-scoped file `file.path`, `file.Ext.original.path`, `file.origin_url`, and `file.Ext.windows.zone_identifier`; missing file telemetry is unresolved, not benign. $investigate_2
  - Hint: scope by `host.id` + `process.entity_id`, or `host.id` + `process.pid` if absent; check later starts where `process.executable` equals the written path.
  - Implication: escalate when the child writes scripts, DLLs, EXEs, archives, or renamed content under WSUS, IIS, temp, or user-writable paths, especially if later executed; lower suspicion only when writes stay inside the same narrow WSUS maintenance path.
- Did the child retrieve tooling, call back, or reach destinations outside the WSUS role?
  - Focus: process-scoped DNS `event.action`, `dns.question.name`, `dns.resolved_ip`, and connection `destination.ip`/`destination.port`; missing network telemetry is unresolved, not benign. $investigate_3
  - Hint: scope by `host.id` + `process.entity_id`, or `host.id` + `process.pid` if absent. Compare DNS "lookup_result" `dns.resolved_ip` with later `destination.ip` from the same process.
  - Implication: escalate when the child retrieves tools from public infrastructure, connects to rare or unrelated systems, or uses destinations inconsistent with WSUS update distribution; lower suspicion when the same process reaches only recognized internal mirrors, proxies, or vendor services that fit command and parent context.
- If local findings are suspicious or unresolved, does same-host scope show broader WSUS compromise?
  - Focus: related alerts on the same `host.id`, especially repeated WSUS-spawned tools and complementary webshell, credential-access, discovery, archive, or lateral-movement activity. $investigate_0
  - Range: start with the alert window; expand to 48 hours only if parent-child, command, artifact, or destination evidence remains suspicious or incomplete.
  - Implication: broaden containment when related alerts corroborate WSUS compromise or post-exploitation; keep scope local when surrounding activity is limited to one fully explained maintenance action.
- Escalate for unexplained service-side execution, payload staging, suspicious destinations, or broader WSUS compromise; close only when parent-child path, command intent, service context, binary identity, artifacts, destinations, and same-host scope prove one exact recognized WSUS maintenance or validation workflow; preserve artifacts and escalate when evidence is mixed or optional telemetry is missing.

### False positive analysis

- WSUS installation, post-install repair, cleanup, health-check, migration, or authorized CVE validation can launch bounded shell or PowerShell children from "WsusPool" or "WsusService.exe". Close only when parent `process.parent.name`/`process.parent.args`, child command, path, hash or signer, `user.id`, and `host.id` prove the same narrow task; artifact and destination telemetry should corroborate when available, and missing recovery that leaves staging or callback unresolved requires confirmation or escalation.
- Before creating an exception, validate stability across prior alerts for the same WSUS server: parent context, child path/hash/signer, exact `process.command_line`, `user.id`, `host.id`, and any bounded artifact or destination pattern. Avoid exceptions on "WsusService.exe", "w3wp.exe", `process.name`, or `host.id` alone.

### Response and remediation

- If confirmed benign, reverse temporary containment and document the parent context, child `process.executable`, `process.command_line`, signer or hash, `user.id`, `host.id`, and bounded artifact or destination evidence that proved the WSUS workflow. Create an exception only from that full stable pattern.
- If suspicious but unconfirmed, preserve the case export, process tree, child `process.entity_id`, `process.pid`, `process.command_line`, parent context, `user.id`, `host.id`, recovered staged paths, recovered DNS or destination indicators, and related-alert identifiers before containment. Apply reversible containment first: block confirmed malicious destinations, restrict inbound WSUS exposure on ports 8530/8531, limit external access to the affected service, or increase monitoring. Isolate the host only when artifact, destination, or related-alert evidence shows active compromise and the server role can tolerate disruption.
- If confirmed malicious, isolate the WSUS host or terminate the malicious child only after preserving process identifiers, command lines, parent context, hashes, staged paths, destination indicators, and related-alert evidence. Then disable the exposed WSUS service path or block inbound 8530/8531 until patched, scope other servers and accounts for confirmed indicators, remove only artifacts identified during triage, restore WSUS/IIS content, rotate exposed credentials if configuration material was accessed, apply the relevant Microsoft WSUS update, and retain case logs.
"""

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:

- [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)
"""

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

[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 = "Child processes of the suspicious WSUS 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" }
  ],
  [
    { 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.pid", queryType = "phrase", value = "{{process.pid}}", valueType = "string" }
  ]
]
relativeFrom = "now-1h"
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 = "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"

[[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 = "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.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"

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

[[rule.threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"

[[rule.threat.technique.subtechnique]]
id = "T1218.011"
name = "Rundll32"
reference = "https://attack.mitre.org/techniques/T1218/011/"

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

[[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/"

Stages and Predicates

Stage 1: process

process where host.os.type == "windows" and event.type == "start" and
  process.name : ("cmd.exe", "powershell.exe", "pwsh.exe", "powershell_ise.exe", "rundll32.exe", "curl.exe") and
  (
   (process.parent.name : "w3wp.exe" and process.parent.args : "WsusPool") or
   process.parent.name : "WsusService.exe"
   )

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.typeeq
  • start corpus 1036 (elastic 1036)
field:"event.type" kind:eq value:"start"
process.namewildcard
  • cmd.exe corpus 122 (elastic 93, splunk 29)
  • curl.exe corpus 34 (elastic 32, splunk 2)
  • powershell.exe corpus 187 (elastic 140, splunk 44, kusto 3)
  • powershell_ise.exe corpus 53 (splunk 29, elastic 24)
  • pwsh.exe corpus 78 (elastic 49, splunk 29)
  • rundll32.exe corpus 123 (elastic 100, splunk 23)
field:"process_basename" kind:wildcard
process.parent.argswildcard
  • WsusPool corpus 2 (elastic 2)
field:"process.parent.args" kind:wildcard value:"WsusPool"
process.parent.namewildcard
  • WsusService.exe corpus 3 (elastic 2, splunk 1)
  • w3wp.exe corpus 8 (elastic 8)
field:"parent_process_basename" kind:wildcard

Back to all Elastic rules