Detection rules › Elastic

Elastic rules: 08

API via Callback from a Suspicious Stack

#
Source
github.com/elastic/protections-artifacts

Identifies the call of Memory Windows APIs indirectly via a callback function. This may be the result of an evasion attempt to hide the origin of the API call from the call stack such as unbacked memory region.

MITRE ATT&CK Coverage

TacticTechniques
Stealth

Rule Body

[rule]
description = """
Identifies the call of Memory Windows APIs indirectly via a callback function. This may be the result of an evasion
attempt to hide the origin of the API call from the call stack such as unbacked memory region.
"""
id = "8154cddf-423f-4600-b20e-3ec55d972c7a"
license = "Elastic License v2"
name = " API via Callback from a Suspicious Stack"
os_list = ["windows"]
reference = [
    "https://www.elastic.co/security-labs/doubling-down-etw-callstacks",
    "https://klezvirus.github.io/posts/Callback-Hell/",
]
version = "1.0.1"

query = '''
api where
 process.Ext.api.name in ("VirtualProtect", "VirtualAlloc", "WriteProcessMemory", "VirtualProtectEx", "VirtualAllocEx", "SuspendThread") and
 _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info : "C:\\Windows\\System32\\ntdll.dll!TpCallbackIndependent*") and
  process.thread.Ext.call_stack_summary like ("ntdll.dll|kernelbase.dll|*|ntdll.dll|kernelbase.dll|ntdll.dll|kernel32.dll|ntdll.dll",
                                              "ntdll.dll|kernelbase.dll|*|gdi32full.dll|kernelbase.dll|ntdll.dll|kernel32.dll|ntdll.dll",
                                              "ntdll.dll|kernelbase.dll|*|gdi32full.dll|user32.dll|ntdll.dll|kernel32.dll|ntdll.dll")
'''

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

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


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

[internal]
min_endpoint_version = "8.10.0"

Stages and Predicates

Stage 1: api

api where
 process.Ext.api.name in ("VirtualProtect", "VirtualAlloc", "WriteProcessMemory", "VirtualProtectEx", "VirtualAllocEx", "SuspendThread") and
 _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info : "C:\\Windows\\System32\\ntdll.dll!TpCallbackIndependent*") and
  process.thread.Ext.call_stack_summary like ("ntdll.dll|kernelbase.dll|*|ntdll.dll|kernelbase.dll|ntdll.dll|kernel32.dll|ntdll.dll",
                                              "ntdll.dll|kernelbase.dll|*|gdi32full.dll|kernelbase.dll|ntdll.dll|kernel32.dll|ntdll.dll",
                                              "ntdll.dll|kernelbase.dll|*|gdi32full.dll|user32.dll|ntdll.dll|kernel32.dll|ntdll.dll")

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
process.Ext.api.namein
  • SuspendThread corpus 12 (elastic 12)
  • VirtualAlloc corpus 27 (elastic 27)
  • VirtualAllocEx corpus 22 (elastic 22)
  • VirtualProtect corpus 35 (elastic 35)
  • VirtualProtectEx corpus 29 (elastic 29)
  • WriteProcessMemory corpus 23 (elastic 23)
field:"process.Ext.api.name" kind:in
process.thread.Ext.call_stack_summarywildcard
  • ntdll.dll|kernelbase.dll|*|gdi32full.dll|kernelbase.dll|ntdll.dll|kernel32.dll|ntdll.dll
  • ntdll.dll|kernelbase.dll|*|gdi32full.dll|user32.dll|ntdll.dll|kernel32.dll|ntdll.dll
  • ntdll.dll|kernelbase.dll|*|ntdll.dll|kernelbase.dll|ntdll.dll|kernel32.dll|ntdll.dll
field:"process.thread.Ext.call_stack_summary" kind:wildcard

Administrator Privileges Assigned to an Okta Group

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

Detects when an administrator role is assigned to an Okta group. An adversary may attempt to assign administrator privileges to an Okta group in order to assign additional permissions to compromised user accounts and maintain access to their target organization.

Known False Positives

  • Administrator roles may be assigned to Okta users by a Super Admin user. Verify that the behavior was expected. Exceptions can be added to this rule to filter expected behavior.

MITRE ATT&CK Coverage

Telemetry Coverage

Rules Detecting the Same Action

These rules filter on the same operation.

Rule Body

[metadata]
creation_date = "2020/05/21"
integration = ["okta"]
maturity = "production"
updated_date = "2026/04/10"

[rule]
author = ["Elastic"]
description = """
Detects when an administrator role is assigned to an Okta group. An adversary may attempt to assign administrator
privileges to an Okta group in order to assign additional permissions to compromised user accounts and maintain access
to their target organization.
"""
false_positives = [
    """
    Administrator roles may be assigned to Okta users by a Super Admin user. Verify that the behavior was expected.
    Exceptions can be added to this rule to filter expected behavior.
    """,
]
index = ["filebeat-*", "logs-okta*"]
language = "kuery"
license = "Elastic License v2"
name = "Administrator Privileges Assigned to an Okta Group"
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 Administrator Privileges Assigned to an Okta Group

Okta is a widely used identity management service that facilitates secure user authentication and access control. Administrator privileges in Okta allow users to manage settings and permissions, making them a target for adversaries seeking persistent access. Malicious actors may exploit these privileges by assigning them to groups, thereby extending elevated access to compromised accounts. The detection rule monitors system events for privilege grants to groups, flagging potential unauthorized privilege escalations.

### Possible investigation steps

- Review the event logs for entries with event.dataset:okta.system and event.action:group.privilege.grant to identify the specific group and administrator role assigned.
- Identify the user account that initiated the privilege grant action and verify if the account has a history of suspicious activity or if it has been compromised.
- Check the membership of the affected Okta group to determine which user accounts have gained elevated privileges and assess if any of these accounts are unauthorized or compromised.
- Investigate recent activities of the affected group members to identify any unusual or unauthorized actions that may indicate malicious intent.
- Review the organization's change management records to confirm if the privilege assignment was part of an approved change request or if it was unauthorized.
- If unauthorized activity is confirmed, initiate incident response procedures to revoke the unauthorized privileges and secure the affected accounts.

### False positive analysis

- Routine administrative tasks may trigger alerts when legitimate IT staff assign administrator roles to groups for maintenance or updates. To manage this, create exceptions for known IT personnel or scheduled maintenance windows.
- Organizational changes such as mergers or department restructuring might require temporary privilege escalations. Document these changes and adjust the detection rule to exclude these specific events during the transition period.
- Automated scripts or third-party integrations that manage group permissions could inadvertently trigger false positives. Identify these scripts and whitelist their actions within the monitoring system to prevent unnecessary alerts.
- Training or onboarding sessions where temporary admin access is granted to groups for demonstration purposes can cause alerts. Ensure these sessions are logged and recognized as non-threatening to avoid false positives.

### Response and remediation

- Immediately revoke the administrator privileges assigned to the Okta group to prevent further unauthorized access or privilege escalation.
- Conduct a thorough review of recent group membership changes and privilege assignments in Okta to identify any other unauthorized modifications.
- Isolate and investigate any user accounts that were part of the affected group to determine if they have been compromised.
- Reset passwords and enforce multi-factor authentication (MFA) for all accounts that were part of the affected group to secure them against further unauthorized access.
- Notify the security team and relevant stakeholders about the incident to ensure awareness and coordinated response efforts.
- Implement additional monitoring on the affected group and related user accounts to detect any further suspicious activities.
- Review and update access control policies to ensure that only necessary groups and users have administrative privileges, reducing the risk of similar incidents in the future.

## Setup

The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
references = [
    "https://help.okta.com/en/prod/Content/Topics/Security/administrators-admin-comparison.htm",
    "https://developer.okta.com/docs/reference/api/system-log/",
    "https://developer.okta.com/docs/reference/api/event-types/",
    "https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy",
    "https://www.elastic.co/security-labs/monitoring-okta-threats-with-elastic-security",
    "https://www.elastic.co/security-labs/starter-guide-to-understanding-okta",
]
risk_score = 47
rule_id = "b8075894-0b62-46e5-977c-31275da34419"
severity = "medium"
tags = [
    "Use Case: Identity and Access Audit",
    "Data Source: Okta",
    "Tactic: Persistence",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "query"

query = '''
data_stream.dataset:okta.system and event.action:group.privilege.grant
'''


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

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

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

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

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

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

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

Stages and Predicates

Stage 1: query

data_stream.dataset:okta.system and event.action:group.privilege.grant

Indicators

These rows show field, operator, and value matches.

AMSI Bypass via PowerShell

#
Source
github.com/elastic/protections-artifacts

Identifies the execution of PowerShell script with keywords related to different Antimalware Scan Interface (AMSI) bypasses. An adversary may attempt first to disable AMSI before executing further malicious powershell scripts to evade detection.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
Identifies the execution of PowerShell script with keywords related to different Antimalware Scan Interface (AMSI)
bypasses. An adversary may attempt first to disable AMSI before executing further malicious powershell scripts to evade
detection.
"""
id = "ee4fbf59-c858-4a5d-bc74-e027926d7e2e"
license = "Elastic License v2"
name = "AMSI Bypass via PowerShell"
os_list = ["windows"]
reference = ["https://github.com/0xsyr0/Red-Team-Playbooks/blob/master/5-Installation/5-Installation.md"]
version = "1.0.6"

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 : ("*amsiContext*", "*amsiSession*", "*amsiInitFailed*", "*AmsiUtils*", "*AmsiInitialize*", "*AmsiScanString*") and
   process.Ext.api.parameters.buffer : "*.SetValue*" and process.Ext.api.parameters.buffer : "*.GetField*") or

  (process.Ext.api.parameters.buffer : "*[Ref].Assembly.GetType*System.Management.Automation.Amsi*" and
   process.Ext.api.parameters.buffer : "*.SetValue*" and process.Ext.api.parameters.buffer : "*.GetField*") or

  (process.Ext.api.parameters.buffer : "*[Ref].Assembly.GetTypes()*" and
   process.Ext.api.parameters.buffer : "*GetFields*" and process.Ext.api.parameters.buffer : ("*amsiIn*", "*iUtils*")) or

  (process.Ext.api.parameters.buffer : "*::AllocHGlobal*" and process.Ext.api.parameters.buffer : "*.NoRMALiZe*" and
   process.Ext.api.parameters.buffer : "*.SetValue*" and process.Ext.api.parameters.buffer : "*-replace*") or

  (process.Ext.api.parameters.buffer : "*System.Management.Automation.*" and process.Ext.api.parameters.buffer : "*.SetValue*" and
   process.Ext.api.parameters.buffer : ("*.GetField*NonPublic,Static*", "*FromBase64String*") and
    not (
      process.Ext.api.parameters.buffer : "*_outputEncoding*" and
      process.Ext.api.parameters.content_name in ("exec_wrapper.ps1", "exec_wrapper-async.ps1.ps1") and
      process.code_signature.subject_name : "Microsoft Windows" and process.code_signature.trusted == true
    )
  ) or

process.Ext.api.parameters.buffer :
                   ("*Invoke-AmsiBypass*",
                    "*AllocHGlobal*9076*",
                    "*cwBpAC4AZABsAGwA*",
                    "*41 6d 73 69 53 63 61 6e 42 75 66 66 65 72*",
                    "*5492868772801748688168747280728187173688878280688776828*")
  ) and
not process.parent.executable : "C:\\Program Files (x86)\\ManageSoft\\Tracker\\ndtrack.exe"
'''

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 = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"
[[threat.technique.subtechnique]]
id = "T1562.001"
name = "Disable or Modify Tools"
reference = "https://attack.mitre.org/techniques/T1562/001/"



[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.Ext.api.name == "AmsiScanBuffer" and
 (process.name in~ ("powershell.exe") or process.Ext.api.parameters.app_name == "PowerShell") and
 (
  (process.Ext.api.parameters.buffer : ("*amsiContext*", "*amsiSession*", "*amsiInitFailed*", "*AmsiUtils*", "*AmsiInitialize*", "*AmsiScanString*") and
   process.Ext.api.parameters.buffer : "*.SetValue*" and process.Ext.api.parameters.buffer : "*.GetField*") or

  (process.Ext.api.parameters.buffer : "*[Ref].Assembly.GetType*System.Management.Automation.Amsi*" and
   process.Ext.api.parameters.buffer : "*.SetValue*" and process.Ext.api.parameters.buffer : "*.GetField*") or

  (process.Ext.api.parameters.buffer : "*[Ref].Assembly.GetTypes()*" and
   process.Ext.api.parameters.buffer : "*GetFields*" and process.Ext.api.parameters.buffer : ("*amsiIn*", "*iUtils*")) or

  (process.Ext.api.parameters.buffer : "*::AllocHGlobal*" and process.Ext.api.parameters.buffer : "*.NoRMALiZe*" and
   process.Ext.api.parameters.buffer : "*.SetValue*" and process.Ext.api.parameters.buffer : "*-replace*") or

  (process.Ext.api.parameters.buffer : "*System.Management.Automation.*" and process.Ext.api.parameters.buffer : "*.SetValue*" and
   process.Ext.api.parameters.buffer : ("*.GetField*NonPublic,Static*", "*FromBase64String*") and
    not (
      process.Ext.api.parameters.buffer : "*_outputEncoding*" and
      process.Ext.api.parameters.content_name in ("exec_wrapper.ps1", "exec_wrapper-async.ps1.ps1") and
      process.code_signature.subject_name : "Microsoft Windows" and process.code_signature.trusted == true
    )
  ) or

process.Ext.api.parameters.buffer :
                   ("*Invoke-AmsiBypass*",
                    "*AllocHGlobal*9076*",
                    "*cwBpAC4AZABsAGwA*",
                    "*41 6d 73 69 53 63 61 6e 42 75 66 66 65 72*",
                    "*5492868772801748688168747280728187173688878280688776828*")
  ) and
not process.parent.executable : "C:\\Program Files (x86)\\ManageSoft\\Tracker\\ndtrack.exe"

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
  • *-replace*
  • *.GetField*
  • *.GetField*NonPublic,Static*
  • *.NoRMALiZe*
  • *.SetValue*
  • *41 6d 73 69 53 63 61 6e 42 75 66 66 65 72*
  • *5492868772801748688168747280728187173688878280688776828*
  • *::AllocHGlobal*
  • *AllocHGlobal*9076*
  • *AmsiInitialize*
  • *AmsiScanString*
  • *AmsiUtils*
  • *FromBase64String*
  • *GetFields*
  • *Invoke-AmsiBypass*
  • *System.Management.Automation.*
  • *[Ref].Assembly.GetType*System.Management.Automation.Amsi*
  • *[Ref].Assembly.GetTypes()*
  • *amsiContext*
  • *amsiIn*
  • *amsiInitFailed*
  • *amsiSession*
  • *cwBpAC4AZABsAGwA*
  • *iUtils*
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"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.parent.executableeqC:\Program Files (x86)\ManageSoft\Tracker\ndtrack.exeexcludes:process.parent.executable field:"process.parent.executable" value:"C:\Program Files (x86)\ManageSoft\Tracker\ndtrack.exe"

AWS Bedrock Provisioned Model Throughput Tampering

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

Detects creation, modification, or deletion of AWS Bedrock Provisioned Model Throughput via the CreateProvisionedModelThroughput, UpdateProvisionedModelThroughput, and DeleteProvisionedModelThroughput APIs. Provisioned Throughput reserves dedicated, billed model capacity for Amazon Bedrock. An adversary who scales this capacity up can drive large, unauthorized cost (cloud resource/bill hijacking), while deleting reserved throughput can cause denial of service to production workloads that depend on that committed capacity. These control-plane changes should be validated against approved capacity-planning and change-management processes.

Known False Positives

  • Provisioned Throughput changes may be performed by platform, ML, or FinOps teams as part of capacity planning, scaling for production demand, or cost optimization. Infrastructure-as-code pipelines and automation roles may also create, update, or delete provisioned throughput during deployments. Verify that the user identity, user agent, and source IP correspond to known administrators or automation and that a corresponding change request exists. If known behavior is causing false positives, it can be exempted from the rule.

MITRE ATT&CK Coverage

Telemetry Coverage

Rules Detecting the Same Action

These rules filter on the same operation.

Rule Body

[metadata]
creation_date = "2026/06/04"
integration = ["aws"]
maturity = "production"
updated_date = "2026/06/04"

[rule]
author = ["Elastic"]
description = """
Detects creation, modification, or deletion of AWS Bedrock Provisioned Model Throughput via the
CreateProvisionedModelThroughput, UpdateProvisionedModelThroughput, and DeleteProvisionedModelThroughput APIs.
Provisioned Throughput reserves dedicated, billed model capacity for Amazon Bedrock. An adversary who scales this
capacity up can drive large, unauthorized cost (cloud resource/bill hijacking), while deleting reserved throughput can
cause denial of service to production workloads that depend on that committed capacity. These control-plane changes
should be validated against approved capacity-planning and change-management processes.
"""
false_positives = [
    """
    Provisioned Throughput changes may be performed by platform, ML, or FinOps teams as part of capacity planning,
    scaling for production demand, or cost optimization. Infrastructure-as-code pipelines and automation roles may also
    create, update, or delete provisioned throughput during deployments. Verify that the user identity, user agent, and
    source IP correspond to known administrators or automation and that a corresponding change request exists. If known
    behavior is causing false positives, it can be exempted from the rule.
    """,
]
from = "now-6m"
index = ["logs-aws.cloudtrail-*"]
language = "kuery"
license = "Elastic License v2"
name = "AWS Bedrock Provisioned Model Throughput Tampering"
note = """## Triage and analysis

### Investigating AWS Bedrock Provisioned Model Throughput Tampering

Amazon Bedrock Provisioned Throughput reserves dedicated, billed model capacity for foundation models.
Because this capacity is committed and metered, adversaries can abuse it in two ways: scaling capacity up to
incur large, unauthorized cloud spend (resource/bill hijacking), or deleting reserved throughput to deny
service to production workloads that rely on committed capacity. This rule identifies
`CreateProvisionedModelThroughput`, `UpdateProvisionedModelThroughput`, and `DeleteProvisionedModelThroughput`
calls so responders can confirm whether the change was authorized.

#### Possible investigation steps

- **Identify the actor and context**
  - Review `aws.cloudtrail.user_identity.arn`, `aws.cloudtrail.user_identity.type`,
    `aws.cloudtrail.user_identity.access_key_id`, `user_agent.original`, and `source.ip`.
  - Determine whether the identity is an approved administrator, ML/platform engineer, or automation role.
  - Confirm a corresponding change request or capacity-planning ticket exists.
- **Validate the request details**
  - Inspect `aws.cloudtrail.request_parameters` and `aws.cloudtrail.response_elements` for the model ID,
    commitment duration, and requested model units. Unusually large model-unit counts or long commitment
    terms on a Create/Update may indicate cost-driven abuse.
  - For `DeleteProvisionedModelThroughput`, identify which provisioned model was removed and whether any
    production workload depended on it.
- **Correlate activity**
  - Review other Bedrock control-plane actions (e.g., model invocation logging changes, guardrail changes)
    and IAM/STS activity from the same identity around the same time.
  - Check `cloud.account.id` and `cloud.region` for whether the activity occurred in an expected account/region.

### False positive analysis

- **Capacity planning**: Platform, ML, or FinOps teams may legitimately create, update, or delete provisioned
  throughput. Validate against change tickets and standard capacity-management procedures.
- **Automation**: IaC or deployment pipelines may manage provisioned throughput on bootstrap or teardown.
  Confirm the source IP and ARN match expected automation infrastructure.

### Response and remediation

- If unauthorized, immediately disable the offending access key or role and revert the change (delete
  unauthorized provisioned throughput, or recreate deleted reserved capacity required by production).
- Review billing and Cost Explorer for unexpected Bedrock provisioned-throughput charges.
- Audit the actor's recent activity and rotate credentials if compromise is suspected.
- Restrict `bedrock:CreateProvisionedModelThroughput`, `bedrock:UpdateProvisionedModelThroughput`, and
  `bedrock:DeleteProvisionedModelThroughput` to a small set of administrative roles and enforce approval
  workflows and budget alarms.

### Additional information

- **[Amazon Bedrock Provisioned Throughput](https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html)**
"""
references = [
    "https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html",
    "https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateProvisionedModelThroughput.html",
    "https://docs.aws.amazon.com/bedrock/latest/APIReference/API_DeleteProvisionedModelThroughput.html",
    "https://docs.aws.amazon.com/bedrock/latest/APIReference/API_UpdateProvisionedModelThroughput.html"
]
risk_score = 47
rule_id = "42b5e06d-b297-4286-a004-ae0da92c5b81"
severity = "medium"
tags = [
    "Domain: Cloud",
    "Domain: LLM",
    "Data Source: AWS",
    "Data Source: AWS CloudTrail",
    "Data Source: Amazon Web Services",
    "Data Source: Amazon Bedrock",
    "Use Case: Threat Detection",
    "Resources: Investigation Guide",
    "Tactic: Impact",
]
timestamp_override = "event.ingested"
type = "query"

query = '''
data_stream.dataset: "aws.cloudtrail" and
    event.provider: "bedrock.amazonaws.com" and
    event.action: (
        "CreateProvisionedModelThroughput" or
        "UpdateProvisionedModelThroughput" or
        "DeleteProvisionedModelThroughput"
    ) and
    event.outcome: "success"
'''


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

[[rule.threat.technique]]
id = "T1496"
name = "Resource Hijacking"
reference = "https://attack.mitre.org/techniques/T1496/"

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

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

[rule.investigation_fields]
field_names = [
    "@timestamp",
    "user.name",
    "user_agent.original",
    "source.ip",
    "aws.cloudtrail.user_identity.arn",
    "aws.cloudtrail.user_identity.type",
    "aws.cloudtrail.user_identity.access_key_id",
    "event.action",
    "event.provider",
    "event.outcome",
    "cloud.account.id",
    "cloud.region",
    "aws.cloudtrail.request_parameters",
    "aws.cloudtrail.response_elements",
]

Stages and Predicates

Stage 1: query

data_stream.dataset: "aws.cloudtrail" and
    event.provider: "bedrock.amazonaws.com" and
    event.action: (
        "CreateProvisionedModelThroughput" or
        "UpdateProvisionedModelThroughput" or
        "DeleteProvisionedModelThroughput"
    ) and
    event.outcome: "success"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
data_stream.dataseteq
  • aws.cloudtrail corpus 143 (elastic 143)
field:"data_stream.dataset" kind:eq value:"aws.cloudtrail"
event.actionin
  • CreateProvisionedModelThroughput
  • DeleteProvisionedModelThroughput
  • UpdateProvisionedModelThroughput
field:"EventType" kind:in
event.outcomeeq
  • success corpus 306 (elastic 306)
field:"event.outcome" kind:eq value:"success"
event.providereq
  • bedrock.amazonaws.com corpus 13 (elastic 13)
field:"Provider_Name" kind:eq value:"bedrock.amazonaws.com"

AWS Config Resource Deletion

#
Status
production
Severity
medium
Time window
6m
Author
Elastic, Austin Songer
Source
github.com/elastic/detection-rules

Identifies attempts to delete AWS Config resources. AWS Config provides continuous visibility into resource configuration changes and compliance posture across an account. Deleting Config components can significantly reduce security visibility and auditability. Adversaries may delete or disable Config resources to evade detection, hide prior activity, or weaken governance controls before or after other malicious actions.

Known False Positives

  • Deletion of AWS Config resources may occur during legitimate account restructuring, environment teardown, or changes to compliance tooling. Centralized security teams or approved automation may also delete and recreate Config components as part of controlled workflows. Confirm that the action aligns with approved change management and was performed by an expected principal.

MITRE ATT&CK Coverage

Telemetry Coverage

Rules Detecting the Same Action

These rules filter on the same operation.

Rule Body

[metadata]
creation_date = "2020/06/26"
integration = ["aws"]
maturity = "production"
updated_date = "2026/08/05"

[rule]
author = ["Elastic", "Austin Songer"]
description = """
Identifies attempts to delete AWS Config resources. AWS Config provides continuous visibility into resource
configuration changes and compliance posture across an account. Deleting Config components can significantly reduce
security visibility and auditability. Adversaries may delete or disable Config resources to evade detection, hide prior
activity, or weaken governance controls before or after other malicious actions.
"""
false_positives = [
    """
    Deletion of AWS Config resources may occur during legitimate account restructuring, environment teardown, or changes
    to compliance tooling. Centralized security teams or approved automation may also delete and recreate Config
    components as part of controlled workflows. Confirm that the action aligns with approved change management and was
    performed by an expected principal.
    """,
]
from = "now-6m"
index = ["filebeat-*", "logs-aws.cloudtrail-*"]
language = "kuery"
license = "Elastic License v2"
name = "AWS Config Resource Deletion"
note = """## Triage and analysis

### Investigating AWS Config Resource Deletion

AWS Config records configuration changes, relationships, and compliance status for AWS resources over time.
Deleting Config components such as recorders, delivery channels, rules, or conformance packs disrupts
security monitoring, compliance enforcement, and forensic visibility. This behavior is uncommon outside of
planned infrastructure changes and should be treated as high-risk when unexpected. This rule detects successful deletion of AWS Config resources.

### Possible investigation steps

**Identify the actor**
- Review `aws.cloudtrail.user_identity.arn` and `aws.cloudtrail.user_identity.access_key_id` to determine who initiated the deletion.
- Confirm whether this principal typically manages AWS Config or centralized security tooling.
- Check `user_agent.original` to determine whether the action was performed via console, CLI, SDK, or automation.

**Determine what was deleted**
- Inspect `event.action` and `aws.cloudtrail.request_parameters` to identify which Config component was removed
  (e.g., configuration recorder, delivery channel, rule, aggregator, or conformance pack).
- Assess whether the deleted resource was account-scoped or organization-wide. Used for compliance reporting, guardrails, or security monitoring.
- Identify the affected regions and accounts using `cloud.region` and `cloud.account.id`.

**Reconstruct timing and intent**
- Use `@timestamp` to correlate the deletion with:
  - IAM changes (role updates, policy modifications, STS activity).
  - Other monitoring disruptions (CloudTrail, GuardDuty, Security Hub).
  - Destructive or high-impact actions occurring shortly before or after.
- Compare the timing against approved maintenance windows or infrastructure changes.

**Correlate with broader activity**
- Pivot in CloudTrail on the same principal or access key to identify:
  - Additional attempts to disable logging or security controls.
  - Resource deletions or configuration weakening across services.
- Evaluate whether the deletion appears isolated or part of a broader evasion sequence.

**Validate intent with stakeholders**
- Confirm with security, cloud platform, or compliance teams whether the deletion was planned and approved.
- Verify whether replacement Config resources were created shortly after, or whether monitoring remains disabled.

### False positive analysis

- **Planned environment changes**
  - Non-production account teardown, environment consolidation, or compliance tool migrations may involve
    deletion of Config resources.

- **Authorized security automation**
  - Approved automation or security tooling may delete and recreate Config components during setup or remediation.
  - Tune exceptions carefully using specific principals or automation roles rather than broad exclusions.

### Response and remediation

- **Contain and restore visibility**
  - If unauthorized, immediately re-enable AWS Config components, including recorders and delivery channels.
  - Validate that historical configuration data and compliance reporting resume as expected.

- **Investigate scope and impact**
  - Determine how long Config visibility was impaired and what activity may have occurred during that window.
  - Review other monitoring gaps (e.g., CloudTrail or GuardDuty changes) for coordinated evasion.

- **Credential and access review**
  - Rotate or disable credentials associated with the deleting principal if compromise is suspected.
  - Review IAM permissions to ensure only a minimal, well-defined set of roles can manage AWS Config.

- **Hardening and prevention**
  - Use SCPs or IAM conditions to restrict deletion of Config resources in production and security accounts.
  - Implement AWS Config rules or Security Hub controls to alert when Config is disabled or degraded.
  - Document and formalize change procedures for governance tooling.

### Additional information
- **[AWS IR Playbooks](https://github.com/aws-samples/aws-incident-response-playbooks/blob/c151b0dc091755fffd4d662a8f29e2f6794da52c/playbooks/)** 
- **[AWS Customer Playbook Framework](https://github.com/aws-samples/aws-customer-playbook-framework/tree/a8c7b313636b406a375952ac00b2d68e89a991f2/docs)** 
- **[AWS Knowledge Center – Security Best Practices](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/)**
"""
references = [
    "https://docs.aws.amazon.com/config/latest/developerguide/how-does-config-work.html",
    "https://docs.aws.amazon.com/config/latest/APIReference/API_Operations.html",
]
risk_score = 47
rule_id = "7024e2a0-315d-4334-bb1a-552d604f27bc"
severity = "medium"
tags = [
    "Domain: Cloud",
    "Platform: AWS",
    "Data Source: AWS CloudTrail",
    "Service: AWS Config",
    "Tactic: Defense Evasion",
    "Rule Type: Custom Query (KQL)",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "query"

query = '''
data_stream.dataset: aws.cloudtrail 
    and event.provider: config.amazonaws.com 
    and event.outcome: success
    and event.action: (DeleteConfigRule or DeleteOrganizationConfigRule or DeleteConfigurationAggregator or
    DeleteConfigurationRecorder or DeleteConformancePack or DeleteOrganizationConformancePack or
    DeleteDeliveryChannel or DeleteRemediationConfiguration or DeleteRetentionConfiguration)
    and not aws.cloudtrail.user_identity.invoked_by: (securityhub.amazonaws.com or fms.amazonaws.com or controltower.amazonaws.com or config-conforms.amazonaws.com)
    and not user_agent.original: (*Pulumi* or *Terraform*)
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[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.008"
name = "Disable or Modify Cloud Logs"
reference = "https://attack.mitre.org/techniques/T1562/008/"



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

[rule.investigation_fields]
field_names = [
    "@timestamp",
    "user.name",
    "user_agent.original",
    "source.ip",
    "aws.cloudtrail.user_identity.arn",
    "aws.cloudtrail.user_identity.type",
    "aws.cloudtrail.user_identity.access_key_id",
    "event.action",
    "event.outcome",
    "cloud.account.id",
    "cloud.region",
    "aws.cloudtrail.request_parameters"
]

Stages and Predicates

Stage 1: query

data_stream.dataset: aws.cloudtrail 
    and event.provider: config.amazonaws.com 
    and event.outcome: success
    and event.action: (DeleteConfigRule or DeleteOrganizationConfigRule or DeleteConfigurationAggregator or
    DeleteConfigurationRecorder or DeleteConformancePack or DeleteOrganizationConformancePack or
    DeleteDeliveryChannel or DeleteRemediationConfiguration or DeleteRetentionConfiguration)
    and not aws.cloudtrail.user_identity.invoked_by: (securityhub.amazonaws.com or fms.amazonaws.com or controltower.amazonaws.com or config-conforms.amazonaws.com)
    and not user_agent.original: (*Pulumi* or *Terraform*)

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
data_stream.dataseteq
  • aws.cloudtrail corpus 143 (elastic 143)
field:"data_stream.dataset" kind:eq value:"aws.cloudtrail"
event.actionin
  • DeleteConfigRule
  • DeleteConfigurationAggregator
  • DeleteConfigurationRecorder
  • DeleteConformancePack
  • DeleteDeliveryChannel
  • DeleteOrganizationConfigRule
  • DeleteOrganizationConformancePack
  • DeleteRemediationConfiguration
  • DeleteRetentionConfiguration
field:"EventType" kind:in
event.outcomeeq
  • success corpus 306 (elastic 306)
field:"event.outcome" kind:eq value:"success"
event.providereq
  • config.amazonaws.com corpus 2 (elastic 2)
field:"Provider_Name" kind:eq value:"config.amazonaws.com"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
user_agent.originalmatchPulumiexcludes:user_agent.original field:"user_agent.original" value:"Pulumi"
user_agent.originalmatchTerraformexcludes:user_agent.original field:"user_agent.original" value:"Terraform"
aws.cloudtrail.user_identity.invoked_byinconfig-conforms.amazonaws.com, controltower.amazonaws.com, fms.amazonaws.com, securityhub.amazonaws.comexcludes:aws.cloudtrail.user_identity.invoked_by

AWS EC2 Instance Interaction with IAM Service

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

Identifies when an EC2 instance interacts with the AWS IAM service via an assumed role. This is uncommon behavior and could indicate an attacker using compromised credentials to further exploit an environment. For example, an assumed role could be used to create new users for persistence or add permissions for privilege escalation. An EC2 instance assumes a role using their EC2 ID as the session name. This rule looks for the pattern "i-" which is the beginning pattern for assumed role sessions started by an EC2 instance. This is a building block rule and does not generate alerts on its own. It is meant to be used for correlation with other rules to detect suspicious activity.

Known False Positives

  • Administrators may use EC2 instances to interact with IAM services as part of an automation workflow, ensure validity of the triggered event and include exceptions where necessary.

MITRE ATT&CK Coverage

Telemetry Coverage

Rules Detecting the Same Action

These rules filter on the same operation.

Rule Body

[metadata]
bypass_bbr_timing = true
creation_date = "2024/07/24"
integration = ["aws"]
maturity = "production"
updated_date = "2026/08/05"

[rule]
author = ["Elastic"]
building_block_type = "default"
description = """
Identifies when an EC2 instance interacts with the AWS IAM service via an assumed role. This is uncommon behavior and
could indicate an attacker using compromised credentials to further exploit an environment. For example, an assumed role
could be used to create new users for persistence or add permissions for privilege escalation. An EC2 instance assumes a
role using their EC2 ID as the session name. This rule looks for the pattern "i-" which is the beginning pattern for
assumed role sessions started by an EC2 instance. This is a [building
block](https://www.elastic.co/guide/en/security/current/building-block-rule.html) rule and does not generate alerts on
its own. It is meant to be used for correlation with other rules to detect suspicious activity.
"""
false_positives = [
    """
    Administrators may use EC2 instances to interact with IAM services as part of an automation workflow, ensure
    validity of the triggered event and include exceptions where necessary.
    """,
]
from = "now-6m"
index = ["filebeat-*", "logs-aws.cloudtrail-*"]
language = "eql"
license = "Elastic License v2"
name = "AWS EC2 Instance Interaction with IAM Service"
references = ["https://redcanary.com/blog/aws-sts/"]
risk_score = 21
rule_id = "a44bcb58-5109-4870-a7c6-11f5fe7dd4b1"
severity = "low"
tags = [
    "Domain: Cloud",
    "Platform: AWS",
    "Data Source: AWS CloudTrail",
    "Service: AWS EC2",
    "Service: AWS IAM",
    "Tactic: Persistence",
    "Tactic: Privilege Escalation",
    "Rule Type: BBR",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
any where event.dataset == "aws.cloudtrail"
    and event.provider == "iam.amazonaws.com"
    and aws.cloudtrail.user_identity.type == "AssumedRole"
    and stringContains(user.id, ":i-")
    and (
            startsWith(event.action, "Update")
            or startsWith(event.action, "Attach")
            or startsWith(event.action, "Detach")
            or startsWith(event.action, "Create")
            or startsWith(event.action, "Delete")
            or startsWith(event.action, "Add")
            or startsWith(event.action, "Remove")
            or startsWith(event.action, "Put")
            or startsWith(event.action, "Tag")
    )
    and not user_agent.original like~ ("*Terraform*", "*Pulumi*", "*Ansible*")
'''

[rule.investigation_fields]
field_names = [
    "@timestamp",
    "source.address",
    "user.name",
    "user.id",
    "aws.cloudtrail.user_identity.arn",
    "aws.cloudtrail.user_identity.type",
    "user_agent.original",
    "user.target.name",
    "event.action",
    "event.outcome",
    "cloud.region",
    "event.provider",
    "aws.cloudtrail.request_parameters",
    "aws.cloudtrail.response_elements"
]

[[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 = "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.technique.subtechnique]]
id = "T1098.003"
name = "Additional Cloud Roles"
reference = "https://attack.mitre.org/techniques/T1098/003/"



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

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

Stages and Predicates

Stage 1: any

any where event.dataset == "aws.cloudtrail"
    and event.provider == "iam.amazonaws.com"
    and aws.cloudtrail.user_identity.type == "AssumedRole"
    and stringContains(user.id, ":i-")
    and (
            startsWith(event.action, "Update")
            or startsWith(event.action, "Attach")
            or startsWith(event.action, "Detach")
            or startsWith(event.action, "Create")
            or startsWith(event.action, "Delete")
            or startsWith(event.action, "Add")
            or startsWith(event.action, "Remove")
            or startsWith(event.action, "Put")
            or startsWith(event.action, "Tag")
    )
    and not user_agent.original like~ ("*Terraform*", "*Pulumi*", "*Ansible*")

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
aws.cloudtrail.user_identity.typeeq
  • AssumedRole corpus 5 (elastic 3, panther 2)
field:"aws::userIdentity.type" kind:eq value:"AssumedRole"
event.actionstarts_with
  • Add
  • Attach
  • Create
  • Delete
  • Detach
  • Put
  • Remove
  • Tag
  • Update
field:"EventType" kind:starts_with
event.dataseteq
  • aws.cloudtrail corpus 4 (elastic 4)
field:"event.dataset" kind:eq value:"aws.cloudtrail"
event.providereq
  • iam.amazonaws.com corpus 9 (elastic 9)
field:"Provider_Name" kind:eq value:"iam.amazonaws.com"
user.idcontains
  • :i- corpus 4 (elastic 4)
field:"user.id" kind:contains value:":i-"

Exclusions

The rule actively suppresses these predicates.

BPF Filter Applied using Traffic Control

#
Source
github.com/elastic/protections-artifacts

Detects when the tc (traffic control) binary is utilized to set a BPF (Berkeley Packet Filter) on a network interface. Tc is used to configure Traffic Control in the Linux kernel. It can shape, schedule, police and drop traffic. A threat actor can utilize tc to set a bpf filter on an interface for the purpose of manipulating the incoming traffic. This technique is not at all common and should indicate abnormal, suspicious or malicious activity.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
Detects when the tc (traffic control) binary is utilized to set a BPF (Berkeley Packet Filter) on a network interface.
Tc is used to configure Traffic Control in the Linux kernel. It can shape, schedule, police and drop traffic. A threat
actor can utilize tc to set a bpf filter on an interface for the purpose of manipulating the incoming traffic. This
technique is not at all common and should indicate abnormal, suspicious or malicious activity.
"""
id = "bde36476-0c2c-40df-b3b1-941b0b31e444"
license = "Elastic License v2"
name = "BPF Filter Applied using Traffic Control"
os_list = ["linux"]
version = "1.0.1"

query = '''
process where event.type == "start" and event.action == "exec" and process.name == "tc" and
process.args == "filter" and process.args == "add" and process.args == "bpf" and
not process.parent.executable == "/usr/sbin/libvirtd"
'''

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

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

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



[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"
[[threat.technique.subtechnique]]
id = "T1562.001"
name = "Disable or Modify Tools"
reference = "https://attack.mitre.org/techniques/T1562/001/"



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

[internal]
min_endpoint_version = "7.15.0"

Stages and Predicates

Stage 1: process

process where event.type == "start" and event.action == "exec" and process.name == "tc" and
process.args == "filter" and process.args == "add" and process.args == "bpf" and
not process.parent.executable == "/usr/sbin/libvirtd"

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.parent.executableeq/usr/sbin/libvirtdexcludes:process.parent.executable field:"process.parent.executable" value:"/usr/sbin/libvirtd"

Egress Network Connection from RPM Package

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

This rule monitors for egress network connections from processes that are executed from an RPM package parent. Attackers can backdoor an RPM package to establish initial access, or install a malicious RPM package to maintain persistence.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
This rule monitors for egress network connections from processes that are executed from an RPM package parent. Attackers
can backdoor an RPM package to establish initial access, or install a malicious RPM package to maintain persistence.
"""
id = "d20cd4ba-ff65-4e1c-8012-4241d449b16b"
license = "Elastic License v2"
name = "Egress Network Connection from RPM Package"
os_list = ["linux"]
version = "1.0.13"

query = '''
sequence with maxspan=3s
  [process where event.type == "start" and event.action == "exec" and
   process.parent.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and
   process.parent.args : "/var/tmp/rpm-tmp.*" and not (
     (process.name == "curl" and process.command_line like ("*.microsoft.com/api/report*", "*check.percona.com*")) or
     process.executable in ("/sbin/runuser", "/usr/sbin/runuser") or
     process.working_directory like~ (
       "/builds/packages/naudit-repos", "/disco_flowlytics/docker/overlay2/*", "/builddir/build/BUILD/librdkafka-*/mklove/deps/src/libzstd"
     ) or
     process.args : ("/usr/local/cpanel/3rdparty/wp-toolkit/*", "/usr/bin/rpmkeys") or
     (process.executable == "/bin/sudo" and process.args in (
       "https://global.endpoint.security.micro",
       "https://global.endpoint.security.micros"
       )
     ) or
     (process.name == "curl" and process.args == "sudo" and process.args == "mdatp" and process.args == "--cacert") or
     process.command_line like "runuser -u mdatp*" or
     process.name == "sudo"
   )
  ] by process.entity_id
  [network where event.type == "start" and event.action == "connection_attempted" and not (
     destination.ip == null or
     destination.ip == "0.0.0.0" or
     cidrmatch(
       destination.ip, "10.0.0.0/8", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24", "192.0.0.0/29",
       "192.0.0.8/32", "192.0.0.9/32", "192.0.0.10/32", "192.0.0.170/32", "192.0.0.171/32", "192.0.2.0/24",
       "192.31.196.0/24", "192.52.193.0/24", "192.168.0.0/16", "192.88.99.0/24", "224.0.0.0/4", "100.64.0.0/10",
       "192.175.48.0/24","198.18.0.0/15", "198.51.100.0/24", "203.0.113.0/24", "240.0.0.0/4", "::1", "FE80::/10",
       "FF00::/8", "172.31.0.0/16"
       ) or
      process.executable in (
      "/opt/cisco/amp/bin/ampinsthelper", "/usr/libexec/platform-python", "/sbin/update-pciids",
      "/etc/nginx/ea-nginx/config-scripts/global/config-scripts-global-cloudflare",
      "/opt/kerio/GFIAgent/GFIAgentInstaller", "/usr/share/centrifydc/libexec/adinfo",
      "/opt/teleport/system/bin/tsh"
      ) or
      process.executable like "/usr/local/cpanel/3rdparty/perl/*/bin/perl"
    )
  ] by process.parent.entity_id
'''

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

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1195"
name = "Supply Chain Compromise"
reference = "https://attack.mitre.org/techniques/T1195/"
[[threat.technique.subtechnique]]
id = "T1195.002"
name = "Compromise Software Supply Chain"
reference = "https://attack.mitre.org/techniques/T1195/002/"



[threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1543"
name = "Create or Modify System Process"
reference = "https://attack.mitre.org/techniques/T1543/"

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


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


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

Stages and Predicates

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

Stage 1: process

[process where event.type == "start" and event.action == "exec" and
   process.parent.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and
   process.parent.args : "/var/tmp/rpm-tmp.*" and not (
     (process.name == "curl" and process.command_line like ("*.microsoft.com/api/report*", "*check.percona.com*")) or
     process.executable in ("/sbin/runuser", "/usr/sbin/runuser") or
     process.working_directory like~ (
       "/builds/packages/naudit-repos", "/disco_flowlytics/docker/overlay2/*", "/builddir/build/BUILD/librdkafka-*/mklove/deps/src/libzstd"
     ) or
     process.args : ("/usr/local/cpanel/3rdparty/wp-toolkit/*", "/usr/bin/rpmkeys") or
     (process.executable == "/bin/sudo" and process.args in (
       "https://global.endpoint.security.micro",
       "https://global.endpoint.security.micros"
       )
     ) or
     (process.name == "curl" and process.args == "sudo" and process.args == "mdatp" and process.args == "--cacert") or
     process.command_line like "runuser -u mdatp*" or
     process.name == "sudo"
   )
  ] by process.entity_id

Stage 2: network

[network where event.type == "start" and event.action == "connection_attempted" and not (
     destination.ip == null or
     destination.ip == "0.0.0.0" or
     cidrmatch(
       destination.ip, "10.0.0.0/8", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24", "192.0.0.0/29",
       "192.0.0.8/32", "192.0.0.9/32", "192.0.0.10/32", "192.0.0.170/32", "192.0.0.171/32", "192.0.2.0/24",
       "192.31.196.0/24", "192.52.193.0/24", "192.168.0.0/16", "192.88.99.0/24", "224.0.0.0/4", "100.64.0.0/10",
       "192.175.48.0/24","198.18.0.0/15", "198.51.100.0/24", "203.0.113.0/24", "240.0.0.0/4", "::1", "FE80::/10",
       "FF00::/8", "172.31.0.0/16"
       ) or
      process.executable in (
      "/opt/cisco/amp/bin/ampinsthelper", "/usr/libexec/platform-python", "/sbin/update-pciids",
      "/etc/nginx/ea-nginx/config-scripts/global/config-scripts-global-cloudflare",
      "/opt/kerio/GFIAgent/GFIAgentInstaller", "/usr/share/centrifydc/libexec/adinfo",
      "/opt/teleport/system/bin/tsh"
      ) or
      process.executable like "/usr/local/cpanel/3rdparty/perl/*/bin/perl"
    )
  ] by process.parent.entity_id

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argseq--cacertexcludes:process.args field:"process.args" value:"--cacert"
process.argseqmdatpexcludes:process.args field:"process.args" value:"mdatp"
process.argseqsudoexcludes:process.args field:"process.args" value:"sudo"
process.nameeqcurlexcludes:process.name field:"process.name" value:"curl"
process.argsinhttps://global.endpoint.security.micro, https://global.endpoint.security.microsexcludes:process.args field:"process.args" value:"https://global.endpoint.security.micro" field:"process.args" value:"https://global.endpoint.security.micros"
process.executableeq/bin/sudoexcludes:process.executable field:"process.executable" value:"/bin/sudo"
process.command_linematch.microsoft.com/api/report, check.percona.comexcludes:process.command_line field:"process.command_line" value:".microsoft.com/api/report" field:"process.command_line" value:"check.percona.com"
process.argswildcard/usr/local/cpanel/3rdparty/wp-toolkit/*, /usr/bin/rpmkeysexcludes:process.args field:"process.args" value:"/usr/local/cpanel/3rdparty/wp-toolkit/*" field:"process.args" value:"/usr/bin/rpmkeys"
process.command_linestarts_withrunuser -u mdatpexcludes:process.command_line field:"process.command_line" value:"runuser -u mdatp"
process.executablein/sbin/runuser, /usr/sbin/runuserexcludes:process.executable field:"process.executable" value:"/sbin/runuser" field:"process.executable" value:"/usr/sbin/runuser"
process.nameeqsudoexcludes:process.name field:"process.name" value:"sudo"
process.working_directorywildcard/builds/packages/naudit-repos, /disco_flowlytics/docker/overlay2/*, /builddir/build/BUILD/librdkafka-*/mklove/deps/src/libzstdexcludes:process.working_directory field:"process.working_directory" value:"/builds/packages/naudit-repos" field:"process.working_directory" value:"/disco_flowlytics/docker/overlay2/*" field:"process.working_directory" value:"/builddir/build/BUILD/librdkafka-*/mklove/deps/src/libzstd"
destination.ipcidr_match10.0.0.0/8, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.0.0/29, 192.0.0.8/32, 192.0.0.9/32, 192.0.0.10/32, 192.0.0.170/32, 192.0.0.171/32, 192.0.2.0/24, 192.31.196.0/24, 192.52.193.0/24, 192.168.0.0/16, 192.88.99.0/24, 224.0.0.0/4, 100.64.0.0/10, 192.175.48.0/24, 198.18.0.0/15, 198.51.100.0/24, 203.0.113.0/24, 240.0.0.0/4, ::1, FE80::/10, FF00::/8, 172.31.0.0/16excludes:destination.ip
destination.ipeq0.0.0.0excludes:destination.ip field:"destination.ip" value:"0.0.0.0"
destination.ipis_null(no value, null check)excludes:destination.ip
process.executablein/etc/nginx/ea-nginx/config-scripts/global/config-scripts-global-cloudflare, /opt/cisco/amp/bin/ampinsthelper, /opt/kerio/GFIAgent/GFIAgentInstaller, /opt/teleport/system/bin/tsh, /sbin/update-pciids, /usr/libexec/platform-python, /usr/share/centrifydc/libexec/adinfoexcludes:process.executable
process.executablewildcard/usr/local/cpanel/3rdparty/perl/*/bin/perlexcludes:process.executable field:"process.executable" value:"/usr/local/cpanel/3rdparty/perl/*/bin/perl"

Entra ID User Added as Registered Application Owner

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

Identifies when a user is added as an owner for an Azure application. An adversary may add a user account as an owner for an Azure application in order to grant additional permissions and modify the application's configuration using another account.

MITRE ATT&CK Coverage

TacticTechniques
Persistence
Privilege Escalation
Credential Access

Telemetry Coverage

PlatformRecord / event type
AzureAdd owner to application

Rules Detecting the Same Action

These rules filter on the same operation.

Rule Body

[metadata]
creation_date = "2020/08/20"
integration = ["azure"]
maturity = "production"
updated_date = "2026/04/10"

[rule]
author = ["Elastic"]
description = """
Identifies when a user is added as an owner for an Azure application. An adversary may add a user account as an owner
for an Azure application in order to grant additional permissions and modify the application's configuration using
another account.
"""
from = "now-9m"
index = ["logs-azure.auditlogs-*", "filebeat-*"]
language = "kuery"
license = "Elastic License v2"
name = "Entra ID User Added as Registered Application Owner"
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 Entra ID User Added as Registered Application Owner

Azure applications often require specific permissions for functionality, managed by assigning user roles. An adversary might exploit this by adding themselves or a compromised account as an owner, gaining elevated privileges to alter configurations or access sensitive data. The detection rule monitors audit logs for successful operations where a user is added as an application owner, flagging potential unauthorized privilege escalations.

### Possible investigation steps

- Review the Azure audit logs to confirm the operation by filtering for event.dataset:azure.auditlogs and azure.auditlogs.operation_name:"Add owner to application" with a successful outcome.
- Identify the user account that was added as an owner and the account that performed the operation to determine if they are legitimate or potentially compromised.
- Check the history of activities associated with both the added owner and the account that performed the operation to identify any suspicious behavior or patterns.
- Verify the application's current configuration and permissions to assess any changes made after the new owner was added.
- Contact the legitimate owner or administrator of the Azure application to confirm whether the addition of the new owner was authorized.
- Investigate any recent changes in the organization's user access policies or roles that might explain the addition of a new owner.

### False positive analysis

- Routine administrative actions: Regular maintenance or updates by IT staff may involve adding users as application owners. To manage this, create a list of authorized personnel and exclude their actions from triggering alerts.
- Automated processes: Some applications may have automated scripts or services that add users as owners for operational purposes. Identify these processes and configure exceptions for their activities.
- Organizational changes: During mergers or restructuring, there may be legitimate reasons for adding multiple users as application owners. Temporarily adjust the rule to accommodate these changes and review the audit logs manually.
- Testing and development: In development environments, users may be added as owners for testing purposes. Exclude these environments from the rule or set up a separate monitoring policy with adjusted thresholds.

### Response and remediation

- Immediately revoke the added user's owner permissions from the Azure application to prevent further unauthorized access or configuration changes.
- Conduct a thorough review of recent activity logs for the affected application to identify any unauthorized changes or data access that may have occurred since the user was added as an owner.
- Reset credentials and enforce multi-factor authentication for the compromised or suspicious account to prevent further misuse.
- Notify the security team and relevant stakeholders about the incident for awareness and potential escalation if further investigation reveals broader compromise.
- Implement additional monitoring on the affected application and related accounts to detect any further unauthorized access attempts or privilege escalations.
- Review and update access control policies to ensure that only authorized personnel can modify application ownership, and consider implementing stricter approval processes for such changes.
- Document the incident, including actions taken and lessons learned, to improve response strategies and prevent recurrence.

## Setup

The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
risk_score = 21
rule_id = "774f5e28-7b75-4a58-b94e-41bf060fdd86"
severity = "low"
tags = ["Domain: Cloud", "Data Source: Azure", "Use Case: Configuration Audit", "Tactic: Persistence", "Resources: Investigation Guide"]
timestamp_override = "event.ingested"
type = "query"

query = '''
data_stream.dataset:azure.auditlogs and azure.auditlogs.operation_name:"Add owner to application" and event.outcome:(Success or success)
'''


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

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

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

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

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

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

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

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

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

Stages and Predicates

Stage 1: query

data_stream.dataset:azure.auditlogs and azure.auditlogs.operation_name:"Add owner to application" and event.outcome:(Success or success)

Indicators

These rows show field, operator, and value matches.

Google Workspace Object Copied from External Drive with App Consent

#

Parent Process Detected with Suspicious Windows Process(es)

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

A machine learning job combination has identified a parent process with one or more suspicious Windows processes that exhibit unusually high malicious probability scores. These process(es) have been classified as malicious in several ways. The process(es) were predicted to be malicious by the ProblemChild supervised ML model. If the anomaly contains a cluster of suspicious processes, each process has the same parent process name, and the aggregate score of the event cluster was calculated to be unusually high by an unsupervised ML model. Such a cluster often contains suspicious or malicious activity, possibly involving LOLbins, that may be resistant to detection using conventional search rules.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2023/10/16"
integration = ["problemchild", "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 = 75
author = ["Elastic"]
description = """
A machine learning job combination has identified a parent process with one or more suspicious Windows processes that
exhibit unusually high malicious probability scores. These process(es) have been classified as malicious in several
ways. The process(es) were predicted to be malicious by the ProblemChild supervised ML model. If the anomaly contains a
cluster of suspicious processes, each process has the same parent process name, and the aggregate score of the event
cluster was calculated to be unusually high by an unsupervised ML model. Such a cluster often contains suspicious or
malicious activity, possibly involving LOLbins, that may be resistant to detection using conventional search rules.
"""
from = "now-45m"
interval = "15m"
license = "Elastic License v2"
machine_learning_job_id = "problem_child_high_sum_by_parent_ea"
name = "Parent Process Detected with Suspicious Windows Process(es)"
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 Parent Process Detected with Suspicious Windows Process(es)

In Windows environments, processes are often spawned by parent processes, forming a hierarchy. Adversaries exploit this by using legitimate processes to launch malicious ones, often leveraging Living off the Land Binaries (LOLBins) to evade detection. The detection rule employs machine learning to identify clusters of processes with high malicious probability, focusing on those sharing a common parent process. This approach helps uncover stealthy attacks that traditional methods might miss, enhancing defense against tactics like masquerading.

### Possible investigation steps

- Review the parent process name associated with the suspicious process cluster to identify if it is a known legitimate process or a potential masquerading attempt.
- Examine the command line arguments and execution context of the suspicious processes to identify any use of LOLBins or unusual patterns that could indicate malicious activity.
- Check the process creation timestamps and correlate them with any known events or user activities to determine if the process execution aligns with expected behavior.
- Investigate the network activity of the suspicious processes to identify any unusual outbound connections or data exfiltration attempts.
- Analyze the user account context under which the suspicious processes were executed to determine if there is any indication of compromised credentials or privilege escalation.
- Cross-reference the detected processes with threat intelligence sources to identify any known indicators of compromise or related threat actor activity.

### False positive analysis

- Legitimate administrative tools may trigger false positives if they frequently spawn processes that resemble malicious activity. Users can create exceptions for known safe tools by whitelisting their parent process names.
- Software updates or installations often generate clusters of processes that might be flagged as suspicious. Users should monitor these activities and exclude them if they are verified as legitimate.
- Automated scripts or batch jobs that run regularly and spawn multiple processes can be mistaken for malicious clusters. Identifying these scripts and excluding their parent processes can reduce false positives.
- Security software or monitoring tools that perform regular scans or updates might mimic malicious behavior. Users should ensure these tools are recognized and excluded from the rule's scope.
- Custom business applications that are not widely recognized might be flagged. Users should document and exclude these applications if they are confirmed to be safe and necessary for operations.

### Response and remediation

- Isolate the affected system from the network to prevent further spread of the potential threat and to contain any ongoing malicious activity.
- Terminate the suspicious processes identified by the alert to stop any malicious actions they may be performing.
- Conduct a thorough review of the parent process and its associated binaries to ensure they have not been tampered with or replaced by malicious versions.
- Restore any affected files or system components from a known good backup to ensure system integrity and functionality.
- Update and patch the system to close any vulnerabilities that may have been exploited by the adversary, focusing on those related to LOLBins and masquerading techniques.
- Monitor the system and network for any signs of re-infection or related suspicious activity, using enhanced logging and alerting mechanisms.
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if additional systems are affected."""
references = [
    "https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html",
    "https://docs.elastic.co/en/integrations/problemchild",
    "https://www.elastic.co/security-labs/detecting-living-off-the-land-attacks-with-new-elastic-integration",
]
risk_score = 21
rule_id = "f5d9d36d-7c30-4cdb-a856-9f653c13d4e0"
setup = """## Setup

The rule requires the Living off the Land (LotL) Attack Detection integration assets to be installed, as well as Windows process events collected by integrations such as Elastic Defend or Winlogbeat.

### LotL Attack Detection Setup
The LotL Attack Detection integration detects living-off-the-land activity in Windows process events.

#### Prerequisite Requirements:
- Fleet is required for LotL Attack Detection.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
- Windows process events collected by the [Elastic Defend](https://docs.elastic.co/en/integrations/endpoint) integration or Winlogbeat(https://www.elastic.co/guide/en/beats/winlogbeat/current/_winlogbeat_overview.html).
- To install Elastic Defend, refer to the [documentation](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
- To set up and run Winlogbeat, follow [this](https://www.elastic.co/guide/en/beats/winlogbeat/current/winlogbeat-installation-configuration.html) guide.

#### The following steps should be executed to install assets associated with the LotL Attack Detection integration:
- Go to the Kibana homepage. Under Management, click Integrations.
- In the query bar, search for Living off the Land Attack 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 = [
    "Domain: Endpoint",
    "OS: Windows",
    "Data Source: Elastic Defend",
    "Data Source: Elastic Endgame",
    "Use Case: Living off the Land Attack Detection",
    "Rule Type: ML",
    "Rule Type: Machine Learning",
    "Tactic: Defense Evasion",
    "Resources: Investigation Guide",
]
type = "machine_learning"
[[rule.threat]]
framework = "MITRE ATT&CK"

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

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

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

Potential Copy Fail (CVE-2026-31431) Exploitation via AF_ALG Socket

#
Status
production
Severity
high
Time window
1m
Sequence by
host.id, process.parent.pid, process.pid, user.id
Author
Elastic
Source
github.com/elastic/detection-rules

Correlates a burst of non-root AF_ALG-class "socket", "splice", or "bound-socket" telemetry with a subsequent process execution where effective user is root but the login user remains non-root. This sequence matches common post-exploitation chains for Copy Fail (CVE-2026-31431) style abuse where AF_ALG and "splice" primitives precede executing a corrupted setuid binary from cache.

Known False Positives

  • Legitimate AF_ALG usage from unprivileged users is uncommon, but some kernel crypto tests, IPsec helpers, disk encryption tooling, HSM integrations, or approved security research systems may exercise this interface. Verify the process, user, and host role before adding an exception.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2026/04/29"
integration = ["auditd_manager"]
maturity = "production"
updated_date = "2026/04/29"

[rule]
author = ["Elastic"]
description = """
Correlates a burst of non-root AF_ALG-class "socket", "splice", or "bound-socket" telemetry with a subsequent process execution
where effective user is root but the login user remains non-root. This sequence matches common post-exploitation chains
for Copy Fail (CVE-2026-31431) style abuse where AF_ALG and "splice" primitives precede executing a corrupted setuid
binary from cache.
"""
false_positives = [
    """
    Legitimate AF_ALG usage from unprivileged users is uncommon, but some kernel crypto tests, IPsec helpers, disk
    encryption tooling, HSM integrations, or approved security research systems may exercise this interface. Verify the
    process, user, and host role before adding an exception.
    """,
]
from = "now-6m"
index = ["auditbeat-*", "logs-auditd_manager.auditd-*"]
language = "eql"
license = "Elastic License v2"
name = "Potential Copy Fail (CVE-2026-31431) Exploitation via AF_ALG Socket"
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 Copy Fail (CVE-2026-31431) Exploitation via AF_ALG Socket

Copy Fail (CVE-2026-31431) abuses the Linux kernel `authencesn` AEAD path through AF_ALG and `splice()` to write four controlled bytes into the page cache of a readable file. Public exploitation targets setuid-root binaries such as `/usr/bin/su`, then executes the corrupted in-memory copy to gain root. The file on disk is not modified, so traditional on-disk integrity checks may miss the activity.

This sequence rule requires many (`runs=10`) non-root `splice` or AF_ALG-related `socket` events (`auditd.data.a0 == "26"`)
within 60 seconds, followed by an `executed` event where `user.effective.id` is root while `user.id` is still non-root.
That ordering aligns with abusing AF_ALG/`splice` primitives and then running a setuid-root helper whose page cache was
targeted.

### Possible investigation steps

- Review the grouped `host.name`, `user.name`, and `process.name` values in the alert, then inspect the original audit events for `process.executable`, `process.command_line`, `process.pid`, parent process details, working directory, and session or login context.
- Determine whether the process is an interpreter or ad-hoc binary. Public proof-of-concept behavior may appear as a short Python script using standard library modules and calls such as `socket.socket(38, 5, 0)`, `authencesn`, `os.splice`, or `MSG_MORE`.
- Pivot on the same host, user, process name, and nearby timestamps for additional syscall activity from the same process tree, especially `splice`, `sendmsg`, `recvmsg`, or repeated `socket` activity.
- Look for execution of setuid-root binaries shortly after the AF_ALG socket creation, including `/usr/bin/su`, `/usr/bin/sudo`, `/usr/bin/passwd`, `/usr/bin/mount`, `/usr/bin/newgrp`, `/usr/bin/gpasswd`, or `/usr/bin/chfn`.
- Check for evidence of a UID transition to root from the same process tree, followed by root shell activity, persistence creation, credential access, or security control tampering.
- Check container fields such as `container.id` and `container.image.name`. Because this primitive abuses the shared host page cache, container-originated activity should be treated as a possible node-compromise attempt.
- Confirm the host kernel version and distribution advisory status. Prioritize hosts running vulnerable kernels or untrusted container workloads.

### False positive analysis

- Legitimate unprivileged AF_ALG consumers are rare, but some environments may use kernel crypto testing, disk encryption tooling, IPsec helpers, HSM integration software, or approved research systems.
- Verify whether the process name and executable path are expected on the host. Confirm that the user identity, host role, and execution time align with documented administrative or testing activity.
- If the activity is expected, add a narrow exception using stable values such as `process.executable`, `user.id`, and `host.id` rather than broad process-name-only exclusions.
- Treat interpreter-driven AF_ALG use, activity from temporary directories, or AF_ALG use inside containers as suspicious unless there is a documented reason.

### Response and remediation

- Isolate the affected Linux host if unauthorized AF_ALG activity cannot be quickly ruled out. Treat confirmed exploitation as root compromise.
- Terminate the alerting process and any suspicious child processes. Preserve memory, exploit scripts, shell history, temporary files, and relevant audit logs for forensic review.
- Inspect setuid-root binaries that may have been targeted. Remember that the vulnerable write affects the page cache, not the on-disk file; normal file-integrity checks may not show the corrupted in-memory state.
- Rebuild or reimage the host if successful privilege escalation cannot be ruled out. Rotate credentials, SSH keys, tokens, and secrets that were accessible to the affected user or any root shell spawned afterward.
- Patch the kernel with the vendor fix for CVE-2026-31431. Until patched, consider blocking `algif_aead` module loading or restricting AF_ALG socket creation via seccomp for untrusted workloads.
- For containerized environments, patch the underlying node kernel. Rebuilding container images does not remediate the host kernel vulnerability.
"""
references = [
    "https://xint.io/blog/copy-fail-linux-distributions",
    "https://nvd.nist.gov/vuln/detail/CVE-2026-31431",
    "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a664bf3d603d",
    "https://www.kernel.org/doc/html/latest/crypto/userspace-if.html",
]
risk_score = 73
rule_id = "1c28becc-ec0b-4e6d-81a5-899d00348089"
setup = """## Setup

This rule requires data coming in from one of the following integrations:
- Auditbeat
- Auditd Manager

### Auditbeat Setup
Auditbeat is a lightweight shipper that you can install on your servers to audit user and process activity. It can collect and centralize events from the Linux Audit Framework.

#### The following steps should be executed in order to add Auditbeat on a Linux system:
- Elastic provides repositories available for APT and YUM-based distributions. To install the repositories, follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).
- For complete "Setup and Run Auditbeat" instructions, refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).
- To run Auditbeat on Docker or Kubernetes, follow the relevant deployment guides in the Auditbeat documentation.

### Auditd Manager Integration Setup
The Auditd Manager integration receives audit events from the Linux Audit Framework, which is part of the Linux kernel. Auditd Manager provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon.

#### The following steps should be executed in order to add the Elastic Agent System integration "auditd_manager" on a Linux system:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Auditd Manager" and select the integration to see more details.
- Click "Add Auditd Manager".
- Configure the integration name and optionally add a description.
- Review optional and advanced settings as needed.
- Add the newly installed "auditd manager" integration to an existing or new agent policy, and deploy the agent on Linux systems where detection is desired.
- Click "Save and Continue".
- For more details on the integration, refer to the [helper guide](https://docs.elastic.co/integrations/auditd_manager).

#### Rule Specific Setup Note
This detection relies on auditing one of the 3 event types `socket` or `splice` or `bound-socket` event. If your environment uses a minimal audit ruleset, add rules similar to the following
in the integration's "audit rules" configuration:

```
-a always,exit -F arch=b64 -S socket -k socket_syscall
-a always,exit -F arch=b32 -S socketcall -k socket_syscall
-a always,exit -F arch=b64 -S splice -k splice-syscall
-a always,exit -F arch=b32 -S splice -k splice-syscall
-a always,exit -F arch=b64 -S bind -k socket_bound
-a always,exit -F arch=b32 -S bind -k socket_bound
```
"""
severity = "high"
tags = [
    "Domain: Endpoint",
    "OS: Linux",
    "Use Case: Threat Detection",
    "Use Case: Vulnerability",
    "Tactic: Privilege Escalation",
    "Data Source: Auditd Manager",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
sequence with maxspan=60s
  [any where host.os.type == "linux" and    
   (
    (event.category == "process" and auditd.data.syscall == "socket" and auditd.data.a0 == "26") or 
    (event.category == "process" and auditd.data.syscall == "splice") or 
    (event.category == "network" and event.action == "bound-socket" and data_stream.dataset == "auditd_manager.auditd" and ?auditd.data.socket.family == "38") 
    )  
   and user.id != "0"]  by process.pid, host.id, user.id with runs=10
  [process where host.os.type == "linux"  and event.action == "executed" and 
   (
     (user.effective.id == "0" and user.id != "0") or 
     (process.name in ("bash", "sh", "zsh", "dash", "fish", "ksh", "busybox") and 
      process.args in ("-c", "--command", "-ic", "-ci", "-cl", "-lc", "-bash", "-sh", "-zsh", "-dash", "-fish", "-ksh"))
    )] by process.parent.pid, host.id, user.id
'''


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

[[rule.threat.technique]]
id = "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 1m, correlated by host.id, process.parent.pid, process.pid, user.id.

Stage 1: any

[any where host.os.type == "linux" and    
   (
    (event.category == "process" and auditd.data.syscall == "socket" and auditd.data.a0 == "26") or 
    (event.category == "process" and auditd.data.syscall == "splice") or 
    (event.category == "network" and event.action == "bound-socket" and data_stream.dataset == "auditd_manager.auditd" and ?auditd.data.socket.family == "38") 
    )  
   and user.id != "0"]  by process.pid, host.id, user.id with runs=10

Stage 2: process

[process where host.os.type == "linux"  and event.action == "executed" and 
   (
     (user.effective.id == "0" and user.id != "0") or 
     (process.name in ("bash", "sh", "zsh", "dash", "fish", "ksh", "busybox") and 
      process.args in ("-c", "--command", "-ic", "-ci", "-cl", "-lc", "-bash", "-sh", "-zsh", "-dash", "-fish", "-ksh"))
    )] by process.parent.pid, host.id, user.id

Indicators

These rows show field, operator, and value matches.

Potential Linux Tunneling and/or Port Forwarding via SSH Option

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

This rule detects the use of SSH options that may indicate tunneling or port forwarding on Linux systems. This behavior is commonly associated with malicious activity, such as establishing a port forward, proxy or an encrypted tunnel to exfiltrate data.

MITRE ATT&CK Coverage

TacticTechniques
Command & Control

Rule Body

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

[rule]
author = ["Elastic"]
description = """
This rule detects the use of SSH options that may indicate tunneling or port forwarding on Linux systems. This behavior
is commonly associated with malicious activity, such as establishing a port forward, proxy or an encrypted tunnel to
exfiltrate data. 
"""
from = "now-9m"
index = [
    "endgame-*",
    "logs-crowdstrike.fdr*",
    "logs-endpoint.events.process*",
    "logs-sentinel_one_cloud_funnel.*",
]
language = "eql"
license = "Elastic License v2"
name = "Potential Linux Tunneling and/or Port Forwarding via SSH Option"
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 Linux Tunneling and/or Port Forwarding via SSH Option

SSH is a secure protocol used for encrypted communication over networks, often employed for remote administration. Adversaries exploit SSH options like port forwarding to create tunnels, facilitating covert data exfiltration or unauthorized access. The detection rule identifies suspicious SSH commands indicative of tunneling by monitoring specific SSH options, helping to flag potential misuse for further investigation.

### Possible investigation steps

- Review the process command line details to identify the specific SSH options used, such as ProxyCommand, LocalForward, RemoteForward, DynamicForward, Tunnel, GatewayPorts, ExitOnForwardFailure, or ProxyJump, to understand the nature of the potential tunneling or port forwarding.
- Examine the user account associated with the SSH process to determine if the activity aligns with their typical behavior or if it appears suspicious.
- Check the source and destination IP addresses involved in the SSH connection to identify any unusual or unauthorized endpoints that may indicate malicious activity.
- Investigate the timing and frequency of the SSH connections to assess whether they coincide with known business operations or if they suggest unauthorized access patterns.
- Correlate the event with other security logs or alerts from the same host or network segment to identify any additional indicators of compromise or related suspicious activities.

### False positive analysis

- Legitimate administrative tasks using SSH options like ProxyCommand or LocalForward can trigger the rule. To manage this, create exceptions for known administrative scripts or users frequently using these options for valid purposes.
- Automated backup or synchronization processes that use SSH tunneling for secure data transfer may be flagged. Identify these processes and exclude them by specifying the associated process names or user accounts.
- Development or testing environments where developers use SSH tunneling for accessing remote services might cause alerts. Implement exceptions for specific IP addresses or user groups associated with these environments.
- Monitoring or logging tools that utilize SSH for secure data collection can be mistaken for malicious activity. Whitelist these tools by their process names or command-line patterns to prevent false positives.
- Internal network services that rely on SSH port forwarding for legitimate communication should be reviewed and excluded based on their known behavior and usage patterns.

### Response and remediation

- Immediately isolate the affected Linux system from the network to prevent further unauthorized access or data exfiltration.
- Terminate any suspicious SSH sessions identified by the detection rule to halt potential tunneling or port forwarding activities.
- Conduct a thorough review of SSH configuration files and logs on the affected system to identify unauthorized changes or access patterns.
- Reset credentials for any accounts that were used in the suspicious SSH activity to prevent further unauthorized access.
- Implement network segmentation to limit SSH access to only necessary systems and services, reducing the risk of lateral movement.
- Escalate the incident to the security operations team for further investigation and to determine if additional systems are compromised.
- Enhance monitoring and logging of SSH activities across the network to detect similar threats in the future, ensuring alerts are promptly reviewed and acted upon.
"""
references = [
    "https://blog.bitsadmin.com/living-off-the-foreign-land-windows-as-offensive-platform",
    "https://book.hacktricks.xyz/generic-methodologies-and-resources/tunneling-and-port-forwarding",
]
risk_score = 21
rule_id = "ef395dff-be12-4a6e-8919-d87d627c2174"
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: Command and Control",
    "Data Source: Elastic Defend",
    "Data Source: Elastic Endgame",
    "Data Source: Crowdstrike",
    "Data Source: SentinelOne",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "start", "ProcessRollup2") and
process.name in ("ssh", "sshd") and process.args like "-o*" and
process.command_line like~ (
  "*ProxyCommand*", "*LocalForward*", "*RemoteForward*", "*DynamicForward*", "*Tunnel*", "*GatewayPorts*",
  "*ExitOnForwardFailure*", "*ProxyCommand*", "*ProxyJump*"
) and 
not (
  ?process.parent.args == "/usr/bin/pvedaemon" or
  ?process.parent.command_line in ("pvedaemon", "pve-ha-lrm") or
  ?process.working_directory like "*ansible*" or
  process.command_line like "*ansible*"
)
'''
[[rule.threat]]
framework = "MITRE ATT&CK"

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

[[rule.threat.technique]]
id = "T1572"
name = "Protocol Tunneling"
reference = "https://attack.mitre.org/techniques/T1572/"

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

Stages and Predicates

Stage 1: process

process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "start", "ProcessRollup2") and
process.name in ("ssh", "sshd") and process.args like "-o*" and
process.command_line like~ (
  "*ProxyCommand*", "*LocalForward*", "*RemoteForward*", "*DynamicForward*", "*Tunnel*", "*GatewayPorts*",
  "*ExitOnForwardFailure*", "*ProxyCommand*", "*ProxyJump*"
) and 
not (
  ?process.parent.args == "/usr/bin/pvedaemon" or
  ?process.parent.command_line in ("pvedaemon", "pve-ha-lrm") or
  ?process.working_directory like "*ansible*" or
  process.command_line like "*ansible*"
)

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actionin
  • ProcessRollup2
  • exec
  • exec_event
  • start
field:"EventType" kind:in
event.typeeq
  • start
field:"event.type" kind:eq value:"start"
process.argswildcard
  • -o*
field:"process.args" kind:wildcard value:"-o*"
process.command_linewildcard
  • *DynamicForward*
  • *ExitOnForwardFailure*
  • *GatewayPorts*
  • *LocalForward*
  • *ProxyCommand*
  • *ProxyJump*
  • *RemoteForward*
  • *Tunnel*
field:"CommandLine" kind:wildcard
process.namein
  • ssh
  • sshd
field:"process_basename" kind:in

Exclusions

The rule actively suppresses these predicates.

Potential Net-NTLM Coercion via Snipping Tool ms-screensketch URI (CVE-2026-33829)

#
Source
github.com/elastic/protections-artifacts

Identifies Snipping Tool started with an ms-screensketch deep link whose filePath parameter points at a remote resource (URL-encoded UNC, literal UNC, or http-based value), consistent with public research on CVE-2026-33829. Affected builds can coerce an authenticated SMB connection and leak Net-NTLM responses for the current user when the handler processes an attacker-controlled filePath. Apply the vendor security update from the April 14, 2026 release train when available.

MITRE ATT&CK Coverage

TacticTechniques
Credential Access

Rule Body

[rule]
description = """
Identifies Snipping Tool started with an ms-screensketch deep link whose filePath parameter points at a remote resource
(URL-encoded UNC, literal UNC, or http-based value), consistent with public research on CVE-2026-33829. Affected builds
can coerce an authenticated SMB connection and leak Net-NTLM responses for the current user when the handler processes
an attacker-controlled filePath. Apply the vendor security update from the April 14, 2026 release train when available.
"""
id = "b2c4d6e8-0a1f-4b3c-8d9e-1f2a3b4c5d6e"
license = "Elastic License v2"
name = "Potential Net-NTLM Coercion via Snipping Tool ms-screensketch URI (CVE-2026-33829)"
os_list = ["windows"]
reference = [
    "https://github.com/blackarrowsec/redteam-research/tree/master/CVE-2026-33829",
    "https://www.cve.org/CVERecord?id=CVE-2026-33829",
]
version = "1.0.1"

query = '''
process where event.action == "start" and
  process.name : "SnippingTool.exe" and
  (
    process.args : (
      "ms-screensketch:edit?&filePath=%5C%5C*",
      "ms-screensketch:edit?&filePath=http*",
      "ms-screensketch:edit?&filePath=\\\\*"
    ) or
    process.command_line : (
      "*ms-screensketch*edit*&filePath=%5C%5C*",
      "*ms-screensketch*edit*&filePath=http*",
      "*ms-screensketch*edit*&filePath=*\\\\*"
    )
  ) and 
  process.parent.executable != null and not process.parent.executable : ("?:\\Windows\\System32\\svchost.exe", "?:\\Program Files\\WindowsApps\\Microsoft.ScreenSketch_*\\SnippingTool\\SnippingTool.exe")
'''

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

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1187"
name = "Forced Authentication"
reference = "https://attack.mitre.org/techniques/T1187/"


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

[internal]
min_endpoint_version = "7.15.0"

Stages and Predicates

Stage 1: process

process where event.action == "start" and
  process.name : "SnippingTool.exe" and
  (
    process.args : (
      "ms-screensketch:edit?&filePath=%5C%5C*",
      "ms-screensketch:edit?&filePath=http*",
      "ms-screensketch:edit?&filePath=\\\\*"
    ) or
    process.command_line : (
      "*ms-screensketch*edit*&filePath=%5C%5C*",
      "*ms-screensketch*edit*&filePath=http*",
      "*ms-screensketch*edit*&filePath=*\\\\*"
    )
  ) and 
  process.parent.executable != null and not process.parent.executable : ("?:\\Windows\\System32\\svchost.exe", "?:\\Program Files\\WindowsApps\\Microsoft.ScreenSketch_*\\SnippingTool\\SnippingTool.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.argswildcard
  • ms-screensketch:edit?&filePath=%5C%5C*
  • ms-screensketch:edit?&filePath=\\*
  • ms-screensketch:edit?&filePath=http*
field:"process.args" kind:wildcard
process.command_linewildcard
  • *ms-screensketch*edit*&filePath=%5C%5C*
  • *ms-screensketch*edit*&filePath=*\\*
  • *ms-screensketch*edit*&filePath=http*
field:"CommandLine" kind:wildcard
process.namewildcard
  • SnippingTool.exe corpus 2 (elastic 2)
field:"process_basename" kind:wildcard value:"SnippingTool.exe"
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.parent.executablewildcard?:\Windows\System32\svchost.exe, ?:\Program Files\WindowsApps\Microsoft.ScreenSketch_*\SnippingTool\SnippingTool.exeexcludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\System32\svchost.exe" field:"process.parent.executable" value:"?:\Program Files\WindowsApps\Microsoft.ScreenSketch_*\SnippingTool\SnippingTool.exe"

Potential Payload Download via Finger LOLBin

#
Source
github.com/elastic/protections-artifacts

Detects abuse of the Windows finger.exe LOLBin to download and execute remote payloads, a technique observed in ClickFix campaigns. Adversaries copy finger.exe from System32 to a user Temp directory under a benign-looking name such as ct.exe, then invoke it with a confirm@ remote host argument and pipe the response into cmd for execution.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
Detects abuse of the Windows finger.exe LOLBin to download and execute remote payloads, a technique observed in ClickFix
campaigns. Adversaries copy finger.exe from System32 to a user Temp directory under a benign-looking name such as
ct.exe, then invoke it with a confirm@ remote host argument and pipe the response into cmd for execution.
"""
id = "3260bb0d-7b35-4c7a-b59a-35ca8dbd3856"
license = "Elastic License v2"
name = "Potential Payload Download via Finger LOLBin"
os_list = ["windows"]
reference = [
    "https://lolbas-project.github.io/lolbas/Binaries/Finger/",
    "https://www.microsoft.com/en-us/security/blog/2025/08/21/think-before-you-clickfix-analyzing-the-clickfix-social-engineering-technique/",
    "https://mrd0x.com/filefix-clickfix-alternative/",
]
version = "1.0.1"

query = '''
process where event.action == "start" and
     (process.pe.original_file_name == "finger.exe" or process.name : "finger.exe") and
      process.command_line like "*@*" and not process.command_line like "*@localhost*" and 
      process.parent.name : ("cmd.exe", "powershell.exe", "WindowsTerminal.exe", "wt.exe", "explorer.exe")
'''

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

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

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1566"
name = "Phishing"
reference = "https://attack.mitre.org/techniques/T1566/"
[[threat.technique.subtechnique]]
id = "T1566.002"
name = "Spearphishing Link"
reference = "https://attack.mitre.org/techniques/T1566/002/"



[threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[[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.003"
name = "Windows Command Shell"
reference = "https://attack.mitre.org/techniques/T1059/003/"


[[threat.technique]]
id = "T1204"
name = "User Execution"
reference = "https://attack.mitre.org/techniques/T1204/"
[[threat.technique.subtechnique]]
id = "T1204.001"
name = "Malicious Link"
reference = "https://attack.mitre.org/techniques/T1204/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/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1105"
name = "Ingress Tool Transfer"
reference = "https://attack.mitre.org/techniques/T1105/"


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

[internal]
min_endpoint_version = "8.10.0"

Stages and Predicates

Stage 1: process

process where event.action == "start" and
     (process.pe.original_file_name == "finger.exe" or process.name : "finger.exe") and
      process.command_line like "*@*" and not process.command_line like "*@localhost*" and 
      process.parent.name : ("cmd.exe", "powershell.exe", "WindowsTerminal.exe", "wt.exe", "explorer.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.command_linewildcard
  • *@*
field:"CommandLine" kind:wildcard value:"*@*"
process.namewildcard
  • finger.exe corpus 2 (elastic 2)
field:"process_basename" kind:wildcard value:"finger.exe"
process.parent.namewildcard
  • WindowsTerminal.exe
  • cmd.exe corpus 37 (elastic 32, splunk 4, kusto 1)
  • explorer.exe corpus 50 (elastic 50)
  • powershell.exe corpus 37 (elastic 35, splunk 1, kusto 1)
  • wt.exe
field:"parent_process_basename" kind:wildcard
process.pe.original_file_nameeq
  • finger.exe
field:"OriginalFileName" kind:eq value:"finger.exe"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.command_linematch@localhostexcludes:process.command_line field:"process.command_line" value:"@localhost"

Potential PowerShell Pass-the-Hash/Relay Script

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

Detects PowerShell scripts associated with NTLM relay or pass-the-hash tooling and SMB/NTLM negotiation artifacts. Attackers use relay and PtH techniques to authenticate without passwords and pivot to other systems.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2024/03/27"
integration = ["windows"]
maturity = "production"
updated_date = "2026/04/27"

[rule]
author = ["Elastic"]
description = """
Detects PowerShell scripts associated with NTLM relay or pass-the-hash tooling and SMB/NTLM negotiation
artifacts. Attackers use relay and PtH techniques to authenticate without passwords and pivot to other systems.
"""
from = "now-9m"
index = ["logs-windows.powershell*", "winlogbeat-*"]
language = "kuery"
license = "Elastic License v2"
name = "Potential PowerShell Pass-the-Hash/Relay Script"
references = [
    "https://github.com/Kevin-Robertson/Invoke-TheHash/blob/master/Invoke-WMIExec.ps1",
    "https://github.com/Kevin-Robertson/Invoke-TheHash/blob/master/Invoke-SMBExec.ps1",
    "https://github.com/dafthack/Check-LocalAdminHash/blob/master/Check-LocalAdminHash.ps1",
    "https://github.com/nettitude/PoshC2/blob/master/resources/modules/Invoke-Tater.ps1",
    "https://github.com/Kevin-Robertson/Inveigh/blob/master/Inveigh.ps1",
]
risk_score = 73
rule_id = "951779c2-82ad-4a6c-82b8-296c1f691449"
severity = "high"
tags = [
    "Domain: Endpoint",
    "OS: Windows",
    "Use Case: Threat Detection",
    "Tactic: Credential Access",
    "Resources: Investigation Guide",
    "Data Source: PowerShell Logs",
]
timestamp_override = "event.ingested"
type = "query"

query = '''
event.category:process and host.os.type:windows and
  powershell.file.script_block_text : (
    ("NTLMSSPNegotiate" and ("NegotiateSMB" or "NegotiateSMB2")) or
    "4E544C4D53535000" or
    "0x4e,0x54,0x4c,0x4d,0x53,0x53,0x50" or
    "0x4e,0x54,0x20,0x4c,0x4d" or
    "0x53,0x4d,0x42,0x20,0x32" or
    "0x81,0xbb,0x7a,0x36,0x44,0x98,0xf1,0x35,0xad,0x32,0x98,0xf0,0x38"
  ) and
  not file.directory : "C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Downloads"
'''

note = """## Triage and analysis

### Investigating Potential PowerShell Pass-the-Hash/Relay Script

#### Possible investigation steps

- Does the visible script content implement relay-listener behavior, pass-the-hash execution, target validation, or more than one?
  - Focus: `powershell.file.script_block_text` and any file-backed `file.path`.
  - Implication: escalate when the fragment builds NTLMSSP/SMB messages, starts HTTP/SMB/proxy listeners, forwards authentication, references WMI/SMB/WinRM helpers, or pairs byte arrays with target selection; lower suspicion only for parser or lab text with no targeting, listener, credential, or execution logic.

- Does full script reconstruction reveal target lists, credential material, service names, or listener settings the matching fragment did not show?
  - Why: script block logging often splits relay mode, target configuration, and execution helpers into separate fragments.
  - Focus: `powershell.file.script_block_id`, `powershell.sequence`, `powershell.total`, and reconstructed `powershell.file.script_block_text` on `host.id`; reassemble by `powershell.sequence` and treat missing fragments as unresolved. $investigate_0
  - Implication: escalate on remote targets, password hashes, "TargetList", "SMBRelayTarget", "wpad.dat", "WPAD", listener ports, service names, execution helpers, or fan-out logic; lower suspicion only for research or validation code with no credential material, targets, listener, or execution path.

- Which recovered PowerShell process explains launch context and downstream pivots?
  - Focus: If endpoint process telemetry exists, recover the matching process via `host.id + process.pid` before interpreting `process.*` or `process.parent.*`; if absent, keep launch context unresolved. Record `process.command_line`, `process.parent.executable`, `process.Ext.session_info.logon_type`, `process.Ext.authentication_id`, and `process.entity_id`. $investigate_1
  - Implication: escalate when the recovered launch shows encoded commands, remote-administration launchers, Office or browser parents, elevated context, or service/network logon sessions that do not fit the user; do not infer legitimacy from `process.pid` alone.

- Do authentication events show local operator context or relay/PtH follow-on?
  - Focus: same-`host.id`/`user.id` Windows Security events for `event.code` 4624, 4625, or 4648; review `source.ip`, `winlog.event_data.AuthenticationPackageName`, and `winlog.logon.type`. $investigate_2
  - Hint: bridge recovered `process.Ext.authentication_id` to `winlog.event_data.TargetLogonId` only for the local session; prove relay/PtH with same-host inbound NTLM without `user.id`, target-host 4624/4625, or DC-side 4776 for reconstructed targets or sources.
  - Implication: escalate when local, target-host, or DC authentication shows unexpected type 3 NTLM, repeated failures, privileged sessions, or explicit-credential use tied to reconstructed targets; missing authentication telemetry is unresolved, not benign.

- Do network events show outbound relay or hash-validation activity to targets named in the script?
  - Why: relay code often resolves targets, then reaches SMB, RPC, WinRM, or HTTP destinations; listener-only capture may not.
  - Focus: If endpoint network telemetry exists, scope same-host events to `host.id`, `process.pid`, and the alert window, or use reconstructed targets when process identity is unavailable; separate DNS (`dns.question.name`, `dns.resolved_ip`) from connections (`destination.ip`, `destination.port`). $investigate_3
  - Implication: escalate when the host fans out to named targets or reaches SMB, RPC, WinRM, or relay ports (80, 443, 445) outside the declared test scope; listener scripts stay suspicious with little outbound traffic when reconstruction shows "SMBRelayTarget", "wpad.dat", or similar relay-ready settings. Missing network telemetry is unresolved, not benign.

- If local evidence remains suspicious or incomplete, do related alerts widen the user or host scope?
  - Focus: related alerts for `user.id`; if quiet, compare `host.id` for adjacent relay, pass-the-hash, remote-service, persistence, or post-compromise alerts.
    - $investigate_4
    - $investigate_5
  - Implication: broaden when local evidence stays suspicious or unresolved and related alerts show connected relay, listener-only capture, hash-validation fan-out, or lateral-movement behavior; keep local when surrounding alerts are absent or confined to the same declared test scope.

- Weigh script intent, reconstruction, launch context, authentication follow-on, network contact, and related-alert scope: escalate when they align on unauthorized relay or pass-the-hash activity; close only when reconstructed content, launch, source, and available auth or network evidence support one controlled workflow with no contradictions; preserve and escalate if evidence is mixed or incomplete.

### False positive analysis

- Controlled testing, incident-response, or protocol-research workflows can trigger this rule when reconstructed `powershell.file.script_block_text` names only recognized targets or stays limited to parser/validation routines, recovered launch context matches the operator workflow, and authentication or network telemetry shows no live relay, listener, or execution outside scope. If engagement or change records exist, require alignment; otherwise, confirm recurring `user.id`, `host.id`, source pattern, recovered launch pattern, and target or port pattern across prior alerts from this rule. Do not close if hashes, listener ports, or follow-on authentication diverge.
- Before creating an exception, validate recurring `user.id`, `host.id`, recovered launch pattern, source pattern, and target set across prior alerts. Build the exception from that minimum workflow. Avoid exceptions on byte sequences alone, `user.name` alone, or host alone.

### Response and remediation

- If confirmed benign, reverse any temporary containment and document the script content, recovered launch chain, source path pattern, target set, and session origin or logon-type pattern that proved the lab, response, or troubleshooting workflow. Create an exception only if the same workflow recurs across prior alerts from this rule.
- If suspicious but unconfirmed, preserve the reconstructed `powershell.file.script_block_text`, `powershell.file.script_block_id`, fragment ordering metadata, recovered process and parent details, named targets, listener ports, service names, UNC paths, and related authentication or network evidence before destructive actions.
- Apply reversible containment first, such as host isolation if tolerable or temporary controls on exposed accounts and named targets. Avoid terminating processes or deleting artifacts until possible credential misuse and lateral movement scope is clearer.
- If confirmed malicious, isolate the endpoint when possible; otherwise escalate with the recorded `host.id`, recovered process identifiers, source IP values, named targets, and authentication evidence. Rotate or invalidate impacted credentials, review named systems for successful SMB/WMI/WinRM/service activity, restrict exposed NTLM pathways where supported, then remove only the scripts, services, scheduled tasks, persistence, or staging artifacts found during the investigation.
- Retain PowerShell Script Block Logging plus supporting endpoint, authentication, and network telemetry. Document adjacent variants such as listener-only capture, hash-validation fan-out, or non-PowerShell relay/pass-the-hash alerts for detection follow-up.
"""

setup = """## Setup

PowerShell Script Block Logging must be enabled to generate the events used by this rule (e.g., 4104).
Setup instructions: https://ela.st/powershell-logging-setup
"""

[rule.investigation_fields]
field_names = [
    "@timestamp",
    "user.name",
    "user.id",
    "user.domain",
    "powershell.file.script_block_text",
    "powershell.file.script_block_id",
    "powershell.sequence",
    "powershell.total",
    "file.path",
    "file.directory",
    "file.name",
    "process.pid",
    "host.name",
    "host.id",
    "powershell.file.script_block_length"
]

[transform]

[[transform.investigate]]
label = "All PowerShell 4104 fragments for this script on this host"
description = ""
providers = [
  [
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
    { excluded = false, field = "powershell.file.script_block_id", queryType = "phrase", value = "{{powershell.file.script_block_id}}", valueType = "string" },
    { excluded = false, field = "event.code", queryType = "phrase", value = "4104", valueType = "string" }
  ]
]
relativeFrom = "now-1h"
relativeTo = "now"

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

[[transform.investigate]]
label = "Windows Security authentication events for the user"
description = ""
providers = [
  [
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
    { excluded = false, field = "user.id", queryType = "phrase", value = "{{user.id}}", valueType = "string" },
    { excluded = false, field = "event.code", queryType = "phrase", value = "4624", valueType = "string" }
  ],
  [
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
    { excluded = false, field = "user.id", queryType = "phrase", value = "{{user.id}}", valueType = "string" },
    { excluded = false, field = "event.code", queryType = "phrase", value = "4625", valueType = "string" }
  ],
  [
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
    { excluded = false, field = "user.id", queryType = "phrase", value = "{{user.id}}", valueType = "string" },
    { excluded = false, field = "event.code", queryType = "phrase", value = "4648", valueType = "string" }
  ]
]
relativeFrom = "now-24h"
relativeTo = "now"

[[transform.investigate]]
label = "Network events for the PowerShell process"
description = ""
providers = [
  [
    { excluded = false, field = "process.pid", queryType = "phrase", value = "{{process.pid}}", valueType = "string" },
    { excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
    { excluded = false, field = "event.category", queryType = "phrase", value = "network", valueType = "string" }
  ]
]
relativeFrom = "now-1h"
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"

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

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

[[rule.threat.technique]]
id = "T1557"
name = "Adversary-in-the-Middle"
reference = "https://attack.mitre.org/techniques/T1557/"

[[rule.threat.technique.subtechnique]]
id = "T1557.001"
name = "LLMNR/NBT-NS Poisoning and SMB Relay"
reference = "https://attack.mitre.org/techniques/T1557/001/"

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

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

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

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

[[rule.threat.technique]]
id = "T1550"
name = "Use Alternate Authentication Material"
reference = "https://attack.mitre.org/techniques/T1550/"

[[rule.threat.technique.subtechnique]]
id = "T1550.002"
name = "Pass the Hash"
reference = "https://attack.mitre.org/techniques/T1550/002/"

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

Stages and Predicates

Stage 1: query

event.category:process and host.os.type:windows and
  powershell.file.script_block_text : (
    ("NTLMSSPNegotiate" and ("NegotiateSMB" or "NegotiateSMB2")) or
    "4E544C4D53535000" or
    "0x4e,0x54,0x4c,0x4d,0x53,0x53,0x50" or
    "0x4e,0x54,0x20,0x4c,0x4d" or
    "0x53,0x4d,0x42,0x20,0x32" or
    "0x81,0xbb,0x7a,0x36,0x44,0x98,0xf1,0x35,0xad,0x32,0x98,0xf0,0x38"
  ) and
  not file.directory : "C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Downloads"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.categoryeq
  • process corpus 105 (elastic 105)
field:"event.category" kind:eq value:"process"
powershell.file.script_block_texteq
  • 0x4e,0x54,0x20,0x4c,0x4d
  • 0x4e,0x54,0x4c,0x4d,0x53,0x53,0x50
  • 0x53,0x4d,0x42,0x20,0x32
  • 0x81,0xbb,0x7a,0x36,0x44,0x98,0xf1,0x35,0xad,0x32,0x98,0xf0,0x38
  • 4E544C4D53535000
  • NTLMSSPNegotiate
field:"ScriptBlockText" kind:eq
powershell.file.script_block_textin
  • NegotiateSMB
  • NegotiateSMB2
field:"ScriptBlockText" kind:in

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
file.directoryeqC:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Downloadsexcludes:file.directory field:"file.directory" value:"C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Downloads"

Powershell Encoded Command

#
Source
github.com/elastic/protections-artifacts

Detects process events where the process is Powershell (pwsh) or a shell interpreter (sh, bash, zsh) with the encoded command flag set in the process arguments. Powershell usage on macOS is extremely rare but usage of Powershell with the encoded command flag, used for executing base64 encoded command strings, is almost always inherently malicious.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
Detects process events where the process is Powershell (pwsh) or a shell interpreter (sh, bash, zsh) with the encoded
command flag set in the process arguments. Powershell usage on macOS is extremely rare but usage of Powershell with the
encoded command flag, used for executing base64 encoded command strings, is almost always inherently malicious.
"""
id = "4abb4f46-2066-4769-b073-dca491067e1b"
license = "Elastic License v2"
name = "Powershell Encoded Command"
os_list = ["macos"]
version = "1.0.22"

query = '''
process where event.type == "start" and process.args in~ ("-EncodedCommand", "-enc") and
 (process.name in ("sh", "bash", "zsh", "pwsh", "dash", "csh", "tcsh", "ksh", "tclsh", "fish") or process.name like "tclsh*") and
 not process.args like "/Applications/Visual Studio Code.app/*" and
 not process.executable like "/Applications/Docker.app/Contents/Resources/bin/docker" and
 not process.parent.executable in ("/Applications/Docker.app/Contents/Resources/bin/com.docker.cli",
                                   "/Applications/VSCodium.app/Contents/Frameworks/VSCodium Helper.app/Contents/MacOS/VSCodium Helper",
                                   "/Applications/Cursor.app/Contents/Frameworks/Cursor Helper.app/Contents/MacOS/Cursor Helper",
                                   "/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper",
                                   "/Applications/Docker.app/Contents/Resources/bin/docker") and
 not process.parent.code_signature.team_id in ("UBF8T346G9", "83Z2LHX6XW") and
 not process.Ext.effective_parent.name == "electron" and
 not ((process.name == "zsh" and process.parent.name == "zsh") or
      (process.name == "pwsh" and process.parent.name == "pwsh") or
      (process.name == "pwsh" and process.parent.name == "Code Helper"))
'''

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

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

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.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/"

[internal]
min_endpoint_version = "8.11.0"

Stages and Predicates

Stage 1: process

process where event.type == "start" and process.args in~ ("-EncodedCommand", "-enc") and
 (process.name in ("sh", "bash", "zsh", "pwsh", "dash", "csh", "tcsh", "ksh", "tclsh", "fish") or process.name like "tclsh*") and
 not process.args like "/Applications/Visual Studio Code.app/*" and
 not process.executable like "/Applications/Docker.app/Contents/Resources/bin/docker" and
 not process.parent.executable in ("/Applications/Docker.app/Contents/Resources/bin/com.docker.cli",
                                   "/Applications/VSCodium.app/Contents/Frameworks/VSCodium Helper.app/Contents/MacOS/VSCodium Helper",
                                   "/Applications/Cursor.app/Contents/Frameworks/Cursor Helper.app/Contents/MacOS/Cursor Helper",
                                   "/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper",
                                   "/Applications/Docker.app/Contents/Resources/bin/docker") and
 not process.parent.code_signature.team_id in ("UBF8T346G9", "83Z2LHX6XW") and
 not process.Ext.effective_parent.name == "electron" and
 not ((process.name == "zsh" and process.parent.name == "zsh") or
      (process.name == "pwsh" and process.parent.name == "pwsh") or
      (process.name == "pwsh" and process.parent.name == "Code Helper"))

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.nameeqpwshexcludes:process.name field:"process.name" value:"pwsh"
process.parent.nameeqCode Helperexcludes:process.parent.name field:"process.parent.name" value:"Code Helper"
process.parent.nameeqpwshexcludes:process.parent.name field:"process.parent.name" value:"pwsh"
process.nameeqzshexcludes:process.name field:"process.name" value:"zsh"
process.parent.nameeqzshexcludes:process.parent.name field:"process.parent.name" value:"zsh"
process.Ext.effective_parent.nameeqelectronexcludes:process.Ext.effective_parent.name field:"process.Ext.effective_parent.name" value:"electron"
process.argsstarts_with/Applications/Visual Studio Code.app/excludes:process.args field:"process.args" value:"/Applications/Visual Studio Code.app/"
process.executableeq/Applications/Docker.app/Contents/Resources/bin/dockerexcludes:process.executable field:"process.executable" value:"/Applications/Docker.app/Contents/Resources/bin/docker"
process.parent.code_signature.team_idin83Z2LHX6XW, UBF8T346G9excludes:process.parent.code_signature.team_id field:"process.parent.code_signature.team_id" value:"83Z2LHX6XW" field:"process.parent.code_signature.team_id" value:"UBF8T346G9"
process.parent.executablein/Applications/Cursor.app/Contents/Frameworks/Cursor Helper.app/Contents/MacOS/Cursor Helper, /Applications/Docker.app/Contents/Resources/bin/com.docker.cli, /Applications/Docker.app/Contents/Resources/bin/docker, /Applications/VSCodium.app/Contents/Frameworks/VSCodium Helper.app/Contents/MacOS/VSCodium Helper, /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helperexcludes:process.parent.executable

Recently Downloaded File Made Executable and Run

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

This rule detects a sequence of events where a network connection is initiated to download a file to a world-writeable directory, followed by the execution of a chmod or chown command, and then another process execution. This pattern may indicate an attacker attempting to download a payload, modify its permissions to make it executable, and then execute it.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
This rule detects a sequence of events where a network connection is initiated to download a file to a world-writeable
directory, followed by the execution of a chmod or chown command, and then another process execution. This pattern may
indicate an attacker attempting to download a payload, modify its permissions to make it executable, and then execute
it.
"""
id = "d67ef864-5567-4675-b2eb-7dfd4443e8af"
license = "Elastic License v2"
name = "Recently Downloaded File Made Executable and Run"
os_list = ["linux"]
version = "1.0.9"

query = '''
sequence by process.parent.entity_id with maxspan=10s
  [file where event.type == "creation" and process.name in ("wget", "curl") and
   file.path like ("/tmp/*", "/var/tmp/*", "/dev/shm/*")] as event0
  [process where event.type == "start" and event.action == "exec" and process.name == "chmod" and
   process.command_line like~ (
     /* symbolic exec */
     "*+x*", "*+X*", "*=x*", "*=*x*",
     /* setuid/setgid & copy-perms */
     "*u+s*", "*g+s*", "*u=s*", "*g=s*", "*g=u*", "*o=u*",
     /* numeric: 3-digit forms where any position is 1/3/5/7 */
     "*7??*", "*?7?*", "*??7*",
     "*5??*", "*?5?*", "*??5*",
     "*3??*", "*?3?*", "*??3*",
     "*1??*", "*?1?*", "*??1*",
     /* numeric: 4-digit forms (leading special bit), same idea */
     "*?7??*", "*?5??*", "*?3??*", "*?1??*"
  ) and
  process.args_count >= 2 and
  stringcontains(process.command_line, event0.file.name) and
  not (
    process.command_line like~ ("*-h*","*--help*","*-V*","*--version*") or
    process.parent.command_line like "*/.claude/shell-snapshots/snapshot-*"
  )]
  [process where event.type == "start" and event.action == "exec" and startswith~(process.executable, event0.file.path) and
   not (
     process.parent.executable == "/usr/local/bin/check_idle.sh" or
     process.executable like (
       "/var/lib/docker/*", "/tmp/tmp.*/rustup-init", "/tmp/cis-diagnose-rc-amd64", "/tmp/tmp.*/juliainstaller",
       "/etc/actions-runner-*", "/builds/*/snyk", "/tmp/mpm", "/tmp/coder.*/coder", "/tmp/helm"
     ) or
     (process.executable like "/tmp/teleport-*/install.sh" and process.args == "/usr/bin/env" and process.working_directory like "/tmp/teleport-*") or
     (process.executable == "/tmp/garage" and process.parent.args == "/garage-init") or
     process.working_directory like "/var/lib/waagent/*" or
     process.entry_leader.executable : ("/usr/lib/venv-salt-minion/bin/python.original", "/var/ossec/bin/wazuh-modulesd") or
     (
       process.parent.executable == "/tmp/sca_security.sh" and
       process.executable like "/tmp/*_security_check.sh" and
       process.working_directory == "/var/ossec"
     )
   )]
'''

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

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

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

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

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

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

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

Stages and Predicates

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

Stage 1: file

[file where event.type == "creation" and process.name in ("wget", "curl") and
   file.path like ("/tmp/*", "/var/tmp/*", "/dev/shm/*")] as event0

Stage 2: process

[process where event.type == "start" and event.action == "exec" and process.name == "chmod" and
   process.command_line like~ (
     "*+x*", "*+X*", "*=x*", "*=*x*",
     "*u+s*", "*g+s*", "*u=s*", "*g=s*", "*g=u*", "*o=u*",
     "*7??*", "*?7?*", "*??7*",
     "*5??*", "*?5?*", "*??5*",
     "*3??*", "*?3?*", "*??3*",
     "*1??*", "*?1?*", "*??1*",
     "*?7??*", "*?5??*", "*?3??*", "*?1??*"
  ) and
  process.args_count >= 2 and
  stringcontains(process.command_line, event0.file.name) and
  not (
    process.command_line like~ ("*-h*","*--help*","*-V*","*--version*") or
    process.parent.command_line like "*/.claude/shell-snapshots/snapshot-*"
  )]

Stage 3: process

[process where event.type == "start" and event.action == "exec" and startswith~(process.executable, event0.file.path) and
   not (
     process.parent.executable == "/usr/local/bin/check_idle.sh" or
     process.executable like (
       "/var/lib/docker/*", "/tmp/tmp.*/rustup-init", "/tmp/cis-diagnose-rc-amd64", "/tmp/tmp.*/juliainstaller",
       "/etc/actions-runner-*", "/builds/*/snyk", "/tmp/mpm", "/tmp/coder.*/coder", "/tmp/helm"
     ) or
     (process.executable like "/tmp/teleport-*/install.sh" and process.args == "/usr/bin/env" and process.working_directory like "/tmp/teleport-*") or
     (process.executable == "/tmp/garage" and process.parent.args == "/garage-init") or
     process.working_directory like "/var/lib/waagent/*" or
     process.entry_leader.executable : ("/usr/lib/venv-salt-minion/bin/python.original", "/var/ossec/bin/wazuh-modulesd") or
     (
       process.parent.executable == "/tmp/sca_security.sh" and
       process.executable like "/tmp/*_security_check.sh" and
       process.working_directory == "/var/ossec"
     )
   )]

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • exec
field:"EventType" kind:eq value:"exec"
event.typeeq
  • creation
  • start
field:"event.type" kind:eq
file.pathwildcard
  • /dev/shm/*
  • /tmp/*
  • /var/tmp/*
field:"TargetFilename" kind:wildcard
process.args_countge
  • 2 transforms: number
field:"process.args_count" kind:ge value:"2"
process.command_linecontains
  • event0.file.name (field reference)
field:"CommandLine" kind:contains value:"event0.file.name"
process.command_linewildcard
  • *+X*
  • *+x*
  • *1??*
  • *3??*
  • *5??*
  • *7??*
  • *=*x*
  • *=x*
  • *?1?*
  • *?1??*
  • *?3?*
  • *?3??*
  • *?5?*
  • *?5??*
  • *?7?*
  • *?7??*
  • *??1*
  • *??3*
  • *??5*
  • *??7*
  • *g+s*
  • *g=s*
  • *g=u*
  • *o=u*
  • *u+s*
  • *u=s*
field:"CommandLine" kind:wildcard
process.executablestarts_with
  • event0.file.path (field reference)
field:"Image" kind:starts_with value:"event0.file.path"
process.nameeq
  • chmod
field:"process_basename" kind:eq value:"chmod"
process.namein
  • curl
  • wget
field:"process_basename" kind:in

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.command_linematch-h, --help, -V, --versionexcludes:process.command_line
process.parent.command_linematch/.claude/shell-snapshots/snapshot-excludes:process.parent.command_line field:"process.parent.command_line" value:"/.claude/shell-snapshots/snapshot-"
process.argseq/usr/bin/envexcludes:process.args field:"process.args" value:"/usr/bin/env"
process.executablewildcard/tmp/teleport-*/install.shexcludes:process.executable field:"process.executable" value:"/tmp/teleport-*/install.sh"
process.working_directorystarts_with/tmp/teleport-excludes:process.working_directory field:"process.working_directory" value:"/tmp/teleport-"
process.executableeq/tmp/garageexcludes:process.executable field:"process.executable" value:"/tmp/garage"
process.parent.argseq/garage-initexcludes:process.parent.args field:"process.parent.args" value:"/garage-init"
process.executablewildcard/tmp/*_security_check.shexcludes:process.executable field:"process.executable" value:"/tmp/*_security_check.sh"
process.parent.executableeq/tmp/sca_security.shexcludes:process.parent.executable field:"process.parent.executable" value:"/tmp/sca_security.sh"
process.working_directoryeq/var/ossecexcludes:process.working_directory field:"process.working_directory" value:"/var/ossec"
process.entry_leader.executableeq/usr/lib/venv-salt-minion/bin/python.original, /var/ossec/bin/wazuh-modulesdexcludes:process.entry_leader.executable field:"process.entry_leader.executable" value:"/usr/lib/venv-salt-minion/bin/python.original" field:"process.entry_leader.executable" value:"/var/ossec/bin/wazuh-modulesd"
process.executablewildcard/var/lib/docker/*, /tmp/tmp.*/rustup-init, /tmp/cis-diagnose-rc-amd64, /tmp/tmp.*/juliainstaller, /etc/actions-runner-*, /builds/*/snyk, /tmp/mpm, /tmp/coder.*/coder, /tmp/helmexcludes:process.executable
process.parent.executableeq/usr/local/bin/check_idle.shexcludes:process.parent.executable field:"process.parent.executable" value:"/usr/local/bin/check_idle.sh"
process.working_directorystarts_with/var/lib/waagent/excludes:process.working_directory field:"process.working_directory" value:"/var/lib/waagent/"

Remote Process Memory Write by Low Reputation Module

#
Source
github.com/elastic/protections-artifacts

Identifies attempts to write to the address space of a remote process by an unsigned final user module with low or unknown public reputation. This behavior is consistent with remote code injection attacks.

MITRE ATT&CK Coverage

TacticTechniques
Stealth

Rule Body

[rule]
description = """
Identifies attempts to write to the address space of a remote process by an unsigned final user module with low or
unknown public reputation. This behavior is consistent with remote code injection attacks.
"""
id = "54916896-1f73-441d-acec-1141094b15e3"
license = "Elastic License v2"
name = "Remote Process Memory Write by Low Reputation Module"
os_list = ["windows"]
version = "1.0.7"

query = '''
api where process.Ext.api.name == "WriteProcessMemory" and

 process.executable != null and Target.process.executable != null and process.Ext.api.behaviors == "cross-process" and

 Target.process.executable != process.executable and not process.Ext.api.summary like "*Unknown*" and

 /* WPM triggers multiple times at process creation */
 not (_arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info like ("*\\kernelbase.dll!CreateProcess*", "*\\kernelbase.dll+0x*"))
      and process.Ext.api.summary like ("*PEB*", "*PEB32*",  "*ProcessStartupInfo*")) and
 not (process.Ext.api.summary like ("*PEB*", "*PEB32*",  "*ProcessStartupInfo*") and process.thread.Ext.call_stack_summary like "*Unknown*") and

 /* excluding trusted code signature */
 process.thread.Ext.call_stack_final_user_module.code_signature != null and
 not _arraysearch(process.thread.Ext.call_stack_final_user_module.code_signature, $entry, $entry.trusted == true) and

 not (process.name : "rundll32.exe" and process.Ext.api.parameters.size <= 140 and
      _arraysearch(process.thread.Ext.call_stack_final_user_module.code_signature, $entry, $entry.subject_name == "Barco N.V." and $entry.status in ("errorTimeStamp", "errorUntrustedRoot"))) and

 not (process.executable : "\\\\?\\Volume{*}\\*.exe" and process.parent.executable : "\\\\?\\Volume{*}\\*.exe" and
      process.thread.Ext.call_stack_final_user_module.path like "*\\docker\\*\\windows\\*.dll") and

 /* excluding multiple unsigned third party modules from programfiles */
  not process.thread.Ext.call_stack_final_user_module.path like
                             ("?:\\windows\\assembly\\nativeimages_*",
                              "?:\\windows\\winsxs\\*.dll",
                              "?:\\program files\\*",
                              "?:\\program files (x86)\\*",
                              "c:\\windows\\apppatch\\ummon.dll",
                              "c:\\windows\\apppatch\\apppatch64\\ummon.dll",
                              "c:\\windows\\system32\\ctiuser.dll",
                              "c:\\windows\\syswow64\\ctiuser.dll",
                              "c:\\windows\\system32\\hpzipm12.dll",
                              "c:\\windows\\system32\\lsasrv.dll") and
  not process.thread.Ext.call_stack_final_user_module.protection_provenance in ("mfehcthe.dll", "system.core.ni.dll") and
  not process.thread.Ext.call_stack_final_user_module.protection_provenance_path like ("?:\\program files\\*", "?:\\program files (x86)\\*", "c:\\windows\\assembly\\nativeimages_*") and
  not process.thread.Ext.call_stack_final_user_module.name in ("Unknown", "Undetermined", "Kernel") and
  not process.thread.Ext.call_stack_final_user_module.hash.sha256 in
                                  ("27fe00d32f773a95e6d50986e5e7499917f66ce881e46054c77652ef4bdf3512",
                                   "a59e039e1520b74254a454bf48c2bceeafe7bd7ac6e5886baa482a52f86a29bf",
                                   "f01bb9aba3f9daf4d8f5551a3b753d8011e16072a1103cf5303d617a9f866424",
                                   "16184cf6f54d6ac4eb0a31c0e9ee8ae775bae6dfdc632e283e832f3e89de595d",
                                   "c983d11ad519a851aca2d37739110b7913819bea1ddf2cc3ec69efe3ed3b609f",
                                   "c3cd2439a6175ce28192904e72b14523b02559d8083a710b5e82aee400626d1a",
                                   "7396f943823494d2ec5f2260329daa2d35b1764f01cdefd95f84ae320986a8f3",
                                   "efd03f2525e69cdc30b5736af74d9485728b8a94d5624da87f1431b3706980ab",
                                   "8eb0721092af3131a940f1e23bc2871e09362980e0b71a7ed7dab6e8accd1f30",
                                   "6edb20df25d1cf0fd1b27052f2604a05db1d7ca5a3f074e7bacc229e28d17667",
                                   "67435999749d9e6908a4029321c0c6f9e915135e98e01a7e499a1c55a960bc68",
                                   "914299dd77f4322c99f62c37df1317ea3424d9a747d4635d10c1d3f003f6abd4",
                                   "51b63860fd996d6d5b1753ba6bb7f3a4303f13187fbfecc96ba2b6bae52a7410",
                                   "0255b5bf7ad66aa090be145f0ad41a0f4e33409ff5c2970081fccd863c720779",
                                   "925a5cd982933bae1b271e1aaaa887ab469397701cd299f4397ddd8af5a351f9",
                                   "9cb1208f1747963dc57e8bf8a8fe82b3aaa856caae3d151b6a6b97b23369f5a6",
                                   "681303f5b5688075b5b504819d8b3c343c78e3240a3bccf371e03228970ffb10",
                                   "30b59303bec45b020b4878b2d33d63bd719d89820456a7ee0a920178efe089f4",
                                   "8ee5bd6fea98577bd29c15055e96ec17c62ca415f4a5d26065b25a922b19d3b1",
                                   "57854d83b50ff0a23d47c077d6da875874ea78f88f28168d8e99ffbf9f1c3153",
                                   "c4788275a5ed2c1576e69b59e6e267ce573450ff07e54b799ec4c4edef40b502",
                                   "a4637935f895de601850c6868d952977a84076a7b1719d0deb519f1fc0871be4",
                                   "a99ac2554c1e392ffe3cd53f7f72f76638948533795fc04f7e15454c386b7eec",
                                   "b031da6137f9442a6cc9f4b4546b4057b666726cb7c9224c4ca857a60f2ec1e1",
                                   "586d8eeaec3a439978836a512bf2f5a987cbe2ba72e5bb10322d04cd65fe8d09",
                                   "ebdc2c2cedd5e549ba8d5e3f474d29204e1cf073e2b26e75f60bb429d2b5a088",
                                   "80eb757f729a943ff0919df1eb980b80f8419f76648407834d95c76adfd21624",
                                   "e71eb30f24c82bc4fa1c645eecbe343f5a44526043fc3a13047183dac5f212f3",
                                   "c46f9f3c710ff2baabea480670220e0328e7bcc2aa3c598c3f982728e0b5652d",
                                   "7f1ab7572a89534366172df3ae5f0182aab1ae3ef992b684a84c5c1a10e8315f",
                                   "d7624e57820ccd1bae7881e08af40bc3522971278018fdfbe0ca98302292165c",
                                   "e0f11ad44d1c1e11f9308f9aaee4d8bcac86ff6e0b4a41d1e75879f6cfd56049",
                                   "2266a567ba921d1c2661258cd5b31150274cb781ac01413c34a471557123ba65",
                                   "1f2e936a57994e16b457f249a64af4786877f7beaab003fb521a20e45031f408",
                                   "e8eaf74988082b8c8222dabed68218069c8eb4e93acd3619a776bc28d39e5ce5",
                                   "39fdb47a5f349e06bbb7dc1cedcc81a051d1dffe373956871325f8327e858afa",
                                   "f7af5eac1d34a2ddc619dd0c3172ec28334b8d79efc1f8ad758124b7e5aae0d5",
                                   "8f3d19065d0d1295bbfbf7591aa02af3a5dc70fde74bac670c18ccd8f7306008",
                                   "d6b771bedda261bcfe9dd1d1402b7d33b5cd2764cd53d941957e32920cfbeb19",
                                   "3e02857de5a59331e1f7fc7e1ddf5ae58e8680d298bb44b49bd316e0b3a1f024",
                                   "954b4385cf4faecfbf9cd04e01c059eb09113a78ee727149b63a65b495a28a6c",
                                   "8851b734602eb00da5b1cfc1e40d38f1cb32e0add2df257ff9d7dbd520b4d5da",
                                   "b2d86212afab00e7b9bf19b7931277130b653c9258ac419a7a24d749471ea5ac",
                                   "5231df995d71991ee4108937bb12e4d3f344a96fb0c4cd82c14e18061d6c4730",
                                   "4daef5be9503c580697b36b0b60a702c109e23840c0632ca00ef4a233603018e",
                                   "fd788a077e026905f1565e0d2a65dfc6c55699c098a59879d6b0b3f3b8459ae8",
                                   "dc641636d5d782b31d29ce823e951d1a2164c86ee06bf2f65a841360fb7af356",
                                   "fb4a05ce7d50721c71f66c37e0ab7e52cd46034a2e394940b3f60c9c2afb079a",
                                   "862a7e8c68f05b91ecf3a43ac5b60c6f57ee50fa98ad1b539480d541628f5c2e",
                                   "44c87532cbb511c369b38a105fc5a84b1d89dba9dfdd5a62c311d6176fe93201",
                                   "465aade5769d4cae2ca1f365ca634440a0444ca0ce319171c140c362d12859c4",
                                   "d615af8e012426c8847c750a0838159d6c41385d2e50388cea28a97999b81614",
                                   "9c63bfc10af9e801f0a009cb5e3c3c097d5eae8ee00351e2bcaa672ead352df4",
                                   "8bca3967254a38d6789c90afe136e34e96b5840b3fc77826dcf3c73b44016ea2",
                                   "dc2d5b2d59a18cd4e749d2cd709e4ada3751ef59d188a8bbab1bbd7562f2d609",
                                   "759f7e4d46e10d3de2fad228994ae8bb142ff171082d175b5d233895efa047be",
                                   "bea84d6541a56c63c570d7b637d18b4de3348c6f8b96b536002da1e7c268879f",
                                   "bc66341f3d2cd4d5216612869731a9f653fa4d75b429ee944a0802ae9457367f",
                                   "5497ff34548a2a0c948024e0d4f21005c18f82ed01246ee98dbb33c0389670c8",
                                   "ebbc8af232a86e870ecf0cbb3f6c3dc79e740c14e907437bab449e2a1e098ed3",
                                   "f3cb863c2a8f16a5f1a4ec5a4d7036f7a0b444cbd4f52226c0d463154e8d5428",
                                   "646c951524f1fab3aaa70a4cff9469ab658a2a0bdeea4e88aa18072c54c83430",
                                   "c79d56dacc8e28b662dcc5fe922453d225441bfa73656942beb205bf4ad20066",
                                   "d0735ca28e1f806da75e83a8405ed431d991c7476bc79c8be6c7b27ccce0ac31",
                                   "175184977cf02e59af9674a24a2f2b0d8278bf886f9f7e05ef8878b5364dc3bb",
                                   "7214d926419fe847a4795a74f9b73209990e4927bb5b56128cf30703be68cde7",
                                   "f7c78dba07128af325d8da99138ebf78be163ecfb5da5b01fa6b65b96efecef1",
                                   "5bcb5bd390665792c5e597bcc569caa9bfb942ef7946014eb60dcef0fcf586a6",
                                   "07d6c3a19a8e3e243e9545a41dd30a9ee1e9ad79cdd6d446c229d689e5ab574a",
                                   "3d171205aec848f93b721891806ff86b36ba639923067f6e5dabc4cf500f5831",
                                   "7b55a781fef86de1dd56f8956b5160d74de10c9c9179e7f5b38331eb4eefd9af",
                                   "593384d6a5d77c75426c0fe7d93663d24e9797548dd52ff8d60f9c25ac0b70f9",
                                   "67fffdf1b96050f8eca6e844cb23fcee2ef54f85fbfb7786ad9d6d3c39d84415",
                                   "e3fdcd2b4c5215e74b0cabe91ce7fe2800cbf8e2a28157342960bca61bbd6b5d",
                                   "4f1f25bb19905c34bf75436d32c48df96afd9872c0f5fc5ab45e31f9783e1ace",
                                   "0d6ff0e37139ee86d2991d2b8389f36316778ddb6e44a6d6c727e2d4b87693a5",
                                   "6e54f990149523e9b25c4dd804986f55bdbf846ba1261f8a0ba285cdfabe0bab",
                                   "2c8483ea06618e3c501678e4b7bd77f2e1c068cfa88c0f168abffa5f78b328ea",
                                   "03e03d5726da2ca346a0130cf01b7fa4af46b5f8b9370d1cf63ddde1c72dd6d2",
                                   "0d6ff0e37139ee86d2991d2b8389f36316778ddb6e44a6d6c727e2d4b87693a5",
                                   "494ee86d2a538f23fcfbab1507612637b4af2b97166ed1e3b5f86da74506bca4",
                                   "341f3841335bf2e4e2d2fe39672c591fbc819b0b64b654fc198000234fb8052b",
                                   "9840c97b35afb77418d541ef2f1b5da93c0d7d9632c334ec7444ceadeb0f9fa8",
                                   "27f6d804c989ddae14c94768240c639e14fc94bac4a56156c4f1925682004f89",
                                   "9840c97b35afb77418d541ef2f1b5da93c0d7d9632c334ec7444ceadeb0f9fa8",
                                   "ddcbecf2cd2cd4904cf21e3db40c6a918df0ed3b258473fc5d6e2688dee72696",
                                   "4e4b9bcef90731eb9b1306610fc89ba31296a5875ff5ba628f7271130aa61280",
                                   "35e1443640e39922f5488cba77b10fd97a58c65e0c4d2a0dcdd16a276c3677e1",
                                   "b152de9afc373bba831dc9c1b137668462ae6d46ccd46815f2ffcc7f1bfc7056",
                                   "c9b456c3722c60e680e8bbf3a8c9aad55bbea6af0f8de7340e4573b23b1272b6",
                                   "472232ca821b5c2ef562ab07f53638bc2cc82eae84cea13fbe674d6022b6481c",
                                   "cd4aa919f346bee759d4aded15c57901026307446546f8c296fa706e2e109095",
                                   "e3a6a3337494667a6cfd7578e9a6c6b5f17f4cac82ae9a98d56cd4c2ae701542",
                                   "0884f057877298b3dd93f3ffd749692820f7e8df52f907480484dab5000048f4",
                                   "7291b1c32671f5416ea33d1f14ca6a36dc77e166a12e6a3868ba68b9ebfdc3d3",
                                   "00bf4e4083d79196e54b39e2d957b25b50807c922d3cc09f5661215536895f4b",
                                   "02e1131db2a61b8547dac4f53e94c0dcdc1bf12224544707c0dc275fc74e09c7",
                                   "42215642c3c1ec4c578b9c03cbe8cd93cdf20abe33687473da2d25d5f5efe0a9",
                                   "2be01a865c59be9be8068f7fd5fcc1d772324a79a3ba50cf42250d3e8dc43cec",
                                   "cd0e1ca821e92ae426cbd30daf44ae3580ec4070c734b2d411376a5e6a874e97",
                                   "c750bdf07966a69d1423dda5deb3413d312e319c9dd1193f354eb48310208370",
                                   "538837e2f9bdb764d6ec799c89348bd483d51e72b3f91b6bc5e30a1bdcae24bf",
                                   "0e7165fa35c4175c837896f3af89bd4c5c53a562d0039a9849e2549aef0daa32",
                                   "2d7cdadefcd3a8b5ef17ea54ebc068f2593cef3eb88518d4c0ceaaa3923dafff",
                                   "53d38dbec3e832f63b0ced834fcfd1bc60959b733f98a66b171339e5144572fd",
                                   "c55eccc22495ca47d45738ec622c1063ec183fe240fbde7d40fd23d5018a695c",
                                   "154e97b6c7ff91c3e6687a5e6c2a5e7f5f0206df0d232fd3e80519f8f0cd8a5b",
                                   "c00a1e6ecb6d6febd07397cc3887087eec880ea3f34dda6dff4322eebdbfed29",
                                   "55cf1d3e49027092e6a364cc11b0a33bf3ca829868842067b9468a4b3f7a9c54",
                                   "89b8da24841c9959a19bb7932c02476b5150c4b17303f79b1252bee12559d419",
                                   "0274eae9163aa1e5184ec44959bc052dc58a090b4d27923ed64aa985b3e8ea82",
                                   "084b788ef2f160822ffd140665ea1d6065fe04bf0fbc85da2314e8baa630b282",
                                   "7998b2da82bac8bbcfbbcd73e0c439d780776e63889dd77b07ad11855416d789",
                                   "c0ebdc88e948ce980fcd1ea7d984b8a27539b34cc22f38bf477f19f42f206bac",
                                   "f939f09133e4a6a050e085adcdebadc92a45bd8696d75895ea520cfbd0167ebe",
                                   "32144dbc32aef6b1eab071968c2c2ee6eaf477dcb4a8eb7b8967824f48db17b7")
'''

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

[[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 = "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.14.2"

Stages and Predicates

Stage 1: api

api where process.Ext.api.name == "WriteProcessMemory" and
 process.executable != null and Target.process.executable != null and process.Ext.api.behaviors == "cross-process" and
 Target.process.executable != process.executable and not process.Ext.api.summary like "*Unknown*" and
 not (_arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info like ("*\\kernelbase.dll!CreateProcess*", "*\\kernelbase.dll+0x*"))
      and process.Ext.api.summary like ("*PEB*", "*PEB32*",  "*ProcessStartupInfo*")) and
 not (process.Ext.api.summary like ("*PEB*", "*PEB32*",  "*ProcessStartupInfo*") and process.thread.Ext.call_stack_summary like "*Unknown*") and
 process.thread.Ext.call_stack_final_user_module.code_signature != null and
 not _arraysearch(process.thread.Ext.call_stack_final_user_module.code_signature, $entry, $entry.trusted == true) and
 not (process.name : "rundll32.exe" and process.Ext.api.parameters.size <= 140 and
      _arraysearch(process.thread.Ext.call_stack_final_user_module.code_signature, $entry, $entry.subject_name == "Barco N.V." and $entry.status in ("errorTimeStamp", "errorUntrustedRoot"))) and
 not (process.executable : "\\\\?\\Volume{*}\\*.exe" and process.parent.executable : "\\\\?\\Volume{*}\\*.exe" and
      process.thread.Ext.call_stack_final_user_module.path like "*\\docker\\*\\windows\\*.dll") and
  not process.thread.Ext.call_stack_final_user_module.path like
                             ("?:\\windows\\assembly\\nativeimages_*",
                              "?:\\windows\\winsxs\\*.dll",
                              "?:\\program files\\*",
                              "?:\\program files (x86)\\*",
                              "c:\\windows\\apppatch\\ummon.dll",
                              "c:\\windows\\apppatch\\apppatch64\\ummon.dll",
                              "c:\\windows\\system32\\ctiuser.dll",
                              "c:\\windows\\syswow64\\ctiuser.dll",
                              "c:\\windows\\system32\\hpzipm12.dll",
                              "c:\\windows\\system32\\lsasrv.dll") and
  not process.thread.Ext.call_stack_final_user_module.protection_provenance in ("mfehcthe.dll", "system.core.ni.dll") and
  not process.thread.Ext.call_stack_final_user_module.protection_provenance_path like ("?:\\program files\\*", "?:\\program files (x86)\\*", "c:\\windows\\assembly\\nativeimages_*") and
  not process.thread.Ext.call_stack_final_user_module.name in ("Unknown", "Undetermined", "Kernel") and
  not process.thread.Ext.call_stack_final_user_module.hash.sha256 in
                                  ("27fe00d32f773a95e6d50986e5e7499917f66ce881e46054c77652ef4bdf3512",
                                   "a59e039e1520b74254a454bf48c2bceeafe7bd7ac6e5886baa482a52f86a29bf",
                                   "f01bb9aba3f9daf4d8f5551a3b753d8011e16072a1103cf5303d617a9f866424",
                                   "16184cf6f54d6ac4eb0a31c0e9ee8ae775bae6dfdc632e283e832f3e89de595d",
                                   "c983d11ad519a851aca2d37739110b7913819bea1ddf2cc3ec69efe3ed3b609f",
                                   "c3cd2439a6175ce28192904e72b14523b02559d8083a710b5e82aee400626d1a",
                                   "7396f943823494d2ec5f2260329daa2d35b1764f01cdefd95f84ae320986a8f3",
                                   "efd03f2525e69cdc30b5736af74d9485728b8a94d5624da87f1431b3706980ab",
                                   "8eb0721092af3131a940f1e23bc2871e09362980e0b71a7ed7dab6e8accd1f30",
                                   "6edb20df25d1cf0fd1b27052f2604a05db1d7ca5a3f074e7bacc229e28d17667",
                                   "67435999749d9e6908a4029321c0c6f9e915135e98e01a7e499a1c55a960bc68",
                                   "914299dd77f4322c99f62c37df1317ea3424d9a747d4635d10c1d3f003f6abd4",
                                   "51b63860fd996d6d5b1753ba6bb7f3a4303f13187fbfecc96ba2b6bae52a7410",
                                   "0255b5bf7ad66aa090be145f0ad41a0f4e33409ff5c2970081fccd863c720779",
                                   "925a5cd982933bae1b271e1aaaa887ab469397701cd299f4397ddd8af5a351f9",
                                   "9cb1208f1747963dc57e8bf8a8fe82b3aaa856caae3d151b6a6b97b23369f5a6",
                                   "681303f5b5688075b5b504819d8b3c343c78e3240a3bccf371e03228970ffb10",
                                   "30b59303bec45b020b4878b2d33d63bd719d89820456a7ee0a920178efe089f4",
                                   "8ee5bd6fea98577bd29c15055e96ec17c62ca415f4a5d26065b25a922b19d3b1",
                                   "57854d83b50ff0a23d47c077d6da875874ea78f88f28168d8e99ffbf9f1c3153",
                                   "c4788275a5ed2c1576e69b59e6e267ce573450ff07e54b799ec4c4edef40b502",
                                   "a4637935f895de601850c6868d952977a84076a7b1719d0deb519f1fc0871be4",
                                   "a99ac2554c1e392ffe3cd53f7f72f76638948533795fc04f7e15454c386b7eec",
                                   "b031da6137f9442a6cc9f4b4546b4057b666726cb7c9224c4ca857a60f2ec1e1",
                                   "586d8eeaec3a439978836a512bf2f5a987cbe2ba72e5bb10322d04cd65fe8d09",
                                   "ebdc2c2cedd5e549ba8d5e3f474d29204e1cf073e2b26e75f60bb429d2b5a088",
                                   "80eb757f729a943ff0919df1eb980b80f8419f76648407834d95c76adfd21624",
                                   "e71eb30f24c82bc4fa1c645eecbe343f5a44526043fc3a13047183dac5f212f3",
                                   "c46f9f3c710ff2baabea480670220e0328e7bcc2aa3c598c3f982728e0b5652d",
                                   "7f1ab7572a89534366172df3ae5f0182aab1ae3ef992b684a84c5c1a10e8315f",
                                   "d7624e57820ccd1bae7881e08af40bc3522971278018fdfbe0ca98302292165c",
                                   "e0f11ad44d1c1e11f9308f9aaee4d8bcac86ff6e0b4a41d1e75879f6cfd56049",
                                   "2266a567ba921d1c2661258cd5b31150274cb781ac01413c34a471557123ba65",
                                   "1f2e936a57994e16b457f249a64af4786877f7beaab003fb521a20e45031f408",
                                   "e8eaf74988082b8c8222dabed68218069c8eb4e93acd3619a776bc28d39e5ce5",
                                   "39fdb47a5f349e06bbb7dc1cedcc81a051d1dffe373956871325f8327e858afa",
                                   "f7af5eac1d34a2ddc619dd0c3172ec28334b8d79efc1f8ad758124b7e5aae0d5",
                                   "8f3d19065d0d1295bbfbf7591aa02af3a5dc70fde74bac670c18ccd8f7306008",
                                   "d6b771bedda261bcfe9dd1d1402b7d33b5cd2764cd53d941957e32920cfbeb19",
                                   "3e02857de5a59331e1f7fc7e1ddf5ae58e8680d298bb44b49bd316e0b3a1f024",
                                   "954b4385cf4faecfbf9cd04e01c059eb09113a78ee727149b63a65b495a28a6c",
                                   "8851b734602eb00da5b1cfc1e40d38f1cb32e0add2df257ff9d7dbd520b4d5da",
                                   "b2d86212afab00e7b9bf19b7931277130b653c9258ac419a7a24d749471ea5ac",
                                   "5231df995d71991ee4108937bb12e4d3f344a96fb0c4cd82c14e18061d6c4730",
                                   "4daef5be9503c580697b36b0b60a702c109e23840c0632ca00ef4a233603018e",
                                   "fd788a077e026905f1565e0d2a65dfc6c55699c098a59879d6b0b3f3b8459ae8",
                                   "dc641636d5d782b31d29ce823e951d1a2164c86ee06bf2f65a841360fb7af356",
                                   "fb4a05ce7d50721c71f66c37e0ab7e52cd46034a2e394940b3f60c9c2afb079a",
                                   "862a7e8c68f05b91ecf3a43ac5b60c6f57ee50fa98ad1b539480d541628f5c2e",
                                   "44c87532cbb511c369b38a105fc5a84b1d89dba9dfdd5a62c311d6176fe93201",
                                   "465aade5769d4cae2ca1f365ca634440a0444ca0ce319171c140c362d12859c4",
                                   "d615af8e012426c8847c750a0838159d6c41385d2e50388cea28a97999b81614",
                                   "9c63bfc10af9e801f0a009cb5e3c3c097d5eae8ee00351e2bcaa672ead352df4",
                                   "8bca3967254a38d6789c90afe136e34e96b5840b3fc77826dcf3c73b44016ea2",
                                   "dc2d5b2d59a18cd4e749d2cd709e4ada3751ef59d188a8bbab1bbd7562f2d609",
                                   "759f7e4d46e10d3de2fad228994ae8bb142ff171082d175b5d233895efa047be",
                                   "bea84d6541a56c63c570d7b637d18b4de3348c6f8b96b536002da1e7c268879f",
                                   "bc66341f3d2cd4d5216612869731a9f653fa4d75b429ee944a0802ae9457367f",
                                   "5497ff34548a2a0c948024e0d4f21005c18f82ed01246ee98dbb33c0389670c8",
                                   "ebbc8af232a86e870ecf0cbb3f6c3dc79e740c14e907437bab449e2a1e098ed3",
                                   "f3cb863c2a8f16a5f1a4ec5a4d7036f7a0b444cbd4f52226c0d463154e8d5428",
                                   "646c951524f1fab3aaa70a4cff9469ab658a2a0bdeea4e88aa18072c54c83430",
                                   "c79d56dacc8e28b662dcc5fe922453d225441bfa73656942beb205bf4ad20066",
                                   "d0735ca28e1f806da75e83a8405ed431d991c7476bc79c8be6c7b27ccce0ac31",
                                   "175184977cf02e59af9674a24a2f2b0d8278bf886f9f7e05ef8878b5364dc3bb",
                                   "7214d926419fe847a4795a74f9b73209990e4927bb5b56128cf30703be68cde7",
                                   "f7c78dba07128af325d8da99138ebf78be163ecfb5da5b01fa6b65b96efecef1",
                                   "5bcb5bd390665792c5e597bcc569caa9bfb942ef7946014eb60dcef0fcf586a6",
                                   "07d6c3a19a8e3e243e9545a41dd30a9ee1e9ad79cdd6d446c229d689e5ab574a",
                                   "3d171205aec848f93b721891806ff86b36ba639923067f6e5dabc4cf500f5831",
                                   "7b55a781fef86de1dd56f8956b5160d74de10c9c9179e7f5b38331eb4eefd9af",
                                   "593384d6a5d77c75426c0fe7d93663d24e9797548dd52ff8d60f9c25ac0b70f9",
                                   "67fffdf1b96050f8eca6e844cb23fcee2ef54f85fbfb7786ad9d6d3c39d84415",
                                   "e3fdcd2b4c5215e74b0cabe91ce7fe2800cbf8e2a28157342960bca61bbd6b5d",
                                   "4f1f25bb19905c34bf75436d32c48df96afd9872c0f5fc5ab45e31f9783e1ace",
                                   "0d6ff0e37139ee86d2991d2b8389f36316778ddb6e44a6d6c727e2d4b87693a5",
                                   "6e54f990149523e9b25c4dd804986f55bdbf846ba1261f8a0ba285cdfabe0bab",
                                   "2c8483ea06618e3c501678e4b7bd77f2e1c068cfa88c0f168abffa5f78b328ea",
                                   "03e03d5726da2ca346a0130cf01b7fa4af46b5f8b9370d1cf63ddde1c72dd6d2",
                                   "0d6ff0e37139ee86d2991d2b8389f36316778ddb6e44a6d6c727e2d4b87693a5",
                                   "494ee86d2a538f23fcfbab1507612637b4af2b97166ed1e3b5f86da74506bca4",
                                   "341f3841335bf2e4e2d2fe39672c591fbc819b0b64b654fc198000234fb8052b",
                                   "9840c97b35afb77418d541ef2f1b5da93c0d7d9632c334ec7444ceadeb0f9fa8",
                                   "27f6d804c989ddae14c94768240c639e14fc94bac4a56156c4f1925682004f89",
                                   "9840c97b35afb77418d541ef2f1b5da93c0d7d9632c334ec7444ceadeb0f9fa8",
                                   "ddcbecf2cd2cd4904cf21e3db40c6a918df0ed3b258473fc5d6e2688dee72696",
                                   "4e4b9bcef90731eb9b1306610fc89ba31296a5875ff5ba628f7271130aa61280",
                                   "35e1443640e39922f5488cba77b10fd97a58c65e0c4d2a0dcdd16a276c3677e1",
                                   "b152de9afc373bba831dc9c1b137668462ae6d46ccd46815f2ffcc7f1bfc7056",
                                   "c9b456c3722c60e680e8bbf3a8c9aad55bbea6af0f8de7340e4573b23b1272b6",
                                   "472232ca821b5c2ef562ab07f53638bc2cc82eae84cea13fbe674d6022b6481c",
                                   "cd4aa919f346bee759d4aded15c57901026307446546f8c296fa706e2e109095",
                                   "e3a6a3337494667a6cfd7578e9a6c6b5f17f4cac82ae9a98d56cd4c2ae701542",
                                   "0884f057877298b3dd93f3ffd749692820f7e8df52f907480484dab5000048f4",
                                   "7291b1c32671f5416ea33d1f14ca6a36dc77e166a12e6a3868ba68b9ebfdc3d3",
                                   "00bf4e4083d79196e54b39e2d957b25b50807c922d3cc09f5661215536895f4b",
                                   "02e1131db2a61b8547dac4f53e94c0dcdc1bf12224544707c0dc275fc74e09c7",
                                   "42215642c3c1ec4c578b9c03cbe8cd93cdf20abe33687473da2d25d5f5efe0a9",
                                   "2be01a865c59be9be8068f7fd5fcc1d772324a79a3ba50cf42250d3e8dc43cec",
                                   "cd0e1ca821e92ae426cbd30daf44ae3580ec4070c734b2d411376a5e6a874e97",
                                   "c750bdf07966a69d1423dda5deb3413d312e319c9dd1193f354eb48310208370",
                                   "538837e2f9bdb764d6ec799c89348bd483d51e72b3f91b6bc5e30a1bdcae24bf",
                                   "0e7165fa35c4175c837896f3af89bd4c5c53a562d0039a9849e2549aef0daa32",
                                   "2d7cdadefcd3a8b5ef17ea54ebc068f2593cef3eb88518d4c0ceaaa3923dafff",
                                   "53d38dbec3e832f63b0ced834fcfd1bc60959b733f98a66b171339e5144572fd",
                                   "c55eccc22495ca47d45738ec622c1063ec183fe240fbde7d40fd23d5018a695c",
                                   "154e97b6c7ff91c3e6687a5e6c2a5e7f5f0206df0d232fd3e80519f8f0cd8a5b",
                                   "c00a1e6ecb6d6febd07397cc3887087eec880ea3f34dda6dff4322eebdbfed29",
                                   "55cf1d3e49027092e6a364cc11b0a33bf3ca829868842067b9468a4b3f7a9c54",
                                   "89b8da24841c9959a19bb7932c02476b5150c4b17303f79b1252bee12559d419",
                                   "0274eae9163aa1e5184ec44959bc052dc58a090b4d27923ed64aa985b3e8ea82",
                                   "084b788ef2f160822ffd140665ea1d6065fe04bf0fbc85da2314e8baa630b282",
                                   "7998b2da82bac8bbcfbbcd73e0c439d780776e63889dd77b07ad11855416d789",
                                   "c0ebdc88e948ce980fcd1ea7d984b8a27539b34cc22f38bf477f19f42f206bac",
                                   "f939f09133e4a6a050e085adcdebadc92a45bd8696d75895ea520cfbd0167ebe",
                                   "32144dbc32aef6b1eab071968c2c2ee6eaf477dcb4a8eb7b8967824f48db17b7")

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.thread.Ext.call_stack_final_user_module.code_signaturearray_any(no value, null check)excludes:process.thread.Ext.call_stack_final_user_module.code_signature
process.Ext.api.parameters.sizele140excludes:process.Ext.api.parameters.size field:"process.Ext.api.parameters.size" value:"140"
process.nameeqrundll32.exeexcludes:process.name field:"process.name" value:"rundll32.exe"
process.thread.Ext.call_stackarray_any(no value, null check)excludes:process.thread.Ext.call_stack
process.Ext.api.summarymatchPEB, PEB32, ProcessStartupInfoexcludes:process.Ext.api.summary field:"process.Ext.api.summary" value:"PEB" field:"process.Ext.api.summary" value:"PEB32" field:"process.Ext.api.summary" value:"ProcessStartupInfo"
process.thread.Ext.call_stack_summarymatchUnknownexcludes:process.thread.Ext.call_stack_summary field:"process.thread.Ext.call_stack_summary" value:"Unknown"
process.executablewildcard\\?\Volume{*}\*.exeexcludes:process.executable field:"process.executable" value:"\\?\Volume{*}\*.exe"
process.parent.executablewildcard\\?\Volume{*}\*.exeexcludes:process.parent.executable field:"process.parent.executable" value:"\\?\Volume{*}\*.exe"
process.thread.Ext.call_stack_final_user_module.pathwildcard*\docker\*\windows\*.dllexcludes:process.thread.Ext.call_stack_final_user_module.path field:"process.thread.Ext.call_stack_final_user_module.path" value:"*\docker\*\windows\*.dll"
process.Ext.api.summarymatchUnknownexcludes:process.Ext.api.summary field:"process.Ext.api.summary" value:"Unknown"
process.thread.Ext.call_stack_final_user_module.hash.sha256in00bf4e4083d79196e54b39e2d957b25b50807c922d3cc09f5661215536895f4b, 0255b5bf7ad66aa090be145f0ad41a0f4e33409ff5c2970081fccd863c720779, 0274eae9163aa1e5184ec44959bc052dc58a090b4d27923ed64aa985b3e8ea82, 02e1131db2a61b8547dac4f53e94c0dcdc1bf12224544707c0dc275fc74e09c7, 03e03d5726da2ca346a0130cf01b7fa4af46b5f8b9370d1cf63ddde1c72dd6d2, 07d6c3a19a8e3e243e9545a41dd30a9ee1e9ad79cdd6d446c229d689e5ab574a, 084b788ef2f160822ffd140665ea1d6065fe04bf0fbc85da2314e8baa630b282, 0884f057877298b3dd93f3ffd749692820f7e8df52f907480484dab5000048f4, 0d6ff0e37139ee86d2991d2b8389f36316778ddb6e44a6d6c727e2d4b87693a5, 0e7165fa35c4175c837896f3af89bd4c5c53a562d0039a9849e2549aef0daa32, 154e97b6c7ff91c3e6687a5e6c2a5e7f5f0206df0d232fd3e80519f8f0cd8a5b, 16184cf6f54d6ac4eb0a31c0e9ee8ae775bae6dfdc632e283e832f3e89de595d, 175184977cf02e59af9674a24a2f2b0d8278bf886f9f7e05ef8878b5364dc3bb, 1f2e936a57994e16b457f249a64af4786877f7beaab003fb521a20e45031f408, 2266a567ba921d1c2661258cd5b31150274cb781ac01413c34a471557123ba65, 27f6d804c989ddae14c94768240c639e14fc94bac4a56156c4f1925682004f89, 27fe00d32f773a95e6d50986e5e7499917f66ce881e46054c77652ef4bdf3512, 2be01a865c59be9be8068f7fd5fcc1d772324a79a3ba50cf42250d3e8dc43cec, 2c8483ea06618e3c501678e4b7bd77f2e1c068cfa88c0f168abffa5f78b328ea, 2d7cdadefcd3a8b5ef17ea54ebc068f2593cef3eb88518d4c0ceaaa3923dafff, 30b59303bec45b020b4878b2d33d63bd719d89820456a7ee0a920178efe089f4, 32144dbc32aef6b1eab071968c2c2ee6eaf477dcb4a8eb7b8967824f48db17b7, 341f3841335bf2e4e2d2fe39672c591fbc819b0b64b654fc198000234fb8052b, 35e1443640e39922f5488cba77b10fd97a58c65e0c4d2a0dcdd16a276c3677e1, 39fdb47a5f349e06bbb7dc1cedcc81a051d1dffe373956871325f8327e858afa, 3d171205aec848f93b721891806ff86b36ba639923067f6e5dabc4cf500f5831, 3e02857de5a59331e1f7fc7e1ddf5ae58e8680d298bb44b49bd316e0b3a1f024, 42215642c3c1ec4c578b9c03cbe8cd93cdf20abe33687473da2d25d5f5efe0a9, 44c87532cbb511c369b38a105fc5a84b1d89dba9dfdd5a62c311d6176fe93201, 465aade5769d4cae2ca1f365ca634440a0444ca0ce319171c140c362d12859c4, 472232ca821b5c2ef562ab07f53638bc2cc82eae84cea13fbe674d6022b6481c, 494ee86d2a538f23fcfbab1507612637b4af2b97166ed1e3b5f86da74506bca4, 4daef5be9503c580697b36b0b60a702c109e23840c0632ca00ef4a233603018e, 4e4b9bcef90731eb9b1306610fc89ba31296a5875ff5ba628f7271130aa61280, 4f1f25bb19905c34bf75436d32c48df96afd9872c0f5fc5ab45e31f9783e1ace, 51b63860fd996d6d5b1753ba6bb7f3a4303f13187fbfecc96ba2b6bae52a7410, 5231df995d71991ee4108937bb12e4d3f344a96fb0c4cd82c14e18061d6c4730, 538837e2f9bdb764d6ec799c89348bd483d51e72b3f91b6bc5e30a1bdcae24bf, 53d38dbec3e832f63b0ced834fcfd1bc60959b733f98a66b171339e5144572fd, 5497ff34548a2a0c948024e0d4f21005c18f82ed01246ee98dbb33c0389670c8, 55cf1d3e49027092e6a364cc11b0a33bf3ca829868842067b9468a4b3f7a9c54, 57854d83b50ff0a23d47c077d6da875874ea78f88f28168d8e99ffbf9f1c3153, 586d8eeaec3a439978836a512bf2f5a987cbe2ba72e5bb10322d04cd65fe8d09, 593384d6a5d77c75426c0fe7d93663d24e9797548dd52ff8d60f9c25ac0b70f9, 5bcb5bd390665792c5e597bcc569caa9bfb942ef7946014eb60dcef0fcf586a6, 646c951524f1fab3aaa70a4cff9469ab658a2a0bdeea4e88aa18072c54c83430, 67435999749d9e6908a4029321c0c6f9e915135e98e01a7e499a1c55a960bc68, 67fffdf1b96050f8eca6e844cb23fcee2ef54f85fbfb7786ad9d6d3c39d84415, 681303f5b5688075b5b504819d8b3c343c78e3240a3bccf371e03228970ffb10, 6e54f990149523e9b25c4dd804986f55bdbf846ba1261f8a0ba285cdfabe0bab, 6edb20df25d1cf0fd1b27052f2604a05db1d7ca5a3f074e7bacc229e28d17667, 7214d926419fe847a4795a74f9b73209990e4927bb5b56128cf30703be68cde7, 7291b1c32671f5416ea33d1f14ca6a36dc77e166a12e6a3868ba68b9ebfdc3d3, 7396f943823494d2ec5f2260329daa2d35b1764f01cdefd95f84ae320986a8f3, 759f7e4d46e10d3de2fad228994ae8bb142ff171082d175b5d233895efa047be, 7998b2da82bac8bbcfbbcd73e0c439d780776e63889dd77b07ad11855416d789, 7b55a781fef86de1dd56f8956b5160d74de10c9c9179e7f5b38331eb4eefd9af, 7f1ab7572a89534366172df3ae5f0182aab1ae3ef992b684a84c5c1a10e8315f, 80eb757f729a943ff0919df1eb980b80f8419f76648407834d95c76adfd21624, 862a7e8c68f05b91ecf3a43ac5b60c6f57ee50fa98ad1b539480d541628f5c2e, 8851b734602eb00da5b1cfc1e40d38f1cb32e0add2df257ff9d7dbd520b4d5da, 89b8da24841c9959a19bb7932c02476b5150c4b17303f79b1252bee12559d419, 8bca3967254a38d6789c90afe136e34e96b5840b3fc77826dcf3c73b44016ea2, 8eb0721092af3131a940f1e23bc2871e09362980e0b71a7ed7dab6e8accd1f30, 8ee5bd6fea98577bd29c15055e96ec17c62ca415f4a5d26065b25a922b19d3b1, 8f3d19065d0d1295bbfbf7591aa02af3a5dc70fde74bac670c18ccd8f7306008, 914299dd77f4322c99f62c37df1317ea3424d9a747d4635d10c1d3f003f6abd4, 925a5cd982933bae1b271e1aaaa887ab469397701cd299f4397ddd8af5a351f9, 954b4385cf4faecfbf9cd04e01c059eb09113a78ee727149b63a65b495a28a6c, 9840c97b35afb77418d541ef2f1b5da93c0d7d9632c334ec7444ceadeb0f9fa8, 9c63bfc10af9e801f0a009cb5e3c3c097d5eae8ee00351e2bcaa672ead352df4, 9cb1208f1747963dc57e8bf8a8fe82b3aaa856caae3d151b6a6b97b23369f5a6, a4637935f895de601850c6868d952977a84076a7b1719d0deb519f1fc0871be4, a59e039e1520b74254a454bf48c2bceeafe7bd7ac6e5886baa482a52f86a29bf, a99ac2554c1e392ffe3cd53f7f72f76638948533795fc04f7e15454c386b7eec, b031da6137f9442a6cc9f4b4546b4057b666726cb7c9224c4ca857a60f2ec1e1, b152de9afc373bba831dc9c1b137668462ae6d46ccd46815f2ffcc7f1bfc7056, b2d86212afab00e7b9bf19b7931277130b653c9258ac419a7a24d749471ea5ac, bc66341f3d2cd4d5216612869731a9f653fa4d75b429ee944a0802ae9457367f, bea84d6541a56c63c570d7b637d18b4de3348c6f8b96b536002da1e7c268879f, c00a1e6ecb6d6febd07397cc3887087eec880ea3f34dda6dff4322eebdbfed29, c0ebdc88e948ce980fcd1ea7d984b8a27539b34cc22f38bf477f19f42f206bac, c3cd2439a6175ce28192904e72b14523b02559d8083a710b5e82aee400626d1a, c46f9f3c710ff2baabea480670220e0328e7bcc2aa3c598c3f982728e0b5652d, c4788275a5ed2c1576e69b59e6e267ce573450ff07e54b799ec4c4edef40b502, c55eccc22495ca47d45738ec622c1063ec183fe240fbde7d40fd23d5018a695c, c750bdf07966a69d1423dda5deb3413d312e319c9dd1193f354eb48310208370, c79d56dacc8e28b662dcc5fe922453d225441bfa73656942beb205bf4ad20066, c983d11ad519a851aca2d37739110b7913819bea1ddf2cc3ec69efe3ed3b609f, c9b456c3722c60e680e8bbf3a8c9aad55bbea6af0f8de7340e4573b23b1272b6, cd0e1ca821e92ae426cbd30daf44ae3580ec4070c734b2d411376a5e6a874e97, cd4aa919f346bee759d4aded15c57901026307446546f8c296fa706e2e109095, d0735ca28e1f806da75e83a8405ed431d991c7476bc79c8be6c7b27ccce0ac31, d615af8e012426c8847c750a0838159d6c41385d2e50388cea28a97999b81614, d6b771bedda261bcfe9dd1d1402b7d33b5cd2764cd53d941957e32920cfbeb19, d7624e57820ccd1bae7881e08af40bc3522971278018fdfbe0ca98302292165c, dc2d5b2d59a18cd4e749d2cd709e4ada3751ef59d188a8bbab1bbd7562f2d609, dc641636d5d782b31d29ce823e951d1a2164c86ee06bf2f65a841360fb7af356, ddcbecf2cd2cd4904cf21e3db40c6a918df0ed3b258473fc5d6e2688dee72696, e0f11ad44d1c1e11f9308f9aaee4d8bcac86ff6e0b4a41d1e75879f6cfd56049, e3a6a3337494667a6cfd7578e9a6c6b5f17f4cac82ae9a98d56cd4c2ae701542, e3fdcd2b4c5215e74b0cabe91ce7fe2800cbf8e2a28157342960bca61bbd6b5d, e71eb30f24c82bc4fa1c645eecbe343f5a44526043fc3a13047183dac5f212f3, e8eaf74988082b8c8222dabed68218069c8eb4e93acd3619a776bc28d39e5ce5, ebbc8af232a86e870ecf0cbb3f6c3dc79e740c14e907437bab449e2a1e098ed3, ebdc2c2cedd5e549ba8d5e3f474d29204e1cf073e2b26e75f60bb429d2b5a088, efd03f2525e69cdc30b5736af74d9485728b8a94d5624da87f1431b3706980ab, f01bb9aba3f9daf4d8f5551a3b753d8011e16072a1103cf5303d617a9f866424, f3cb863c2a8f16a5f1a4ec5a4d7036f7a0b444cbd4f52226c0d463154e8d5428, f7af5eac1d34a2ddc619dd0c3172ec28334b8d79efc1f8ad758124b7e5aae0d5, f7c78dba07128af325d8da99138ebf78be163ecfb5da5b01fa6b65b96efecef1, f939f09133e4a6a050e085adcdebadc92a45bd8696d75895ea520cfbd0167ebe, fb4a05ce7d50721c71f66c37e0ab7e52cd46034a2e394940b3f60c9c2afb079a, fd788a077e026905f1565e0d2a65dfc6c55699c098a59879d6b0b3f3b8459ae8excludes:process.thread.Ext.call_stack_final_user_module.hash.sha256
process.thread.Ext.call_stack_final_user_module.nameinKernel, Undetermined, Unknownexcludes:process.thread.Ext.call_stack_final_user_module.name field:"process.thread.Ext.call_stack_final_user_module.name" value:"Kernel" field:"process.thread.Ext.call_stack_final_user_module.name" value:"Undetermined" field:"process.thread.Ext.call_stack_final_user_module.name" value:"Unknown"
process.thread.Ext.call_stack_final_user_module.pathwildcard?:\windows\assembly\nativeimages_*, ?:\windows\winsxs\*.dll, ?:\program files\*, ?:\program files (x86)\*, c:\windows\apppatch\ummon.dll, c:\windows\apppatch\apppatch64\ummon.dll, c:\windows\system32\ctiuser.dll, c:\windows\syswow64\ctiuser.dll, c:\windows\system32\hpzipm12.dll, c:\windows\system32\lsasrv.dllexcludes:process.thread.Ext.call_stack_final_user_module.path
process.thread.Ext.call_stack_final_user_module.protection_provenanceinmfehcthe.dll, system.core.ni.dllexcludes:process.thread.Ext.call_stack_final_user_module.protection_provenance field:"process.thread.Ext.call_stack_final_user_module.protection_provenance" value:"mfehcthe.dll" field:"process.thread.Ext.call_stack_final_user_module.protection_provenance" value:"system.core.ni.dll"
process.thread.Ext.call_stack_final_user_module.protection_provenance_pathstarts_with?:\program files\, ?:\program files (x86)\, c:\windows\assembly\nativeimages_excludes:process.thread.Ext.call_stack_final_user_module.protection_provenance_path field:"process.thread.Ext.call_stack_final_user_module.protection_provenance_path" value:"?:\program files\" field:"process.thread.Ext.call_stack_final_user_module.protection_provenance_path" value:"?:\program files (x86)\" field:"process.thread.Ext.call_stack_final_user_module.protection_provenance_path" value:"c:\windows\assembly\nativeimages_"

Sensitive Registry Hive Access via RegBack

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

Identifies attempts to access registry backup hives that can contain or enable access to credential material.

MITRE ATT&CK Coverage

Rule Body

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

[rule]
author = ["Elastic"]
description = "Identifies attempts to access registry backup hives that can contain or enable access to credential material."
from = "now-9m"
index = ["logs-endpoint.events.file-*"]
language = "eql"
license = "Elastic License v2"
name = "Sensitive Registry Hive Access via RegBack"
references = [
    "https://attack.mitre.org/techniques/T1003/002/",
]
risk_score = 73
rule_id = "63e381a6-0ffe-4afb-9a26-72a59ad16d7b"
severity = "high"
tags = [
    "Domain: Endpoint",
    "OS: Windows",
    "Use Case: Threat Detection",
    "Tactic: Credential Access",
    "Resources: Investigation Guide",
    "Data Source: Elastic Defend",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
file where host.os.type == "windows" and
 event.action == "open" and event.outcome == "success" and process.executable != null and
 file.path :
      ("?:\\Windows\\System32\\config\\RegBack\\SAM",
       "?:\\Windows\\System32\\config\\RegBack\\SECURITY",
       "?:\\Windows\\System32\\config\\RegBack\\SYSTEM") and
 not (
    user.id == "S-1-5-18" and process.executable : (
        "?:\\Windows\\system32\\taskhostw.exe",
        "?:\\Windows\\system32\\taskhost.exe",
        "?:\\Program Files\\Sophos\\Endpoint Defense\\SophosScanCoordinator.exe",
        "?:\\Program Files\\Sophos\\Endpoint Defense\\SSPService.exe",
        "?:\\Program Files\\Windows Defender Advanced Threat Protection\\MsSense.exe",
        "?:\\Program Files\\Trend Micro\\AMSP\\coreServiceShell.exe",
        "?:\\Program Files\\Symantec\\Symantec Endpoint Protection\\*\\Bin64\\ccSvcHst.exe",
        "?:\\Program Files\\Bitdefender\\Endpoint Security\\EPSecurityService.exe",
        "?:\\Program Files\\N-able Technologies\\AVDefender\\EPSecurityService.exe",
        "?:\\Program Files\\Cylance\\Optics\\CyOptics.exe",
        "?:\\Program Files\\Common Files\\McAfee\\AVSolution\\mcshield.exe",
        "?:\\Program Files (x86)\\Padvish AV\\APCcSvc.exe"
    )
 )
'''

note = """## Triage and analysis

### Investigating Sensitive Registry Hive Access via RegBack

#### Possible investigation steps

- Which RegBack hives did the process open, and is the set usable for credential access?
  - Why: "SAM" or "SECURITY" becomes credential material when paired with "SYSTEM"; `file.size` helps assess populated hives but does not replace hive-set review.
  - Focus: alert `file.path` and `file.size`, then same-process opens for other RegBack hives. $investigate_2
  - Implication: escalate when one process accesses "SAM" plus "SYSTEM" or all three hives, especially with populated sizes; do not close on empty/missing size alone, and keep isolated single-hive access unresolved until identity and staging are checked.

- Does the accessing process fit a recognized recovery, backup, or forensic chain?
  - Focus: `process.executable`, `process.code_signature.subject_name`, `process.code_signature.trusted`, and `process.parent.executable`.
  - Hint: use `process.entity_id` to tie `process.command_line` and `process.parent.command_line` to the opener; if renamed, check `process.pe.original_file_name`. Trusted signer or Microsoft path does not clear credential-hive access.
  - Implication: escalate when the binary is unsigned, user-writable, renamed, or launched by shell, script, Office, or remote-admin lineage outside recovery/evidence collection; lower suspicion when signer, path, parent, and command lines converge on one recognized workflow.

- Did the same process stage, rename, archive, or hide hive files?
  - Focus: same-process file events by `host.id` and `process.entity_id`, especially `file.path` and `file.size`.
  - Hint: look for temp, user-profile, admin-share, removable, archive, or deceptive names omitting "SAM", "SECURITY", or "SYSTEM".
  - Implication: escalate when hives are copied, renamed, compressed, or staged outside a recognized evidence or backup repository; lower suspicion when copies stay inside the bounded recovery/forensic case path.

- Does the user and session identity fit protected RegBack access?
  - Focus: `user.id`, `process.Ext.authentication_id`, `process.command_line`, and `process.parent.executable`.
  - Hint: when present, use `process.Ext.session_info.logon_type` only as support; otherwise anchor on `process.Ext.authentication_id`, parent, and command line.
  - Implication: escalate on rare user, unexplained session identifier, or remote-admin lineage without matching process and file-path evidence for recovery or forensics; lower suspicion when account, session, parent, and command line match the bounded workflow.

- Do command lines or child processes show hive parsing, cleanup, or transfer?
  - Why: RegBack reads may pair with "reg save", shadow-copy, or raw-copy variants for offline secret extraction.
  - Focus: `process.command_line`, child process events where `process.parent.entity_id` matches `process.entity_id`, and copied-hive `file.path` values. $investigate_3
  - Hint: check for "reg.exe save", shadow-copy utilities, raw-copy tools, archive tools, credential dumpers, cleanup commands, removable paths, or UNC paths.
  - Implication: escalate when the lineage parses hives, creates archives, deletes staged hives, writes UNC/removable paths, or uses reg-save/shadow-copy/raw-copy variants; absence of these follow-on artifacts does not clear populated multi-hive access.

- If local evidence is suspicious or incomplete, do related alerts expand scope?
  - Focus: related alerts for `user.id` covering credential access, privilege escalation, staging, transfer, persistence, or lateral movement. $investigate_0
  - Hint: use `host.id` when user scope is quiet or the actor is "S-1-5-18" or another service context. $investigate_1
  - Implication: broaden containment and credential-impact review when related alerts show adjacent post-compromise behavior; keep the case local when related alerts are quiet and all local evidence fits one recognized workflow.

- Escalate on populated multi-hive access with suspicious identity, staging, transfer, privilege, or related-alert context; close only when telemetry aligns with one recognized backup, recovery, or forensic workflow and no contradictory evidence remains; preserve hives, process records, and copied artifacts when evidence is mixed, incomplete, or needs outside confirmation.

### False positive analysis

- Endpoint security products (AV/EDR) routinely open RegBack hives during full-disk scans. Confirm when `process.executable` is a trusted-signed binary from a `Program Files` AV/EDR install path, `user.id` is `S-1-5-18`, and the same `process.entity_id` shows no staging, copy, archive, or multi-hive credential-set access.
- Recognized backup, recovery, or forensic workflows can legitimately access RegBack hives only when `process.executable`, `process.code_signature.subject_name`, `process.parent.executable`, `process.command_line`, copied `file.path`, `user.id`, `process.Ext.authentication_id`, and `host.id` identify the same bounded maintenance or evidence-collection scope. Leave unresolved if staging, child-process, or related-alert evidence contradicts the workflow or legitimacy rests only on owner/context.
- Before creating an exception, require recurring `process.executable`, `process.command_line`, `file.path`, `user.id`, and `host.id` across prior alerts; avoid exceptions on the RegBack path, hive name, or host alone.

### Response and remediation

- If confirmed benign, release any temporary containment and document the confirmed workflow anchors: tool identity, parent and command line, bounded RegBack `file.path` set, copied path pattern, `user.id`, and `host.id`. Create an exception only if those anchors recur consistently across prior alerts from this rule.
- If suspicious but unconfirmed, export the alert, process timeline, same-process file activity, and any copied, archived, UNC, or removable-media hive paths before containment. Preserve hive copies when present. Apply reversible containment first, such as restricting the process, copied path, share access, or involved `user.id`; escalate to host isolation only when populated multi-hive access is paired with staging, transfer paths, or related post-compromise alerts and the asset can tolerate it.
- If confirmed malicious, record and preserve the responsible process instance, process timeline, and hive artifact paths before containment. Then use Elastic Defend response actions to isolate the host and kill or suspend the process. If direct endpoint response is unavailable, escalate with those artifacts to the team that can isolate the host or disable the involved account. Block confirmed malicious tools, paths, shares, and copied artifacts tied to the RegBack access before cleanup.
- If the same process accessed populated "SAM", "SECURITY", and "SYSTEM" files, treat the case as higher-confidence credential exposure and begin local-account and cached-credential hygiene appropriate to the host role. On shared admin systems or servers with privileged local accounts, escalate identity-impact handling according to the credential-compromise runbook.
- Before eradication, scope the same process identity, RegBack path set, copy destinations, `user.id`, and `host.id` across related alerts so evidence is preserved before cleanup. Then remove unauthorized tools, copied hives, archives, remote-share artifacts, and persistence mechanisms uncovered during the investigation, and remediate the access vector or privilege path that allowed RegBack access.
- Post-incident hardening: restrict RegBack access to recognized backup, recovery, and forensic tooling; retain endpoint process and file telemetry needed for this workflow; and document any "reg save", shadow-copy, or raw-copy variants surfaced during triage for future case comparison.
"""

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.name",
    "host.id",
    "user.name",
    "user.id",
    "process.executable",
    "process.entity_id",
    "process.command_line",
    "process.parent.executable",
    "process.pe.original_file_name",
    "process.code_signature.subject_name",
    "process.code_signature.trusted",
    "process.Ext.authentication_id",
    "file.path",
    "file.size",
]

[transform]

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

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

[[transform.investigate]]
label = "File activity for the same process"
description = ""
providers = [
  [
    { 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" }
  ]
]
relativeFrom = "now-1h"
relativeTo = "now"

[[transform.investigate]]
label = "Child process events for the accessing process"
description = ""
providers = [
  [
    { 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" }
  ]
]
relativeFrom = "now-1h"
relativeTo = "now"

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

[[rule.threat.technique]]
id = "T1003"
name = "OS Credential Dumping"
reference = "https://attack.mitre.org/techniques/T1003/"

[[rule.threat.technique.subtechnique]]
id = "T1003.002"
name = "Security Account Manager"
reference = "https://attack.mitre.org/techniques/T1003/002/"

[[rule.threat.technique.subtechnique]]
id = "T1003.004"
name = "LSA Secrets"
reference = "https://attack.mitre.org/techniques/T1003/004/"

[[rule.threat.technique.subtechnique]]
id = "T1003.005"
name = "Cached Domain Credentials"
reference = "https://attack.mitre.org/techniques/T1003/005/"

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

Stages and Predicates

Stage 1: file

file where host.os.type == "windows" and
 event.action == "open" and event.outcome == "success" and process.executable != null and
 file.path :
      ("?:\\Windows\\System32\\config\\RegBack\\SAM",
       "?:\\Windows\\System32\\config\\RegBack\\SECURITY",
       "?:\\Windows\\System32\\config\\RegBack\\SYSTEM") and
 not (
    user.id == "S-1-5-18" and process.executable : (
        "?:\\Windows\\system32\\taskhostw.exe",
        "?:\\Windows\\system32\\taskhost.exe",
        "?:\\Program Files\\Sophos\\Endpoint Defense\\SophosScanCoordinator.exe",
        "?:\\Program Files\\Sophos\\Endpoint Defense\\SSPService.exe",
        "?:\\Program Files\\Windows Defender Advanced Threat Protection\\MsSense.exe",
        "?:\\Program Files\\Trend Micro\\AMSP\\coreServiceShell.exe",
        "?:\\Program Files\\Symantec\\Symantec Endpoint Protection\\*\\Bin64\\ccSvcHst.exe",
        "?:\\Program Files\\Bitdefender\\Endpoint Security\\EPSecurityService.exe",
        "?:\\Program Files\\N-able Technologies\\AVDefender\\EPSecurityService.exe",
        "?:\\Program Files\\Cylance\\Optics\\CyOptics.exe",
        "?:\\Program Files\\Common Files\\McAfee\\AVSolution\\mcshield.exe",
        "?:\\Program Files (x86)\\Padvish AV\\APCcSvc.exe"
    )
 )

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • open corpus 49 (elastic 49)
field:"EventType" kind:eq value:"open"
event.outcomeeq
  • success corpus 82 (elastic 82)
field:"event.outcome" kind:eq value:"success"
file.pathwildcard
  • ?:\Windows\System32\config\RegBack\SAM corpus 2 (elastic 2)
  • ?:\Windows\System32\config\RegBack\SECURITY corpus 2 (elastic 2)
  • ?:\Windows\System32\config\RegBack\SYSTEM corpus 2 (elastic 2)
field:"TargetFilename" kind:wildcard
process.executableis_not_null
  • (no value, null check)
field:"Image" kind:is_not_null

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.executablewildcard?:\Windows\system32\taskhostw.exe, ?:\Windows\system32\taskhost.exe, ?:\Program Files\Sophos\Endpoint Defense\SophosScanCoordinator.exe, ?:\Program Files\Sophos\Endpoint Defense\SSPService.exe, ?:\Program Files\Windows Defender Advanced Threat Protection\MsSense.exe, ?:\Program Files\Trend Micro\AMSP\coreServiceShell.exe, ?:\Program Files\Symantec\Symantec Endpoint Protection\*\Bin64\ccSvcHst.exe, ?:\Program Files\Bitdefender\Endpoint Security\EPSecurityService.exe, ?:\Program Files\N-able Technologies\AVDefender\EPSecurityService.exe, ?:\Program Files\Cylance\Optics\CyOptics.exe, ?:\Program Files\Common Files\McAfee\AVSolution\mcshield.exe, ?:\Program Files (x86)\Padvish AV\APCcSvc.exeexcludes:process.executable
user.ideqS-1-5-18excludes:user.id field:"user.id" value:"S-1-5-18"

Setcap setuid/setgid Capability Set

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

This rule monitors for the addition of the cap_setuid+ep or cap_setgid+ep capabilities via setcap. Setuid (Set User ID) and setgid (Set Group ID) are Unix-like OS features that enable processes to run with elevated privileges, based on the file owner or group. Threat actors can exploit these attributes to achieve persistence by creating malicious binaries, allowing them to maintain control over a compromised system with elevated permissions.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2023/09/05"
integration = ["endpoint", "crowdstrike", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2026/03/24"

[transform]
[[transform.osquery]]
label = "Osquery - Retrieve Running Processes by User"
query = "SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username"

[[transform.osquery]]
label = "Osquery - Retrieve Crontab Information"
query = "SELECT * FROM crontab"

[[transform.osquery]]
label = "Osquery - Retrieve Listening Ports"
query = "SELECT pid, address, port, socket, protocol, path FROM listening_ports"

[[transform.osquery]]
label = "Osquery - Retrieve Open Sockets"
query = "SELECT pid, family, remote_address, remote_port, socket, state FROM process_open_sockets"

[[transform.osquery]]
label = "Osquery - Retrieve Information for a Specific User"
query = "SELECT * FROM users WHERE username = {{user.name}}"

[[transform.osquery]]
label = "Osquery - Investigate the Account Authentication Status"
query = "SELECT * FROM logged_in_users WHERE user = {{user.name}}"

[rule]
author = ["Elastic"]
description = """
This rule monitors for the addition of the cap_setuid+ep or cap_setgid+ep capabilities via setcap. Setuid (Set User ID)
and setgid (Set Group ID) are Unix-like OS features that enable processes to run with elevated privileges, based on the
file owner or group. Threat actors can exploit these attributes to achieve persistence by creating malicious binaries,
allowing them to maintain control over a compromised system with elevated permissions.
"""
from = "now-9m"
index = [
    "endgame-*",
    "logs-crowdstrike.fdr*",
    "logs-endpoint.events.process*",
    "logs-sentinel_one_cloud_funnel.*",
]
language = "eql"
license = "Elastic License v2"
name = "Setcap setuid/setgid Capability Set"
note = """## Triage and analysis

### Investigating Setcap setuid/setgid Capability Set

Setuid (Set User ID) and setgid (Set Group ID) are Unix-like OS features that enable processes to run with elevated privileges, based on the file owner or group.

Threat actors can exploit these attributes to achieve persistence by creating malicious binaries, allowing them to maintain control over a compromised system with elevated permissions.

This rule monitors for the addition of the cap_setuid+ep or cap_setgid+ep capabilities via setcap.

> **Note**:
> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/current/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.
> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.

#### Possible Investigation Steps

- Investigate the file that was targeted by the addition of the setuid/setgid capability through OSQuery.
- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.
  - $osquery_0
- Investigate other alerts associated with the user/host during the past 48 hours.
- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.
- Investigate whether the altered scripts call other malicious scripts elsewhere on the file system. 
  - If scripts or executables were dropped, retrieve the files and determine if they are malicious:
    - Use a private sandboxed malware analysis system to perform analysis.
      - Observe and collect information about the following activities:
        - Attempts to contact external domains and addresses.
          - Check if the domain is newly registered or unexpected.
          - Check the reputation of the domain or IP address.
        - File access, modification, and creation activities.
        - Cron jobs, services and other persistence mechanisms.
            - $osquery_1
- Investigate abnormal behaviors by the subject process/user such as network connections, file modifications, and any other spawned child processes.
  - Investigate listening ports and open sockets to look for potential command and control traffic or data exfiltration.
    - $osquery_2
    - $osquery_3
  - Identify the user account that performed the action, analyze it, and check whether it should perform this kind of action.
    - $osquery_4
- Investigate whether the user is currently logged in and active.
    - $osquery_5

### False Positive Analysis

- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.
- If this activity is related to a system administrator that performed these actions for administrative purposes, consider adding exceptions for this specific administrator user account. 
- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.

### Response and remediation

- Initiate the incident response process based on the outcome of the triage.
- Isolate the involved host to prevent further post-compromise behavior.
- If the triage identified malware, search the environment for additional compromised hosts.
  - Implement temporary network rules, procedures, and segmentation to contain the malware.
  - Stop suspicious processes.
  - Immediately block the identified indicators of compromise (IoCs).
  - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
"""
risk_score = 73
rule_id = "f5c005d3-4e17-48b0-9cd7-444d48857f97"
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 = "high"
tags = [
    "Domain: Endpoint",
    "OS: Linux",
    "Use Case: Threat Detection",
    "Tactic: Persistence",
    "Data Source: Elastic Defend",
    "Data Source: Elastic Endgame",
    "Data Source: Crowdstrike",
    "Data Source: SentinelOne",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "linux" and event.type == "start" and
event.action in ("exec", "exec_event", "start", "ProcessRollup2") and 
process.name == "setcap" and process.args : "cap_set?id+ep" and not (
  process.parent.name in ("jem", "vzctl") or
  process.args like "/usr/bin/new?idmap"
)
'''

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

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

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

[[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 = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

Stages and Predicates

Stage 1: process

process where host.os.type == "linux" and event.type == "start" and
event.action in ("exec", "exec_event", "start", "ProcessRollup2") and 
process.name == "setcap" and process.args : "cap_set?id+ep" and not (
  process.parent.name in ("jem", "vzctl") or
  process.args like "/usr/bin/new?idmap"
)

Indicators

These rows show field, operator, and value matches.

Exclusions

The rule actively suppresses these predicates.

Silent NPM Package Install Command

#
Source
github.com/elastic/protections-artifacts

Detects when Node or NPM is used to install a package or packages using options to hide the installation using the following options: "--no-warnings", "--no-progress", and "--loglevel silent". Malicious packages will install required dependencies in order to function and will use these options in order to hide it from the user.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
Detects when Node or NPM is used to install a package or packages using options to hide the installation using the
following options: "--no-warnings", "--no-progress", and "--loglevel silent". Malicious packages will install required
dependencies in order to function and will use these options in order to hide it from the user.
"""
id = "539488cc-baf9-465f-9700-f978b93b3f62"
license = "Elastic License v2"
name = "Silent NPM Package Install Command"
os_list = ["linux", "macos"]
reference = ["https://jp.security.ntt/tech_blog/contagious-interview-ottercookie"]
version = "1.0.3"

query = '''
process where event.type == "start" and process.name in ("node", "npm", "npx") and 
 process.args in ("install", "i", "in", "ins", "inst", "instal", "add", "isnt", "isnta", "isntal", "isntall") and 
 process.args == "--no-save" and 
 process.args == "--no-progress" and 
 ((process.args == "--loglevel" and process.args == "silent") or 
  (process.args in ("-s", "--silent")))
'''

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

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

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

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



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

[internal]
min_endpoint_version = "8.11.0"

Stages and Predicates

Stage 1: process

process where event.type == "start" and process.name in ("node", "npm", "npx") and 
 process.args in ("install", "i", "in", "ins", "inst", "instal", "add", "isnt", "isnta", "isntal", "isntall") and 
 process.args == "--no-save" and 
 process.args == "--no-progress" and 
 ((process.args == "--loglevel" and process.args == "silent") or 
  (process.args in ("-s", "--silent")))

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.typeeq
  • start
field:"event.type" kind:eq value:"start"
process.argseq
  • --loglevel
  • --no-progress
  • --no-save
  • silent
field:"process.args" kind:eq
process.argsin
  • --silent
  • -s
  • add
  • i
  • in
  • ins
  • inst
  • instal
  • install
  • isnt
  • isnta
  • isntal
  • isntall
field:"process.args" kind:in
process.namein
  • node
  • npm
  • npx
field:"process_basename" kind:in

Spike in host-based traffic

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

A machine learning job has detected a sudden spike in host based traffic. This can be due to a range of security issues, such as a compromised system, DDoS attacks, malware infections, privilege escalation, or data exfiltration.

Known False Positives

  • System updates, scheduled backups, or misconfigured services may trigger this alert.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2025/02/18"
integration = ["auditd_manager", "endpoint", "system", "windows"]
maturity = "production"
min_stack_version = "9.4.0"
min_stack_comments = "Use EA (Entity Analytics) fields"
updated_date = "2026/07/27"

[rule]
anomaly_threshold = 75
author = ["Elastic"]
description = """
A machine learning job has detected a sudden spike in host based traffic. This can be due to a range of security issues, such as a compromised system, DDoS attacks,
malware infections, privilege escalation, or data exfiltration.
"""
false_positives = [
    """
    System updates, scheduled backups, or misconfigured services may trigger this alert.
    """,
]
from = "now-1h"
interval = "15m"
license = "Elastic License v2"
machine_learning_job_id = "high_count_events_for_a_host_name_ea"
name = "Spike in host-based traffic"
setup = """## Setup

This rule requires the installation of associated Machine Learning jobs, as well as data coming in from one of the following integrations:
- Elastic Defend
- Auditd Manager
- System
- Windows

### Anomaly Detection Setup

Once the rule is enabled, the associated Machine Learning job will start automatically. You can view the Machine Learning job linked under the "Definition" panel of the detection rule. If the job does not start due to an error, the issue must be resolved for the job to commence successfully. For more details on setting up anomaly detection jobs, refer to the [helper guide](https://www.elastic.co/guide/en/kibana/current/xpack-ml-anomalies.html).

### 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 to your 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/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).

### Auditd Manager Integration Setup
The Auditd Manager Integration receives audit events from the Linux Audit Framework which is a part of the Linux kernel.
Auditd Manager provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system.

#### The following steps should be executed in order to add the Elastic Agent System integration "auditd_manager" to your system:
- Go to the Kibana home page and click “Add integrations”.
- In the query bar, search for “Auditd Manager” and select the integration to see more details about it.
- Click “Add Auditd Manager”.
- Configure the integration name and optionally add a description.
- Review optional and advanced settings accordingly.
- Add the newly installed “auditd manager” to an existing or a new agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.
- Click “Save and Continue”.
- For more details on the integration refer to the [helper guide](https://docs.elastic.co/integrations/auditd_manager).

#### Rule Specific Setup Note
Auditd Manager subscribes to the kernel and receives events as they occur without any additional configuration.
However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the "audit rules" configuration box or the "auditd rule files" box by specifying a file to read the audit rules from.
- For this detection rule no additional audit rules are required.

### System Integration Setup
The System integration allows you to collect system logs and metrics from your servers with Elastic Agent.

#### The following steps should be executed in order to add the Elastic Agent System integration "system" to your system:
- Go to the Kibana home page and click “Add integrations”.
- In the query bar, search for “System” and select the integration to see more details about it.
- Click “Add System”.
- Configure the integration name and optionally add a description.
- Review optional and advanced settings accordingly.
- Add the newly installed “system” to an existing or a new agent policy, and deploy the agent on your system from which system log files are desirable.
- Click “Save and Continue”.
- For more details on the integration refer to the [helper guide](https://docs.elastic.co/integrations/system).

### Windows Integration Setup
The Windows integration allows you to monitor the Windows OS, services, applications, and more.

#### The following steps should be executed in order to add the Elastic Agent System integration "windows" to your system:
- Go to the Kibana home page and click “Add integrations”.
- In the query bar, search for “Windows” and select the integration to see more details about it.
- Click “Add Windows”.
- Configure the integration name and optionally add a description.
- Review optional and advanced settings accordingly.
- Add the newly installed “windows” to an existing or a new agent policy, and deploy the agent on your system from which windows log files are desirable.
- Click “Save and Continue”.
- For more details on the integration refer to the [helper guide](https://docs.elastic.co/integrations/windows).
"""
references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
risk_score = 21
rule_id = "fe8d6507-b543-4bbc-849f-dc0da6db29f6"
severity = "low"
tags = [
    "Data Source: Elastic Defend",
    "Data Source: Auditd Manager",
    "Data Source: Windows Security Event Logs",
    "Use Case: Threat Detection",
    "Rule Type: ML",
    "Rule Type: Machine Learning",
    "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 Spike in host-based traffic
The detection of a spike in host-based traffic leverages machine learning to identify anomalies in network behavior, which may indicate security threats like DDoS attacks or data exfiltration. Adversaries exploit this by overwhelming systems or stealthily transferring data. The rule, with a low severity score, flags unusual traffic patterns, enabling analysts to investigate potential compromises or misconfigurations.

### Possible investigation steps

- Review the timestamp and source of the traffic spike to determine the exact time and origin of the anomaly.
- Analyze the affected host's network logs to identify any unusual outbound or inbound connections that coincide with the spike.
- Check for any recent changes or updates on the affected host that might have triggered the spike, such as software installations or configuration changes.
- Investigate any associated user accounts for signs of unauthorized access or privilege escalation activities.
- Correlate the spike with other security alerts or logs to identify potential patterns or related incidents.
- Assess the host for signs of malware infection or indicators of compromise that could explain the abnormal traffic behavior.

### False positive analysis

- Routine software updates or patch management activities can cause temporary spikes in host-based traffic. Users should monitor scheduled update times and create exceptions for these periods to avoid false positives.
- Backup operations often generate increased network traffic. Identifying and excluding these regular backup windows from monitoring can help reduce false alerts.
- High-volume data transfers within the organization, such as large file uploads or downloads for legitimate business purposes, may trigger the rule. Establishing baseline traffic patterns for these activities and setting exceptions can mitigate unnecessary alerts.
- Automated scripts or batch processes that run at specific times and generate predictable traffic spikes should be documented and excluded from anomaly detection to prevent false positives.
- Internal network scans or vulnerability assessments conducted by IT security teams can mimic malicious traffic patterns. These should be scheduled and whitelisted to avoid triggering the rule.

### Response and remediation

- Isolate the affected host from the network to prevent further data exfiltration or participation in a DDoS attack.
- Conduct a thorough scan of the isolated host for malware or unauthorized software, and remove any malicious files or applications found.
- Review and reset credentials for any accounts that may have been compromised, ensuring that privilege escalation is mitigated.
- Monitor network traffic for any additional anomalies or spikes that could indicate further compromise or ongoing attacks.
- Restore the affected host from a known good backup if malware or significant unauthorized changes are detected.
- Implement network segmentation to limit the spread of potential threats and reduce the impact of similar incidents in the future.
- Escalate the incident to the security operations center (SOC) or relevant team for further analysis and to determine if additional resources are needed for a comprehensive response."""

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

[[rule.threat.technique]]
id = "T1041"
name = "Exfiltration Over C2 Channel"
reference = "https://attack.mitre.org/techniques/T1041/"

[[rule.threat.technique]]
id = "T1048"
name = "Exfiltration Over Alternative Protocol"
reference = "https://attack.mitre.org/techniques/T1048/"

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

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

[[rule.threat.technique]]
id = "T1498"
name = "Network Denial of Service"
reference = "https://attack.mitre.org/techniques/T1498/"

[[rule.threat.technique]]
id = "T1499"
name = "Endpoint Denial of Service"
reference = "https://attack.mitre.org/techniques/T1499/"

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

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

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

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

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

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

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

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

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

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

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

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

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

Successful SSH Authentication from Unusual SSH Public Key

#
Status
production
Severity
low
Time window
9m
Group by
system.auth.ssh.signature
Author
Elastic
Source
github.com/elastic/detection-rules

This rule leverages the new_terms rule type to detect successful SSH authentications via a public key that has not been seen in the last 5 days. Public key authentication is a secure method for authenticating users to a server. Monitoring unusual public key authentication events can help detect unauthorized access attempts or suspicious activity on the system.

Known False Positives

  • This rule may trigger in cases where a user has routine work patterns that result in infrequent authentications.

MITRE ATT&CK Coverage

Rule Body

[metadata]
creation_date = "2025/02/21"
integration = ["system"]
maturity = "production"
updated_date = "2026/03/24"

[rule]
author = ["Elastic"]
description = """
This rule leverages the new_terms rule type to detect successful SSH authentications via a public
key that has not been seen in the last 5 days. Public key authentication is a secure method for
authenticating users to a server. Monitoring unusual public key authentication events can help
detect unauthorized access attempts or suspicious activity on the system.
"""
false_positives = [
    """
    This rule may trigger in cases where a user has routine work patterns that result in infrequent authentications.
    """,
]
from = "now-9m"
index = ["logs-system.auth-*"]
language = "kuery"
license = "Elastic License v2"
name = "Successful SSH Authentication from Unusual SSH Public Key"
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 Successful SSH Authentication from Unusual SSH Public Key

SSH public key authentication is a secure method for accessing Linux systems, relying on cryptographic keys rather than passwords. Adversaries may exploit this by using stolen or unauthorized keys to gain access. The detection rule identifies successful logins using new public keys, unseen in the past 10 days, signaling potential unauthorized access attempts. This helps in early detection of suspicious activities, aligning with threat tactics like Initial Access.

### Possible investigation steps

- Review the specific SSH login event details, focusing on the event.category, event.action, and event.outcome fields to confirm the successful authentication via public key.
- Identify the source IP address and user account associated with the login event to determine if they are known or expected.
- Check the system.auth.ssh.method field to ensure the authentication method was indeed public key and not another method.
- Investigate the history of the public key used for authentication by searching logs for any previous occurrences or related activities within the last 10 days.
- Correlate the event with other security logs or alerts from the same host or user to identify any patterns or additional suspicious activities.
- Assess the risk by considering the context of the login, such as the time of access, the location of the source IP, and any recent changes in user behavior or system configurations.
- If unauthorized access is suspected, initiate incident response procedures, including revoking the public key, notifying affected parties, and conducting a thorough security review of the system.

### False positive analysis

- Frequent logins from known automation scripts or services using rotating SSH keys can trigger false positives. To manage this, identify these services and add their public keys to an exception list.
- Developers or system administrators who regularly update their SSH keys for security reasons may cause alerts. Maintain a record of authorized personnel and their key update schedules to exclude these events.
- Temporary access granted to third-party vendors or contractors might appear as unusual activity. Ensure that any temporary access is documented and keys are added to an exception list during the access period.
- Test environments where SSH keys are frequently generated and used for various testing purposes can lead to false positives. Implement a separate monitoring policy for test environments to reduce noise in production alerts.

### Response and remediation

- Immediately isolate the affected system from the network to prevent further unauthorized access or lateral movement by the adversary.
- Revoke the unauthorized SSH public key from the system's authorized_keys file to block further access using that key.
- Conduct a thorough review of recent login activities and system logs to identify any additional unauthorized access or suspicious activities that may have occurred.
- Change passwords and regenerate SSH keys for all legitimate users on the affected system to ensure no compromised credentials remain in use.
- Notify the security team and relevant stakeholders about the incident for awareness and further investigation.
- Implement additional monitoring on the affected system and related network segments to detect any further suspicious activities or attempts to regain access.
- Review and update access control policies and SSH key management practices to prevent similar incidents in the future, ensuring that only authorized keys are allowed and regularly audited.
"""
risk_score = 21
rule_id = "267dace3-a4de-4c94-a7b5-dd6c0f5482e5"
setup = """## Setup

This rule requires data coming in from one of the following integrations:
- Filebeat

### Filebeat Setup
Filebeat is a lightweight shipper for forwarding and centralizing log data. Installed as an agent on your servers, Filebeat monitors the log files or locations that you specify, collects log events, and forwards them either to Elasticsearch or Logstash for indexing.

#### The following steps should be executed in order to add the Filebeat for the Linux System:
- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.
- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/setup-repositories.html).
- To run Filebeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/running-on-docker.html).
- To run Filebeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/running-on-kubernetes.html).
- For quick start information for Filebeat refer to the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/8.11/filebeat-installation-configuration.html).
- For complete Setup and Run Filebeat information refer to the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/setting-up-and-running.html).

#### Rule Specific Setup Note
- This rule requires the Filebeat System Module to be enabled.
- The system module collects and parses logs created by the system logging service of common Unix/Linux based distributions.
- To run the system module of Filebeat on Linux follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-system.html).
"""
severity = "low"
tags = [
    "Domain: Endpoint",
    "OS: Linux",
    "Use Case: Threat Detection",
    "Tactic: Initial Access",
    "Data Source: Elastic Defend",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
event.category:authentication and host.os.type:linux and event.action:ssh_login and event.outcome:success and system.auth.ssh.method:publickey
'''

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

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

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

[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 = "T1021"
name = "Remote Services"
reference = "https://attack.mitre.org/techniques/T1021/"

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

[rule.threat.tactic]
id = "TA0008"
name = "Lateral Movement"
reference = "https://attack.mitre.org/tactics/TA0008/"
[rule.new_terms]
field = "new_terms_fields"
value = ["system.auth.ssh.signature"]

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

Stages and Predicates

Stage 1: new_terms

event.category:authentication and host.os.type:linux and event.action:ssh_login and event.outcome:success and system.auth.ssh.method:publickey

Indicators

These rows show field, operator, and value matches.

Suspicious Process Execution by Zoom

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

Identifies suspicious process execution associated with the Zoom desktop client on macOS and Linux. The rule detects shells, script interpreters, downloaders, and network utilities spawned by Zoom on either platform. On Linux, it also detects Zoom replacing its own process image with an executable outside the Zoom installation directory. These behaviors may indicate successful exploitation of a Zoom client vulnerability, including CVE-2026-53413.

Known False Positives

  • Legitimate support, diagnostic, accessibility, update, or enterprise management workflows may cause Zoom to launch command-line utilities. Verify the executable path, command line, code signature, and surrounding user activity before adding exceptions.

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

[metadata]
creation_date = "2026/08/12"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/08/20"

[rule]
author = ["Elastic"]
description = """
Identifies suspicious process execution associated with the Zoom desktop client on macOS and Linux. The rule detects
shells, script interpreters, downloaders, and network utilities spawned by Zoom on either platform. On Linux, it also
detects Zoom replacing its own process image with an executable outside the Zoom installation directory. These behaviors
may indicate successful exploitation of a Zoom client vulnerability, including CVE-2026-53413.
"""
false_positives = [
    """
    Legitimate support, diagnostic, accessibility, update, or enterprise management workflows may cause Zoom to launch
    command-line utilities. Verify the executable path, command line, code signature, and surrounding user activity
    before adding exceptions.
    """,
]
from = "now-9m"
index = ["logs-endpoint.events.process-*"]
language = "eql"
license = "Elastic License v2"
name = "Suspicious Process Execution by Zoom"
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 Process Execution by Zoom

CVE-2026-53413 is a buffer overwrite in Zoom's annotation parser that can allow a meeting participant to execute code
on another participant's device. The published macOS exploit replaced the running `zoom.us` process image with Safari
using `execvp`. Other payloads may instead spawn a shell, interpreter, downloader, or network utility. This rule detects
suspicious Zoom child processes on macOS and Linux and in-place Zoom process-image replacement on Linux, where Elastic
Defend records the prior image in `process.previous.executable`. The Linux logic identifies the Zoom executable
regardless of its installation path.

### Possible investigation steps

- Determine which branch matched. For a child process, verify that `process.parent.executable` is the genuine Zoom
  client. For Linux image replacement, compare `process.previous.executable` with `process.executable` and review the
  new image's path, hash, arguments, and provenance. The image-replacement branch excludes direct Zoom children because
  `process.previous.executable` includes the image inherited at fork as well as subsequent executions.
- Review the process command line and arguments for payload download, shell commands, persistence, credential access,
  discovery, or outbound connection activity.
- Use `process.entity_id` and `process.parent.entity_id` to examine related process, file, and network events before and
  after the alert. Look for additional payloads, persistence changes, credential access, and communication with
  untrusted destinations.
- Confirm the installed Zoom version and whether it was vulnerable at the alert time. Zoom Workplace releases before
  `7.1.5` and `7.0.6` in their respective branches are affected by CVE-2026-53413.
- Establish whether the user was in a Zoom meeting near the alert time. Preserve the meeting UUID and occurrence,
  participant report, client version, join and leave times, screen-sharing state, and available Zoom client logs.
- Review crash diagnostics for annotation-library faults or memory-corruption indicators near the alert. A crash alone
  is not sufficient evidence of exploitation.
- Check for other alerts on the host and for similar activity involving the same meeting participants or source
  infrastructure.

### False positive analysis

- Zoom may invoke legitimate support, diagnostic, accessibility, update, or enterprise-management tooling. Validate the
  binary's signature, path, command line, prevalence, and relationship to an approved workflow.
- Zoom performs Linux startup checks through a shell, including audio, graphics, desktop portal, and process-limit
  discovery. The known commands are excluded by this rule; investigate variations or additional chained commands.
- Opening authentication or meeting links normally uses an operating-system broker and should not require Zoom to spawn
  a shell or replace its own image. Treat direct shell, interpreter, or downloader execution as suspicious unless a
  specific benign workflow is confirmed.

### Response and remediation

- If exploitation is suspected, isolate the host and preserve process, file, network, crash, Zoom client, and meeting
  audit evidence before terminating processes or reimaging.
- Update Zoom to a fixed release and enforce minimum client versions. Until vulnerable clients are removed, disable
  end-to-end encryption so Zoom's server-side annotation filtering can inspect meeting content.
- Restrict meeting access with waiting rooms, passcodes, and authenticated-user requirements, and disable unnecessary
  annotation, whiteboarding, remote-control, file-transfer, and participant screen-sharing features.
- Remove malicious artifacts and persistence, rotate credentials accessible to the compromised user or process, and
  investigate other participants and endpoints associated with the meeting.
"""
references = [
    "https://a.security/blog/asecurity-zoomsday",
    "https://www.zoom.com/en/trust/security-bulletin/zsb-26015/",
    "https://www.securityweek.com/zoom-patches-zero-click-code-execution-vulnerability/",
]
risk_score = 73
rule_id = "84b81b96-58dd-4c0d-9b2e-35023ab5ee88"
setup = """## Setup

This rule requires process events from Elastic Defend on macOS or Linux.

Elastic Defend is integrated into the Elastic Agent using Fleet. Configure the integration to collect process events
from protected endpoints. The Linux image-replacement branch requires `process.previous.executable`, which Elastic
Defend provides on Linux `exec` process events.
"""
severity = "high"
tags = [
    "Domain: Endpoint",
    "OS: Linux",
    "OS: macOS",
    "Use Case: Threat Detection",
    "Use Case: Vulnerability",
    "Tactic: Execution",
    "Data Source: Elastic Defend",
    "Rule Type: Event Correlation (EQL)",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
process where event.type == "start" and event.action == "exec" and
  (
    (
      host.os.type == "linux" and
      process.previous.executable : "*/zoom" and
      not process.executable : "*/zoom" and
      not process.parent.name : "zoom"
    ) or
    (
      host.os.type in ("macos", "linux") and
      (
        (host.os.type == "macos" and
         process.parent.executable : "*/zoom.us.app/Contents/MacOS/zoom.us") or
        (host.os.type == "linux" and
         process.parent.name : "zoom")
      ) and
      process.name : (
        "sh", "bash", "zsh", "dash", "ksh", "fish", "ash", "mksh", "tsh", "tcsh", "pwsh",
        "python*", "perl*", "ruby*", "php*", "lua*", "node", "nodejs", "osascript",
        "curl", "nscurl", "wget", "nc", "ncat", "netcat", "netcat.openbsd", "netcat.traditional",
        "nc.openbsd", "nc.traditional", "socat", "openssl",
        "chmod", "xattr"
      ) and
      not (
        host.os.type == "linux" and process.name in ("sh", "bash") and
        process.args : (
          "lspci",
          "pacmd --version",
          "pacmd list-sinks |grep 'name:\\|module:'",
          "pipewire --version",
          "ls /usr/share/xdg-desktop-portal/portals/",
          "/usr/libexec/xdg-desktop-portal --version",
          "cat /proc/sys/kernel/pid_max"
        )
      )
    )
  )
'''


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

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

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


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


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

Stages and Predicates

Stage 1: process

process where event.type == "start" and event.action == "exec" and
  (
    (
      host.os.type == "linux" and
      process.previous.executable : "*/zoom" and
      not process.executable : "*/zoom" and
      not process.parent.name : "zoom"
    ) or
    (
      host.os.type in ("macos", "linux") and
      (
        (host.os.type == "macos" and
         process.parent.executable : "*/zoom.us.app/Contents/MacOS/zoom.us") or
        (host.os.type == "linux" and
         process.parent.name : "zoom")
      ) and
      process.name : (
        "sh", "bash", "zsh", "dash", "ksh", "fish", "ash", "mksh", "tsh", "tcsh", "pwsh",
        "python*", "perl*", "ruby*", "php*", "lua*", "node", "nodejs", "osascript",
        "curl", "nscurl", "wget", "nc", "ncat", "netcat", "netcat.openbsd", "netcat.traditional",
        "nc.openbsd", "nc.traditional", "socat", "openssl",
        "chmod", "xattr"
      ) and
      not (
        host.os.type == "linux" and process.name in ("sh", "bash") and
        process.args : (
          "lspci",
          "pacmd --version",
          "pacmd list-sinks |grep 'name:\\|module:'",
          "pipewire --version",
          "ls /usr/share/xdg-desktop-portal/portals/",
          "/usr/libexec/xdg-desktop-portal --version",
          "cat /proc/sys/kernel/pid_max"
        )
      )
    )
  )

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.namewildcard
  • ash corpus 3 (elastic 3)
  • bash corpus 33 (elastic 33)
  • chmod corpus 7 (elastic 7)
  • curl corpus 28 (elastic 28)
  • dash corpus 16 (elastic 16)
  • fish corpus 14 (elastic 14)
  • ksh corpus 16 (elastic 16)
  • lua* corpus 18 (elastic 18)
  • mksh corpus 4 (elastic 4)
  • nc corpus 12 (elastic 12)
  • nc.openbsd corpus 8 (elastic 8)
  • nc.traditional corpus 7 (elastic 7)
  • ncat corpus 11 (elastic 11)
  • netcat corpus 12 (elastic 12)
  • netcat.openbsd corpus 4 (elastic 4)
  • netcat.traditional corpus 4 (elastic 4)
  • node corpus 11 (elastic 11)
  • nodejs corpus 2 (elastic 2)
  • nscurl corpus 15 (elastic 15)
  • openssl corpus 12 (elastic 12)
  • osascript corpus 31 (elastic 31)
  • perl* corpus 22 (elastic 22)
  • php* corpus 22 (elastic 22)
  • pwsh corpus 5 (elastic 5)
  • python* corpus 51 (elastic 51)
  • ruby* corpus 19 (elastic 19)
  • sh corpus 33 (elastic 33)
  • socat corpus 7 (elastic 7)
  • tcsh corpus 16 (elastic 16)
  • tsh
  • wget corpus 16 (elastic 16)
  • xattr corpus 6 (elastic 6)
  • zsh corpus 31 (elastic 31)
field:"process_basename" kind:wildcard
process.parent.executablewildcard
  • */zoom.us.app/Contents/MacOS/zoom.us
field:"ParentImage" kind:wildcard value:"*/zoom.us.app/Contents/MacOS/zoom.us"
process.parent.namewildcard
  • zoom
field:"parent_process_basename" kind:wildcard value:"zoom"
process.previous.executablewildcard
  • */zoom
field:"process.previous.executable" kind:wildcard value:"*/zoom"

System Network Connections Discovery

#
Status
production
Kind
building block (feeds higher-level correlation rules; not a standalone alert)
Severity
low
Time window
119m
Group by
host.id, process.command_line, process.parent.executable
Author
Elastic
Source
github.com/elastic/detection-rules

Adversaries may attempt to get a listing of network connections to or from a compromised system.

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

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

[rule]
author = ["Elastic"]
building_block_type = "default"
description = """
Adversaries may attempt to get a listing of network connections to or from a compromised system.
"""
from = "now-119m"
index = ["logs-endpoint.events.*"]
interval = "60m"
language = "kuery"
license = "Elastic License v2"
name = "System Network Connections Discovery"
risk_score = 21
rule_id = "e2dc8f8c-5f16-42fa-b49e-0eb8057f7444"
severity = "low"
tags = [
    "Domain: Endpoint",
    "OS: Linux",
    "OS: macOS",
    "Use Case: Threat Detection",
    "Tactic: Discovery",
    "Rule Type: BBR",
    "Data Source: Elastic Defend",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
event.category:process and host.os.type:(linux or macos) and event.type:start and event.action:exec and
process.name:("netstat" or "lsof" or "ss" or "iftop" or "ip" or "nmcli" or "arp" or "route" or "ifconfig" or "netcfg" or "networksetup") and
not (
  process.parent.executable:(
    /Library/Elastic/Agent/* or "/Applications/Docker.app/Contents/MacOS/com.docker.backend" or
    "/opt/NinjaRMMAgent/programfiles/ninjarmm-linagent" or "/usr/local/ASR/Vx/bin/svagents"
  ) or
  process.working_directory:("/var/ossec" or "/usr/lib/check_mk_agent/plugins" or "/opt/microsoft/mdatp/sbin")
)
'''

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

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

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

Stages and Predicates

Stage 1: new_terms

event.category:process and host.os.type:(linux or macos) and event.type:start and event.action:exec and
process.name:("netstat" or "lsof" or "ss" or "iftop" or "ip" or "nmcli" or "arp" or "route" or "ifconfig" or "netcfg" or "networksetup") and
not (
  process.parent.executable:(
    /Library/Elastic/Agent/* or "/Applications/Docker.app/Contents/MacOS/com.docker.backend" or
    "/opt/NinjaRMMAgent/programfiles/ninjarmm-linagent" or "/usr/local/ASR/Vx/bin/svagents"
  ) or
  process.working_directory:("/var/ossec" or "/usr/lib/check_mk_agent/plugins" or "/opt/microsoft/mdatp/sbin")
)

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • exec corpus 37 (elastic 22, sigma 15)
field:"EventType" kind:eq value:"exec"
event.categoryeq
  • process corpus 105 (elastic 105)
field:"event.category" kind:eq value:"process"
event.typeeq
  • start corpus 67 (elastic 67)
field:"event.type" kind:eq value:"start"
process.namein
  • arp corpus 2 (elastic 1, splunk 1)
  • ifconfig corpus 5 (splunk 4, elastic 1)
  • iftop
  • ip corpus 2 (elastic 1, splunk 1)
  • lsof
  • netcfg
  • netstat corpus 2 (elastic 1, splunk 1)
  • networksetup
  • nmcli
  • route corpus 2 (elastic 1, splunk 1)
  • ss corpus 2 (elastic 1, splunk 1)
field:"process_basename" kind:in

Exclusions

The rule actively suppresses these predicates.

Unsigned DLL Side-Loading from a Suspicious Folder

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

Identifies a Windows trusted program running from locations often abused by adversaries to masquerade as a trusted program and loading a recently dropped DLL. This behavior may indicate an attempt to evade defenses via side-loading a malicious DLL within the memory space of a signed processes.

MITRE ATT&CK Coverage

Telemetry Coverage

ProviderRecord / event type
SysmonEvent ID 7: Image loaded

Rule Body

[metadata]
creation_date = "2022/11/22"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/05/04"

[rule]
author = ["Elastic"]
description = """
Identifies a Windows trusted program running from locations often abused by adversaries to masquerade as a trusted
program and loading a recently dropped DLL. This behavior may indicate an attempt to evade defenses via side-loading a
malicious DLL within the memory space of a signed processes.
"""
from = "now-9m"
index = ["logs-endpoint.events.library-*"]
language = "eql"
license = "Elastic License v2"
name = "Unsigned DLL Side-Loading from a Suspicious Folder"
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 Unsigned DLL Side-Loading from a Suspicious Folder

DLL side-loading exploits the trust of signed executables to load malicious DLLs, often from suspicious directories. Adversaries use this to bypass security measures by placing unsigned DLLs in locations mimicking legitimate paths. The detection rule identifies this by checking for trusted programs loading recently modified, unsigned DLLs from atypical directories, signaling potential evasion tactics.

### Possible investigation steps

- Review the process code signature to confirm the legitimacy of the trusted program that loaded the DLL. Check if the process is expected to run from the identified directory.
- Examine the DLL's path and creation or modification time to determine if it aligns with typical user or system activity. Investigate why the DLL was recently modified or created.
- Analyze the DLL's code signature status to understand why it is unsigned or has an error status. This can help identify if the DLL is potentially malicious.
- Investigate the parent process and any associated child processes to understand the context of the DLL loading event. This can provide insights into how the DLL was introduced.
- Check for any recent changes or anomalies in the system or user activity logs around the time the DLL was created or modified to identify potential indicators of compromise.
- Correlate the alert with other security events or alerts in the environment to determine if this is part of a broader attack or isolated incident.

### False positive analysis

- Legitimate software updates or installations may temporarily load unsigned DLLs from atypical directories. Users can create exceptions for known update processes by verifying the source and ensuring the process is part of a legitimate update.
- Custom or in-house applications might load unsigned DLLs from non-standard directories. Users should verify the application's behavior and, if deemed safe, exclude these specific paths or processes from the rule.
- Development environments often involve testing unsigned DLLs in various directories. Developers can exclude these environments by specifying the directories or processes involved in the development workflow.
- Some third-party security or system management tools may use unsigned DLLs for legitimate purposes. Users should confirm the tool's legitimacy and add exceptions for these tools to prevent false positives.

### Response and remediation

- Isolate the affected system from the network to prevent further spread of the potential threat and to contain any malicious activity.
- Terminate the process associated with the unsigned DLL to stop any ongoing malicious operations.
- Quarantine the suspicious DLL file and any related files for further analysis to understand the scope and nature of the threat.
- Conduct a thorough scan of the affected system using updated antivirus or endpoint detection and response (EDR) tools to identify and remove any additional malicious files or remnants.
- Review and restore any altered system configurations or settings to their original state to ensure system integrity.
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if the threat has impacted other systems.
- Implement additional monitoring and logging on the affected system and network to detect any recurrence or similar threats in the future."""
references = [
    "https://www.elastic.co/security-labs/Hunting-for-Suspicious-Windows-Libraries-for-Execution-and-Evasion",
]
risk_score = 47
rule_id = "ca98c7cf-a56e-4057-a4e8-39603f7f0389"
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
"""
severity = "medium"
tags = [
    "Domain: Endpoint",
    "OS: Windows",
    "Use Case: Threat Detection",
    "Tactic: Defense Evasion",
    "Data Source: Elastic Defend",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
library where host.os.type == "windows" and

 process.code_signature.trusted == true and

 (dll.Ext.relative_file_creation_time <= 500 or dll.Ext.relative_file_name_modify_time <= 500) and

  not dll.code_signature.status : ("trusted", "errorExpired", "errorCode_endpoint*", "errorChaining") and

      /* Suspicious Paths */
      dll.path : ("?:\\PerfLogs\\*.dll",
                  "?:\\Users\\*\\Pictures\\*.dll",
                  "?:\\Users\\*\\Music\\*.dll",
                  "?:\\Users\\Public\\*.dll",
                  "?:\\Users\\*\\Documents\\*.dll",
				  "?:\\Users\\*\\Downloads\\*.dll",
                  "?:\\Windows\\Tasks\\*.dll",
                  "?:\\Windows\\System32\\Tasks\\*.dll",
                  "?:\\Intel\\*.dll",
                  "?:\\AMD\\Temp\\*.dll",
                  "?:\\Windows\\AppReadiness\\*.dll",
                  "?:\\Windows\\ServiceState\\*.dll",
                  "?:\\Windows\\security\\*.dll",
		  "?:\\Windows\\System\\*.dll",
                  "?:\\Windows\\IdentityCRL\\*.dll",
                  "?:\\Windows\\Branding\\*.dll",
                  "?:\\Windows\\csc\\*.dll",
                  "?:\\Windows\\DigitalLocker\\*.dll",
                  "?:\\Windows\\en-US\\*.dll",
                  "?:\\Windows\\wlansvc\\*.dll",
                  "?:\\Windows\\Prefetch\\*.dll",
                  "?:\\Windows\\Fonts\\*.dll",
                  "?:\\Windows\\diagnostics\\*.dll",
                  "?:\\Windows\\TAPI\\*.dll",
                  "?:\\Windows\\INF\\*.dll",
                  "?:\\windows\\tracing\\*.dll",
                  "?:\\windows\\IME\\*.dll",
                  "?:\\Windows\\Performance\\*.dll",
                  "?:\\windows\\intel\\*.dll",
                  "?:\\windows\\ms\\*.dll",
                  "?:\\Windows\\dot3svc\\*.dll",
                  "?:\\Windows\\ServiceProfiles\\*.dll",
                  "?:\\Windows\\panther\\*.dll",
                  "?:\\Windows\\RemotePackages\\*.dll",
                  "?:\\Windows\\OCR\\*.dll",
                  "?:\\Windows\\appcompat\\*.dll",
                  "?:\\Windows\\apppatch\\*.dll",
                  "?:\\Windows\\addins\\*.dll",
                  "?:\\Windows\\Setup\\*.dll",
                  "?:\\Windows\\Help\\*.dll",
                  "?:\\Windows\\SKB\\*.dll",
                  "?:\\Windows\\Vss\\*.dll",
                  "?:\\Windows\\Web\\*.dll",
                  "?:\\Windows\\servicing\\*.dll",
                  "?:\\Windows\\CbsTemp\\*.dll",
                  "?:\\Windows\\Logs\\*.dll",
                  "?:\\Windows\\WaaS\\*.dll",
                  "?:\\Windows\\twain_32\\*.dll",
                  "?:\\Windows\\ShellExperiences\\*.dll",
                  "?:\\Windows\\ShellComponents\\*.dll",
                  "?:\\Windows\\PLA\\*.dll",
                  "?:\\Windows\\Migration\\*.dll",
                  "?:\\Windows\\debug\\*.dll",
                  "?:\\Windows\\Cursors\\*.dll",
                  "?:\\Windows\\Containers\\*.dll",
                  "?:\\Windows\\Boot\\*.dll",
                  "?:\\Windows\\bcastdvr\\*.dll",
                  "?:\\Windows\\TextInput\\*.dll",
                  "?:\\Windows\\schemas\\*.dll",
                  "?:\\Windows\\SchCache\\*.dll",
                  "?:\\Windows\\Resources\\*.dll",
                  "?:\\Windows\\rescache\\*.dll",
                  "?:\\Windows\\Provisioning\\*.dll",
                  "?:\\Windows\\PrintDialog\\*.dll",
                  "?:\\Windows\\PolicyDefinitions\\*.dll",
                  "?:\\Windows\\media\\*.dll",
                  "?:\\Windows\\Globalization\\*.dll",
                  "?:\\Windows\\L2Schemas\\*.dll",
                  "?:\\Windows\\LiveKernelReports\\*.dll",
                  "?:\\Windows\\ModemLogs\\*.dll",
                  "?:\\Windows\\ImmersiveControlPanel\\*.dll",
                  "?:\\$Recycle.Bin\\*.dll") 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))) or dll.name : "chrome_elf.dll")
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1036"
name = "Masquerading"
reference = "https://attack.mitre.org/techniques/T1036/"
[[rule.threat.technique.subtechnique]]
id = "T1036.001"
name = "Invalid Code Signature"
reference = "https://attack.mitre.org/techniques/T1036/001/"


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



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

Stages and Predicates

Stage 1: library

library where host.os.type == "windows" and
 process.code_signature.trusted == true and
 (dll.Ext.relative_file_creation_time <= 500 or dll.Ext.relative_file_name_modify_time <= 500) and
  not dll.code_signature.status : ("trusted", "errorExpired", "errorCode_endpoint*", "errorChaining") and
      dll.path : ("?:\\PerfLogs\\*.dll",
                  "?:\\Users\\*\\Pictures\\*.dll",
                  "?:\\Users\\*\\Music\\*.dll",
                  "?:\\Users\\Public\\*.dll",
                  "?:\\Users\\*\\Documents\\*.dll",
				  "?:\\Users\\*\\Downloads\\*.dll",
                  "?:\\Windows\\Tasks\\*.dll",
                  "?:\\Windows\\System32\\Tasks\\*.dll",
                  "?:\\Intel\\*.dll",
                  "?:\\AMD\\Temp\\*.dll",
                  "?:\\Windows\\AppReadiness\\*.dll",
                  "?:\\Windows\\ServiceState\\*.dll",
                  "?:\\Windows\\security\\*.dll",
		  "?:\\Windows\\System\\*.dll",
                  "?:\\Windows\\IdentityCRL\\*.dll",
                  "?:\\Windows\\Branding\\*.dll",
                  "?:\\Windows\\csc\\*.dll",
                  "?:\\Windows\\DigitalLocker\\*.dll",
                  "?:\\Windows\\en-US\\*.dll",
                  "?:\\Windows\\wlansvc\\*.dll",
                  "?:\\Windows\\Prefetch\\*.dll",
                  "?:\\Windows\\Fonts\\*.dll",
                  "?:\\Windows\\diagnostics\\*.dll",
                  "?:\\Windows\\TAPI\\*.dll",
                  "?:\\Windows\\INF\\*.dll",
                  "?:\\windows\\tracing\\*.dll",
                  "?:\\windows\\IME\\*.dll",
                  "?:\\Windows\\Performance\\*.dll",
                  "?:\\windows\\intel\\*.dll",
                  "?:\\windows\\ms\\*.dll",
                  "?:\\Windows\\dot3svc\\*.dll",
                  "?:\\Windows\\ServiceProfiles\\*.dll",
                  "?:\\Windows\\panther\\*.dll",
                  "?:\\Windows\\RemotePackages\\*.dll",
                  "?:\\Windows\\OCR\\*.dll",
                  "?:\\Windows\\appcompat\\*.dll",
                  "?:\\Windows\\apppatch\\*.dll",
                  "?:\\Windows\\addins\\*.dll",
                  "?:\\Windows\\Setup\\*.dll",
                  "?:\\Windows\\Help\\*.dll",
                  "?:\\Windows\\SKB\\*.dll",
                  "?:\\Windows\\Vss\\*.dll",
                  "?:\\Windows\\Web\\*.dll",
                  "?:\\Windows\\servicing\\*.dll",
                  "?:\\Windows\\CbsTemp\\*.dll",
                  "?:\\Windows\\Logs\\*.dll",
                  "?:\\Windows\\WaaS\\*.dll",
                  "?:\\Windows\\twain_32\\*.dll",
                  "?:\\Windows\\ShellExperiences\\*.dll",
                  "?:\\Windows\\ShellComponents\\*.dll",
                  "?:\\Windows\\PLA\\*.dll",
                  "?:\\Windows\\Migration\\*.dll",
                  "?:\\Windows\\debug\\*.dll",
                  "?:\\Windows\\Cursors\\*.dll",
                  "?:\\Windows\\Containers\\*.dll",
                  "?:\\Windows\\Boot\\*.dll",
                  "?:\\Windows\\bcastdvr\\*.dll",
                  "?:\\Windows\\TextInput\\*.dll",
                  "?:\\Windows\\schemas\\*.dll",
                  "?:\\Windows\\SchCache\\*.dll",
                  "?:\\Windows\\Resources\\*.dll",
                  "?:\\Windows\\rescache\\*.dll",
                  "?:\\Windows\\Provisioning\\*.dll",
                  "?:\\Windows\\PrintDialog\\*.dll",
                  "?:\\Windows\\PolicyDefinitions\\*.dll",
                  "?:\\Windows\\media\\*.dll",
                  "?:\\Windows\\Globalization\\*.dll",
                  "?:\\Windows\\L2Schemas\\*.dll",
                  "?:\\Windows\\LiveKernelReports\\*.dll",
                  "?:\\Windows\\ModemLogs\\*.dll",
                  "?:\\Windows\\ImmersiveControlPanel\\*.dll",
                  "?:\\$Recycle.Bin\\*.dll") and
	 (endswith~(substring(dll.path, 0, length(dll.path) - (length(dll.name) + 1)), substring(process.executable, 0, length(process.executable) - (length(process.name) + 1))) or dll.name : "chrome_elf.dll")

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
dll.Ext.relative_file_creation_timele
  • 500 transforms: number corpus 11 (elastic 11)
field:"dll.Ext.relative_file_creation_time" kind:le value:"500"
dll.Ext.relative_file_name_modify_timele
  • 500 transforms: number corpus 9 (elastic 9)
field:"dll.Ext.relative_file_name_modify_time" kind:le value:"500"
dll.namewildcard
  • chrome_elf.dll
field:"dll.name" kind:wildcard value:"chrome_elf.dll"
dll.pathwildcard
  • ?:\$Recycle.Bin\*.dll corpus 2 (elastic 2)
  • ?:\AMD\Temp\*.dll corpus 2 (elastic 2)
  • ?:\Intel\*.dll corpus 2 (elastic 2)
  • ?:\PerfLogs\*.dll corpus 2 (elastic 2)
  • ?:\Users\*\Documents\*.dll
  • ?:\Users\*\Downloads\*.dll
  • ?:\Users\*\Music\*.dll corpus 2 (elastic 2)
  • ?:\Users\*\Pictures\*.dll corpus 2 (elastic 2)
  • ?:\Users\Public\*.dll corpus 2 (elastic 2)
  • ?:\Windows\AppReadiness\*.dll corpus 2 (elastic 2)
  • ?:\Windows\Boot\*.dll corpus 2 (elastic 2)
  • ?:\Windows\Branding\*.dll corpus 2 (elastic 2)
  • ?:\Windows\CbsTemp\*.dll corpus 2 (elastic 2)
  • ?:\Windows\Containers\*.dll corpus 2 (elastic 2)
  • ?:\Windows\Cursors\*.dll corpus 2 (elastic 2)
  • ?:\Windows\DigitalLocker\*.dll corpus 2 (elastic 2)
  • ?:\Windows\Fonts\*.dll corpus 2 (elastic 2)
  • ?:\Windows\Globalization\*.dll corpus 2 (elastic 2)
  • ?:\Windows\Help\*.dll corpus 2 (elastic 2)
  • ?:\Windows\INF\*.dll corpus 2 (elastic 2)
  • ?:\Windows\IdentityCRL\*.dll corpus 2 (elastic 2)
  • ?:\Windows\ImmersiveControlPanel\*.dll corpus 2 (elastic 2)
  • ?:\Windows\L2Schemas\*.dll corpus 2 (elastic 2)
  • ?:\Windows\LiveKernelReports\*.dll corpus 2 (elastic 2)
  • ?:\Windows\Logs\*.dll corpus 2 (elastic 2)
  • ?:\Windows\Migration\*.dll corpus 2 (elastic 2)
  • ?:\Windows\ModemLogs\*.dll corpus 2 (elastic 2)
  • ?:\Windows\OCR\*.dll corpus 2 (elastic 2)
  • ?:\Windows\PLA\*.dll corpus 2 (elastic 2)
  • ?:\Windows\Performance\*.dll corpus 2 (elastic 2)
  • ?:\Windows\PolicyDefinitions\*.dll corpus 2 (elastic 2)
  • ?:\Windows\Prefetch\*.dll corpus 2 (elastic 2)
  • ?:\Windows\PrintDialog\*.dll corpus 2 (elastic 2)
  • ?:\Windows\Provisioning\*.dll corpus 2 (elastic 2)
  • ?:\Windows\RemotePackages\*.dll corpus 2 (elastic 2)
  • ?:\Windows\Resources\*.dll corpus 2 (elastic 2)
  • ?:\Windows\SKB\*.dll corpus 2 (elastic 2)
  • ?:\Windows\SchCache\*.dll corpus 2 (elastic 2)
  • ?:\Windows\ServiceProfiles\*.dll corpus 2 (elastic 2)
  • ?:\Windows\ServiceState\*.dll corpus 2 (elastic 2)
  • +32 more values (see full rule source)
field:"ImageLoaded" kind:wildcard
process.code_signature.trustedeq
  • true transforms: boolean corpus 14 (elastic 14)
field:"process.code_signature.trusted" kind:eq value:"true"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
dll.code_signature.statuswildcardtrusted, errorExpired, errorCode_endpoint*, errorChainingexcludes:dll.code_signature.status

Veeam Backup Library Loaded by Unusual Process

#
Status
production
Severity
medium
Time window
1m
Sequence by
process.entity_id
Author
Elastic
Source
github.com/elastic/detection-rules

Identifies potential credential decrypt operations by PowerShell or unsigned processes using the Veeam.Backup.Common.dll library. Attackers can use Veeam Credentials to target backups as part of destructive operations such as Ransomware attacks.

MITRE ATT&CK Coverage

Telemetry Coverage

Rule Body

[metadata]
creation_date = "2024/03/14"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/04/27"

[rule]
author = ["Elastic"]
description = """
Identifies potential credential decrypt operations by PowerShell or unsigned processes using the Veeam.Backup.Common.dll
library. Attackers can use Veeam Credentials to target backups as part of destructive operations such as Ransomware
attacks.
"""
from = "now-9m"
index = ["logs-endpoint.events.library-*", "logs-endpoint.events.process-*"]
language = "eql"
license = "Elastic License v2"
name = "Veeam Backup Library Loaded by Unusual Process"
risk_score = 47
rule_id = "aaab30ec-b004-4191-95e1-4a14387ef6a6"
severity = "medium"
tags = [
    "Domain: Endpoint",
    "OS: Windows",
    "Use Case: Threat Detection",
    "Tactic: Credential Access",
    "Data Source: Elastic Defend",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
sequence by process.entity_id with maxspan=1m
[process where host.os.type == "windows" and event.type == "start" and
  (
    process.code_signature.trusted == false or
    process.code_signature.exists == false or
    process.name : ("powershell.exe", "pwsh.exe", "powershell_ise.exe") or
    process.pe.original_file_name : ("PowerShell.EXE", "pwsh.dll", "powershell_ise.EXE")
  ) and
  not (process.name : "powershell.exe" and process.parent.executable : "C:\\Windows\\System32\\CompatTelRunner.exe")
]
[library where host.os.type == "windows" and event.action == "load" and
  (dll.name : "Veeam.Backup.Common.dll" or dll.pe.original_file_name : "Veeam.Backup.Common.dll")]
'''

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

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 Veeam Backup Library Loaded by Unusual Process

Veeam Backup software is crucial for data protection, enabling secure backup and recovery operations. However, adversaries may exploit its credential storage by loading the Veeam.Backup.Common.dll library through unauthorized processes like PowerShell, aiming to decrypt and misuse credentials. The detection rule identifies such anomalies by flagging untrusted or unsigned processes loading this library, indicating potential credential access attempts.

### Possible investigation steps

- Review the process details to identify the untrusted or unsigned process that loaded the Veeam.Backup.Common.dll library, focusing on the process.name field to determine if it is PowerShell or another suspicious executable.
- Check the process execution history and command line arguments to understand the context of the process activity, especially if the process.name is powershell.exe, pwsh.exe, or powershell_ise.exe.
- Investigate the source and integrity of the process by examining the process.code_signature fields to determine if the process is expected or potentially malicious.
- Analyze the timeline of events on the host to identify any preceding or subsequent suspicious activities that might indicate a broader attack pattern or lateral movement.
- Correlate the alert with other security events or logs from the same host or network to identify any related indicators of compromise or additional affected systems.

### False positive analysis

- Legitimate administrative scripts or automation tasks using PowerShell may trigger the rule. Review the script's purpose and source, and if verified as safe, consider adding an exception for the specific script or process.
- Scheduled tasks or maintenance operations that involve Veeam Backup operations might load the library through unsigned processes. Validate these tasks and exclude them if they are part of routine, secure operations.
- Custom or third-party backup solutions that integrate with Veeam may load the library in a non-standard way. Confirm the legitimacy of these solutions and whitelist them to prevent unnecessary alerts.
- Development or testing environments where Veeam components are frequently loaded by various processes for testing purposes can generate false positives. Implement process exclusions for these environments to reduce noise.
- Ensure that any exclusions or exceptions are documented and reviewed regularly to maintain security posture and adapt to any changes in the environment.

### Response and remediation

- Immediately isolate the affected system from the network to prevent further unauthorized access or data exfiltration.
- Terminate any suspicious processes identified as loading the Veeam.Backup.Common.dll library, especially those that are unsigned or involve PowerShell.
- Conduct a thorough review of the system's event logs and process history to identify any additional unauthorized access or actions taken by the adversary.
- Change all credentials stored within the Veeam Backup software and any other potentially compromised accounts to prevent misuse.
- Restore any affected systems or data from a known good backup to ensure integrity and availability.
- 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 and alerting for similar activities, focusing on unauthorized process executions and DLL loads, to improve early detection of future threats."""

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

[[rule.threat.technique]]
id = "T1555"
name = "Credentials from Password Stores"
reference = "https://attack.mitre.org/techniques/T1555/"

[rule.threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "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.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"

[rule.investigation_fields]
field_names = [
    "@timestamp",
    "host.name",
    "host.id",
    "user.name",
    "user.id",
    "user.domain",
    "process.entity_id",
    "process.name",
    "process.executable",
    "process.code_signature.exists",
    "process.code_signature.trusted",
    "process.code_signature.subject_name",
]

Stages and Predicates

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

Stage 1: process

[process where host.os.type == "windows" and event.type == "start" and
  (
    process.code_signature.trusted == false or
    process.code_signature.exists == false or
    process.name : ("powershell.exe", "pwsh.exe", "powershell_ise.exe") or
    process.pe.original_file_name : ("PowerShell.EXE", "pwsh.dll", "powershell_ise.EXE")
  ) and
  not (process.name : "powershell.exe" and process.parent.executable : "C:\\Windows\\System32\\CompatTelRunner.exe")
]

Stage 2: library

[library where host.os.type == "windows" and event.action == "load" and
  (dll.name : "Veeam.Backup.Common.dll" or dll.pe.original_file_name : "Veeam.Backup.Common.dll")]

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
dll.namewildcard
  • Veeam.Backup.Common.dll
field:"dll.name" kind:wildcard value:"Veeam.Backup.Common.dll"
dll.pe.original_file_namewildcard
  • Veeam.Backup.Common.dll
field:"dll.pe.original_file_name" kind:wildcard value:"Veeam.Backup.Common.dll"
event.actioneq
  • load corpus 23 (elastic 23)
field:"EventType" kind:eq value:"load"
event.typeeq
  • start corpus 1036 (elastic 1036)
field:"event.type" kind:eq value:"start"
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
  • 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)
field:"process_basename" kind:wildcard
process.pe.original_file_namewildcard
  • PowerShell.EXE corpus 134 (sigma 86, splunk 30, elastic 18)
  • powershell_ise.EXE corpus 52 (splunk 30, sigma 18, elastic 4)
  • pwsh.dll corpus 115 (sigma 81, splunk 30, elastic 4)
field:"OriginalFileName" kind:wildcard

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.nameeqpowershell.exeexcludes:process.name field:"process.name" value:"powershell.exe"
process.parent.executableeqC:\Windows\System32\CompatTelRunner.exeexcludes:process.parent.executable field:"process.parent.executable" value:"C:\Windows\System32\CompatTelRunner.exe"

Web Browser Credential Access via Scripting Utility

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

Identifies an unexpected process accessing the password store of commonly used web browsers. Adversaries may steal credentials from web browsers by reading files specific to the target browser.

MITRE ATT&CK Coverage

Rule Body

[rule]
description = """
Identifies an unexpected process accessing the password store of commonly used web browsers. Adversaries may steal
credentials from web browsers by reading files specific to the target browser.
"""
id = "215d1262-984e-4ffc-8e26-f568ed77b3cb"
license = "Elastic License v2"
name = "Web Browser Credential Access via Scripting Utility"
os_list = ["windows"]
reference = [
    "https://www.elastic.co/security-labs/globally-distributed-stealers",
    "https://www.elastic.co/security-labs/detect-credential-access",
]
version = "1.0.2"

query = '''
sequence by process.entity_id with maxspan=5m
[process where event.action == "start" and 
 (
  process.name : ("node.exe", "python*.exe", "wscript.exe", "mshta.exe",  "AutoIt*.exe") or
  process.code_signature.subject_name : ("AutoIt Consulting Ltd", "OpenJS Foundation", "The MathWorks, Inc.", "Python Software Foundation")
 ) and
 not (process.name : "wscript.exe" and process.args : "\\\\*\\*") and 
 not process.executable : 
             ("?:\\Program Files\\Microsoft SDKs\\Azure\\CLI2\\python.exe", 
              "?:\\Program Files\\Common Files\\Adobe\\Creative Cloud Libraries\\libs\\node.exe", 
              "?:\\Program Files (x86)\\Adobe\\Adobe Creative Cloud Experience\\libs\\node.exe", 
              "?:\\Program Files\\Adobe\\Adobe Creative Cloud Experience\\libs\\node.exe",
              "?:\\Program Files\\Qlik\\Sense\\ServiceDispatcher\\Node\\node.exe", 
              "?:\\Program Files\\MATLAB\\*\\bin\\win64\\MATLAB.exe")]
[file where event.type == "access" and
  file.path :
           ("?:\\Users\\*\\AppData\\Local\\Google\\Chrome\\User Data\\Local State",
            "?:\\Users\\*\\AppData\\Local\\Microsoft\\Edge\\User Data\\Local State",
            "?:\\users\\*\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Login Data",
            "?:\\Users\\*\\AppData\\Local\\Microsoft\\Edge\\User Data\\Default\\Login Data")]
'''

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

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1539"
name = "Steal Web Session Cookie"
reference = "https://attack.mitre.org/techniques/T1539/"

[[threat.technique]]
id = "T1555"
name = "Credentials from Password Stores"
reference = "https://attack.mitre.org/techniques/T1555/"
[[threat.technique.subtechnique]]
id = "T1555.003"
name = "Credentials from Web Browsers"
reference = "https://attack.mitre.org/techniques/T1555/003/"



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

[internal]
min_endpoint_version = "8.10.0"

Stages and Predicates

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

Stage 1: process

[process where event.action == "start" and 
 (
  process.name : ("node.exe", "python*.exe", "wscript.exe", "mshta.exe",  "AutoIt*.exe") or
  process.code_signature.subject_name : ("AutoIt Consulting Ltd", "OpenJS Foundation", "The MathWorks, Inc.", "Python Software Foundation")
 ) and
 not (process.name : "wscript.exe" and process.args : "\\\\*\\*") and 
 not process.executable : 
             ("?:\\Program Files\\Microsoft SDKs\\Azure\\CLI2\\python.exe", 
              "?:\\Program Files\\Common Files\\Adobe\\Creative Cloud Libraries\\libs\\node.exe", 
              "?:\\Program Files (x86)\\Adobe\\Adobe Creative Cloud Experience\\libs\\node.exe", 
              "?:\\Program Files\\Adobe\\Adobe Creative Cloud Experience\\libs\\node.exe",
              "?:\\Program Files\\Qlik\\Sense\\ServiceDispatcher\\Node\\node.exe", 
              "?:\\Program Files\\MATLAB\\*\\bin\\win64\\MATLAB.exe")]

Stage 2: file

[file where event.type == "access" and
  file.path :
           ("?:\\Users\\*\\AppData\\Local\\Google\\Chrome\\User Data\\Local State",
            "?:\\Users\\*\\AppData\\Local\\Microsoft\\Edge\\User Data\\Local State",
            "?:\\users\\*\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Login Data",
            "?:\\Users\\*\\AppData\\Local\\Microsoft\\Edge\\User Data\\Default\\Login Data")]

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 388 (elastic 388)
field:"EventType" kind:eq value:"start"
event.typeeq
  • access corpus 9 (elastic 9)
field:"event.type" kind:eq value:"access"
file.pathwildcard
  • ?:\Users\*\AppData\Local\Google\Chrome\User Data\Local State corpus 4 (elastic 4)
  • ?:\Users\*\AppData\Local\Microsoft\Edge\User Data\Default\Login Data corpus 4 (elastic 4)
  • ?:\Users\*\AppData\Local\Microsoft\Edge\User Data\Local State corpus 4 (elastic 4)
  • ?:\users\*\AppData\Local\Google\Chrome\User Data\Default\Login Data corpus 4 (elastic 4)
field:"TargetFilename" kind:wildcard
process.code_signature.subject_namewildcard
  • AutoIt Consulting Ltd corpus 5 (elastic 5)
  • OpenJS Foundation corpus 6 (elastic 6)
  • Python Software Foundation corpus 6 (elastic 6)
  • The MathWorks, Inc.
field:"Signature" kind:wildcard
process.namewildcard
  • AutoIt*.exe corpus 4 (elastic 4)
  • mshta.exe corpus 6 (elastic 6)
  • node.exe corpus 8 (elastic 8)
  • python*.exe corpus 4 (elastic 4)
  • wscript.exe corpus 9 (elastic 9)
field:"process_basename" kind:wildcard

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argswildcard\\*\*excludes:process.args field:"process.args" value:"\\*\*"
process.nameeqwscript.exeexcludes:process.name field:"process.name" value:"wscript.exe"
process.executablewildcard?:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe, ?:\Program Files\Common Files\Adobe\Creative Cloud Libraries\libs\node.exe, ?:\Program Files (x86)\Adobe\Adobe Creative Cloud Experience\libs\node.exe, ?:\Program Files\Adobe\Adobe Creative Cloud Experience\libs\node.exe, ?:\Program Files\Qlik\Sense\ServiceDispatcher\Node\node.exe, ?:\Program Files\MATLAB\*\bin\win64\MATLAB.exeexcludes:process.executable

Back to all Elastic rules