Detection rules › Elastic
Elastic rules: 1w
Active Directory Forced Authentication from Linux Host - SMB Named Pipes
#Identifies a potential forced authentication using related SMB named pipes. Attackers may attempt to force targets to authenticate to a host controlled by them to capture hashes or enable relay attacks.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2024/07/23"
integration = ["endpoint", "system"]
maturity = "production"
updated_date = "2025/02/21"
[rule]
author = ["Elastic"]
description = """
Identifies a potential forced authentication using related SMB named pipes. Attackers may attempt to force targets to
authenticate to a host controlled by them to capture hashes or enable relay attacks.
"""
from = "now-9m"
index = ["logs-endpoint.events.network-*", "logs-system.security*", "winlogbeat-*"]
language = "eql"
license = "Elastic License v2"
name = "Active Directory Forced Authentication from Linux Host - SMB Named Pipes"
references = [
"https://github.com/p0dalirius/windows-coerced-authentication-methods",
"https://www.thehacker.recipes/a-d/movement/mitm-and-coerced-authentications",
"https://attack.mitre.org/techniques/T1187/",
]
risk_score = 47
rule_id = "c24e9a43-f67e-431d-991b-09cdb83b3c0c"
setup = """## Setup
This rule uses Elastic Endpoint network events from Linux hosts and system integration events from Domain controllers
for correlation. Both data sources should be collected from the hosts for this detection to work.
The 'Audit Detailed File Share' audit policy must be configured (Success Failure).
Steps to implement the logging policy with Advanced Audit Configuration:
```
Computer Configuration >
Policies >
Windows Settings >
Security Settings >
Advanced Audit Policies Configuration >
Audit Policies >
Object Access >
Audit Detailed File Share (Success,Failure)
```
"""
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"OS: Linux",
"Use Case: Threat Detection",
"Tactic: Credential Access",
"Data Source: Elastic Defend",
"Data Source: Active Directory",
"Use Case: Active Directory Monitoring",
"Data Source: Windows Security Event Logs",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
sequence with maxspan=15s
[network where host.os.type == "linux" and event.action == "connection_attempted" and destination.port == 445 and not startswith~(string(destination.ip), string(host.ip))] by host.ip, data_stream.namespace
[file where host.os.type == "windows" and event.code == "5145" and file.name : ("Spoolss", "netdfs", "lsarpc", "lsass", "netlogon", "samr", "efsrpc", "FssagentRpc")] by source.ip, data_stream.namespace
'''
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 Active Directory Forced Authentication from Linux Host - SMB Named Pipes
Active Directory (AD) and SMB named pipes facilitate network resource access and inter-process communication. Adversaries exploit these by forcing authentication from a Linux host to capture credentials or perform relay attacks. The detection rule identifies suspicious SMB connection attempts from Linux to Windows hosts, focusing on specific named pipes indicative of forced authentication attempts, thus highlighting potential credential access threats.
### Possible investigation steps
- Review the network logs to identify the Linux host IP address that attempted the SMB connection on port 445 and verify if this activity is expected or authorized.
- Check the Windows host logs for event code 5145 to determine which named pipes were accessed and assess if these accesses align with normal operations or indicate suspicious activity.
- Investigate the source IP address from the Windows logs to determine if it matches the Linux host IP and evaluate if this connection is part of a known and legitimate process.
- Analyze historical data for any previous similar connection attempts from the same Linux host to identify patterns or repeated unauthorized access attempts.
- Consult with system administrators to confirm if there have been any recent changes or updates in the network configuration that could explain the connection attempts.
### False positive analysis
- Routine administrative tasks from Linux hosts may trigger alerts. Identify and document these tasks to create exceptions for known IP addresses or hostnames involved in regular operations.
- Automated backup or monitoring systems that connect to Windows hosts using SMB may cause false positives. Review and whitelist these systems by their IP addresses or specific named pipes they access.
- Development or testing environments where Linux hosts frequently interact with Windows systems can generate alerts. Establish a separate monitoring policy or exclude these environments from the rule to reduce noise.
- Security tools or scripts that perform network scans or audits might mimic suspicious behavior. Verify these tools and exclude their activities by specifying their source IPs or associated user accounts.
- Cross-platform file sharing services that use SMB for legitimate purposes may be flagged. Identify these services and adjust the rule to ignore their specific connection patterns or named pipes.
### Response and remediation
- Isolate the affected Linux host from the network to prevent further unauthorized SMB connection attempts and potential credential capture.
- Conduct a thorough review of the Linux host's network activity logs to identify any unauthorized access or data exfiltration attempts.
- Reset passwords for any accounts that may have been exposed or compromised during the forced authentication attempt to mitigate the risk of credential misuse.
- Implement network segmentation to limit SMB traffic between Linux and Windows hosts, reducing the attack surface for similar threats.
- Escalate the incident to the security operations center (SOC) for further investigation and to determine if additional hosts or systems are affected.
- Deploy enhanced monitoring on the identified named pipes and associated network traffic to detect and respond to future forced authentication attempts promptly.
- Review and update firewall rules to restrict unnecessary SMB traffic and ensure only authorized systems can communicate over port 445."""
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1187"
name = "Forced Authentication"
reference = "https://attack.mitre.org/techniques/T1187/"
[rule.threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
Stages and Predicates
Ordered sequence: each step below must occur in order within 15s, correlated by data_stream.namespace, host.ip, source.ip.
Stage 1: network
[network where host.os.type == "linux" and event.action == "connection_attempted" and destination.port == 445 and not startswith~(string(destination.ip), string(host.ip))] by host.ip, data_stream.namespace
Stage 2: file
[file where host.os.type == "windows" and event.code == "5145" and file.name : ("Spoolss", "netdfs", "lsarpc", "lsass", "netlogon", "samr", "efsrpc", "FssagentRpc")] by source.ip, data_stream.namespace
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
destination.port | eq |
| field:"DestinationPort" kind:eq value:"445" |
event.action | eq |
| field:"EventType" kind:eq value:"connection_attempted" |
event.code | eq |
| field:"EventID" kind:eq value:"5145" |
file.name | wildcard |
| field:"file.name" kind:wildcard |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
destination.ip | starts_with | string(host.ip) | excludes:destination.ip field:"destination.ip" value:"string(host.ip)" |
Anomalous Linux Compiler Activity
#Looks for compiler activity by a user context which does not normally run compilers. This can be the result of ad-hoc software changes or unauthorized software deployment. This can also be due to local privilege elevation via locally run exploits or malware activity.
Known False Positives
- Uncommon compiler activity can be due to an engineer running a local build on a production or staging instance in the course of troubleshooting or fixing a software issue.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Resource Development | |
| Privilege Escalation | |
| Stealth |
Rule Body
[metadata]
creation_date = "2020/09/03"
integration = ["auditd_manager", "endpoint", "network_traffic"]
maturity = "production"
min_stack_version = "9.4.0"
min_stack_comments = "Use EA (Entity Analytics) fields"
updated_date = "2026/07/27"
[rule]
anomaly_threshold = 50
author = ["Elastic"]
description = """
Looks for compiler activity by a user context which does not normally run compilers. This can be the result of ad-hoc
software changes or unauthorized software deployment. This can also be due to local privilege elevation via locally run
exploits or malware activity.
"""
false_positives = [
"""
Uncommon compiler activity can be due to an engineer running a local build on a production or staging instance in
the course of troubleshooting or fixing a software issue.
""",
]
from = "now-45m"
interval = "15m"
license = "Elastic License v2"
machine_learning_job_id = ["v3_linux_rare_user_compiler_ea"]
name = "Anomalous Linux Compiler Activity"
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
- Network Packet Capture
### 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.
### Network Packet Capture Integration Setup
The Network Packet Capture integration sniffs network packets on a host and dissects known protocols. Monitoring the network traffic is critical to gaining observability and securing your environment — ensuring high levels of performance and security. The Network Packet Capture integration captures the network traffic between your application servers, decodes common application layer protocols and records the interesting fields for each transaction.
#### The following steps should be executed in order to add the Elastic Agent System integration "network_traffic" to your system:
- Go to the Kibana home page and click “Add integrations”.
- In the query bar, search for “Network Packet Capture” and select the integration to see more details about it.
- Click “Add Network Packet Capture”.
- Configure the integration name and optionally add a description.
- Review optional and advanced settings accordingly.
- Add the newly installed “network_traffic” to an existing or a new agent policy, and deploy the agent on your system from which network log files are desirable.
- Click “Save and Continue”.
- For more details on the integration refer to the [helper guide](https://docs.elastic.co/integrations/network_traffic).
"""
risk_score = 21
rule_id = "cd66a419-9b3f-4f57-8ff8-ac4cd2d5f530"
severity = "low"
tags = [
"Domain: Endpoint",
"OS: Linux",
"Data Source: Elastic Defend",
"Data Source: Auditd Manager",
"Data Source: Network Packet Capture",
"Use Case: Threat Detection",
"Rule Type: ML",
"Rule Type: Machine Learning",
"Tactic: Resource Development",
"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 Anomalous Linux Compiler Activity
Compilers transform source code into executable programs, a crucial step in software development. In Linux environments, unexpected compiler use by atypical users may signal unauthorized software changes or privilege escalation attempts. Adversaries exploit this by deploying malicious code or exploits. The detection rule leverages machine learning to identify unusual compiler activity, flagging potential threats by analyzing user behavior patterns and deviations from normal operations.
### Possible investigation steps
- Review the user account associated with the anomalous compiler activity to determine if the user typically engages in software development or has a history of using compilers.
- Check the specific compiler and version used in the activity to identify if it is a known or legitimate tool within the organization.
- Analyze the source and destination of the compiler activity, including the IP addresses and hostnames, to identify any unusual or unauthorized access patterns.
- Investigate recent changes or deployments on the system where the compiler activity was detected to identify any unauthorized software installations or modifications.
- Examine system logs and audit trails for any signs of privilege escalation attempts or other suspicious activities around the time of the compiler usage.
- Cross-reference the detected activity with known threat intelligence sources to determine if the behavior matches any known attack patterns or indicators of compromise.
### False positive analysis
- Development environments where multiple users compile code can trigger false positives. Regularly update the list of authorized users who are expected to use compilers to prevent unnecessary alerts.
- Automated build systems or continuous integration pipelines may be flagged. Exclude these systems from monitoring or adjust the rule to recognize their activity as normal.
- Educational or training sessions involving compilers might cause alerts. Temporarily adjust the rule settings or add exceptions for the duration of the training.
- Users compiling open-source software for personal use can be mistaken for threats. Implement a process for users to notify the security team of legitimate compiler use to preemptively adjust monitoring rules.
- System administrators performing maintenance or updates that involve compiling software may trigger alerts. Maintain a log of scheduled maintenance activities and adjust the rule to account for these periods.
### Response and remediation
- Isolate the affected system from the network to prevent potential lateral movement or further exploitation.
- Terminate any suspicious processes associated with the anomalous compiler activity to halt any ongoing malicious operations.
- Conduct a thorough review of recent user activity and permissions to identify unauthorized access or privilege escalation attempts.
- Remove any unauthorized or malicious software identified during the investigation to prevent further compromise.
- Restore the system from a known good backup if malicious code execution is confirmed, ensuring that the backup is free from compromise.
- Implement stricter access controls and monitoring for compiler usage, ensuring only authorized users can execute compilers.
- Escalate the incident to the security operations center (SOC) or incident response team for further analysis and to determine if additional systems are affected."""
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1588"
name = "Obtain Capabilities"
reference = "https://attack.mitre.org/techniques/T1588/"
[[rule.threat.technique.subtechnique]]
id = "T1588.001"
name = "Malware"
reference = "https://attack.mitre.org/techniques/T1588/001/"
[rule.threat.tactic]
id = "TA0042"
name = "Resource Development"
reference = "https://attack.mitre.org/tactics/TA0042/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1127"
name = "Trusted Developer Utilities Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1127/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "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/"
AWS Bedrock Untrusted Model Imported or Marketplace Endpoint Registered
#Detects when an AWS Bedrock custom model is imported or deployed, or when a marketplace model endpoint is created or registered, via the CreateModelImportJob, CreateCustomModelDeployment, CreateMarketplaceModelEndpoint, or RegisterMarketplaceModelEndpoint API calls. These actions introduce a model artifact from outside the organization's trusted training and approval pipeline. A backdoored, poisoned, or attacker-supplied model that downstream applications subsequently invoke represents a software supply-chain compromise. New model imports and marketplace endpoint registrations should be validated for artifact provenance (S3 source ownership), the registering identity, and whether the model originates from an approved internal pipeline.
Known False Positives
- Machine learning engineers, MLOps automation, or platform teams may legitimately import custom models or stand up marketplace model endpoints as part of normal model lifecycle operations. Verify whether the user identity, user agent, source IP, and model artifact source (S3 location) are expected for your environment. Imports performed by approved CI/CD or IaC pipelines can be exempted from this rule. Activity from unfamiliar identities or untrusted artifact sources should be investigated.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2026/06/04"
integration = ["aws"]
maturity = "production"
updated_date = "2026/06/04"
[rule]
author = ["Elastic"]
description = """
Detects when an AWS Bedrock custom model is imported or deployed, or when a marketplace model endpoint is created or
registered, via the CreateModelImportJob, CreateCustomModelDeployment, CreateMarketplaceModelEndpoint, or
RegisterMarketplaceModelEndpoint API calls. These actions introduce a model artifact from outside the organization's
trusted training and approval pipeline. A backdoored, poisoned, or attacker-supplied model that downstream applications
subsequently invoke represents a software supply-chain compromise. New model imports and marketplace endpoint
registrations should be validated for artifact provenance (S3 source ownership), the registering identity, and whether
the model originates from an approved internal pipeline.
"""
false_positives = [
"""
Machine learning engineers, MLOps automation, or platform teams may legitimately import custom models or stand up
marketplace model endpoints as part of normal model lifecycle operations. Verify whether the user identity, user
agent, source IP, and model artifact source (S3 location) are expected for your environment. Imports performed by
approved CI/CD or IaC pipelines can be exempted from this rule. Activity from unfamiliar identities or untrusted
artifact sources should be investigated.
""",
]
from = "now-6m"
index = ["logs-aws.cloudtrail-*"]
language = "kuery"
license = "Elastic License v2"
name = "AWS Bedrock Untrusted Model Imported or Marketplace Endpoint Registered"
note = """## Triage and analysis
### Investigating AWS Bedrock Untrusted Model Imported or Marketplace Endpoint Registered
Amazon Bedrock allows organizations to import custom models, deploy them, and register marketplace model endpoints for inference. Each of these paths introduces a model artifact that did not necessarily originate from the organization's trusted training and approval pipeline. Adversaries who can import a backdoored or poisoned model — or register an untrusted marketplace endpoint — can influence the output of any downstream application that invokes that model, constituting a supply-chain compromise. This detection identifies `CreateModelImportJob`, `CreateCustomModelDeployment`, `CreateMarketplaceModelEndpoint`, and `RegisterMarketplaceModelEndpoint` calls so responders can verify model provenance before the model is trusted for inference.
#### 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`.
- Confirm whether a related change request or model onboarding ticket exists.
- Determine if the identity is an approved ML/MLOps role or automation principal.
- **Validate the model artifact source**
- In `aws.cloudtrail.flattened.request_parameters`, review the model source location (e.g., the S3 URI for an import job) and confirm the bucket belongs to your organization and is not attacker-controlled.
- For marketplace endpoints, confirm the model package ARN / product corresponds to an approved vendor.
- **Correlate activity**
- Look for subsequent `InvokeModel` / `InvokeModelWithResponseStream` activity targeting the new model or endpoint.
- Check for prior enumeration such as `ListFoundationModels`, `ListCustomModels`, or `ListImportedModels`.
- Review other recent actions by the same identity for signs of broader compromise.
### False positive analysis
- **Planned model onboarding**: ML teams routinely import models and register endpoints. Validate against a ticket and confirm the artifact source.
- **Automation**: IaC or MLOps pipelines may create these resources during deployment. Confirm the source IP and ARN match expected automation infrastructure.
### Response and remediation
- **If unauthorized**
- Delete or disable the imported model, custom model deployment, or marketplace endpoint.
- Prevent downstream applications from invoking the untrusted model until provenance is established.
- Disable the access key in `aws.cloudtrail.user_identity.access_key_id` and rotate credentials if compromise is suspected.
- Audit the S3 source bucket for tampering and review the model artifact for backdoors.
- **Hardening**
- Restrict `bedrock:CreateModelImportJob`, `bedrock:CreateCustomModelDeployment`, and marketplace endpoint creation/registration permissions to approved roles.
- Enforce that model artifacts originate only from organization-owned, controlled S3 locations.
### Additional information
"""
references = [
"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html",
"https://docs.aws.amazon.com/bedrock/latest/userguide/model-import.html"
]
risk_score = 47
rule_id = "c435defe-8438-4d5a-b4d0-86ab0faf9a49"
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: Persistence",
]
timestamp_override = "event.ingested"
type = "query"
query = '''
data_stream.dataset: "aws.cloudtrail"
and event.provider: "bedrock.amazonaws.com"
and event.action: (
"CreateModelImportJob" or
"CreateCustomModelDeployment" or
"CreateMarketplaceModelEndpoint" or
"RegisterMarketplaceModelEndpoint"
)
and event.outcome: "success"
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1525"
name = "Implant Internal Image"
reference = "https://attack.mitre.org/techniques/T1525/"
[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[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.flattened.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: (
"CreateModelImportJob" or
"CreateCustomModelDeployment" or
"CreateMarketplaceModelEndpoint" or
"RegisterMarketplaceModelEndpoint"
)
and event.outcome: "success"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
data_stream.dataset | eq |
| field:"data_stream.dataset" kind:eq value:"aws.cloudtrail" |
event.action | in |
| field:"EventType" kind:in |
event.outcome | eq |
| field:"event.outcome" kind:eq value:"success" |
event.provider | eq |
| field:"Provider_Name" kind:eq value:"bedrock.amazonaws.com" |
AWS EC2 CreateKeyPair by New Principal from Non-Cloud AS Organization
#Identifies the first time a given IAM principal successfully creates an EC2 key pair when the request is sourced from a network whose autonomous system organization is not attributed to common cloud or hyperscaler providers in your GeoIP data. Adversaries may call CreateKeyPair to stage SSH access material before launching or accessing instances. A new terms baseline on user_identity.arn suppresses repeated noise from the same principal while still surfacing the initial suspicious creation from an unusual egress label.
Known False Positives
- Engineers creating key pairs from home ISP, corporate VPN, or colocation AS names will match until baselined. GeoIP databases vary by vendor; organization labels may differ slightly from the excluded strings (for example alternate Amazon or Google legal names). Tune exclusions on `source.as.organization.name` or principal ARN after validation.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Credential Access | |
| Lateral Movement |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2026/04/08"
integration = ["aws"]
maturity = "production"
updated_date = "2026/07/08"
[rule]
author = ["Elastic"]
description = """
Identifies the first time a given IAM principal successfully creates an EC2 key pair when the request is sourced from a
network whose autonomous system organization is not attributed to common cloud or hyperscaler providers in your GeoIP
data. Adversaries may call CreateKeyPair to stage SSH access material before launching or accessing instances. A new
terms baseline on `user_identity.arn` suppresses repeated noise from the same principal while still surfacing the initial
suspicious creation from an unusual egress label.
"""
false_positives = [
"""
Engineers creating key pairs from home ISP, corporate VPN, or colocation AS names will match until baselined.
GeoIP databases vary by vendor; organization labels may differ slightly from the excluded strings (for example
alternate Amazon or Google legal names). Tune exclusions on `source.as.organization.name` or principal ARN after
validation.
""",
]
from = "now-6m"
index = ["filebeat-*", "logs-aws.cloudtrail-*"]
language = "kuery"
license = "Elastic License v2"
name = "AWS EC2 CreateKeyPair by New Principal from Non-Cloud AS Organization"
note = """## Triage and analysis
### Investigating AWS EC2 CreateKeyPair by New Principal from Non-Cloud AS Organization
`CreateKeyPair` creates an Amazon EC2 SSH key pair in the account; the private key material is returned to the caller
once. This is useful for persistence or preparation for instance access.
This **new terms** rule alerts the **first** time `aws.cloudtrail.user_identity.arn` matches the query within the
configured history window. Subsequent key-pair creations by the same principal (still matching the query) are
suppressed until the term ages out of the window.
#### Possible investigation steps
- Review `aws.cloudtrail.request_parameters` / `response_elements` for `keyName` and whether the key aligns with change
management.
- Correlate `source.ip`, `source.geo`, and `user_agent.original` with the principal’s normal admin paths.
- Hunt for `RunInstances`, `ImportKeyPair`, or Instance Connect activity involving the same key name or actor.
### False positive analysis
- First-time legitimate admin activity from a new office or VPN provider.
- Missing `source.as.organization.name` enrichment would **not** match the query’s positive wildcard; confirm fields are
populated if you expect coverage.
### Response and remediation
- If unauthorized: delete the key pair (`DeleteKeyPair`), review IAM for `ec2:CreateKeyPair`, and rotate any credentials
used by the actor.
### Additional information
- [CreateKeyPair](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html)
"""
references = [
"https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html",
]
risk_score = 73
rule_id = "c8e4f1a2-9b3d-4c5e-a6f7-8b9c0d1e2f3a"
severity = "high"
tags = [
"Domain: Cloud",
"Domain: Identity",
"Data Source: AWS",
"Data Source: Amazon Web Services",
"Data Source: Amazon EC2",
"Use Case: Threat Detection",
"Tactic: Persistence",
"Tactic: Credential Access",
"Tactic: Lateral Movement",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
event.dataset: "aws.cloudtrail"
and event.provider: "ec2.amazonaws.com"
and event.action: "CreateKeyPair"
and event.outcome: "success"
and source.as.organization.name: (
* and not (
"Amazon.com, Inc." or AMAZ* or "Google LLC" or "Microsoft Corporation"
)
)
'''
[rule.investigation_fields]
field_names = [
"@timestamp",
"user.name",
"user_agent.original",
"source.ip",
"source.as.organization.name",
"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",
"aws.cloudtrail.response_elements",
]
[[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 = "T1552"
name = "Unsecured Credentials"
reference = "https://attack.mitre.org/techniques/T1552/"
[[rule.threat.technique.subtechnique]]
id = "T1552.004"
name = "Private Keys"
reference = "https://attack.mitre.org/techniques/T1552/004/"
[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 = "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 = ["user.name", "cloud.account.id"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-10d"
Stages and Predicates
Stage 1: new_terms
event.dataset: "aws.cloudtrail"
and event.provider: "ec2.amazonaws.com"
and event.action: "CreateKeyPair"
and event.outcome: "success"
and source.as.organization.name: (
* and not (
"Amazon.com, Inc." or AMAZ* or "Google LLC" or "Microsoft Corporation"
)
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"CreateKeyPair" |
event.dataset | eq |
| field:"event.dataset" kind:eq value:"aws.cloudtrail" |
event.outcome | eq |
| field:"event.outcome" kind:eq value:"success" |
event.provider | eq |
| field:"Provider_Name" kind:eq value:"ec2.amazonaws.com" |
source.as.organization.name | is_not_null | field:"source.as.organization.name" kind:is_not_null |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
source.as.organization.name | eq | Amazon.com, Inc. | excludes:source.as.organization.name field:"source.as.organization.name" value:"Amazon.com, Inc." |
source.as.organization.name | eq | Google LLC | excludes:source.as.organization.name field:"source.as.organization.name" value:"Google LLC" |
source.as.organization.name | eq | Microsoft Corporation | excludes:source.as.organization.name field:"source.as.organization.name" value:"Microsoft Corporation" |
source.as.organization.name | starts_with | AMAZ | excludes:source.as.organization.name field:"source.as.organization.name" value:"AMAZ" |
AWS STS GetSessionToken Usage
#Identifies the use of GetSessionToken API calls by IAM users or Root Account. While this is a common and legitimate operation used to obtain temporary credentials, it also provides adversaries with a method to generate short-lived tokens for stealthy activity. Attackers who compromise IAM user access keys may call GetSessionToken to create temporary credentials, which they can then use to move laterally, escalate privileges, or persist after key rotation. This rule is intended as a BBR to establish patterns of typical STS usage and support correlation with higher-fidelity detections.
Known False Positives
- GetSessionToken is widely used by legitimate automation, CLI users, and administrative scripts to acquire temporary credentials. Frequent, authorized usage is expected in most environments, especially where IAM users authenticate with MFA or use short-lived tokens. Review IAM and CI/CD users, SDKs, and service accounts that regularly perform this action and document them in an allowlist. Suppress or tune accordingly to reduce noise.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | |
| Stealth | |
| Lateral Movement |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
Rule Body
[metadata]
bypass_bbr_timing = true
creation_date = "2021/05/17"
integration = ["aws"]
maturity = "production"
updated_date = "2026/03/24"
[rule]
author = ["Austin Songer", "Elastic"]
building_block_type = "default"
description = """
Identifies the use of GetSessionToken API calls by IAM users or Root Account. While this is a common and legitimate
operation used to obtain temporary credentials, it also provides adversaries with a method to generate short-lived
tokens for stealthy activity. Attackers who compromise IAM user access keys may call GetSessionToken to create temporary
credentials, which they can then use to move laterally, escalate privileges, or persist after key rotation. This rule is
intended as a BBR to establish patterns of typical STS usage and support correlation with higher-fidelity detections.
"""
false_positives = [
"""
GetSessionToken is widely used by legitimate automation, CLI users, and administrative scripts to acquire temporary
credentials. Frequent, authorized usage is expected in most environments, especially where IAM users authenticate
with MFA or use short-lived tokens. Review IAM and CI/CD users, SDKs, and service accounts that regularly perform
this action and document them in an allowlist. Suppress or tune accordingly to reduce noise.
""",
]
from = "now-6m"
index = ["filebeat-*", "logs-aws.cloudtrail-*"]
language = "kuery"
license = "Elastic License v2"
name = "AWS STS GetSessionToken Usage"
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 AWS STS GetSessionToken Usage
AWS Security Token Service (STS) provides temporary credentials for AWS resources, crucial for managing access without long-term credentials. Adversaries may exploit `GetSessionToken` to create temporary credentials, enabling lateral movement and privilege escalation. The detection rule identifies successful `GetSessionToken` requests, flagging potential misuse for further investigation.
#### Possible investigation steps
- **Establish normal baseline behavior**
- Use this rule’s data to determine which IAM users or automation scripts routinely perform `GetSessionToken`.
- Monitor frequency, regions, and user agents (CLI, SDK, console) for each identity over time.
- **Identify anomalies**
- Look for first-time or rare `GetSessionToken` usage by an IAM user.
- Detect tokens issued without MFA when MFA is normally required.
- Identify new or unexpected source IPs, geographies, or user agents (e.g., API calls from unfamiliar networks).
- Check for multiple temporary tokens minted in rapid succession by the same user or access key.
- **Correlate with downstream activity**
- Search for immediate follow-on events within 15 minutes of token creation:
- `AssumeRole` into higher-privileged roles or cross-account roles.
- Privileged API calls (e.g., `iam:*`, `s3:PutBucketPolicy`, `ec2:CreateSnapshot`).
- New region access, resource enumeration, or credential operations (`GetCallerIdentity`, `ListUsers`, etc.).
- Use this correlation to elevate contextual `GetSessionToken` behavior into actionable detections.
### Usage Notes
- This rule’s telemetry can support hunting queries such as:
- `GetSessionToken` without `TokenCode` (no MFA)
- New IP + `GetSessionToken` + `AssumeRole`
- Rapid token issuance followed by API activity from a new ASN
Use these patterns in combination with related BBRs or detection rules for `AssumeRole` abuse, cross-account access,
or credential pivoting for more reliable threat detection.
"""
references = ["https://docs.aws.amazon.com/STS/latest/APIReference/API_GetSessionToken.html"]
risk_score = 21
rule_id = "b45ab1d2-712f-4f01-a751-df3826969807"
severity = "low"
tags = [
"Domain: Cloud",
"Data Source: AWS",
"Data Source: Amazon Web Services",
"Data Source: AWS STS",
"Use Case: Identity and Access Audit",
"Tactic: Privilege Escalation",
"Tactic: Lateral Movement",
"Resources: Investigation Guide",
"Rule Type: BBR",
]
timestamp_override = "event.ingested"
type = "query"
query = '''
event.dataset: aws.cloudtrail
and event.provider: sts.amazonaws.com
and event.action: GetSessionToken
and event.outcome: success
'''
[[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.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
[[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.001"
name = "Application Access Token"
reference = "https://attack.mitre.org/techniques/T1550/001/"
[rule.threat.tactic]
id = "TA0008"
name = "Lateral Movement"
reference = "https://attack.mitre.org/tactics/TA0008/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "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.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",
"aws.cloudtrail.response_elements",
]
Stages and Predicates
Stage 1: query
event.dataset: aws.cloudtrail
and event.provider: sts.amazonaws.com
and event.action: GetSessionToken
and event.outcome: success
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"GetSessionToken" |
event.dataset | eq |
| field:"event.dataset" kind:eq value:"aws.cloudtrail" |
event.outcome | eq |
| field:"event.outcome" kind:eq value:"success" |
event.provider | eq |
| field:"Provider_Name" kind:eq value:"sts.amazonaws.com" |
dMSA Account Creation by an Unusual User
#Detects creation of a delegated Managed Service Account by an unusual subject account. Attackers can abuse weak child-object or msDS-DelegatedManagedServiceAccount rights during account migration to elevate privileges.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 5137: A directory service object was created. |
Rule Body
[metadata]
creation_date = "2025/05/23"
integration = ["system", "windows"]
maturity = "production"
updated_date = "2026/05/03"
[rule]
author = ["Elastic"]
description = """
Detects creation of a delegated Managed Service Account by an unusual subject account. Attackers can abuse weak
child-object or msDS-DelegatedManagedServiceAccount rights during account migration to elevate privileges.
"""
from = "now-9m"
index = ["winlogbeat-*", "logs-system.security*", "logs-windows.forwarded*"]
language = "kuery"
license = "Elastic License v2"
name = "dMSA Account Creation by an Unusual User"
references = ["https://www.akamai.com/blog/security-research/abusing-dmsa-for-privilege-escalation-in-active-directory"]
risk_score = 73
rule_id = "f0dbff4c-1aa7-4458-9ed5-ada472f64970"
severity = "high"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Privilege Escalation",
"Use Case: Active Directory Monitoring",
"Data Source: Active Directory",
"Data Source: Windows Security Event Logs",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
event.code:5137 and host.os.type:"windows" and winlog.event_data.ObjectClass:"msDS-DelegatedManagedServiceAccount"
'''
note = """## Triage and analysis
### Investigating dMSA Account Creation by an Unusual User
#### Possible investigation steps
- What dMSA object did the alert show, and where was it created?
- Focus: use `winlog.event_data.ObjectClass`, `winlog.event_data.ObjectDN`, `winlog.event_data.ObjectGUID`, `winlog.event_data.SubjectUserName`, and `winlog.computer_name` to identify the new msDS-DelegatedManagedServiceAccount, new-to-this-rule writer, and controller.
- Implication: escalate when the object is in a privileged service, sync, backup, DC, or identity-infrastructure path, or when name or writer lacks a narrow service-account purpose; lower only when DN, writer, and controller match one exact planned dMSA rollout or lab path.
- Did the same dMSA receive migration or privilege-enabling attributes?
- Why: BadSuccessor-style abuse elevates creation with `5136` changes such as msDS-ManagedAccountPrecededByLink, msDS-DelegatedMSAState, SPNs, delegation attributes, or gMSA membership.
- Focus: review same-object `5136` and `5137` records on this controller with `winlog.event_data.ObjectGUID`, comparing `winlog.event_data.AttributeLDAPDisplayName`, `winlog.event_data.AttributeValue`, and `winlog.event_data.ObjectDN`. $investigate_0
- Hint: if same-controller results have gaps, repeat the `winlog.event_data.ObjectGUID` search across DC Windows Security logs before treating missing follow-on changes as lower risk.
- Implication: escalate when values link the dMSA to a privileged predecessor, advance migration state, or add SPN/delegation material; lower suspicion only when attributes form one bounded migration to the intended legacy service account.
- Who created the dMSA, and what session reached the domain controller?
- Focus: identify writer and session with `winlog.event_data.SubjectUserSid` and `winlog.event_data.SubjectLogonId`, then recover `source.ip`, `winlog.logon.type`, and `winlog.event_data.AuthenticationPackageName`. $investigate_1
- Hint: this pivot uses `winlog.event_data.TargetLogonId` for `4624` or `4634`; search `4648` separately with `winlog.event_data.SubjectLogonId` when explicit-credential use matters. Missing authentication telemetry is unresolved, not benign.
- Implication: escalate for an unexpected human, helpdesk account, low-privilege service identity, unusual source, interactive/RDP session, or explicit-credential path; lower suspicion only when actor and source match the narrow identity-management path for this object.
- Did the same session touch other directory objects?
- Focus: compare surrounding `5137` and `5136` records on the same `host.id` for `winlog.event_data.SubjectLogonId`, reading `winlog.event_data.ObjectDN`, `winlog.event_data.ObjectClass`, and `winlog.event_data.AttributeLDAPDisplayName`.
- Implication: escalate when the session creates multiple dMSAs, edits ACLs, changes delegation, or touches unrelated privileged users, computers, groups, or service accounts; lower when every change stays tied to one bounded dMSA rollout.
- Did the new dMSA get used from systems that should not touch it?
- Focus: derive the dMSA from the CN in `winlog.event_data.ObjectDN`, confirm it in `winlog.event_data.TargetUserName`, then review `4624` records for `source.ip`, `winlog.logon.type`, and `winlog.event_data.AuthenticationPackageName`; search `4648` separately for explicit credential use.
- Hint: absent dMSA authentication is a timing or visibility gap, not proof creation is harmless.
- Implication: escalate when the dMSA authenticates from unexpected servers, workstations, jump hosts, or non-service logon types; lower suspicion only when use stays inside the exact service host set for the confirmed rollout.
- If local evidence is suspicious or incomplete, do related Windows Security events show broader AD abuse?
- Focus: review events for writer `user.id`, then compare records referencing the new `winlog.event_data.ObjectGUID`. $investigate_2
- Hint: use the object-event view for shadow credentials, delegation abuse, unusual service changes, or other AD tampering tied to the same dMSA. $investigate_3
- Implication: escalate and expand scope when either entity is tied to privilege abuse, directory tampering, or suspicious authentication; keep scope to this object when related events are quiet, but do not close solely because no other event exists.
- Escalate for sensitive placement, privileged migration links, unexpected writer/session context, broader directory edits, unexpected dMSA authentication, or related AD-abuse events; close only when telemetry and outside confirmation prove one exact planned migration or lab activity; if mixed or incomplete, preserve directory-change and session evidence and escalate.
### False positive analysis
- Planned dMSA rollout or service-account migration can legitimately create msDS-DelegatedManagedServiceAccount objects. Confirm expected `winlog.event_data.ObjectDN`, same-object `5136` attributes limited to the intended legacy service account, and `winlog.event_data.SubjectUserSid`, recovered `source.ip`, and `winlog.logon.type` matching the narrow migration account and host path. If change records, migration tickets, or owner confirmation are unavailable, leave unresolved unless telemetry proves the exact authorized workflow.
- Lab validation or staged service-account modernization can also trigger this rule. Confirm `winlog.event_data.ObjectDN` stays in the test/staging OU, the same `winlog.event_data.SubjectLogonId` avoids unrelated privileged objects, and any `winlog.event_data.TargetUserName`, `source.ip`, or `winlog.logon.type` activity stays limited to designated test systems. If test scope lacks outside confirmation, treat the alert as unresolved.
- Before creating an exception, validate exact writer `winlog.event_data.SubjectUserSid`, dMSA path pattern, bounded same-object `5136` attributes, controller path, and recovered source. Use a temporary or tightly scoped exception for one-time migrations, and avoid exceptions on event `5137`, all msDS-DelegatedManagedServiceAccount objects, or all dMSA creation activity.
### Response and remediation
- If confirmed benign, reverse any temporary containment and document the evidence that proved the authorized workflow: `winlog.event_data.SubjectUserSid`, `winlog.event_data.ObjectDN`, same-object `5136` sequence, recovered `source.ip`, `winlog.logon.type`, and exact rollout or lab scope.
- If suspicious but unconfirmed, preserve a case export with the triggering `5137`, related same-object `5136` records, recovered `4624` or `4648` records, and key object/session identifiers before containment. Apply reversible containment first, such as temporary DC access restrictions for the recovered source or heightened monitoring on the writer and dMSA. Disable the writer or isolate the source host only if privileged follow-on changes, unexpected authentication, or related events appear.
- If confirmed malicious, preserve the same directory-change and session evidence first, then remove the unauthorized dMSA and roll back related msDS-ManagedAccountPrecededByLink, msDS-DelegatedMSAState, SPN, delegation, or membership changes found in the same-object sequence. Isolate the recovered source host when endpoint response is available and host criticality permits, then disable or reset the compromised writer and any linked service accounts.
- Before deleting objects or closing the case, review hosts and services that used the new dMSA, verify rollback replication across domain controllers, then rotate affected secrets or restore service bindings.
- Post-incident hardening: restrict who can create dMSAs or start service-account migration, review CreateChild and delegated managed service account rights on service-account OUs, retain `5136`, `5137`, `4624`, and `4648` coverage on domain controllers, and record the confirmed workflow or BadSuccessor evidence pattern for future triage.
"""
setup = """## Setup
Audit Directory Service Changes must be enabled to generate the events used by this rule.
Setup instructions: https://ela.st/audit-directory-service-changes
"""
[rule.investigation_fields]
field_names = [
"@timestamp",
"event.code",
"user.name",
"user.id",
"winlog.event_data.SubjectUserName",
"winlog.event_data.SubjectUserSid",
"winlog.event_data.SubjectDomainName",
"winlog.event_data.SubjectLogonId",
"winlog.event_data.ObjectDN",
"winlog.event_data.ObjectGUID",
"winlog.event_data.ObjectClass",
"winlog.event_data.DSName",
"host.name",
"host.id",
"winlog.computer_name",
]
[transform]
[[transform.investigate]]
label = "Directory changes for the same dMSA object on this controller"
description = ""
providers = [
[
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "winlog.event_data.ObjectGUID", queryType = "phrase", value = "{{winlog.event_data.ObjectGUID}}", valueType = "string" },
{ excluded = false, field = "event.code", queryType = "phrase", value = "5137", valueType = "string" }
],
[
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "winlog.event_data.ObjectGUID", queryType = "phrase", value = "{{winlog.event_data.ObjectGUID}}", valueType = "string" },
{ excluded = false, field = "event.code", queryType = "phrase", value = "5136", valueType = "string" }
]
]
relativeFrom = "now-1h"
relativeTo = "now"
[[transform.investigate]]
label = "Authentication events for the writer session on this controller"
description = ""
providers = [
[
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "winlog.event_data.TargetLogonId", queryType = "phrase", value = "{{winlog.event_data.SubjectLogonId}}", valueType = "string" }
]
]
relativeFrom = "now-48h/h"
relativeTo = "now"
[[transform.investigate]]
label = "Windows Security events associated with the modifying account"
description = ""
providers = [
[
{ excluded = false, field = "user.id", queryType = "phrase", value = "{{user.id}}", valueType = "string" }
],
[
{ excluded = false, field = "winlog.event_data.SubjectUserSid", queryType = "phrase", value = "{{winlog.event_data.SubjectUserSid}}", valueType = "string" }
]
]
relativeFrom = "now-48h/h"
relativeTo = "now"
[[transform.investigate]]
label = "Windows Security events associated with the new dMSA object"
description = ""
providers = [
[
{ excluded = false, field = "winlog.event_data.ObjectGUID", queryType = "phrase", value = "{{winlog.event_data.ObjectGUID}}", valueType = "string" }
]
]
relativeFrom = "now-48h/h"
relativeTo = "now"
[rule.new_terms]
field = "new_terms_fields"
value = ["winlog.event_data.SubjectUserName"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-7d"
[[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.002"
name = "Domain Accounts"
reference = "https://attack.mitre.org/techniques/T1078/002/"
[[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/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1136"
name = "Create Account"
reference = "https://attack.mitre.org/techniques/T1136/"
[[rule.threat.technique.subtechnique]]
id = "T1136.002"
name = "Domain Account"
reference = "https://attack.mitre.org/techniques/T1136/002/"
[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
Stages and Predicates
Stage 1: new_terms
event.code:5137 and host.os.type:"windows" and winlog.event_data.ObjectClass:"msDS-DelegatedManagedServiceAccount"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
winlog.event_data.ObjectClass | eq |
| field:"ObjectClass" kind:eq value:"msDS-DelegatedManagedServiceAccount" |
Entra ID PowerShell Sign-in
#Identifies a sign-in using the Azure Active Directory PowerShell module. PowerShell for Azure Active Directory allows for managing settings from the command line, which is intended for users who are members of an admin role.
Known False Positives
- Sign-ins using PowerShell may be done by a system or network administrator. Verify whether the username, hostname, and/or resource name should be signing into your environment. Sign-ins from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Execution |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2020/12/14"
integration = ["azure"]
maturity = "production"
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = """
Identifies a sign-in using the Azure Active Directory PowerShell module. PowerShell for Azure Active Directory allows
for managing settings from the command line, which is intended for users who are members of an admin role.
"""
false_positives = [
"""
Sign-ins using PowerShell may be done by a system or network administrator. Verify whether the username, hostname,
and/or resource name should be signing into your environment. Sign-ins from unfamiliar users or hosts should be
investigated. If known behavior is causing false positives, it can be exempted from the rule.
""",
]
from = "now-9m"
index = ["logs-azure.signinlogs-*", "filebeat-*"]
language = "kuery"
license = "Elastic License v2"
name = "Entra ID PowerShell Sign-in"
note = """## Triage and analysis
### Investigating Entra ID PowerShell Sign-in
Azure Active Directory PowerShell for Graph (Azure AD PowerShell) is a module IT professionals commonly use to manage their Azure Active Directory. The cmdlets in the Azure AD PowerShell module enable you to retrieve data from the directory, create new objects in the directory, update existing objects, remove objects, as well as configure the directory and its features.
This rule identifies sign-ins that use the Azure Active Directory PowerShell module, which can indicate unauthorized access if done outside of IT or engineering.
#### Possible investigation steps
- Identify the user account that performed the action and whether it should perform this kind of action.
- Evaluate whether the user needs to access Azure AD using PowerShell to complete its tasks.
- Investigate other alerts associated with the user account during the past 48 hours.
- Consider the source IP address and geolocation for the involved user account. Do they look normal?
- Contact the account owner and confirm whether they are aware of this activity.
- Investigate suspicious actions taken by the user using the module, for example, modifications in security settings that weakens the security policy, persistence-related tasks, and data access.
- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.
### False positive analysis
- If this activity is expected and noisy in your environment, consider adding IT, Engineering, and other authorized users as exceptions — preferably with a combination of user and device conditions.
### Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Disable or limit the account during the investigation and response.
- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
- Identify the account role in the cloud environment.
- Assess the criticality of affected services and servers.
- Work with your IT team to identify and minimize the impact on users.
- Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
- Identify any regulatory or legal ramifications related to this activity.
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.
- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.
- Consider enabling multi-factor authentication for users.
- Follow security best practices [outlined](https://docs.microsoft.com/en-us/azure/security/fundamentals/identity-management-best-practices) by Microsoft.
- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
## Setup
The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
references = [
"https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/",
"https://docs.microsoft.com/en-us/microsoft-365/enterprise/connect-to-microsoft-365-powershell?view=o365-worldwide",
]
risk_score = 21
rule_id = "a605c51a-73ad-406d-bf3a-f24cc41d5c97"
severity = "low"
tags = [
"Domain: Cloud",
"Data Source: Azure",
"Use Case: Identity and Access Audit",
"Resources: Investigation Guide",
"Tactic: Initial Access",
]
timestamp_override = "event.ingested"
type = "query"
query = '''
data_stream.dataset:azure.signinlogs and
azure.signinlogs.properties.app_display_name:"Azure Active Directory PowerShell" and
azure.signinlogs.properties.token_issuer_type:AzureAD and event.outcome:(success or Success)
'''
[[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.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[rule.threat.technique.subtechnique]]
id = "T1059.001"
name = "PowerShell"
reference = "https://attack.mitre.org/techniques/T1059/001/"
[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
Stages and Predicates
Stage 1: query
data_stream.dataset:azure.signinlogs and
azure.signinlogs.properties.app_display_name:"Azure Active Directory PowerShell" and
azure.signinlogs.properties.token_issuer_type:AzureAD and event.outcome:(success or Success)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
azure.signinlogs.properties.app_display_name | eq |
| field:"azure_ad::app_display_name" kind:eq value:"Azure Active Directory PowerShell" |
azure.signinlogs.properties.token_issuer_type | eq |
| field:"azure.signinlogs.properties.token_issuer_type" kind:eq value:"AzureAD" |
data_stream.dataset | eq |
| field:"data_stream.dataset" kind:eq value:"azure.signinlogs" |
event.outcome | in |
| field:"event.outcome" kind:in |
Entra ID Service Principal Federated Credential Authentication by Unusual Client
#Identifies when a service principal authenticates using a federated identity credential for the first time in the historical window. This indicates that Entra ID validated a JWT token potentially against an external OIDC identity provider and issued an access token. While legitimate for CI/CD workflows (GitHub Actions, Azure DevOps), adversaries may abuse this by configuring rogue identity providers (BYOIDP) to authenticate as compromised applications. First-time federated credential usage for a service principal warrants investigation to determine if the external identity provider is legitimate.
Known False Positives
- New CI/CD pipeline deployments using GitHub Actions, Azure DevOps, or Kubernetes OIDC will trigger this rule when federated authentication is first used. Validate the issuer URL against approved identity providers.
- Application migrations or reconfigurations that switch from certificate/secret authentication to federated credentials will appear as new behavior. Confirm with application owners.
- New workload identity federation configurations for legitimate automation will trigger on first use.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Persistence | |
| Stealth | |
| Lateral Movement |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Azure | Target application: Sign-in naming a target application |
Rule Body
[metadata]
creation_date = "2026/02/09"
integration = ["azure"]
maturity = "production"
updated_date = "2026/07/08"
[rule]
author = ["Elastic"]
description = """
Identifies when a service principal authenticates using a federated identity credential for the first time in the
historical window. This indicates that Entra ID validated a JWT token potentially against an external OIDC identity
provider and issued an access token. While legitimate for CI/CD workflows (GitHub Actions, Azure DevOps), adversaries
may abuse this by configuring rogue identity providers (BYOIDP) to authenticate as compromised applications. First-time
federated credential usage for a service principal warrants investigation to determine if the external identity provider
is legitimate.
"""
false_positives = [
"""
New CI/CD pipeline deployments using GitHub Actions, Azure DevOps, or Kubernetes OIDC will trigger this rule when
federated authentication is first used. Validate the issuer URL against approved identity providers.
""",
"""
Application migrations or reconfigurations that switch from certificate/secret authentication to federated
credentials will appear as new behavior. Confirm with application owners.
""",
"""New workload identity federation configurations for legitimate automation will trigger on first use.
"""
]
from = "now-9m"
index = ["logs-azure.signinlogs-*"]
language = "kuery"
license = "Elastic License v2"
name = "Entra ID Service Principal Federated Credential Authentication by Unusual Client"
note = """## Triage and analysis
### Investigating Entra ID Service Principal Federated Credential Authentication by Unusual Client
If this rule triggers, it indicates that a service principal has authenticated using a federated identity credential for the first time within the historical window. This means that Entra ID validated a JWT token potentially issued by an external OIDC identity provider and issued an access token for the service principal. While this can be legitimate for CI/CD workflows (e.g., GitHub Actions, Azure DevOps, Kubernetes OIDC), it can also indicate abuse by adversaries who have configured rogue identity providers (BYOIDP) to authenticate as compromised applications. For BYOIDP attacks, this is the moment the adversary's rogue identity provider is used to authenticate as the
compromised application for the first time.
### Possible investigation steps
- Identify the service principal using `azure.signinlogs.properties.app_id` and `app_display_name`.
- Critical: Check the application's federated credential configuration in Entra ID:
- What is the issuer URL? Is it a known legitimate provider (GitHub Actions, Azure DevOps, Kubernetes)?
- When was the federated credential added? Was it recent?
- Who added the federated credential?
- Review the `service_principal_credential_thumbprint` - does it match expected certificates?
- Investigate the source IP (`azure.signinlogs.caller_ip_address`) - is it from expected CI/CD infrastructure?
- Check what resources were accessed after authentication using `azure.signinlogs.properties.resource_display_name`.
- Correlate with Graph Activity logs to see what API calls were made with this token.
- Use the `correlation_id` to find related sign-in and activity events.
- Review audit logs for recent changes to this application's federated credentials.
### False positive analysis
- Legitimate CI/CD pipelines using GitHub Actions, Azure DevOps, or Kubernetes OIDC will trigger this rule on first use.
- New application deployments with workload identity federation are expected to show as new behavior.
- Validate the issuer URL against approved identity providers before dismissing.
- Create baseline of applications expected to use federated credentials.
### Response and remediation
- If this is unexpected federated auth for the application, immediately investigate the federated credential configuration.
- Review the external IdP issuer URL configured on the application - is it legitimate?
- If BYOIDP is confirmed:
- Remove the malicious federated credential immediately.
- Revoke active sessions and tokens for the affected service principal.
- Audit what actions were performed using the compromised identity.
- Investigate how the federated credential was added (compromised admin account)."""
references = [
"https://dirkjanm.io/persisting-with-federated-credentials-entra-apps-managed-identities/",
"https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation",
"https://github.com/dirkjanm/ROADtools",
]
risk_score = 73
rule_id = "616b8d00-05f8-11f1-8f33-f661ea17fbce"
setup = """#### Required Microsoft Entra ID Sign-In Logs
To use this rule, ensure that Microsoft Entra ID Sign-In Logs are being collected and streamed into the Elastic Stack via the Azure integration.
"""
severity = "high"
tags = [
"Domain: Cloud",
"Domain: Identity",
"Data Source: Azure",
"Data Source: Microsoft Entra ID",
"Data Source: Microsoft Entra ID Sign-In Logs",
"Use Case: Identity and Access Audit",
"Tactic: Initial Access",
"Tactic: Defense Evasion",
"Tactic: Persistence",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
data_stream.dataset: "azure.signinlogs"
and azure.signinlogs.category: "ServicePrincipalSignInLogs"
and azure.signinlogs.properties.client_credential_type: "federatedIdentityCredential"
and azure.signinlogs.result_signature: "SUCCESS"
and azure.signinlogs.properties.app_id: *
and not azure.signinlogs.properties.app_owner_tenant_id: (
"f8cdef31-a31e-4b4a-93e4-5f571e91255a" or
"72f988bf-86f1-41af-91ab-2d7cd011db47"
)
'''
[[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.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[[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.001"
name = "Application Access Token"
reference = "https://attack.mitre.org/techniques/T1550/001/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1098"
name = "Account Manipulation"
reference = "https://attack.mitre.org/techniques/T1098/"
[[rule.threat.technique.subtechnique]]
id = "T1098.001"
name = "Additional Cloud Credentials"
reference = "https://attack.mitre.org/techniques/T1098/001/"
[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[rule.investigation_fields]
field_names = [
"azure.signinlogs.properties.service_principal_name",
"azure.signinlogs.properties.service_principal_id",
"azure.signinlogs.properties.app_id",
"azure.signinlogs.properties.app_display_name",
"azure.signinlogs.properties.app_owner_tenant_id",
"azure.signinlogs.properties.client_credential_type",
"azure.signinlogs.properties.service_principal_credential_thumbprint",
"azure.signinlogs.caller_ip_address",
"azure.signinlogs.properties.resource_display_name",
"azure.signinlogs.properties.unique_token_identifier",
"azure.correlation_id",
"azure.signinlogs.properties.session_id",
"source.geo.country_name",
"source.geo.city_name",
]
[rule.new_terms]
field = "new_terms_fields"
value = ["azure.signinlogs.properties.app_id"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-5d"
Stages and Predicates
Stage 1: new_terms
data_stream.dataset: "azure.signinlogs"
and azure.signinlogs.category: "ServicePrincipalSignInLogs"
and azure.signinlogs.properties.client_credential_type: "federatedIdentityCredential"
and azure.signinlogs.result_signature: "SUCCESS"
and azure.signinlogs.properties.app_id: *
and not azure.signinlogs.properties.app_owner_tenant_id: (
"f8cdef31-a31e-4b4a-93e4-5f571e91255a" or
"72f988bf-86f1-41af-91ab-2d7cd011db47"
)
Indicators
These rows show field, operator, and value matches.
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
azure.signinlogs.properties.app_owner_tenant_id | in | 72f988bf-86f1-41af-91ab-2d7cd011db47, f8cdef31-a31e-4b4a-93e4-5f571e91255a | excludes:azure.signinlogs.properties.app_owner_tenant_id field:"azure.signinlogs.properties.app_owner_tenant_id" value:"72f988bf-86f1-41af-91ab-2d7cd011db47" field:"azure.signinlogs.properties.app_owner_tenant_id" value:"f8cdef31-a31e-4b4a-93e4-5f571e91255a" |
Execution of a Windows Script Downloaded via a LOLBIN
#Identifies when a Windows script interpreter executes a file downloaded via commonly abused legit Windows binaries such as Certutil or BitsAdmin.
MITRE ATT&CK Coverage
Rule Body
[rule]
description = """
Identifies when a Windows script interpreter executes a file downloaded via commonly abused legit Windows binaries such
as Certutil or BitsAdmin.
"""
id = "f60d4c82-2de5-4c70-95f5-cde9f3ad41a7"
license = "Elastic License v2"
name = "Execution of a Windows Script Downloaded via a LOLBIN"
os_list = ["windows"]
version = "1.0.30"
query = '''
sequence by process.parent.entity_id with maxspan=1m
[process where event.type == "start" and
(process.pe.original_file_name : ("certutil.exe", "bitsadmin.exe", "CertReq.exe", "curl.exe") or
process.executable : "?:\\Windows\\Sys*\\OpenSSH\\sftp.exe") and
process.command_line : ("*download*", "*transfer*", "*-decode*", "*http*", "* -o*", "* --output*")]
[process where event.type == "start" and process.pe.original_file_name : ("wscript.exe", "mshta.exe") and
not (process.working_directory : "E:\\*" and process.name : "cscript.exe" and process.args : ("loadpromo.vbs", "LoadMasterStocks.vbs")) and
not (process.parent.name : "cmd.exe" and
process.parent.args :
("C:\\ProgramData\\NinjaRMMAgent\\scripting\\customscript_gen_?.bat-ninjascript.bat",
"C:\\Storage\\VisualStudioProjects\\connect_wise_script\\install_speerity.bat"))]
'''
min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 1
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.technique.subtechnique]]
id = "T1059.005"
name = "Visual Basic"
reference = "https://attack.mitre.org/techniques/T1059/005/"
[[threat.technique.subtechnique]]
id = "T1059.007"
name = "JavaScript"
reference = "https://attack.mitre.org/techniques/T1059/007/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1197"
name = "BITS Jobs"
reference = "https://attack.mitre.org/techniques/T1197/"
[[threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[[threat.technique.subtechnique]]
id = "T1218.005"
name = "Mshta"
reference = "https://attack.mitre.org/techniques/T1218/005/"
[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 = "7.15.0"
Stages and Predicates
Ordered sequence: each step below must occur in order within 1m, correlated by process.parent.entity_id.
Stage 1: process
[process where event.type == "start" and
(process.pe.original_file_name : ("certutil.exe", "bitsadmin.exe", "CertReq.exe", "curl.exe") or
process.executable : "?:\\Windows\\Sys*\\OpenSSH\\sftp.exe") and
process.command_line : ("*download*", "*transfer*", "*-decode*", "*http*", "* -o*", "* --output*")]
Stage 2: process
[process where event.type == "start" and process.pe.original_file_name : ("wscript.exe", "mshta.exe") and
not (process.working_directory : "E:\\*" and process.name : "cscript.exe" and process.args : ("loadpromo.vbs", "LoadMasterStocks.vbs")) and
not (process.parent.name : "cmd.exe" and
process.parent.args :
("C:\\ProgramData\\NinjaRMMAgent\\scripting\\customscript_gen_?.bat-ninjascript.bat",
"C:\\Storage\\VisualStudioProjects\\connect_wise_script\\install_speerity.bat"))]
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.command_line | wildcard |
| field:"CommandLine" kind:wildcard |
process.executable | wildcard |
| field:"Image" kind:wildcard value:"?:\Windows\Sys*\OpenSSH\sftp.exe" |
process.pe.original_file_name | wildcard |
| field:"OriginalFileName" kind:wildcard |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.args | eq | loadpromo.vbs, LoadMasterStocks.vbs | excludes:process.args field:"process.args" value:"loadpromo.vbs" field:"process.args" value:"LoadMasterStocks.vbs" |
process.name | eq | cscript.exe | excludes:process.name field:"process.name" value:"cscript.exe" |
process.working_directory | starts_with | E:\ | excludes:process.working_directory field:"process.working_directory" value:"E:\" |
process.parent.args | eq | C:\ProgramData\NinjaRMMAgent\scripting\customscript_gen_?.bat-ninjascript.bat, C:\Storage\VisualStudioProjects\connect_wise_script\install_speerity.bat | excludes:process.parent.args field:"process.parent.args" value:"C:\ProgramData\NinjaRMMAgent\scripting\customscript_gen_?.bat-ninjascript.bat" field:"process.parent.args" value:"C:\Storage\VisualStudioProjects\connect_wise_script\install_speerity.bat" |
process.parent.name | eq | cmd.exe | excludes:process.parent.name field:"process.parent.name" value:"cmd.exe" |
Execution of Non-Executable File via Shell
#Detects the execution of an un-executable file, per file extension, via a shell interpreter. Sometimes threat actors will masquerade their payloads as non-executable files in order to avoid suspicion and go unnoticed.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
Rule Body
[rule]
description = """
Detects the execution of an un-executable file, per file extension, via a shell interpreter. Sometimes threat actors
will masquerade their payloads as non-executable files in order to avoid suspicion and go unnoticed.
"""
id = "c0770406-7ede-4049-a7a1-999c15fb60bd"
license = "Elastic License v2"
name = "Execution of Non-Executable File via Shell"
os_list = ["macos"]
version = "1.0.22"
query = '''
process where event.type == "start" and event.action == "exec" and
(process.name in ("bash", "sh", "zsh", "dash", "csh", "tcsh", "ksh", "tclsh", "fish") or process.name like "tclsh*") and
process.command_line like ("/bin/bash *", "/bin/sh *", "/bin/zsh *", "/bin/dash *", "/bin/csh *", "/bin/tcsh *", "/bin/ksh *", "/bin/tclsh*", "/bin/fish *",
"/usr/bin/bash *", "/usr/bin/sh *", "/usr/bin/zsh *", "/usr/bin/dash *", "/usr/bin/csh *", "/usr/bin/tcsh *", "/usr/bin/ksh *", "/usr/bin/tclsh*", "/usr/bin/fish *",
"/usr/local/bin/bash *", "/usr/local/bin/sh *", "/usr/local/bin/zsh *", "/usr/local/bin/dash *", "/usr/local/bin/csh *", "/usr/local/bin/tcsh *", "/usr/local/bin/ksh *", "/usr/local/bin/tclsh*", "/usr/local/bin/fish *",
"/opt/homebrew/bin/bash *", "/opt/homebrew/bin/sh *", "/opt/homebrew/bin/zsh *", "/opt/homebrew/bin/dash *", "/opt/homebrew/bin/csh *", "/opt/homebrew/bin/tcsh *", "/opt/homebrew/bin/ksh *", "/opt/homebrew/bin/tclsh*", "/opt/homebrew/bin/fish *") and
process.command_line like ("*.pid", "*.plist", "*.txt", "*.json", "*.tmp", "*.bin", "*.js", "*.nib", "*.log", "*.dat") and
process.args_count == 2
'''
min_endpoint_version = "8.10.2"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.technique.subtechnique]]
id = "T1059.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 = "T1036"
name = "Masquerading"
reference = "https://attack.mitre.org/techniques/T1036/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "8.10.2"
Stages and Predicates
Stage 1: process
process where event.type == "start" and event.action == "exec" and
(process.name in ("bash", "sh", "zsh", "dash", "csh", "tcsh", "ksh", "tclsh", "fish") or process.name like "tclsh*") and
process.command_line like ("/bin/bash *", "/bin/sh *", "/bin/zsh *", "/bin/dash *", "/bin/csh *", "/bin/tcsh *", "/bin/ksh *", "/bin/tclsh*", "/bin/fish *",
"/usr/bin/bash *", "/usr/bin/sh *", "/usr/bin/zsh *", "/usr/bin/dash *", "/usr/bin/csh *", "/usr/bin/tcsh *", "/usr/bin/ksh *", "/usr/bin/tclsh*", "/usr/bin/fish *",
"/usr/local/bin/bash *", "/usr/local/bin/sh *", "/usr/local/bin/zsh *", "/usr/local/bin/dash *", "/usr/local/bin/csh *", "/usr/local/bin/tcsh *", "/usr/local/bin/ksh *", "/usr/local/bin/tclsh*", "/usr/local/bin/fish *",
"/opt/homebrew/bin/bash *", "/opt/homebrew/bin/sh *", "/opt/homebrew/bin/zsh *", "/opt/homebrew/bin/dash *", "/opt/homebrew/bin/csh *", "/opt/homebrew/bin/tcsh *", "/opt/homebrew/bin/ksh *", "/opt/homebrew/bin/tclsh*", "/opt/homebrew/bin/fish *") and
process.command_line like ("*.pid", "*.plist", "*.txt", "*.json", "*.tmp", "*.bin", "*.js", "*.nib", "*.log", "*.dat") and
process.args_count == 2
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"exec" |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args_count | eq |
| field:"process.args_count" kind:eq value:"2" |
process.command_line | wildcard |
| field:"CommandLine" kind:wildcard |
process.name | in |
| field:"process_basename" kind:in |
process.name | wildcard |
| field:"process_basename" kind:wildcard value:"tclsh*" |
First Occurrence of Okta User Session Started via Proxy
#Identifies the first occurrence of an Okta user session started via a proxy.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
- Failed Logins from Unknown or Invalid User (Kusto)
- High-Risk Admin Activity (Kusto)
- MFA Fatigue (OKTA) (Kusto)
- Multiple Okta Sessions Detected for a Single User (Elastic)
- Multiple Okta User Authentication Events with Same Device Token Hash (Elastic)
- New Device/Location sign-in along with critical operation (Kusto)
- Okta AiTM Phishing Attempt Blocked by FastPass (Panther)
- Okta AiTM Session Cookie Replay (Elastic)
Rule Body
[metadata]
creation_date = "2023/11/07"
integration = ["okta"]
maturity = "production"
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = "Identifies the first occurrence of an Okta user session started via a proxy."
index = ["filebeat-*", "logs-okta.system-*"]
language = "kuery"
license = "Elastic License v2"
name = "First Occurrence of Okta User Session Started via Proxy"
note = """## Triage and analysis
### Investigating First Occurrence of Okta User Session Started via Proxy
This rule detects the first occurrence of an Okta user session started via a proxy. This rule is designed to help identify suspicious authentication behavior that may be indicative of an attacker attempting to gain access to an Okta account while remaining anonymous. This rule leverages the New Terms rule type feature where the `okta.actor.id` value is checked against the previous 7 days of data to determine if the value has been seen before for this activity.
#### Possible investigation steps:
- Identify the user involved in this action by examining the `okta.actor.id`, `okta.actor.type`, `okta.actor.alternate_id`, and `okta.actor.display_name` fields.
- Determine the client used by the actor. Review the `okta.client.ip`, `okta.client.user_agent.raw_user_agent`, `okta.client.zone`, `okta.client.device`, and `okta.client.id` fields.
- Examine the `okta.debug_context.debug_data.flattened` field for more information about the proxy used.
- Review the `okta.request.ip_chain` field for more information about the geographic location of the proxy.
- Review the past activities of the actor involved in this action by checking their previous actions.
- Evaluate the actions that happened just before and after this event in the `okta.event_type` field to help understand the full context of the activity.
### False positive analysis:
- A user may have legitimately started a session via a proxy for security or privacy reasons.
### Response and remediation:
- Review the profile of the user involved in this action to determine if proxy usage may be expected.
- If the user is legitimate and the authentication behavior is not suspicious, no action is required.
- If the user is legitimate but the authentication behavior is suspicious, consider resetting the user's password and enabling multi-factor authentication (MFA).
- If MFA is already enabled, consider resetting MFA for the user.
- If the user is not legitimate, consider deactivating the user's account.
- Conduct a review of Okta policies and ensure they are in accordance with security best practices.
"""
references = [
"https://developer.okta.com/docs/reference/api/system-log/",
"https://developer.okta.com/docs/reference/api/event-types/",
"https://developer.okta.com/docs/reference/api/system-log/#issuer-object",
"https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy",
"https://sec.okta.com/articles/2023/08/cross-tenant-impersonation-prevention-and-detection",
"https://www.elastic.co/security-labs/monitoring-okta-threats-with-elastic-security",
"https://www.elastic.co/security-labs/starter-guide-to-understanding-okta",
"https://cloud.google.com/blog/topics/threat-intelligence/expansion-shinyhunters-saas-data-theft"
]
risk_score = 47
rule_id = "6f1bb4b2-7dc8-11ee-92b2-f661ea17fbcd"
severity = "medium"
tags = [
"Domain: Identity",
"Tactic: Initial Access",
"Use Case: Identity and Access Audit",
"Data Source: Okta",
"Data Source: Okta System Logs",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
data_stream.dataset:okta.system and
okta.event_type: (
user.session.start or
user.authentication.verify or
user.authentication.sso or
user.authentication.auth_via_mfa
) and
okta.security_context.is_proxy:true and
not okta.actor.id: okta*
'''
[[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 = "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.new_terms]
field = "new_terms_fields"
value = ["okta.actor.id", "cloud.account.id"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-7d"
Stages and Predicates
Stage 1: new_terms
data_stream.dataset:okta.system and
okta.event_type: (
user.session.start or
user.authentication.verify or
user.authentication.sso or
user.authentication.auth_via_mfa
) and
okta.security_context.is_proxy:true and
not okta.actor.id: okta*
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
data_stream.dataset | eq |
| field:"data_stream.dataset" kind:eq value:"okta.system" |
okta.event_type | in |
| field:"okta::eventType" kind:in |
okta.security_context.is_proxy | eq |
| field:"okta::securityContext.isProxy" kind:eq value:"true" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
okta.actor.id | starts_with | okta | excludes:okta.actor.id field:"okta.actor.id" value:"okta" |
GKE Multi-Resource Discovery
#Adversaries who land credentials in a GKE cluster—or abuse an over-privileged token, often map the environment before exfiltration or privilege escalation. A practical first pass is to learn where workloads run, how the cluster is partitioned, and what RBAC exists at namespace vs cluster scope. Rapid get/list traffic across many distinct API resource kinds that answer those questions (namespaces, workloads, roles, cluster-wide roles) is a common setup and orientation pattern for both interactive attackers and automated recon scripts. This rule highlights that cross-resource burst from a single client fingerprint within a one-minute bucket when both cluster-layout and RBAC resource kinds are touched, so analysts can separate routine automation from potential discovery ahead of follow-on actions.
Known False Positives
- Platform operators, installers, or runbooks that reconcile RBAC and workload state may span these resource types in a short window; tune by identity, source IP, or user agent when documented.
- GitOps controllers and cluster scanners can still match if not covered by built-in exclusions; baseline approved service accounts after review.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
- Amazon EKS Kubernetes Pod scan detection (Splunk)
- Azure AKS Attempted User Exec into Pod (Elastic)
- Direct Interactive Kubernetes API Request by Unusual Utilities (Elastic)
- GKE API Server Proxying Request to Kubelet (Elastic)
- GKE Pod Exec Cloud Instance Metadata Access (Elastic)
- GKE Pod Exec Potential Reverse Shell (Elastic)
- GKE Pod Exec Sensitive File or Credential Path Access (Elastic)
- GKE Pod Exec with Curl or Wget to HTTPS (Elastic)
Rule Body
[metadata]
creation_date = "2026/07/21"
integration = ["gcp"]
maturity = "production"
updated_date = "2026/07/31"
[rule]
author = ["Elastic"]
description = """
Adversaries who land credentials in a GKE cluster—or abuse an over-privileged token, often map the environment before
exfiltration or privilege escalation. A practical first pass is to learn where workloads run, how the cluster is
partitioned, and what RBAC exists at namespace vs cluster scope. Rapid get/list traffic across many distinct API
resource kinds that answer those questions (namespaces, workloads, roles, cluster-wide roles) is a common setup and
orientation pattern for both interactive attackers and automated recon scripts. This rule highlights that
cross-resource burst from a single client fingerprint within a one-minute bucket when both cluster-layout and RBAC
resource kinds are touched, so analysts can separate routine automation from potential discovery ahead of follow-on
actions.
"""
false_positives = [
"""
Platform operators, installers, or runbooks that reconcile RBAC and workload state may span these resource types
in a short window; tune by identity, source IP, or user agent when documented.
""",
"""
GitOps controllers and cluster scanners can still match if not covered by built-in exclusions; baseline approved
service accounts after review.
""",
]
from = "now-6m"
interval = "5m"
language = "esql"
license = "Elastic License v2"
name = "GKE Multi-Resource Discovery"
note = """## Triage and analysis
### Investigating GKE Multi-Resource Discovery
The rule groups GKE audit get/list events on namespaces, nodes, pods, configmaps, serviceaccounts, roles,
rolebindings, clusterroles, and clusterrolebindings into one-minute windows per `client.user.email`, `source.ip`,
and `user_agent.original`. It alerts when five or more distinct resource kinds appear and the burst includes both
cluster-layout kinds (namespaces, pods, or nodes) and RBAC kinds. Allowed and denied authorizations are both
included: failures still signal probing.
### Possible investigation steps
- Review `Esql.enumerated_resources`, `Esql.enumerated_namespaces`, and `Esql.enumerated_resource_names` for
ordering and targeted APIs.
- Confirm whether `source.ip` and `user_agent.original` match expected admin or automation clients.
- Correlate with follow-on secret reads, RoleBinding changes, pod exec, or unusual user agents from the same actor.
### False positive analysis
- Documented platform sync jobs that read layout and RBAC together; exclude known service accounts after validation.
- Upgrade or install windows that briefly query many resource kinds; correlate with change records.
### Response and remediation
- If malicious, revoke or rotate the implicated credentials, tighten RBAC, and inspect for data access or persistence
established after the burst.
"""
setup = "The GCP Fleet integration with GKE audit logs enabled is required to be compatible with this rule."
references = [
"https://microsoft.github.io/Threat-Matrix-for-Kubernetes/",
]
risk_score = 47
rule_id = "0302d3b2-1892-4448-a805-980aa4a36ba3"
severity = "medium"
tags = [
"Domain: Cloud",
"Domain: Kubernetes",
"Data Source: GCP",
"Data Source: Google Cloud Platform",
"Use Case: Threat Detection",
"Tactic: Discovery",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "esql"
query = '''
from logs-gcp.audit-* metadata _id, _index, _version
| where data_stream.dataset == "gcp.audit"
and service.name == "k8s.io"
and event.action in (
"io.k8s.core.v1.namespaces.get",
"io.k8s.core.v1.namespaces.list",
"io.k8s.core.v1.nodes.get",
"io.k8s.core.v1.nodes.list",
"io.k8s.core.v1.pods.get",
"io.k8s.core.v1.pods.list",
"io.k8s.core.v1.configmaps.get",
"io.k8s.core.v1.configmaps.list",
"io.k8s.core.v1.serviceaccounts.get",
"io.k8s.core.v1.serviceaccounts.list",
"io.k8s.authorization.rbac.v1.roles.get",
"io.k8s.authorization.rbac.v1.roles.list",
"io.k8s.authorization.rbac.v1.rolebindings.get",
"io.k8s.authorization.rbac.v1.rolebindings.list",
"io.k8s.authorization.rbac.v1.clusterroles.get",
"io.k8s.authorization.rbac.v1.clusterroles.list",
"io.k8s.authorization.rbac.v1.clusterrolebindings.get",
"io.k8s.authorization.rbac.v1.clusterrolebindings.list"
)
and source.ip is not null
and client.user.email is not null
and not to_string(source.ip) in ("127.0.0.1", "::1")
and not client.user.email like "system:kube-*"
and not client.user.email like "system:gke-*"
and not client.user.email like "system:node:*"
and not client.user.email like "system:serviceaccount:kube-system:*"
and not client.user.email like "system:serviceaccount:gke-managed*"
and not client.user.email in (
"system:apiserver",
"system:addon-manager",
"system:kubestore-collector",
"gcp:kube-bootstrap",
"system:serviceaccount:security:trivy-operator"
)
and not client.user.email like "system:serviceaccount:flux-system:*"
and not client.user.email like "system:serviceaccount:argocd:*"
and not client.user.email like "system:serviceaccount:argocd-system:*"
and not client.user.email like "system:serviceaccount:cattle-turtles-system:*"
and not client.user.email like "system:serviceaccount:*:palette-manager"
| eval Esql.time_interval = date_trunc(1 minute, @timestamp),
Esql.resource_kind = case(
event.action in ("io.k8s.core.v1.namespaces.get", "io.k8s.core.v1.namespaces.list"), "namespaces",
event.action in ("io.k8s.core.v1.nodes.get", "io.k8s.core.v1.nodes.list"), "nodes",
event.action in ("io.k8s.core.v1.pods.get", "io.k8s.core.v1.pods.list"), "pods",
event.action in ("io.k8s.core.v1.configmaps.get", "io.k8s.core.v1.configmaps.list"), "configmaps",
event.action in ("io.k8s.core.v1.serviceaccounts.get", "io.k8s.core.v1.serviceaccounts.list"), "serviceaccounts",
event.action in ("io.k8s.authorization.rbac.v1.roles.get", "io.k8s.authorization.rbac.v1.roles.list"), "roles",
event.action in ("io.k8s.authorization.rbac.v1.rolebindings.get", "io.k8s.authorization.rbac.v1.rolebindings.list"), "rolebindings",
event.action in ("io.k8s.authorization.rbac.v1.clusterroles.get", "io.k8s.authorization.rbac.v1.clusterroles.list"), "clusterroles",
event.action in ("io.k8s.authorization.rbac.v1.clusterrolebindings.get", "io.k8s.authorization.rbac.v1.clusterrolebindings.list"), "clusterrolebindings",
null
),
Esql.is_rbac = case(
event.action in (
"io.k8s.authorization.rbac.v1.roles.get",
"io.k8s.authorization.rbac.v1.roles.list",
"io.k8s.authorization.rbac.v1.rolebindings.get",
"io.k8s.authorization.rbac.v1.rolebindings.list",
"io.k8s.authorization.rbac.v1.clusterroles.get",
"io.k8s.authorization.rbac.v1.clusterroles.list",
"io.k8s.authorization.rbac.v1.clusterrolebindings.get",
"io.k8s.authorization.rbac.v1.clusterrolebindings.list"
),
1,
0
),
Esql.is_layout = case(
event.action in (
"io.k8s.core.v1.namespaces.get",
"io.k8s.core.v1.namespaces.list",
"io.k8s.core.v1.pods.get",
"io.k8s.core.v1.pods.list",
"io.k8s.core.v1.nodes.get",
"io.k8s.core.v1.nodes.list"
),
1,
0
)
| stats
Esql.unique_resources = count_distinct(Esql.resource_kind),
Esql.rbac_event_count = sum(Esql.is_rbac),
Esql.layout_event_count = sum(Esql.is_layout),
Esql.enumerated_resources = values(Esql.resource_kind),
Esql.enumerated_namespaces = values(orchestrator.namespace),
Esql.enumerated_resource_names = values(gcp.audit.resource_name),
Esql.event_outcome_values = values(event.outcome)
by client.user.email, source.ip, user_agent.original, Esql.time_interval
| where Esql.unique_resources >= 5
and Esql.rbac_event_count > 0
and Esql.layout_event_count > 0
| keep Esql.*, client.user.email, source.ip, user_agent.original
'''
[rule.alert_suppression]
group_by = ["client.user.email", "source.ip"]
duration = {value = 30, unit = "m"}
missing_fields_strategy = "suppress"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1613"
name = "Container and Resource Discovery"
reference = "https://attack.mitre.org/techniques/T1613/"
[rule.threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"
Stages and Predicates
Stage 1: from
from logs-gcp.audit-* metadata _id, _index, _version
Stage 2: where
| where data_stream.dataset == "gcp.audit"
and service.name == "k8s.io"
and event.action in (
"io.k8s.core.v1.namespaces.get",
"io.k8s.core.v1.namespaces.list",
"io.k8s.core.v1.nodes.get",
"io.k8s.core.v1.nodes.list",
"io.k8s.core.v1.pods.get",
"io.k8s.core.v1.pods.list",
"io.k8s.core.v1.configmaps.get",
"io.k8s.core.v1.configmaps.list",
"io.k8s.core.v1.serviceaccounts.get",
"io.k8s.core.v1.serviceaccounts.list",
"io.k8s.authorization.rbac.v1.roles.get",
"io.k8s.authorization.rbac.v1.roles.list",
"io.k8s.authorization.rbac.v1.rolebindings.get",
"io.k8s.authorization.rbac.v1.rolebindings.list",
"io.k8s.authorization.rbac.v1.clusterroles.get",
"io.k8s.authorization.rbac.v1.clusterroles.list",
"io.k8s.authorization.rbac.v1.clusterrolebindings.get",
"io.k8s.authorization.rbac.v1.clusterrolebindings.list"
)
and source.ip is not null
and client.user.email is not null
and not to_string(source.ip) in ("127.0.0.1", "::1")
and not client.user.email like "system:kube-*"
and not client.user.email like "system:gke-*"
and not client.user.email like "system:node:*"
and not client.user.email like "system:serviceaccount:kube-system:*"
and not client.user.email like "system:serviceaccount:gke-managed*"
and not client.user.email in (
"system:apiserver",
"system:addon-manager",
"system:kubestore-collector",
"gcp:kube-bootstrap",
"system:serviceaccount:security:trivy-operator"
)
and not client.user.email like "system:serviceaccount:flux-system:*"
and not client.user.email like "system:serviceaccount:argocd:*"
and not client.user.email like "system:serviceaccount:argocd-system:*"
and not client.user.email like "system:serviceaccount:cattle-turtles-system:*"
and not client.user.email like "system:serviceaccount:*:palette-manager"
Stage 3: eval
| eval Esql.time_interval = date_trunc(1 minute, @timestamp),
Esql.resource_kind = case(
event.action in ("io.k8s.core.v1.namespaces.get", "io.k8s.core.v1.namespaces.list"), "namespaces",
event.action in ("io.k8s.core.v1.nodes.get", "io.k8s.core.v1.nodes.list"), "nodes",
event.action in ("io.k8s.core.v1.pods.get", "io.k8s.core.v1.pods.list"), "pods",
event.action in ("io.k8s.core.v1.configmaps.get", "io.k8s.core.v1.configmaps.list"), "configmaps",
event.action in ("io.k8s.core.v1.serviceaccounts.get", "io.k8s.core.v1.serviceaccounts.list"), "serviceaccounts",
event.action in ("io.k8s.authorization.rbac.v1.roles.get", "io.k8s.authorization.rbac.v1.roles.list"), "roles",
event.action in ("io.k8s.authorization.rbac.v1.rolebindings.get", "io.k8s.authorization.rbac.v1.rolebindings.list"), "rolebindings",
event.action in ("io.k8s.authorization.rbac.v1.clusterroles.get", "io.k8s.authorization.rbac.v1.clusterroles.list"), "clusterroles",
event.action in ("io.k8s.authorization.rbac.v1.clusterrolebindings.get", "io.k8s.authorization.rbac.v1.clusterrolebindings.list"), "clusterrolebindings",
null
),
Esql.is_rbac = case(
event.action in (
"io.k8s.authorization.rbac.v1.roles.get",
"io.k8s.authorization.rbac.v1.roles.list",
"io.k8s.authorization.rbac.v1.rolebindings.get",
"io.k8s.authorization.rbac.v1.rolebindings.list",
"io.k8s.authorization.rbac.v1.clusterroles.get",
"io.k8s.authorization.rbac.v1.clusterroles.list",
"io.k8s.authorization.rbac.v1.clusterrolebindings.get",
"io.k8s.authorization.rbac.v1.clusterrolebindings.list"
),
1,
0
),
Esql.is_layout = case(
event.action in (
"io.k8s.core.v1.namespaces.get",
"io.k8s.core.v1.namespaces.list",
"io.k8s.core.v1.pods.get",
"io.k8s.core.v1.pods.list",
"io.k8s.core.v1.nodes.get",
"io.k8s.core.v1.nodes.list"
),
1,
0
)
Esql.is_layout =event.action in (
"io.k8s.core.v1.namespaces.get",
"io.k8s.core.v1.namespaces.list",
"io.k8s.core.v1.pods.get",
"io.k8s.core.v1.pods.list",
"io.k8s.core.v1.nodes.get",
"io.k8s.core.v1.nodes.list"
)10Esql.is_rbac =event.action in (
"io.k8s.authorization.rbac.v1.roles.get",
"io.k8s.authorization.rbac.v1.roles.list",
"io.k8s.authorization.rbac.v1.rolebindings.get",
"io.k8s.authorization.rbac.v1.rolebindings.list",
"io.k8s.authorization.rbac.v1.clusterroles.get",
"io.k8s.authorization.rbac.v1.clusterroles.list",
"io.k8s.authorization.rbac.v1.clusterrolebindings.get",
"io.k8s.authorization.rbac.v1.clusterrolebindings.list"
)10Esql.resource_kind =event.action in ("io.k8s.core.v1.namespaces.get", "io.k8s.core.v1.namespaces.list")"namespaces"event.action in ("io.k8s.core.v1.nodes.get", "io.k8s.core.v1.nodes.list")"nodes"event.action in ("io.k8s.core.v1.pods.get", "io.k8s.core.v1.pods.list")"pods"event.action in ("io.k8s.core.v1.configmaps.get", "io.k8s.core.v1.configmaps.list")"configmaps"event.action in ("io.k8s.core.v1.serviceaccounts.get", "io.k8s.core.v1.serviceaccounts.list")"serviceaccounts"event.action in ("io.k8s.authorization.rbac.v1.roles.get", "io.k8s.authorization.rbac.v1.roles.list")"roles"event.action in ("io.k8s.authorization.rbac.v1.rolebindings.get", "io.k8s.authorization.rbac.v1.rolebindings.list")"rolebindings"event.action in ("io.k8s.authorization.rbac.v1.clusterroles.get", "io.k8s.authorization.rbac.v1.clusterroles.list")"clusterroles"event.action in ("io.k8s.authorization.rbac.v1.clusterrolebindings.get", "io.k8s.authorization.rbac.v1.clusterrolebindings.list")"clusterrolebindings"nullStage 4: stats
| stats
Esql.unique_resources = count_distinct(Esql.resource_kind),
Esql.rbac_event_count = sum(Esql.is_rbac),
Esql.layout_event_count = sum(Esql.is_layout),
Esql.enumerated_resources = values(Esql.resource_kind),
Esql.enumerated_namespaces = values(orchestrator.namespace),
Esql.enumerated_resource_names = values(gcp.audit.resource_name),
Esql.event_outcome_values = values(event.outcome)
by client.user.email, source.ip, user_agent.original, Esql.time_interval
Stage 5: where
| where Esql.unique_resources >= 5
and Esql.rbac_event_count > 0
and Esql.layout_event_count > 0
Stage 6: keep
| keep Esql.*, client.user.email, source.ip, user_agent.original
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Esql.layout_event_count | gt |
| field:"Esql.layout_event_count" kind:gt value:"0" |
Esql.rbac_event_count | gt |
| field:"Esql.rbac_event_count" kind:gt value:"0" |
Esql.unique_resources | ge |
| field:"Esql.unique_resources" kind:ge value:"5" |
client.user.email | is_not_null | field:"client.user.email" kind:is_not_null | |
data_stream.dataset | eq |
| field:"data_stream.dataset" kind:eq value:"gcp.audit" |
event.action | in |
| field:"EventType" kind:in |
service.name | eq |
| field:"ServiceName" kind:eq value:"k8s.io" |
source.ip | is_not_null | field:"src_ip" kind:is_not_null |
Exclusions
The rule actively suppresses these predicates.
Output Fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
Esql.* | KEEP Esql.* |
client.user.email | KEEP client.user.email |
source.ip | KEEP source.ip |
user_agent.original | KEEP user_agent.original |
GKE RBAC Wildcard Elevation on Existing Role
#Flags an existing GKE Role or ClusterRole being changed (patch or update) so the effective rules become cluster-admin-like: wildcard on every API resource and wildcard on every verb. That is usually a deliberate privilege expansion, not a typo. GKE audit logs with response body capture are required so the detection reads the merged role after apply; loopback source IPs are ignored.
Known False Positives
- Platform installers, GitOps controllers, and emergency break-glass roles sometimes ship or widen wildcard ClusterRoles; correlate with change records and narrow by user or service account when baselined.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
- Direct Interactive Kubernetes API Request by Unusual Utilities (Elastic)
- GKE Creation or Modification of Sensitive Role (Elastic)
- GKE Sensitive RBAC Change Followed by Workload Modification (Elastic)
- GKE Service Account Modified RBAC Objects (Elastic)
- Kubernetes Creation or Modification of Sensitive Role (Elastic)
- Kubernetes RBAC Wildcard Elevation on Existing Role (Elastic)
- Kubernetes Sensitive RBAC Change Followed by Workload Modification (Elastic)
- Kubernetes Service Account Modified RBAC Objects (Elastic)
Rule Body
[metadata]
creation_date = "2026/07/07"
integration = ["gcp"]
maturity = "production"
updated_date = "2026/07/10"
[rule]
author = ["Elastic"]
description = """
Flags an existing GKE Role or ClusterRole being changed (patch or update) so the effective rules become
cluster-admin-like: wildcard on every API resource and wildcard on every verb. That is usually a deliberate privilege
expansion, not a typo. GKE audit logs with response body capture are required so the detection reads the merged role
after apply; loopback source IPs are ignored.
"""
false_positives = [
"""
Platform installers, GitOps controllers, and emergency break-glass roles sometimes ship or widen wildcard
ClusterRoles; correlate with change records and narrow by user or service account when baselined.
""",
]
from = "now-6m"
index = ["logs-gcp.audit-*"]
language = "kuery"
license = "Elastic License v2"
name = "GKE RBAC Wildcard Elevation on Existing Role"
note = """## Triage and analysis
### Investigating GKE RBAC Wildcard Elevation on Existing Role
Someone patched or updated a Role or ClusterRole so the stored rules grant star verbs and star resources—near
cluster-admin breadth on that scope. Confirm the actor (user.email, groups), client, and non-loopback source IP;
then see who can bind that role.
### Possible investigation steps
- Diff the role YAML before and after; list RoleBindings and ClusterRoleBindings that reference it and which subjects
gained the widened access.
- Review `gcp.audit.resource_name`, `gcp.audit.response.rules.verbs`, and `gcp.audit.response.rules.resources`.
- In the same window, check secret reads, exec, and further RBAC changes from the same identity.
### False positive analysis
- Approved GitOps or vendor upgrades sometimes widen a known ClusterRole; allowlist stable automation when documented.
### Response and remediation
- Revert the role, drop unexpected bindings, rotate credentials for the actor, and block future wildcard RBAC outside
governed pipelines (policy-as-code, PR-only RBAC).
"""
setup = "The GCP Fleet integration with GKE audit logs enabled is required to be compatible with this rule."
references = [
"https://kubernetes.io/docs/reference/access-authn-authz/rbac/",
]
risk_score = 73
rule_id = "563a38e9-9790-4a6a-8889-24d26055b832"
severity = "high"
tags = [
"Domain: Cloud",
"Domain: Kubernetes",
"Data Source: GCP",
"Data Source: Google Cloud Platform",
"Use Case: Threat Detection",
"Tactic: Privilege Escalation",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "query"
query = '''
data_stream.dataset:gcp.audit and service.name:"k8s.io" and event.outcome:success and
event.action:(
"io.k8s.authorization.rbac.v1.roles.update" or
"io.k8s.authorization.rbac.v1.roles.patch" or
"io.k8s.authorization.rbac.v1.clusterroles.update" or
"io.k8s.authorization.rbac.v1.clusterroles.patch"
) and source.ip:(* and not ("127.0.0.1" or "::1")) and not (
client.user.email:"system:addon-manager" and
event.action:(
"io.k8s.authorization.rbac.v1.roles.patch" or
"io.k8s.authorization.rbac.v1.clusterroles.patch"
)
) and
gcp.audit.response.rules.verbs:"*" and gcp.audit.response.rules.resources:"*"
'''
[[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.006"
name = "Additional Container Cluster Roles"
reference = "https://attack.mitre.org/techniques/T1098/006/"
[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
[rule.investigation_fields]
field_names = [
"@timestamp",
"client.user.email",
"source.ip",
"user_agent.original",
"event.action",
"event.outcome",
"gcp.audit.resource_name",
"gcp.audit.request.kind",
"data_stream.namespace",
]
Stages and Predicates
Stage 1: query
data_stream.dataset:gcp.audit and service.name:"k8s.io" and event.outcome:success and
event.action:(
"io.k8s.authorization.rbac.v1.roles.update" or
"io.k8s.authorization.rbac.v1.roles.patch" or
"io.k8s.authorization.rbac.v1.clusterroles.update" or
"io.k8s.authorization.rbac.v1.clusterroles.patch"
) and source.ip:(* and not ("127.0.0.1" or "::1")) and not (
client.user.email:"system:addon-manager" and
event.action:(
"io.k8s.authorization.rbac.v1.roles.patch" or
"io.k8s.authorization.rbac.v1.clusterroles.patch"
)
) and
gcp.audit.response.rules.verbs:"*" and gcp.audit.response.rules.resources:"*"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
data_stream.dataset | eq |
| field:"data_stream.dataset" kind:eq value:"gcp.audit" |
event.action | in |
| field:"EventType" kind:in |
event.outcome | eq |
| field:"event.outcome" kind:eq value:"success" |
gcp.audit.response.rules.resources | eq |
| field:"gcp.audit.response.rules.resources" kind:eq value:"*" |
gcp.audit.response.rules.verbs | eq |
| field:"gcp.audit.response.rules.verbs" kind:eq value:"*" |
service.name | eq |
| field:"ServiceName" kind:eq value:"k8s.io" |
source.ip | is_not_null | field:"src_ip" kind:is_not_null |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
client.user.email | eq | system:addon-manager | excludes:client.user.email field:"client.user.email" value:"system:addon-manager" |
event.action | in | io.k8s.authorization.rbac.v1.clusterroles.patch, io.k8s.authorization.rbac.v1.roles.patch | excludes:event.action field:"event.action" value:"io.k8s.authorization.rbac.v1.clusterroles.patch" field:"event.action" value:"io.k8s.authorization.rbac.v1.roles.patch" |
source.ip | in | 127.0.0.1, ::1 | excludes:source.ip field:"source.ip" value:"127.0.0.1" field:"source.ip" value:"::1" |
Linux Payload Decoded and Decrypted via Built-in Utility
#This rule identifies when a built-in utility is used to decode and decrypt a payload on a Linux system. Malware authors may attempt to evade detection and trick users into executing malicious code by encoding and encrypting their payload.
MITRE ATT&CK Coverage
Rule Body
[rule]
description = """
This rule identifies when a built-in utility is used to decode and decrypt a payload on a Linux system. Malware authors
may attempt to evade detection and trick users into executing malicious code by encoding and encrypting their payload.
"""
id = "cc8a82b6-eb6e-4e35-8c9e-e6ec3339e12d"
license = "Elastic License v2"
name = "Linux Payload Decoded and Decrypted via Built-in Utility"
os_list = ["linux"]
version = "1.0.14"
query = '''
process where event.type == "start" and event.action == "exec" and process.parent.executable like (
"/dev/shm/*", "/tmp/*", "/var/tmp/*", "/var/run/*", "/root/*", "/boot/*", "/var/www/html/*", "/opt/.*"
) and (
(process.name in ("base64", "base32", "base16") and process.args like "*-*d*") or
(process.name == "openssl" and process.args == "enc" and process.args in ("-d", "-base64", "-a")) or
(process.name like "python*" and
(process.args == "base64" and process.args in ("-d", "-u", "-t")) or
(process.args == "-c" and process.args like "*base64*" and process.args like "*b64decode*")
) or
(process.name like "perl*" and process.args like "*decode_base64*") or
(process.name like "ruby*" and process.args == "-e" and process.args like "*Base64.decode64*")
) and not (
process.parent.executable like (
"/tmp/newroot/*", "/tmp/jwt_vf.sh", "/root/*.sh", "/tmp/.criu.mntns*", "/var/tmp/buildah*/mnt/rootfs/var/lib/dpkg/info/nmap-common.postinst",
"/tmp/.mount_*/usr/share/cursor/cursor", "/root/.local/share/claude/versions/*"
) or
process.parent.command_line like ("*/tmp/__salt.tmp.*.sh", "*/home/*/.claude/shell-snapshots/snapshot-*", "claude", "/root/.claude/*") or
process.args == "/usr/bin/coreutils" or
(
process.parent.name like "python*" and (
(process.parent.args == "test.regrtest" and process.parent.args == "--pgo") or
(process.parent.command_line like~ "./python -m test --pgo*")
)
)
)
'''
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.technique]]
id = "T1204"
name = "User Execution"
reference = "https://attack.mitre.org/techniques/T1204/"
[[threat.technique.subtechnique]]
id = "T1204.002"
name = "Malicious File"
reference = "https://attack.mitre.org/techniques/T1204/002/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1027"
name = "Obfuscated Files or Information"
reference = "https://attack.mitre.org/techniques/T1027/"
[[threat.technique]]
id = "T1140"
name = "Deobfuscate/Decode Files or Information"
reference = "https://attack.mitre.org/techniques/T1140/"
[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.parent.executable like (
"/dev/shm/*", "/tmp/*", "/var/tmp/*", "/var/run/*", "/root/*", "/boot/*", "/var/www/html/*", "/opt/.*"
) and (
(process.name in ("base64", "base32", "base16") and process.args like "*-*d*") or
(process.name == "openssl" and process.args == "enc" and process.args in ("-d", "-base64", "-a")) or
(process.name like "python*" and
(process.args == "base64" and process.args in ("-d", "-u", "-t")) or
(process.args == "-c" and process.args like "*base64*" and process.args like "*b64decode*")
) or
(process.name like "perl*" and process.args like "*decode_base64*") or
(process.name like "ruby*" and process.args == "-e" and process.args like "*Base64.decode64*")
) and not (
process.parent.executable like (
"/tmp/newroot/*", "/tmp/jwt_vf.sh", "/root/*.sh", "/tmp/.criu.mntns*", "/var/tmp/buildah*/mnt/rootfs/var/lib/dpkg/info/nmap-common.postinst",
"/tmp/.mount_*/usr/share/cursor/cursor", "/root/.local/share/claude/versions/*"
) or
process.parent.command_line like ("*/tmp/__salt.tmp.*.sh", "*/home/*/.claude/shell-snapshots/snapshot-*", "claude", "/root/.claude/*") or
process.args == "/usr/bin/coreutils" or
(
process.parent.name like "python*" and (
(process.parent.args == "test.regrtest" and process.parent.args == "--pgo") or
(process.parent.command_line like~ "./python -m test --pgo*")
)
)
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"exec" |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args | eq |
| field:"process.args" kind:eq |
process.args | in |
| field:"process.args" kind:in |
process.args | wildcard |
| field:"process.args" kind:wildcard |
process.name | eq |
| field:"process_basename" kind:eq value:"openssl" |
process.name | in |
| field:"process_basename" kind:in |
process.name | wildcard |
| field:"process_basename" kind:wildcard |
process.parent.executable | wildcard |
| field:"ParentImage" kind:wildcard |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.parent.args | eq | --pgo | excludes:process.parent.args field:"process.parent.args" value:"--pgo" |
process.parent.args | eq | test.regrtest | excludes:process.parent.args field:"process.parent.args" value:"test.regrtest" |
process.parent.command_line | starts_with | ./python -m test --pgo | excludes:process.parent.command_line field:"process.parent.command_line" value:"./python -m test --pgo" |
process.parent.name | starts_with | python | excludes:process.parent.name field:"process.parent.name" value:"python" |
process.args | eq | /usr/bin/coreutils | excludes:process.args field:"process.args" value:"/usr/bin/coreutils" |
process.parent.command_line | wildcard | */tmp/__salt.tmp.*.sh, */home/*/.claude/shell-snapshots/snapshot-*, claude, /root/.claude/* | excludes:process.parent.command_line |
process.parent.executable | wildcard | /tmp/newroot/*, /tmp/jwt_vf.sh, /root/*.sh, /tmp/.criu.mntns*, /var/tmp/buildah*/mnt/rootfs/var/lib/dpkg/info/nmap-common.postinst, /tmp/.mount_*/usr/share/cursor/cursor, /root/.local/share/claude/versions/* | excludes:process.parent.executable |
Microsoft Graph Request User Impersonation by Unusual Client
#This New Terms rule focuses on the first occurrence of a client application ID (azure.graphactivitylogs.properties.app_id) making a request to Microsoft Graph API for a specific tenant ID (azure.tenant_id) and user principal object ID (azure.graphactivitylogs.properties.user_principal_object_id). This rule may helps identify unauthorized access or actions performed by compromised accounts. Advesaries may succesfully compromise a user's credentials and use the Microsoft Graph API to access resources or perform actions on behalf of the user.
Known False Positives
- Users legitimately accessing Microsoft Graph API using the specified client application ID and tenant ID. This may include authorized applications or services that interact with Microsoft Graph on behalf of users.
- Authorized third-party applications or services that use the specified client application ID to access Microsoft Graph API resources for legitimate purposes.
- Administrative or automated tasks that involve accessing Microsoft Graph API using the specified client application ID and tenant ID, such as provisioning or managing resources.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Stealth | |
| Credential Access | |
| Lateral Movement |
Rule Body
[metadata]
creation_date = "2025/04/23"
integration = ["azure"]
maturity = "production"
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = """
This New Terms rule focuses on the first occurrence of a client application ID
(azure.graphactivitylogs.properties.app_id) making a request to Microsoft Graph API for a specific tenant ID
(azure.tenant_id) and user principal object ID (azure.graphactivitylogs.properties.user_principal_object_id). This rule
may helps identify unauthorized access or actions performed by compromised accounts. Advesaries may succesfully
compromise a user's credentials and use the Microsoft Graph API to access resources or perform actions on behalf of the
user.
"""
false_positives = [
"""
Users legitimately accessing Microsoft Graph API using the specified client application ID and tenant ID. This may
include authorized applications or services that interact with Microsoft Graph on behalf of users.
""",
"""
Authorized third-party applications or services that use the specified client application ID to access Microsoft
Graph API resources for legitimate purposes.
""",
"""
Administrative or automated tasks that involve accessing Microsoft Graph API using the specified client application
ID and tenant ID, such as provisioning or managing resources.
""",
]
from = "now-9m"
index = ["logs-azure.graphactivitylogs-*"]
language = "kuery"
license = "Elastic License v2"
name = "Microsoft Graph Request User Impersonation by Unusual Client"
note = """## Triage and analysis
### Investigating Microsoft Graph Request User Impersonation by Unusual Client
This rule detects the first observed occurrence of a Microsoft Graph API request by a specific client application ID (`azure.graphactivitylogs.properties.app_id`) in combination with a user principal object ID (`azure.graphactivitylogs.properties.user_principal_object_id`) and tenant ID (`azure.tenant_id`) within specific number of days. This may indicate unauthorized access following a successful phishing attempt, token theft, or abuse of OAuth workflows.
Adversaries frequently exploit legitimate Microsoft or third-party application IDs to avoid raising suspicion during initial access. By using pre-consented or trusted apps to interact with Microsoft Graph, attackers can perform actions on behalf of users without triggering conventional authentication alerts or requiring additional user interaction.
### Possible investigation steps
- Review `azure.graphactivitylogs.properties.user_principal_object_id` and correlate with recent sign-in logs for the associated user.
- Determine whether `azure.graphactivitylogs.properties.app_id` is a known and approved application in your environment.
- Investigate the `user_agent.original` field for signs of scripted access (e.g., automation tools or libraries).
- Check the source IP address (`source.ip`) and geolocation data (`source.geo.*`) for unfamiliar origins.
- Inspect `azure.graphactivitylogs.properties.scopes` to understand the level of access being requested by the app.
- Examine any follow-up Graph API activity from the same `app_id` or `user_principal_object_id` for signs of data access or exfiltration.
- Correlate with device or session ID fields (`azure.graphactivitylogs.properties.c_sid`, if present) to detect persistent or repeat activity.
### False positive analysis
- First-time use of a legitimate Microsoft or enterprise-approved application.
- Developer or automation workflows initiating new Graph API requests.
- Valid end-user activity following device reconfiguration or new client installation.
- Maintain an allowlist of expected `app_id` values and known developer tools.
- Suppress detections from known good `user_agent.original` strings or approved source IP ranges.
- Use device and identity telemetry to distinguish trusted vs. unknown activity sources.
- Combine with session risk or sign-in anomaly signals where available.
### Response and remediation
- Reach out to the user and verify whether they authorized the application access.
- Revoke active OAuth tokens and reset credentials if unauthorized use is confirmed.
- Search for additional Graph API calls made by the same `app_id` or `user_principal_object_id`.
- Investigate whether sensitive resources (mail, files, Teams, contacts) were accessed.
- Apply Conditional Access policies to limit Graph API access by app type, IP, or device state.
- Restrict user consent for third-party apps and enforce admin approval workflows.
- Monitor usage of new or uncommon `app_id` values across your tenant.
- Provide user education on OAuth phishing tactics and reporting suspicious prompts.
"""
references = [
"https://www.volexity.com/blog/2025/04/22/phishing-for-codes-russian-threat-actors-target-microsoft-365-oauth-workflows/",
"https://pushsecurity.com/blog/consentfix",
]
risk_score = 21
rule_id = "2a3f38a8-204e-11f0-9c1f-f661ea17fbcd"
severity = "low"
tags = [
"Domain: Cloud",
"Data Source: Azure",
"Data Source: Microsoft Graph",
"Data Source: Microsoft Graph Activity Logs",
"Resources: Investigation Guide",
"Use Case: Identity and Access Audit",
"Tactic: Initial Access",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
data_stream.dataset: "azure.graphactivitylogs"
and event.type: "access"
and azure.graphactivitylogs.properties.app_id: *
and azure.graphactivitylogs.properties.c_idtyp: "user"
and azure.graphactivitylogs.properties.client_auth_method: 0
and http.response.status_code: 200
and url.domain: "graph.microsoft.com"
and not url.path: (
/v1.0/organization
or /v1.0/me/licenseDetails
or /v1.0/me/photo*
or /v1.0/me/photos*
or /beta/me/settings/regionalAndLanguageSettings
or /v1.0/me/drive/special/copilotuploads
or /v1.0/me/informationProtection/sensitivityLabels
or /beta/me/informationProtection/dataLossPreventionPolicies
)
'''
[[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.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[[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 = "T1550"
name = "Use Alternate Authentication Material"
reference = "https://attack.mitre.org/techniques/T1550/"
[[rule.threat.technique.subtechnique]]
id = "T1550.001"
name = "Application Access Token"
reference = "https://attack.mitre.org/techniques/T1550/001/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[rule.new_terms]
field = "new_terms_fields"
value = [
"azure.graphactivitylogs.properties.app_id",
"azure.graphactivitylogs.properties.user_principal_object_id",
]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-10d"
Stages and Predicates
Stage 1: new_terms
data_stream.dataset: "azure.graphactivitylogs"
and event.type: "access"
and azure.graphactivitylogs.properties.app_id: *
and azure.graphactivitylogs.properties.c_idtyp: "user"
and azure.graphactivitylogs.properties.client_auth_method: 0
and http.response.status_code: 200
and url.domain: "graph.microsoft.com"
and not url.path: (
/v1.0/organization
or /v1.0/me/licenseDetails
or /v1.0/me/photo*
or /v1.0/me/photos*
or /beta/me/settings/regionalAndLanguageSettings
or /v1.0/me/drive/special/copilotuploads
or /v1.0/me/informationProtection/sensitivityLabels
or /beta/me/informationProtection/dataLossPreventionPolicies
)
Indicators
These rows show field, operator, and value matches.
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
url.path | eq | /beta/me/informationProtection/dataLossPreventionPolicies | excludes:url.path field:"url.path" value:"/beta/me/informationProtection/dataLossPreventionPolicies" |
url.path | eq | /beta/me/settings/regionalAndLanguageSettings | excludes:url.path field:"url.path" value:"/beta/me/settings/regionalAndLanguageSettings" |
url.path | eq | /v1.0/me/drive/special/copilotuploads | excludes:url.path field:"url.path" value:"/v1.0/me/drive/special/copilotuploads" |
url.path | eq | /v1.0/me/informationProtection/sensitivityLabels | excludes:url.path field:"url.path" value:"/v1.0/me/informationProtection/sensitivityLabels" |
url.path | eq | /v1.0/me/licenseDetails | excludes:url.path field:"url.path" value:"/v1.0/me/licenseDetails" |
url.path | eq | /v1.0/organization | excludes:url.path field:"url.path" value:"/v1.0/organization" |
url.path | starts_with | /v1.0/me/photo | excludes:url.path field:"url.path" value:"/v1.0/me/photo" |
url.path | starts_with | /v1.0/me/photos | excludes:url.path field:"url.path" value:"/v1.0/me/photos" |
Network Activity from Modified Module
#Identifies network activity from a module modified in memory. This may indicate a successful module stomping attack.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Rule Body
[rule]
description = "Identifies network activity from a module modified in memory. This may indicate a successful module stomping attack."
id = "a6582b92-2d7b-4ab7-937c-c0174728115e"
license = "Elastic License v2"
name = "Network Activity from Modified Module"
os_list = ["windows"]
version = "1.0.3"
query = '''
library where
(
(dll.name : "dnsapi.dll" and process.thread.Ext.call_stack_summary regex """ntdll.dll\|iphlpapi.dll\|[a-z0-9]+\.dll""" and
process.thread.Ext.call_stack_summary != "ntdll.dll|iphlpapi.dll|jnitype3.dll" and
_arraysearch(process.thread.Ext.call_stack, $entry,
stringcontains~($entry.symbol_info, substring(process.thread.Ext.call_stack_summary, 23, length(process.thread.Ext.call_stack_summary))) and ($entry.callsite_trailing_bytes : "?*" and $entry.allocation_private_bytes >= 100000))) or
(dll.name : ("ws2_32.dll", "wininet.dll") and process.thread.Ext.call_stack_summary regex """ntdll.dll\|kernelbase.dll\|[a-z0-9]+\.dll""" and
_arraysearch(process.thread.Ext.call_stack, $entry,
stringcontains~($entry.symbol_info, substring(process.thread.Ext.call_stack_summary, 25, length(process.thread.Ext.call_stack_summary))) and ($entry.callsite_trailing_bytes : "?*" and $entry.allocation_private_bytes >= 100000))) or
(dll.name : "winhttp.dll" and process.thread.Ext.call_stack_summary regex """ntdll.dll\|kernelbase.dll\|wininet.dll\|[a-z0-9]+\.dll""" and
_arraysearch(process.thread.Ext.call_stack, $entry,
stringcontains~($entry.symbol_info, substring(process.thread.Ext.call_stack_summary, 37, length(process.thread.Ext.call_stack_summary))) and ($entry.callsite_trailing_bytes : "?*" and $entry.allocation_private_bytes >= 100000)))
) and
not _arraysearch(process.thread.Ext.call_stack, $entry,
$entry.callsite_trailing_bytes in ("9c6895de80184c890c244d89c94883ec0841558f042449bd81020000000000004c896c2408415d554889ed41535048b85f557f7b00000000415549bd45fa0985",
"9c5268d12b4248683616e700488914248f04245a48c704247e0400004881ec080000004c891c24514c89d94881ec080000004c890c244989c94d89cb41595948",
"e9186fffff0f85f8b1fefff7d3498bdce95856000048ffc0f8e9edcdfeff0f8548dbfeff66d3d6660fbcf1f949d1ed66c1f6076681e6a53d480fa5e6488bf3f5",
"4c8d25e0eeffff4489e121d94c89e54831dd4c8d3d38eeffff4489fa21da4d89fe4931de83f86f488d4c4d00498d1456480f44d1ffe2a6094f1ffaf803be2794"))
'''
min_endpoint_version = "8.10.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "8.10.0"
Stages and Predicates
Stage 1: library
library where
(
(dll.name : "dnsapi.dll" and process.thread.Ext.call_stack_summary regex """ntdll.dll\|iphlpapi.dll\|[a-z0-9]+\.dll""" and
process.thread.Ext.call_stack_summary != "ntdll.dll|iphlpapi.dll|jnitype3.dll" and
_arraysearch(process.thread.Ext.call_stack, $entry,
stringcontains~($entry.symbol_info, substring(process.thread.Ext.call_stack_summary, 23, length(process.thread.Ext.call_stack_summary))) and ($entry.callsite_trailing_bytes : "?*" and $entry.allocation_private_bytes >= 100000))) or
(dll.name : ("ws2_32.dll", "wininet.dll") and process.thread.Ext.call_stack_summary regex """ntdll.dll\|kernelbase.dll\|[a-z0-9]+\.dll""" and
_arraysearch(process.thread.Ext.call_stack, $entry,
stringcontains~($entry.symbol_info, substring(process.thread.Ext.call_stack_summary, 25, length(process.thread.Ext.call_stack_summary))) and ($entry.callsite_trailing_bytes : "?*" and $entry.allocation_private_bytes >= 100000))) or
(dll.name : "winhttp.dll" and process.thread.Ext.call_stack_summary regex """ntdll.dll\|kernelbase.dll\|wininet.dll\|[a-z0-9]+\.dll""" and
_arraysearch(process.thread.Ext.call_stack, $entry,
stringcontains~($entry.symbol_info, substring(process.thread.Ext.call_stack_summary, 37, length(process.thread.Ext.call_stack_summary))) and ($entry.callsite_trailing_bytes : "?*" and $entry.allocation_private_bytes >= 100000)))
) and
not _arraysearch(process.thread.Ext.call_stack, $entry,
$entry.callsite_trailing_bytes in ("9c6895de80184c890c244d89c94883ec0841558f042449bd81020000000000004c896c2408415d554889ed41535048b85f557f7b00000000415549bd45fa0985",
"9c5268d12b4248683616e700488914248f04245a48c704247e0400004881ec080000004c891c24514c89d94881ec080000004c890c244989c94d89cb41595948",
"e9186fffff0f85f8b1fefff7d3498bdce95856000048ffc0f8e9edcdfeff0f8548dbfeff66d3d6660fbcf1f949d1ed66c1f6076681e6a53d480fa5e6488bf3f5",
"4c8d25e0eeffff4489e121d94c89e54831dd4c8d3d38eeffff4489fa21da4d89fe4931de83f86f488d4c4d00498d1456480f44d1ffe2a6094f1ffaf803be2794"))
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
dll.name | wildcard |
| field:"dll.name" kind:wildcard |
process.thread.Ext.call_stack_summary | ne |
| field:"process.thread.Ext.call_stack_summary" kind:ne value:"ntdll.dll|iphlpapi.dll|jnitype3.dll" |
process.thread.Ext.call_stack_summary | regex_match |
| field:"process.thread.Ext.call_stack_summary" kind:regex_match |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.thread.Ext.call_stack | array_any | excludes:process.thread.Ext.call_stack |
Potential Linux Reverse Shell via Java JAR Execution
#Identifies the execution of a Linux shell process from a Java JAR application post an incoming network connection. This behavior may indicate reverse shell activity via a Java application.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Command & Control |
Rule Body
[rule]
description = """
Identifies the execution of a Linux shell process from a Java JAR application post an incoming network connection. This
behavior may indicate reverse shell activity via a Java application.
"""
id = "e0db3577-879e-4ac2-bd58-691e1343afca"
license = "Elastic License v2"
name = "Potential Linux Reverse Shell via Java JAR Execution"
os_list = ["linux"]
version = "1.0.15"
query = '''
sequence with maxspan=5s
[network where event.action == "connection_attempted" and process.executable : (
"/usr/bin/java", "/bin/java", "/local/bin/java", "/usr/lib/jvm/*", "/usr/java/*"
) 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"
)
)
] by process.entity_id
[process where event.action == "exec" and process.parent.executable : (
"/usr/bin/java", "/bin/java", "/usr/lib/jvm/*", "/usr/java/*", "/local/bin/java"
) and process.parent.args : "-jar" and process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and
process.parent.args_count <= 4 and not (
process.parent.args : (
"/etc/remote-iot/services/remoteiot.jar",
"/opt/pentaho/data-integration/launcher/launcher.jar",
"/usr/share/java/jenkins.war",
"/opt//tomcat/statistics/statistics.jar",
"/usr/lib64/NetExtender.jar",
"/var/lib/jenkins/workspace/MP-QA/tc_certified_copy*/tc_certified_copy_web_ui_test/target/surefire/surefirebooter*.jar",
"-javaagent:/opt/opentelemetry/opentelemetry-javaagent-all.jar",
"./lib/pipeline-job-executor*SNAPSHOT.jar",
"./lib/worker-launcher-agent*SNAPSHOT.jar",
"/opt/Seqrite_EndPoint_Security/wildfly/jboss-modules.jar",
"/home/data/jenkins.war",
"/pro/service-modules/deployment.jar",
"/application/HES/READER/*.jar",
"*-SNAPSHOT.jar",
"READER/G1A/READER_G1A.jar",
"READER_G1.jar"
) or
process.command_line like~ (
"bash -c ps -eo pid,lstart,comm*",
"bash -c df -i /application | tail -n 1",
"/bin/sh -xe /tmp/hudson*.sh",
"bash -c cat /application/HES/*"
)
)
] by process.parent.entity_id
'''
min_endpoint_version = "8.7.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[threat.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.7.0"
Stages and Predicates
Ordered sequence: each step below must occur in order within 5s, correlated by process.entity_id, process.parent.entity_id.
Stage 1: network
[network where event.action == "connection_attempted" and process.executable : (
"/usr/bin/java", "/bin/java", "/local/bin/java", "/usr/lib/jvm/*", "/usr/java/*"
) 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"
)
)
] by process.entity_id
Stage 2: process
[process where event.action == "exec" and process.parent.executable : (
"/usr/bin/java", "/bin/java", "/usr/lib/jvm/*", "/usr/java/*", "/local/bin/java"
) and process.parent.args : "-jar" and process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and
process.parent.args_count <= 4 and not (
process.parent.args : (
"/etc/remote-iot/services/remoteiot.jar",
"/opt/pentaho/data-integration/launcher/launcher.jar",
"/usr/share/java/jenkins.war",
"/opt//tomcat/statistics/statistics.jar",
"/usr/lib64/NetExtender.jar",
"/var/lib/jenkins/workspace/MP-QA/tc_certified_copy*/tc_certified_copy_web_ui_test/target/surefire/surefirebooter*.jar",
"-javaagent:/opt/opentelemetry/opentelemetry-javaagent-all.jar",
"./lib/pipeline-job-executor*SNAPSHOT.jar",
"./lib/worker-launcher-agent*SNAPSHOT.jar",
"/opt/Seqrite_EndPoint_Security/wildfly/jboss-modules.jar",
"/home/data/jenkins.war",
"/pro/service-modules/deployment.jar",
"/application/HES/READER/*.jar",
"*-SNAPSHOT.jar",
"READER/G1A/READER_G1A.jar",
"READER_G1.jar"
) or
process.command_line like~ (
"bash -c ps -eo pid,lstart,comm*",
"bash -c df -i /application | tail -n 1",
"/bin/sh -xe /tmp/hudson*.sh",
"bash -c cat /application/HES/*"
)
)
] by process.parent.entity_id
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq |
process.executable | wildcard |
| field:"Image" kind:wildcard |
process.name | in |
| field:"process_basename" kind:in |
process.parent.args | wildcard |
| field:"process.parent.args" kind:wildcard value:"-jar" |
process.parent.args_count | le |
| field:"process.parent.args_count" kind:le value:"4" |
process.parent.executable | wildcard |
| field:"ParentImage" kind:wildcard |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
destination.ip | cidr_match | 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 | excludes:destination.ip |
destination.ip | eq | 0.0.0.0 | excludes:destination.ip field:"destination.ip" value:"0.0.0.0" |
destination.ip | is_null | excludes:destination.ip | |
process.command_line | wildcard | bash -c ps -eo pid,lstart,comm*, bash -c df -i /application | tail -n 1, /bin/sh -xe /tmp/hudson*.sh, bash -c cat /application/HES/* | excludes:process.command_line |
process.parent.args | wildcard | /etc/remote-iot/services/remoteiot.jar, /opt/pentaho/data-integration/launcher/launcher.jar, /usr/share/java/jenkins.war, /opt//tomcat/statistics/statistics.jar, /usr/lib64/NetExtender.jar, /var/lib/jenkins/workspace/MP-QA/tc_certified_copy*/tc_certified_copy_web_ui_test/target/surefire/surefirebooter*.jar, -javaagent:/opt/opentelemetry/opentelemetry-javaagent-all.jar, ./lib/pipeline-job-executor*SNAPSHOT.jar, ./lib/worker-launcher-agent*SNAPSHOT.jar, /opt/Seqrite_EndPoint_Security/wildfly/jboss-modules.jar, /home/data/jenkins.war, /pro/service-modules/deployment.jar, /application/HES/READER/*.jar, *-SNAPSHOT.jar, READER/G1A/READER_G1A.jar, READER_G1.jar | excludes:process.parent.args |
Potential Privacy Control Bypass via Localhost Secure Copy
#Identifies use of the Secure Copy Protocol (SCP) to copy files locally by abusing the auto addition of the Secure Shell Daemon (sshd) to the authorized application list for Full Disk Access. This may indicate attempts to bypass macOS privacy controls to access sensitive files.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | |
| Collection |
Rule Body
[metadata]
creation_date = "2020/01/11"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/03/24"
[rule]
author = ["Elastic"]
description = """
Identifies use of the Secure Copy Protocol (SCP) to copy files locally by abusing the auto addition of the Secure Shell
Daemon (sshd) to the authorized application list for Full Disk Access. This may indicate attempts to bypass macOS
privacy controls to access sensitive files.
"""
from = "now-9m"
index = ["logs-endpoint.events.process*"]
language = "eql"
license = "Elastic License v2"
name = "Potential Privacy Control Bypass via Localhost Secure Copy"
references = [
"https://www.trendmicro.com/en_us/research/20/h/xcsset-mac-malware--infects-xcode-projects--uses-0-days.html",
]
risk_score = 73
rule_id = "c02c8b9f-5e1d-463c-a1b0-04edcdfe1a3d"
setup = """## Setup
This rule requires data coming in from Elastic Defend.
### Elastic Defend Integration Setup
Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
#### Prerequisite Requirements:
- Fleet is required for Elastic Defend.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
#### The following steps should be executed in order to add the Elastic Defend integration on a macOS System:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
- Click "Add Elastic Defend".
- Configure the integration name and optionally add a description.
- Select the type of environment you want to protect, for MacOS it is recommended to select "Traditional Endpoints".
- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
- Click "Save and Continue".
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
"""
severity = "high"
tags = [
"Domain: Endpoint",
"OS: macOS",
"Use Case: Threat Detection",
"Tactic: Privilege Escalation",
"Tactic: Defense Evasion",
"Data Source: Elastic Defend",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "macos" and event.type in ("start", "process_started") and
process.name == "scp" and
process.args like~ "StrictHostKeyChecking=no" and
process.command_line like~ ("*scp *localhost:/*", "*scp *127.0.0.?:/*") and
not process.command_line like~ "*vagrant@*127.0.0.1*"
'''
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 Privacy Control Bypass via Localhost Secure Copy
Secure Copy Protocol (SCP) is used for secure file transfers over SSH. On macOS, SSH daemon inclusion in the Full Disk Access list can be exploited to bypass privacy controls. Adversaries may misuse SCP to locally copy files, evading security measures. The detection rule identifies such activity by monitoring SCP commands targeting localhost, excluding benign uses like Vagrant, to flag potential privacy control bypass attempts.
### Possible investigation steps
- Review the process details to confirm the presence of SCP commands targeting localhost or 127.0.0.1, as indicated by the process.command_line field.
- Check the process.args field for the presence of "StrictHostKeyChecking=no" to verify if the SCP command was executed with potentially insecure settings.
- Investigate the user account associated with the SCP command to determine if it is a legitimate user or potentially compromised.
- Examine the timing and frequency of the SCP command execution to identify any unusual patterns or repeated attempts that may indicate malicious activity.
- Cross-reference the alert with other security logs or alerts to identify any related suspicious activities or anomalies around the same timeframe.
- Assess the system for any unauthorized changes or access to sensitive files that may have occurred as a result of the SCP command execution.
### False positive analysis
- Vagrant usage can trigger false positives due to its legitimate use of SCP for local file transfers. To mitigate this, ensure that Vagrant-related SCP commands are excluded by refining the detection rule to ignore processes with arguments containing "vagrant@*127.0.0.1*".
- Development and testing environments may frequently use SCP to localhost for legitimate purposes. Consider creating exceptions for known development tools or scripts that regularly perform these actions to reduce noise.
- Automated backup solutions might use SCP to copy files locally as part of their routine operations. Identify and whitelist these processes to prevent them from being flagged as potential threats.
- System administrators may use SCP for local file management tasks. Establish a list of trusted administrator accounts or specific command patterns that can be safely excluded from triggering alerts.
- Continuous integration and deployment pipelines might involve SCP commands to localhost. Review and exclude these processes if they are part of a controlled and secure workflow.
### Response and remediation
- Immediately isolate the affected macOS system from the network to prevent further unauthorized access or data exfiltration.
- Terminate any suspicious SCP processes identified in the alert to halt ongoing unauthorized file transfers.
- Conduct a thorough review of the system's Full Disk Access list to identify and remove any unauthorized applications, including the SSH daemon if it was added without proper authorization.
- Analyze the system's SSH configuration and logs to identify any unauthorized changes or access patterns, and revert any suspicious modifications.
- Reset credentials for any accounts that may have been compromised, focusing on those with SSH access, and enforce the use of strong, unique passwords.
- Implement network monitoring to detect and alert on any future SCP commands targeting localhost, especially those bypassing host key checks.
- Escalate the incident to the security operations team for further investigation and to assess the potential impact on sensitive data, ensuring compliance with organizational incident response protocols."""
[[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.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[[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.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1005"
name = "Data from Local System"
reference = "https://attack.mitre.org/techniques/T1005/"
[rule.threat.tactic]
id = "TA0009"
name = "Collection"
reference = "https://attack.mitre.org/tactics/TA0009/"
Stages and Predicates
Stage 1: process
process where host.os.type == "macos" and event.type in ("start", "process_started") and
process.name == "scp" and
process.args like~ "StrictHostKeyChecking=no" and
process.command_line like~ ("*scp *localhost:/*", "*scp *127.0.0.?:/*") and
not process.command_line like~ "*vagrant@*127.0.0.1*"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | in |
| field:"event.type" kind:in |
process.args | wildcard |
| field:"process.args" kind:wildcard value:"StrictHostKeyChecking=no" |
process.command_line | wildcard |
| field:"CommandLine" kind:wildcard |
process.name | eq |
| field:"process_basename" kind:eq value:"scp" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.command_line | wildcard | *vagrant@*127.0.0.1* | excludes:process.command_line field:"process.command_line" value:"*vagrant@*127.0.0.1*" |
Potential Privilege Escalation via a Suspicious UID Change
#Detects a potential privilege escalation sequence via a suspicious UID change sequence. This rule checks for non-root execution of a process executable in a user or world-writeable directory followed by a UID change event to 0 (root). This sequence is indicative of a potential local privilege escalation exploit.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Rule Body
[rule]
description = """
Detects a potential privilege escalation sequence via a suspicious UID change sequence. This rule checks for non-root
execution of a process executable in a user or world-writeable directory followed by a UID change event to 0 (root).
This sequence is indicative of a potential local privilege escalation exploit.
"""
id = "8a744999-9b0b-4674-b621-e1fc0fc3718e"
license = "Elastic License v2"
name = "Potential Privilege Escalation via a Suspicious UID Change"
os_list = ["linux"]
version = "1.0.5"
query = '''
sequence by process.entity_id with maxspan=30s
[process where event.type == "start" and event.action == "exec" and
user.id != 0 and process.parent.user.id != 0 and process.parent.group.id != 0 and
process.interactive == true and
(
process.executable like (".*", "/tmp/*", "/dev/shm/*", "/var/tmp/*", "/home/*/*", "/run/user/*", "/var/run/user/*") or
process.parent.executable like (".*", "/tmp/*", "/dev/shm/*", "/var/tmp/*", "/home/*/*", "/run/user/*", "/var/run/user/*")
) and
not (
process.parent.executable like (
"/tmp/go-build*/*/sso.test", "/run/user/*/.bubblewrap/newroot/*", "/tmp/newroot/*", "/var/lib/snapd/snap/node/*/bin/node",
"/usr/libexec/gnome-session-binary", "/home/*/.local/bin/codex", "/home/*/.bun/bin/bun", "/home/*/.local/bin/agy",
"/home/*/.nvm/versions/node/*/bin/codex*", "/home/*/.npm-global/*/bin/codex", "/home/*/.local/bin/copilot",
"/home/*/.local/share/uv/python/cpython-*-linux-x86_64-gnu/bin/python3*", "/home/linuxbrew/.linuxbrew/Caskroom/*",
"/home/*/.local/share/kiro-cli/*", "/home/*/.codex/packages/standalone/releases/*/bin/codex", "/home/*/.opencode/bin/opencode",
"*/extensions/openai.chatgpt-*/bin/*/codex", "*/node_modules/@openai/codex-linux-x64/vendor/*/bin/codex"
) or
process.executable like ("/run/user/*/.bubblewrap/*", "/tmp/newroot/usr/bin/sudo") or
(
process.parent.name like "python*" and
process.parent.args in ("muckrake_runner.run_tests", "terraform.kafka_runner.run-test")
) or
(
process.parent.executable == "/usr/bin/gnome-shell" and process.command_line == "/snap/bin/gnome-calculator"
)
)]
[process where event.type == "change" and event.action == "uid_change" and
user.id == 0 and process.parent.user.id != 0 and process.parent.group.id != 0 and
process.executable != "/usr/bin/sudo"]
'''
min_endpoint_version = "8.2.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 1
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1068"
name = "Exploitation for Privilege Escalation"
reference = "https://attack.mitre.org/techniques/T1068/"
[threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
[internal]
min_endpoint_version = "8.2.0"
Stages and Predicates
Ordered sequence: each step below must occur in order within 30s, correlated by process.entity_id.
Stage 1: process
[process where event.type == "start" and event.action == "exec" and
user.id != 0 and process.parent.user.id != 0 and process.parent.group.id != 0 and
process.interactive == true and
(
process.executable like (".*", "/tmp/*", "/dev/shm/*", "/var/tmp/*", "/home/*/*", "/run/user/*", "/var/run/user/*") or
process.parent.executable like (".*", "/tmp/*", "/dev/shm/*", "/var/tmp/*", "/home/*/*", "/run/user/*", "/var/run/user/*")
) and
not (
process.parent.executable like (
"/tmp/go-build*/*/sso.test", "/run/user/*/.bubblewrap/newroot/*", "/tmp/newroot/*", "/var/lib/snapd/snap/node/*/bin/node",
"/usr/libexec/gnome-session-binary", "/home/*/.local/bin/codex", "/home/*/.bun/bin/bun", "/home/*/.local/bin/agy",
"/home/*/.nvm/versions/node/*/bin/codex*", "/home/*/.npm-global/*/bin/codex", "/home/*/.local/bin/copilot",
"/home/*/.local/share/uv/python/cpython-*-linux-x86_64-gnu/bin/python3*", "/home/linuxbrew/.linuxbrew/Caskroom/*",
"/home/*/.local/share/kiro-cli/*", "/home/*/.codex/packages/standalone/releases/*/bin/codex", "/home/*/.opencode/bin/opencode",
"*/extensions/openai.chatgpt-*/bin/*/codex", "*/node_modules/@openai/codex-linux-x64/vendor/*/bin/codex"
) or
process.executable like ("/run/user/*/.bubblewrap/*", "/tmp/newroot/usr/bin/sudo") or
(
process.parent.name like "python*" and
process.parent.args in ("muckrake_runner.run_tests", "terraform.kafka_runner.run-test")
) or
(
process.parent.executable == "/usr/bin/gnome-shell" and process.command_line == "/snap/bin/gnome-calculator"
)
)]
Stage 2: process
[process where event.type == "change" and event.action == "uid_change" and
user.id == 0 and process.parent.user.id != 0 and process.parent.group.id != 0 and
process.executable != "/usr/bin/sudo"]
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq |
event.type | eq |
| field:"event.type" kind:eq |
process.executable | ne |
| field:"Image" kind:ne value:"/usr/bin/sudo" |
process.executable | wildcard |
| field:"Image" kind:wildcard |
process.interactive | eq |
| field:"process.interactive" kind:eq value:"true" |
process.parent.executable | wildcard |
| field:"ParentImage" kind:wildcard |
process.parent.group.id | ne |
| field:"process.parent.group.id" kind:ne value:"0" |
process.parent.user.id | ne |
| field:"process.parent.user.id" kind:ne value:"0" |
user.id | eq |
| field:"user.id" kind:eq value:"0" |
user.id | ne |
| field:"user.id" kind:ne value:"0" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.command_line | eq | /snap/bin/gnome-calculator | excludes:process.command_line field:"process.command_line" value:"/snap/bin/gnome-calculator" |
process.parent.executable | eq | /usr/bin/gnome-shell | excludes:process.parent.executable field:"process.parent.executable" value:"/usr/bin/gnome-shell" |
process.parent.args | in | muckrake_runner.run_tests, terraform.kafka_runner.run-test | excludes:process.parent.args field:"process.parent.args" value:"muckrake_runner.run_tests" field:"process.parent.args" value:"terraform.kafka_runner.run-test" |
process.parent.name | starts_with | python | excludes:process.parent.name field:"process.parent.name" value:"python" |
process.executable | wildcard | /run/user/*/.bubblewrap/*, /tmp/newroot/usr/bin/sudo | excludes:process.executable field:"process.executable" value:"/run/user/*/.bubblewrap/*" field:"process.executable" value:"/tmp/newroot/usr/bin/sudo" |
process.parent.executable | wildcard | /tmp/go-build*/*/sso.test, /run/user/*/.bubblewrap/newroot/*, /tmp/newroot/*, /var/lib/snapd/snap/node/*/bin/node, /usr/libexec/gnome-session-binary, /home/*/.local/bin/codex, /home/*/.bun/bin/bun, /home/*/.local/bin/agy, /home/*/.nvm/versions/node/*/bin/codex*, /home/*/.npm-global/*/bin/codex, /home/*/.local/bin/copilot, /home/*/.local/share/uv/python/cpython-*-linux-x86_64-gnu/bin/python3*, /home/linuxbrew/.linuxbrew/Caskroom/*, /home/*/.local/share/kiro-cli/*, /home/*/.codex/packages/standalone/releases/*/bin/codex, /home/*/.opencode/bin/opencode, */extensions/openai.chatgpt-*/bin/*/codex, */node_modules/@openai/codex-linux-x64/vendor/*/bin/codex | excludes:process.parent.executable |
Potential Proxy Execution via Run-parts
#This rule detects the execution of a command or binary through the run-parts binary. Run-parts is a utility that runs all the executable files in a directory. Attackers may use this technique to execute binaries while attempting to evade detection.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Rule Body
[rule]
description = """
This rule detects the execution of a command or binary through the run-parts binary. Run-parts is a utility that runs
all the executable files in a directory. Attackers may use this technique to execute binaries while attempting to evade
detection.
"""
id = "e8f9661a-a418-45ea-91cc-e2fa705e2ade"
license = "Elastic License v2"
name = "Potential Proxy Execution via Run-parts"
os_list = ["linux"]
reference = ["https://gtfobins.github.io/gtfobins/run-parts/"]
version = "1.0.7"
query = '''
process where event.type == "start" and event.action == "exec" and process.parent.name == "run-parts" and
process.parent.command_line like ("/*run-parts *", "run-parts *") and process.parent.args_count < 3 and not (
process.executable : (
"/usr/lib/*", "/ns/*", "/var/lib/docker/overlay2/*", "/vz/*", "/run/containerd/*", "/etc/*", "/data/docker/*",
"/home/*/docker/overlay2/*", "/usr/share/*", "/usr/bin/*", "/bin/*", "/usr/sbin/*", "/sbin/*", "/tmp/newroot/*"
) or
process.name in (
"su", "logger", "avahi-daemon", "sendmail", "avahi-daemon-check-dns.sh", "grub-mkconfig", "initramfs-tools",
"apt-auto-removal", "uninvention-policy-result", "unattended-upgrades", "post-update.d/proxmox-boot-sync",
"zz-proxmox-boot", "flash-kernel", "mdadm.finalrd", "dkms_autoinstaller", "frontend", "update-grub-legacy-ec2",
"runwsgi"
) or
process.args : (
"/etc/network/if-*", "/etc/cron.hourly/0anacron", "/etc/resolvconf/update-libc.d/postfix", "/etc/ssl/certs",
"/etc/ca-certificates/update.d/certhash"
) or
process.parent.args : (
"/etc/cron*", "/etc/update-motd.d/*", "/etc/ca-certificates/update.d/*", "/ns/sbin/*", "/etc/periodic/*",
"/ns/bin/*", "/opt/local/cron/periodic/*", "/etc/logrotate.d/*", "/usr/share/univention-monitoring-client/scripts/*",
"/home/*/scripts/cron*", "/etc/apt/post-invoke.d", "/etc/network/if-up.d", "/etc/letsencrypt/hooks/renew.d",
"/config/etc/letsencrypt/renewal-hooks/deploy/"
) or
process.command_line in (
"run-parts --lsbsysinit /etc/update-motd.d", "/bin/run-parts /etc/run_once",
"run-parts /usr/lib/vmware/viewagent/bin/uninstall",
"run-parts /scripts", "/usr/bin/env bash ./dovecot", "/usr/bin/env bash ./postfix"
) or
process.parent.command_line == "run-parts --lsbsysinit /etc/update-motd.d"
)
'''
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 = "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 = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Stage 1: process
process where event.type == "start" and event.action == "exec" and process.parent.name == "run-parts" and
process.parent.command_line like ("/*run-parts *", "run-parts *") and process.parent.args_count < 3 and not (
process.executable : (
"/usr/lib/*", "/ns/*", "/var/lib/docker/overlay2/*", "/vz/*", "/run/containerd/*", "/etc/*", "/data/docker/*",
"/home/*/docker/overlay2/*", "/usr/share/*", "/usr/bin/*", "/bin/*", "/usr/sbin/*", "/sbin/*", "/tmp/newroot/*"
) or
process.name in (
"su", "logger", "avahi-daemon", "sendmail", "avahi-daemon-check-dns.sh", "grub-mkconfig", "initramfs-tools",
"apt-auto-removal", "uninvention-policy-result", "unattended-upgrades", "post-update.d/proxmox-boot-sync",
"zz-proxmox-boot", "flash-kernel", "mdadm.finalrd", "dkms_autoinstaller", "frontend", "update-grub-legacy-ec2",
"runwsgi"
) or
process.args : (
"/etc/network/if-*", "/etc/cron.hourly/0anacron", "/etc/resolvconf/update-libc.d/postfix", "/etc/ssl/certs",
"/etc/ca-certificates/update.d/certhash"
) or
process.parent.args : (
"/etc/cron*", "/etc/update-motd.d/*", "/etc/ca-certificates/update.d/*", "/ns/sbin/*", "/etc/periodic/*",
"/ns/bin/*", "/opt/local/cron/periodic/*", "/etc/logrotate.d/*", "/usr/share/univention-monitoring-client/scripts/*",
"/home/*/scripts/cron*", "/etc/apt/post-invoke.d", "/etc/network/if-up.d", "/etc/letsencrypt/hooks/renew.d",
"/config/etc/letsencrypt/renewal-hooks/deploy/"
) or
process.command_line in (
"run-parts --lsbsysinit /etc/update-motd.d", "/bin/run-parts /etc/run_once",
"run-parts /usr/lib/vmware/viewagent/bin/uninstall",
"run-parts /scripts", "/usr/bin/env bash ./dovecot", "/usr/bin/env bash ./postfix"
) or
process.parent.command_line == "run-parts --lsbsysinit /etc/update-motd.d"
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"exec" |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.parent.args_count | lt |
| field:"process.parent.args_count" kind:lt value:"3" |
process.parent.command_line | wildcard |
| field:"ParentCommandLine" kind:wildcard |
process.parent.name | eq |
| field:"parent_process_basename" kind:eq value:"run-parts" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.args | wildcard | /etc/network/if-*, /etc/cron.hourly/0anacron, /etc/resolvconf/update-libc.d/postfix, /etc/ssl/certs, /etc/ca-certificates/update.d/certhash | excludes:process.args |
process.command_line | in | /bin/run-parts /etc/run_once, /usr/bin/env bash ./dovecot, /usr/bin/env bash ./postfix, run-parts --lsbsysinit /etc/update-motd.d, run-parts /scripts, run-parts /usr/lib/vmware/viewagent/bin/uninstall | excludes:process.command_line |
process.executable | wildcard | /usr/lib/*, /ns/*, /var/lib/docker/overlay2/*, /vz/*, /run/containerd/*, /etc/*, /data/docker/*, /home/*/docker/overlay2/*, /usr/share/*, /usr/bin/*, /bin/*, /usr/sbin/*, /sbin/*, /tmp/newroot/* | excludes:process.executable |
process.name | in | apt-auto-removal, avahi-daemon, avahi-daemon-check-dns.sh, dkms_autoinstaller, flash-kernel, frontend, grub-mkconfig, initramfs-tools, logger, mdadm.finalrd, post-update.d/proxmox-boot-sync, runwsgi, sendmail, su, unattended-upgrades, uninvention-policy-result, update-grub-legacy-ec2, zz-proxmox-boot | excludes:process.name |
process.parent.args | wildcard | /etc/cron*, /etc/update-motd.d/*, /etc/ca-certificates/update.d/*, /ns/sbin/*, /etc/periodic/*, /ns/bin/*, /opt/local/cron/periodic/*, /etc/logrotate.d/*, /usr/share/univention-monitoring-client/scripts/*, /home/*/scripts/cron*, /etc/apt/post-invoke.d, /etc/network/if-up.d, /etc/letsencrypt/hooks/renew.d, /config/etc/letsencrypt/renewal-hooks/deploy/ | excludes:process.parent.args |
process.parent.command_line | eq | run-parts --lsbsysinit /etc/update-motd.d | excludes:process.parent.command_line field:"process.parent.command_line" value:"run-parts --lsbsysinit /etc/update-motd.d" |
Potentially Successful Okta MFA Bombing via Push Notifications
#Detects when an attacker abuses the Multi-Factor authentication mechanism by repeatedly issuing login requests until the user eventually accepts the Okta push notification. An adversary may attempt to bypass the Okta MFA policies configured for an organization to obtain unauthorized access.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Credential Access |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
- Failed Logins from Unknown or Invalid User (Kusto)
- First Occurrence of Okta User Session Started via Proxy (Elastic)
- High-Risk Admin Activity (Kusto)
- MFA Fatigue (OKTA) (Kusto)
- Multiple Okta Sessions Detected for a Single User (Elastic)
- Multiple Okta User Authentication Events with Same Device Token Hash (Elastic)
- New Device/Location sign-in along with critical operation (Kusto)
- Okta AiTM Phishing Attempt Blocked by FastPass (Panther)
Rule Body
[metadata]
creation_date = "2022/01/05"
integration = ["okta"]
maturity = "production"
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = """
Detects when an attacker abuses the Multi-Factor authentication mechanism by repeatedly issuing login requests until the
user eventually accepts the Okta push notification. An adversary may attempt to bypass the Okta MFA policies configured
for an organization to obtain unauthorized access.
"""
event_category_override = "event.category"
index = ["filebeat-*", "logs-okta.system*"]
language = "eql"
license = "Elastic License v2"
name = "Potentially Successful Okta MFA Bombing via Push Notifications"
note = """## Triage and analysis
### Investigating Potentially Successful Okta MFA Bombing via Push Notifications
Multi-Factor Authentication (MFA) is an effective method to prevent unauthorized access. However, some adversaries may abuse the system by repeatedly sending MFA push notifications until the user unwittingly approves the access.
This rule detects when a user denies MFA Okta Verify push notifications twice, followed by a successful authentication event within a 10-minute window. This sequence could indicate an adversary's attempt to bypass the Okta MFA policy.
#### Possible investigation steps:
- Identify the user who received the MFA notifications by reviewing the `user.email` field.
- Identify the time, source IP, and geographical location of the MFA requests and the subsequent successful login.
- Review the `event.action` field to understand the nature of the events. It should include two `user.mfa.okta_verify.deny_push` actions and one `user.authentication.sso` action.
- Ask the user if they remember receiving the MFA notifications and subsequently logging into their account.
- Check if the MFA requests and the successful login occurred during the user's regular activity hours.
- Look for any other suspicious activity on the account around the same time.
- Identify whether the same pattern is repeated for other users in your organization. Multiple users receiving push notifications simultaneously might indicate a larger attack.
### False positive analysis:
- Determine if the MFA push notifications were legitimate. Sometimes, users accidentally trigger MFA requests or deny them unintentionally and later approve them.
- Check if there are known issues with the MFA system causing false denials.
### Response and remediation:
- If unauthorized access is confirmed, initiate your incident response process.
- Alert the user and your IT department immediately.
- If possible, isolate the user's account until the issue is resolved.
- Investigate the source of the unauthorized access.
- If the account was accessed by an unauthorized party, determine the actions they took after logging in.
- Consider enhancing your MFA policy to prevent such incidents in the future.
- Encourage users to report any unexpected MFA notifications immediately.
- Review and update your incident response plans and security policies based on the findings from the incident.
## Setup
The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
references = [
"https://www.mandiant.com/resources/russian-targeting-gov-business",
"https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy",
"https://sec.okta.com/articles/2023/08/cross-tenant-impersonation-prevention-and-detection",
"https://www.rezonate.io/blog/okta-logs-decoded-unveiling-identity-threats-through-threat-hunting/",
"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 = 73
rule_id = "97a8e584-fd3b-421f-9b9d-9c9d9e57e9d7"
severity = "high"
tags = [
"Domain: Identity",
"Use Case: Identity and Access Audit",
"Tactic: Credential Access",
"Data Source: Okta",
"Data Source: Okta System Logs",
"Resources: Investigation Guide",
]
type = "eql"
query = '''
sequence by okta.actor.id with maxspan=10m
[ any
where data_stream.dataset == "okta.system"
and (
okta.event_type == "user.mfa.okta_verify.deny_push"
or (
okta.event_type == "user.authentication.auth_via_mfa"
and okta.debug_context.debug_data.factor == "OKTA_VERIFY_PUSH"
and okta.outcome.reason == "INVALID_CREDENTIALS"
)
)
] with runs=5
[ any
where data_stream.dataset == "okta.system"
and okta.event_type in (
"user.authentication.sso",
"user.authentication.auth_via_mfa",
"user.authentication.verify",
"user.session.start"
)
and okta.outcome.result == "SUCCESS"
]
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1621"
name = "Multi-Factor Authentication Request Generation"
reference = "https://attack.mitre.org/techniques/T1621/"
[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 = "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.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
Stages and Predicates
Ordered sequence: each step below must occur in order within 10m, correlated by okta.actor.id.
Stage 1: any ×5
[ any
where data_stream.dataset == "okta.system"
and (
okta.event_type == "user.mfa.okta_verify.deny_push"
or (
okta.event_type == "user.authentication.auth_via_mfa"
and okta.debug_context.debug_data.factor == "OKTA_VERIFY_PUSH"
and okta.outcome.reason == "INVALID_CREDENTIALS"
)
)
] with runs=5
Stage 2: any
[ any
where data_stream.dataset == "okta.system"
and okta.event_type in (
"user.authentication.sso",
"user.authentication.auth_via_mfa",
"user.authentication.verify",
"user.session.start"
)
and okta.outcome.result == "SUCCESS"
]
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
data_stream.dataset | eq |
| field:"data_stream.dataset" kind:eq value:"okta.system" |
okta.debug_context.debug_data.factor | eq |
| field:"okta::debugContext.debugData.factor" kind:eq value:"OKTA_VERIFY_PUSH" |
okta.event_type | eq |
| field:"okta::eventType" kind:eq |
okta.event_type | in |
| field:"okta::eventType" kind:in |
okta.outcome.reason | eq |
| field:"okta::outcome.reason" kind:eq value:"INVALID_CREDENTIALS" |
okta.outcome.result | eq |
| field:"okta::outcome.result" kind:eq value:"SUCCESS" |
Privilege Escalation via Root Crontab File Modification
#Identifies modifications to the root crontab file. Adversaries may overwrite this file to gain code execution with root privileges by exploiting privileged file write or move related vulnerabilities.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| macOS | ESF event write (NOTIFY): Fires after a process writes data to a file. |
Rule Body
[metadata]
creation_date = "2021/01/27"
integration = ["endpoint"]
maturity = "production"
updated_date = "2025/03/18"
[rule]
author = ["Elastic"]
description = """
Identifies modifications to the root crontab file. Adversaries may overwrite this file to gain code execution with root
privileges by exploiting privileged file write or move related vulnerabilities.
"""
from = "now-9m"
index = ["logs-endpoint.events.*"]
language = "eql"
license = "Elastic License v2"
name = "Privilege Escalation via Root Crontab File Modification"
references = [
"https://phoenhex.re/2017-06-09/pwn2own-diskarbitrationd-privesc",
"https://www.exploit-db.com/exploits/42146",
]
risk_score = 73
rule_id = "0ff84c42-873d-41a2-a4ed-08d74d352d01"
setup = """## Setup
This rule requires data coming in from Elastic Defend.
### Elastic Defend Integration Setup
Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
#### Prerequisite Requirements:
- Fleet is required for Elastic Defend.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
#### The following steps should be executed in order to add the Elastic Defend integration on a macOS System:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
- Click "Add Elastic Defend".
- Configure the integration name and optionally add a description.
- Select the type of environment you want to protect, for MacOS it is recommended to select "Traditional Endpoints".
- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
- Click "Save and Continue".
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
"""
severity = "high"
tags = [
"Domain: Endpoint",
"OS: macOS",
"Use Case: Threat Detection",
"Tactic: Privilege Escalation",
"Data Source: Elastic Defend",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
file where host.os.type == "macos" and event.action == "modification" and
file.path like "/private/var/at/tabs/root" and
not process.executable like "/usr/bin/crontab"
'''
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 Privilege Escalation via Root Crontab File Modification
Crontab files in macOS are used to schedule tasks, often requiring elevated privileges for execution. Adversaries exploit this by modifying the root crontab file, enabling unauthorized code execution with root access. The detection rule identifies suspicious modifications to this file, excluding legitimate crontab processes, to flag potential privilege escalation attempts.
### Possible investigation steps
- Review the alert details to confirm the file path involved is /private/var/at/tabs/root, as this is the specific file path targeted by the rule.
- Examine the process that modified the root crontab file by checking the process executable path. Ensure it is not /usr/bin/crontab, which is excluded as a legitimate process.
- Investigate the user account associated with the process that made the modification to determine if it has legitimate access or if it might be compromised.
- Check for any recent changes or anomalies in user account activity or permissions that could indicate unauthorized access or privilege escalation attempts.
- Correlate this event with other security alerts or logs from the same host to identify any patterns or additional suspicious activities that might suggest a broader attack campaign.
- Assess the risk and impact of the modification by determining if any unauthorized or malicious tasks have been scheduled in the crontab file.
### False positive analysis
- System maintenance tasks or updates may modify the root crontab file. To handle these, users can create exceptions for known maintenance processes that are verified as safe.
- Administrative scripts that require scheduled tasks might trigger this rule. Users should document and exclude these scripts if they are part of regular, authorized operations.
- Backup or monitoring software that interacts with crontab files could cause false positives. Verify these applications and exclude their processes if they are legitimate and necessary for system operations.
- Custom automation tools used by IT departments might modify crontab files. Ensure these tools are reviewed and whitelisted if they are part of approved workflows.
### Response and remediation
- Immediately isolate the affected system from the network to prevent further unauthorized access or execution of malicious tasks.
- Review the modified root crontab file to identify any unauthorized or suspicious entries and remove them to stop any malicious scheduled tasks.
- Conduct a thorough investigation to determine how the crontab file was modified, focusing on identifying any exploited vulnerabilities or unauthorized access points.
- Reset credentials and review permissions for any accounts that may have been compromised or used in the attack to prevent further unauthorized access.
- Apply security patches and updates to the operating system and any vulnerable applications to close exploited vulnerabilities.
- Monitor the system and network for any signs of continued unauthorized activity or attempts to modify crontab files, using enhanced logging and alerting mechanisms.
- Escalate the incident to the appropriate internal security team or external cybersecurity experts if the threat persists or if there is evidence of a broader compromise."""
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1053"
name = "Scheduled Task/Job"
reference = "https://attack.mitre.org/techniques/T1053/"
[[rule.threat.technique.subtechnique]]
id = "T1053.003"
name = "Cron"
reference = "https://attack.mitre.org/techniques/T1053/003/"
[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
Stages and Predicates
Stage 1: file
file where host.os.type == "macos" and event.action == "modification" and
file.path like "/private/var/at/tabs/root" and
not process.executable like "/usr/bin/crontab"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"modification" |
file.path | wildcard |
| field:"TargetFilename" kind:wildcard value:"/private/var/at/tabs/root" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.executable | eq | /usr/bin/crontab | excludes:process.executable field:"process.executable" value:"/usr/bin/crontab" |
Privilege Escalation via SeImpersonatePrivilege
#Identifies a privilege escalation attempt from an account with the SeImpersonatePrivilege to full System privileges.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Rule Body
[rule]
description = "Identifies a privilege escalation attempt from an account with the SeImpersonatePrivilege to full System privileges."
id = "e9d6f6a5-c375-4313-b269-1a8d42c64480"
license = "Elastic License v2"
name = "Privilege Escalation via SeImpersonatePrivilege"
os_list = ["windows"]
reference = [
"https://decoder.cloud/2019/12/06/we-thought-they-were-potatoes-but-they-were-beans/",
"https://github.com/hackvens/CoercedPotato",
]
version = "1.0.24"
query = '''
sequence with maxspan=3m
[process where event.action == "start" and
(user.id : ("S-1-5-17", "S-1-5-19", "S-1-5-20", "S-1-5-32-568") or user.domain : "IIS AppPool") and
not process.executable :
("?:\\Windows\\Syswow64\\wbem\\wmiprvse.exe",
"?:\\Windows\\system32\\wbem\\wmiprvse.exe",
"?:\\WINDOWS\\system32\\svchost.exe",
"?:\\Windows\\System32\\sppsvc.exe",
"C:\\Windows\\System32\\taskhost.exe",
"?:\\Windows\\system32\\printfilterpipelinesvc.exe",
"?:\\Windows\\syswow64\\printfilterpipelinesvc.exe",
"?:\\Windows\\System32\\appidcertstorecheck.exe",
"\\Device\\HarddiskVolume*\\Windows\\System32\\printfilterpipelinesvc.exe",
"\\Device\\HarddiskVolume*\\Windows\\System32\\wbem\\wmiprvse.exe",
"C:\\Windows\\System32\\Speech_OneCore\\Common\\SpeechModelDownload.exe") and
not (process.name : "rundll32.exe" and process.args : "?:\\WINDOWS\\sys*\\davclnt.dll,DavSetCookie") and
not (process.executable : "C:\\Windows\\System32\\conhost.exe" and
process.parent.executable : ("C:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MpCmdRun.exe",
"C:\\Program Files\\Windows Defender\\mpcmdrun.exe")) and
not (process.parent.executable : "C:\\Program Files\\Windows Defender Advanced Threat Protection\\MsSense.exe" and
process.executable : "C:\\Program Files\\Windows Defender Advanced Threat Protection\\Classification\\SenseCE.exe") and
not (process.parent.executable : "?:\\ProgramData\\Microsoft\\Windows Defender\\platform\\*\\MsMpEng.exe" and
process.executable : "?:\\ProgramData\\Microsoft\\Windows Defender\\platform\\*\\MpCmdRun.exe")
] by process.entity_id
[process where event.action == "start" and user.id : "S-1-5-18" and
(
_arraysearch(process.parent.thread.Ext.call_stack, $entry, $entry.symbol_info : ("*CreateProcessAsUser*", "*CreateProcessWithToken*")) or
process.parent.thread.Ext.call_stack_summary :
("ntdll.dll|Unbacked",
"ntdll.dll|kernelbase.dll|Unbacked",
"ntdll.dll|kernelbase.dll|Unknown",
"ntdll.dll|kernelbase.dll|kernel32.dll|Unbacked",
"ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|kernelbase.dll|Unbacked",
"ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|kernelbase.dll|Unbacked|kernel32.dll|ntdll.dll") or
(_arraysearch(process.parent.thread.Ext.call_stack, $entry, $entry.symbol_info : "*KernelBase.dll!CreateProcessInternal*") and
not _arraysearch(process.parent.thread.Ext.call_stack, $entry,
$entry.symbol_info : ("*kernel32.dll!CreateProcess*", "*CreateProcessAsUser*", "*CreateProcessWithToken*", "*KernelBase.dll!CreateProcessA+*", "KernelBase.dll!CreateProcessW")))
) and
not (process.executable : "?:\\Program Files (x86)\\Lenovo\\System Update\\uncsetting.exe" and
process.parent.executable : "?:\\Windows\\Microsoft.NET\\Framework64\\*\\csc.exe") and
not (process.executable : "C:\\Program Files (x86)\\Google\\GoogleUpdater\\*\\updater.exe" and
process.parent.executable == "C:\\Windows\\System32\\appidcertstorecheck.exe") and
not (process.executable == "C:\\Program Files (x86)\\Microsoft\\EdgeUpdate\\MicrosoftEdgeUpdate.exe" and
process.parent.executable in
("C:\\Program Files\\Windows Defender\\MpCmdRun.exe",
"C:\\Program Files\\Windows Defender Advanced Threat Protection\\SenseNdr.exe",
"C:\\Program Files\\Windows Defender Advanced Threat Protection\\Classification\\SenseCE.exe")) and
not (process.executable : "C:\\Program Files\\Portrait Displays\\HP Display Control Service\\DeviceCheck.exe" and
process.parent.executable : "C:\\Windows\\System32\\pacjsworker.exe") and
not (process.executable : ("C:\\Windows\\Microsoft.NET\\Framework\\*\\csc.exe", "C:\\Windows\\SysWOW64\\cmd.exe") and
process.parent.executable : "C:\\Program Files (x86)\\Tanium\\Tanium Client\\TaniumClient.exe") and
not (process.executable : "?:\\Windows\\SysWOW64\\bitsadmin.exe" and process.parent.executable : "?:\\Windows\\SysWOW64\\cmd.exe") and
not process.executable :
("C:\\Program Files\\HP\\hpssacli\\bin\\hpssacli.exe",
"C:\\Program Files (x86)\\ManageSoft\\Uploader\\ndupload.exe",
"C:\\Program Files (x86)\\Google\\GoogleUpdater\\*\\updater.exe",
"C:\\Program Files\\Npcap\\NPFInstall.exe",
"C:\\Program Files (x86)\\ManageEngine\\UEMS_Agent\\bin\\metroapps.exe",
"C:\\Program Files (x86)\\Google\\Update\\GoogleUpdate.exe",
"C:\\Program Files (x86)\\SolarWinds\\Agent\\Plugins\\ADMProbe\\nping.exe",
"C:\\Program Files (x86)\\ManageEngine\\UEMS_Agent\\DeviceControl\\bin\\devctrlaction64.exe") and
process.hash.sha256 != "8ba8760bcb924e1e7943c3008a80006b29737808cc41a93cabcfeaaec9785276" and
not process.parent.executable :
("C:\\Program Files (x86)\\MspPlatform\\PME\\Installers\\RequestHandlerAgentSetup.exe",
"C:\\Program Files\\LANDESK\\Shavlik Protect Agent\\STAgentUpdater.exe",
"C:\\Program Files\\AzureConnectedMachineAgent\\GCArcService\\GC\\gc_worker.exe",
"C:\\Windows\\CCM\\Ccm32BitLauncher.exe",
"C:\\Program Files (x86)\\Common Files\\Pulse Secure\\JUNS\\PulseSecureService.exe",
"C:\\Program Files\\Windows Defender Advanced Threat Protection\\SenseNdr.exe",
"C:\\Program Files (x86)\\Lenovo\\VantageService\\*\\ScheduleEventAction.exe") and
not (process.code_signature.subject_name in ("Sophos Ltd", "Entrust Datacard Corporation", "Com4Cure GmbH", "Martin Prikryl", "Stellar Cyber Inc", "Nmap Software LLC", "SimpleHelp Ltd") and
process.code_signature.trusted == true) and
not (process.executable : "C:\\Program Files (x86)\\Microsoft\\EdgeUpdate\\MicrosoftEdgeUpdate.exe" and
process.parent.executable : "C:\\Program Files (x86)\\Microsoft\\EdgeUpdate\\MicrosoftEdgeUpdate.exe") and
not (process.parent.executable : "C:\\Program Files\\Windows Defender Advanced Threat Protection\\SenseNdr.exe" and
process.executable : ("C:\\Windows\\System32\\DriverStore\\FileRepository\\*.exe", "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe")) and
not (process.parent.executable : "C:\\Windows\\Microsoft.NET\\Framework\\*\\ngentask.exe" and
process.executable : "C:\\Windows\\Microsoft.NET\\Framework\\*\\ngen.exe") and
not (process.parent.executable : "C:\\Windows\\System32\\winlogon.exe" and process.executable : "C:\\Windows\\System32\\LogonUI.exe") and
not (process.parent.executable : "C:\\Windows\\System32\\msiexec.exe" and process.executable : "C:\\Windows\\SysWOW64\\msiexec.exe") and
not (process.parent.executable : "C:\\Windows\\System32\\SearchIndexer.exe" and process.executable : "C:\\Windows\\System32\\SearchFilterHost.exe") and
not (process.executable : "C:\\Windows\\System32\\WerFault.exe" and process.parent.thread.Ext.call_stack_summary == "ntdll.dll|kernelbase.dll|faultrep.dll|wersvc.dll|ntdll.dll|kernel32.dll|ntdll.dll") and
not (process.executable : "C:\\Program Files (x86)\\Microsoft\\EdgeUpdate\\Install\\*.tmp\\setup.exe" and
process.parent.executable : "C:\\Program Files (x86)\\Microsoft\\EdgeUpdate\\Install\\*.tmp\\setup.exe")
] by process.parent.entity_id
'''
min_endpoint_version = "8.7.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1134"
name = "Access Token Manipulation"
reference = "https://attack.mitre.org/techniques/T1134/"
[[threat.technique.subtechnique]]
id = "T1134.001"
name = "Token Impersonation/Theft"
reference = "https://attack.mitre.org/techniques/T1134/001/"
[[threat.technique.subtechnique]]
id = "T1134.002"
name = "Create Process with Token"
reference = "https://attack.mitre.org/techniques/T1134/002/"
[threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
[internal]
min_endpoint_version = "8.7.0"
Stages and Predicates
Ordered sequence: each step below must occur in order within 3m, correlated by process.entity_id, process.parent.entity_id.
Stage 1: process
[process where event.action == "start" and
(user.id : ("S-1-5-17", "S-1-5-19", "S-1-5-20", "S-1-5-32-568") or user.domain : "IIS AppPool") and
not process.executable :
("?:\\Windows\\Syswow64\\wbem\\wmiprvse.exe",
"?:\\Windows\\system32\\wbem\\wmiprvse.exe",
"?:\\WINDOWS\\system32\\svchost.exe",
"?:\\Windows\\System32\\sppsvc.exe",
"C:\\Windows\\System32\\taskhost.exe",
"?:\\Windows\\system32\\printfilterpipelinesvc.exe",
"?:\\Windows\\syswow64\\printfilterpipelinesvc.exe",
"?:\\Windows\\System32\\appidcertstorecheck.exe",
"\\Device\\HarddiskVolume*\\Windows\\System32\\printfilterpipelinesvc.exe",
"\\Device\\HarddiskVolume*\\Windows\\System32\\wbem\\wmiprvse.exe",
"C:\\Windows\\System32\\Speech_OneCore\\Common\\SpeechModelDownload.exe") and
not (process.name : "rundll32.exe" and process.args : "?:\\WINDOWS\\sys*\\davclnt.dll,DavSetCookie") and
not (process.executable : "C:\\Windows\\System32\\conhost.exe" and
process.parent.executable : ("C:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MpCmdRun.exe",
"C:\\Program Files\\Windows Defender\\mpcmdrun.exe")) and
not (process.parent.executable : "C:\\Program Files\\Windows Defender Advanced Threat Protection\\MsSense.exe" and
process.executable : "C:\\Program Files\\Windows Defender Advanced Threat Protection\\Classification\\SenseCE.exe") and
not (process.parent.executable : "?:\\ProgramData\\Microsoft\\Windows Defender\\platform\\*\\MsMpEng.exe" and
process.executable : "?:\\ProgramData\\Microsoft\\Windows Defender\\platform\\*\\MpCmdRun.exe")
] by process.entity_id
Stage 2: process
[process where event.action == "start" and user.id : "S-1-5-18" and
(
_arraysearch(process.parent.thread.Ext.call_stack, $entry, $entry.symbol_info : ("*CreateProcessAsUser*", "*CreateProcessWithToken*")) or
process.parent.thread.Ext.call_stack_summary :
("ntdll.dll|Unbacked",
"ntdll.dll|kernelbase.dll|Unbacked",
"ntdll.dll|kernelbase.dll|Unknown",
"ntdll.dll|kernelbase.dll|kernel32.dll|Unbacked",
"ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|kernelbase.dll|Unbacked",
"ntdll.dll|wow64.dll|wow64cpu.dll|wow64.dll|ntdll.dll|kernelbase.dll|Unbacked|kernel32.dll|ntdll.dll") or
(_arraysearch(process.parent.thread.Ext.call_stack, $entry, $entry.symbol_info : "*KernelBase.dll!CreateProcessInternal*") and
not _arraysearch(process.parent.thread.Ext.call_stack, $entry,
$entry.symbol_info : ("*kernel32.dll!CreateProcess*", "*CreateProcessAsUser*", "*CreateProcessWithToken*", "*KernelBase.dll!CreateProcessA+*", "KernelBase.dll!CreateProcessW")))
) and
not (process.executable : "?:\\Program Files (x86)\\Lenovo\\System Update\\uncsetting.exe" and
process.parent.executable : "?:\\Windows\\Microsoft.NET\\Framework64\\*\\csc.exe") and
not (process.executable : "C:\\Program Files (x86)\\Google\\GoogleUpdater\\*\\updater.exe" and
process.parent.executable == "C:\\Windows\\System32\\appidcertstorecheck.exe") and
not (process.executable == "C:\\Program Files (x86)\\Microsoft\\EdgeUpdate\\MicrosoftEdgeUpdate.exe" and
process.parent.executable in
("C:\\Program Files\\Windows Defender\\MpCmdRun.exe",
"C:\\Program Files\\Windows Defender Advanced Threat Protection\\SenseNdr.exe",
"C:\\Program Files\\Windows Defender Advanced Threat Protection\\Classification\\SenseCE.exe")) and
not (process.executable : "C:\\Program Files\\Portrait Displays\\HP Display Control Service\\DeviceCheck.exe" and
process.parent.executable : "C:\\Windows\\System32\\pacjsworker.exe") and
not (process.executable : ("C:\\Windows\\Microsoft.NET\\Framework\\*\\csc.exe", "C:\\Windows\\SysWOW64\\cmd.exe") and
process.parent.executable : "C:\\Program Files (x86)\\Tanium\\Tanium Client\\TaniumClient.exe") and
not (process.executable : "?:\\Windows\\SysWOW64\\bitsadmin.exe" and process.parent.executable : "?:\\Windows\\SysWOW64\\cmd.exe") and
not process.executable :
("C:\\Program Files\\HP\\hpssacli\\bin\\hpssacli.exe",
"C:\\Program Files (x86)\\ManageSoft\\Uploader\\ndupload.exe",
"C:\\Program Files (x86)\\Google\\GoogleUpdater\\*\\updater.exe",
"C:\\Program Files\\Npcap\\NPFInstall.exe",
"C:\\Program Files (x86)\\ManageEngine\\UEMS_Agent\\bin\\metroapps.exe",
"C:\\Program Files (x86)\\Google\\Update\\GoogleUpdate.exe",
"C:\\Program Files (x86)\\SolarWinds\\Agent\\Plugins\\ADMProbe\\nping.exe",
"C:\\Program Files (x86)\\ManageEngine\\UEMS_Agent\\DeviceControl\\bin\\devctrlaction64.exe") and
process.hash.sha256 != "8ba8760bcb924e1e7943c3008a80006b29737808cc41a93cabcfeaaec9785276" and
not process.parent.executable :
("C:\\Program Files (x86)\\MspPlatform\\PME\\Installers\\RequestHandlerAgentSetup.exe",
"C:\\Program Files\\LANDESK\\Shavlik Protect Agent\\STAgentUpdater.exe",
"C:\\Program Files\\AzureConnectedMachineAgent\\GCArcService\\GC\\gc_worker.exe",
"C:\\Windows\\CCM\\Ccm32BitLauncher.exe",
"C:\\Program Files (x86)\\Common Files\\Pulse Secure\\JUNS\\PulseSecureService.exe",
"C:\\Program Files\\Windows Defender Advanced Threat Protection\\SenseNdr.exe",
"C:\\Program Files (x86)\\Lenovo\\VantageService\\*\\ScheduleEventAction.exe") and
not (process.code_signature.subject_name in ("Sophos Ltd", "Entrust Datacard Corporation", "Com4Cure GmbH", "Martin Prikryl", "Stellar Cyber Inc", "Nmap Software LLC", "SimpleHelp Ltd") and
process.code_signature.trusted == true) and
not (process.executable : "C:\\Program Files (x86)\\Microsoft\\EdgeUpdate\\MicrosoftEdgeUpdate.exe" and
process.parent.executable : "C:\\Program Files (x86)\\Microsoft\\EdgeUpdate\\MicrosoftEdgeUpdate.exe") and
not (process.parent.executable : "C:\\Program Files\\Windows Defender Advanced Threat Protection\\SenseNdr.exe" and
process.executable : ("C:\\Windows\\System32\\DriverStore\\FileRepository\\*.exe", "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe")) and
not (process.parent.executable : "C:\\Windows\\Microsoft.NET\\Framework\\*\\ngentask.exe" and
process.executable : "C:\\Windows\\Microsoft.NET\\Framework\\*\\ngen.exe") and
not (process.parent.executable : "C:\\Windows\\System32\\winlogon.exe" and process.executable : "C:\\Windows\\System32\\LogonUI.exe") and
not (process.parent.executable : "C:\\Windows\\System32\\msiexec.exe" and process.executable : "C:\\Windows\\SysWOW64\\msiexec.exe") and
not (process.parent.executable : "C:\\Windows\\System32\\SearchIndexer.exe" and process.executable : "C:\\Windows\\System32\\SearchFilterHost.exe") and
not (process.executable : "C:\\Windows\\System32\\WerFault.exe" and process.parent.thread.Ext.call_stack_summary == "ntdll.dll|kernelbase.dll|faultrep.dll|wersvc.dll|ntdll.dll|kernel32.dll|ntdll.dll") and
not (process.executable : "C:\\Program Files (x86)\\Microsoft\\EdgeUpdate\\Install\\*.tmp\\setup.exe" and
process.parent.executable : "C:\\Program Files (x86)\\Microsoft\\EdgeUpdate\\Install\\*.tmp\\setup.exe")
] by process.parent.entity_id
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"start" |
process.hash.sha256 | ne |
| field:"Hashes" kind:ne value:"8ba8760bcb924e1e7943c3008a80006b29737808cc41a93cabcfeaaec9785276" |
process.parent.thread.Ext.call_stack_summary | wildcard |
| field:"process.parent.thread.Ext.call_stack_summary" kind:wildcard |
user.domain | wildcard |
| field:"TargetDomainName" kind:wildcard value:"IIS AppPool" |
user.id | wildcard |
| field:"user.id" kind:wildcard |
Exclusions
The rule actively suppresses these predicates.
Process Creation via Secondary Logon
#Identifies process creation with alternate credentials. Adversaries may create a new process with a different token to escalate privileges and bypass access controls.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2022/08/30"
integration = ["system", "windows"]
maturity = "production"
updated_date = "2026/05/04"
[rule]
author = ["Elastic"]
description = """
Identifies process creation with alternate credentials. Adversaries may create a new process with a different token to
escalate privileges and bypass access controls.
"""
from = "now-9m"
index = ["logs-system.security*", "logs-windows.forwarded*", "winlogbeat-*"]
language = "eql"
license = "Elastic License v2"
name = "Process Creation via Secondary Logon"
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 Process Creation via Secondary Logon
The Secondary Logon service in Windows allows users to run processes with different credentials, facilitating legitimate administrative tasks. However, adversaries can exploit this to escalate privileges by creating processes with alternate tokens, bypassing access controls. The detection rule identifies such abuse by monitoring successful logins via the Secondary Logon service and subsequent process creation, linking them through unique logon identifiers.
### Possible investigation steps
- Review the event logs for the specific TargetLogonId to identify the user account associated with the process creation and verify if the account is authorized to use alternate credentials.
- Examine the source IP address "::1" to confirm if the process creation originated from the local machine, which might indicate a local privilege escalation attempt.
- Investigate the process name "svchost.exe" to determine if it is being used legitimately or if it has been exploited for malicious purposes, such as running unauthorized services.
- Check the sequence of events within the 1-minute maxspan to identify any unusual or suspicious activities that occurred immediately before or after the process creation.
- Correlate the detected activity with other security alerts or logs to identify any patterns or additional indicators of compromise that might suggest a broader attack campaign.
### False positive analysis
- Legitimate administrative tasks using the Secondary Logon service can trigger alerts. To manage this, identify and whitelist specific administrative accounts or tasks that frequently use this service for legitimate purposes.
- Scheduled tasks or automated scripts that use alternate credentials for routine operations may cause false positives. Review and exclude these tasks by creating exceptions for known scripts or scheduled jobs.
- Internal IT support activities often involve using alternate credentials for troubleshooting or maintenance. Document and exclude these activities by maintaining a list of support personnel and their typical actions.
- Software updates or installations that require elevated privileges might be flagged. Monitor and exclude these processes by identifying and documenting the update mechanisms used within the organization.
- Development or testing environments where alternate credentials are used for testing purposes can generate alerts. Exclude these environments by setting up specific rules that recognize and ignore these non-production activities.
### Response and remediation
- Immediately isolate the affected system from the network to prevent further unauthorized access or lateral movement by the adversary.
- Terminate any suspicious processes identified as being created via the Secondary Logon service, especially those linked to the unique logon identifiers from the alert.
- Review and revoke any alternate credentials or tokens used in the suspicious process creation to prevent further misuse.
- Conduct a thorough examination of the affected system for additional signs of compromise, such as unauthorized user accounts or changes to system configurations.
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine the full scope of the breach.
- Implement stricter access controls and monitoring on the Secondary Logon service to detect and prevent similar privilege escalation attempts in the future.
- Update and reinforce endpoint detection and response (EDR) solutions to enhance monitoring of process creation events and logon activities, ensuring they are aligned with the latest threat intelligence."""
references = ["https://attack.mitre.org/techniques/T1134/002/"]
risk_score = 47
rule_id = "42eeee3d-947f-46d3-a14d-7036b962c266"
setup = """## Setup
Audit Logon must be enabled to generate the events used by this rule.
Setup instructions: https://ela.st/audit-logon
"""
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Privilege Escalation",
"Data Source: Windows Security Event Logs",
"Resources: Investigation Guide",
]
type = "eql"
query = '''
sequence by winlog.computer_name with maxspan=1m
[authentication where host.os.type == "windows" and event.action:"logged-in" and
event.outcome == "success" and user.id : ("S-1-5-21-*", "S-1-12-1-*") and
/* seclogon service */
process.name == "svchost.exe" and
winlog.event_data.LogonProcessName : "seclogo*" and source.ip == "::1" ] by winlog.event_data.TargetLogonId
[process where host.os.type == "windows" and event.type == "start"] by winlog.event_data.TargetLogonId
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1134"
name = "Access Token Manipulation"
reference = "https://attack.mitre.org/techniques/T1134/"
[[rule.threat.technique.subtechnique]]
id = "T1134.002"
name = "Create Process with Token"
reference = "https://attack.mitre.org/techniques/T1134/002/"
[[rule.threat.technique.subtechnique]]
id = "T1134.003"
name = "Make and Impersonate Token"
reference = "https://attack.mitre.org/techniques/T1134/003/"
[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 winlog.computer_name, winlog.event_data.TargetLogonId.
Stage 1: authentication
[authentication where host.os.type == "windows" and event.action:"logged-in" and
event.outcome == "success" and user.id : ("S-1-5-21-*", "S-1-12-1-*") and
process.name == "svchost.exe" and
winlog.event_data.LogonProcessName : "seclogo*" and source.ip == "::1" ] by winlog.event_data.TargetLogonId
Stage 2: process
[process where host.os.type == "windows" and event.type == "start"] by winlog.event_data.TargetLogonId
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | wildcard |
| field:"EventType" kind:wildcard value:"logged-in" |
event.outcome | eq |
| field:"event.outcome" kind:eq value:"success" |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.name | eq |
| field:"process_basename" kind:eq value:"svchost.exe" |
source.ip | eq |
| field:"src_ip" kind:eq value:"::1" |
user.id | wildcard |
| field:"user.id" kind:wildcard |
winlog.event_data.LogonProcessName | wildcard |
| field:"LogonProcessName" kind:wildcard value:"seclogo*" |
Process Started with Executable Stack
#This rule monitors the syslog log file for messages related to instances of processes that are started with an executable stack. This can be an indicator of a process that is attempting to execute code from the stack, which can be a security risk.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Rule Body
[metadata]
creation_date = "2025/01/07"
integration = ["system"]
maturity = "production"
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = """
This rule monitors the syslog log file for messages related to instances of processes that are started with an executable
stack. This can be an indicator of a process that is attempting to execute code from the stack, which can be a security risk.
"""
from = "now-9m"
index = ["logs-system.syslog-*"]
language = "kuery"
license = "Elastic License v2"
name = "Process Started with Executable Stack"
risk_score = 21
rule_id = "fc5105ce-2584-48b6-a0cf-9ace7eeffd3c"
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: Execution",
"Data Source: System",
"Resources: Investigation Guide"
]
timestamp_override = "event.ingested"
type = "query"
query = '''
host.os.type:"linux" and data_stream.dataset:"system.syslog" and process.name:"kernel" and
message:"started with executable stack"
'''
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 Process Started with Executable Stack
In Linux environments, processes with executable stacks can pose security risks as they may allow code execution from the stack, a behavior often exploited by attackers to run arbitrary code. Adversaries might leverage this to execute malicious scripts or commands. The detection rule monitors syslog for kernel messages indicating such processes, flagging potential threats for further investigation.
### Possible investigation steps
- Review the syslog entries to identify the specific process that triggered the alert, focusing on the message field containing "started with executable stack".
- Investigate the process name and associated command-line arguments to understand the nature and purpose of the process.
- Check the process's parent process to determine if it was spawned by a legitimate application or service.
- Analyze the user account under which the process is running to assess if it aligns with expected behavior and permissions.
- Look for any recent changes or anomalies in the system that might correlate with the process start time, such as new software installations or configuration changes.
- Cross-reference the process with known threat intelligence sources to identify if it matches any known malicious patterns or indicators.
### False positive analysis
- Development tools and environments may intentionally use executable stacks for legitimate purposes, such as certain debugging or testing scenarios. Users can create exceptions for these specific tools by identifying their process names and excluding them from the detection rule.
- Some legacy applications might require executable stacks due to outdated coding practices. Users should verify the necessity of these applications and, if deemed non-threatening, add them to an exclusion list based on their process names or paths.
- Custom scripts or applications developed in-house might inadvertently use executable stacks. Conduct a review of these scripts to ensure they are safe, and if so, exclude them from monitoring by specifying their unique identifiers.
- Certain system utilities or libraries might trigger this rule during normal operations. Users should consult documentation or vendor support to confirm if these are expected behaviors and exclude them accordingly if they pose no risk.
### Response and remediation
- Immediately isolate the affected system from the network to prevent potential lateral movement by the attacker.
- Terminate the suspicious process identified with an executable stack to halt any ongoing malicious activity.
- Conduct a thorough analysis of the process and its associated files to identify any malicious payloads or scripts that may have been executed.
- Restore the system from a known good backup if any unauthorized changes or malware are detected.
- Apply security patches and updates to the operating system and applications to mitigate vulnerabilities that could be exploited by similar threats.
- Implement stack protection mechanisms such as stack canaries or non-executable stack configurations to prevent future exploitation.
- Escalate the incident to the security operations team for further investigation and to assess the need for additional security measures."""
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[rule.threat.technique.subtechnique]]
id = "T1059.004"
name = "Unix Shell"
reference = "https://attack.mitre.org/techniques/T1059/004/"
[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1620"
name = "Reflective Code Loading"
reference = "https://attack.mitre.org/techniques/T1620/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
Stages and Predicates
Stage 1: query
host.os.type:"linux" and data_stream.dataset:"system.syslog" and process.name:"kernel" and
message:"started with executable stack"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
data_stream.dataset | eq |
| field:"data_stream.dataset" kind:eq value:"system.syslog" |
message | eq |
| field:"message" kind:eq value:"started with executable stack" |
process.name | eq |
| field:"process_basename" kind:eq value:"kernel" |
Scheduled Tasks AT Command Enabled
#Identifies attempts to enable the Windows scheduled tasks AT command via the registry. Attackers may use this method to move laterally or persist locally. The AT command has been deprecated since Windows 8 and Windows Server 2012, but still exists for backwards compatibility.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Defense Impairment |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2020/11/23"
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
maturity = "production"
updated_date = "2026/05/04"
[rule]
author = ["Elastic"]
description = """
Identifies attempts to enable the Windows scheduled tasks AT command via the registry. Attackers may use this method to
move laterally or persist locally. The AT command has been deprecated since Windows 8 and Windows Server 2012, but still
exists for backwards compatibility.
"""
from = "now-9m"
index = [
"winlogbeat-*",
"logs-endpoint.events.registry-*",
"logs-windows.sysmon_operational-*",
"endgame-*",
"logs-m365_defender.event-*",
"logs-sentinel_one_cloud_funnel.*",
"logs-crowdstrike.fdr*",
]
language = "eql"
license = "Elastic License v2"
name = "Scheduled Tasks AT Command Enabled"
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 Scheduled Tasks AT Command Enabled
The AT command, a legacy Windows utility, schedules tasks for execution, often used for automation. Despite its deprecation post-Windows 8, it remains for compatibility, posing a security risk. Attackers exploit it to maintain persistence or move laterally. The detection rule monitors registry changes enabling this command, flagging potential misuse by checking specific registry paths and values indicative of enabling the AT command.
### Possible investigation steps
- Review the registry event logs to confirm the change in the registry path "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Schedule\\Configuration\\EnableAt" and verify if the value was set to "1" or "0x00000001".
- Identify the user account and process responsible for the registry change by examining the event logs for associated user and process information.
- Check for any scheduled tasks created or modified around the time of the registry change to determine if the AT command was used to schedule any tasks.
- Investigate the system for any signs of lateral movement or persistence mechanisms that may have been established using the AT command.
- Correlate the event with other security alerts or logs from data sources like Elastic Endgame, Elastic Defend, Sysmon, Microsoft Defender XDR, or SentinelOne to gather additional context and assess the scope of potential malicious activity.
### False positive analysis
- System administrators or IT management tools may enable the AT command for legacy support or compatibility testing. Verify if the change aligns with scheduled maintenance or updates.
- Some enterprise environments might have legacy applications that rely on the AT command for task scheduling. Confirm with application owners if such dependencies exist and document them.
- Security software or monitoring tools might trigger registry changes as part of their normal operation. Cross-reference with logs from these tools to ensure the change is benign.
- If a specific user or system frequently triggers this alert without malicious intent, consider creating an exception for that user or system in your monitoring solution to reduce noise.
- Regularly review and update the list of exceptions to ensure they remain relevant and do not inadvertently allow malicious activity.
### Response and remediation
- Immediately isolate the affected system from the network to prevent further lateral movement or persistence by the attacker.
- Review the registry changes identified in the alert to confirm unauthorized enabling of the AT command. Revert the registry setting to its secure state by setting the value to "0" or "0x00000000".
- 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 software or scripts.
- Investigate user accounts and permissions on the affected system to ensure no unauthorized accounts or privilege escalations have occurred. Reset passwords for any compromised accounts.
- Monitor network traffic and logs for any signs of data exfiltration or communication with known malicious IP addresses or domains.
- Escalate the incident to the security operations center (SOC) or incident response team for further analysis and to determine if additional systems are affected.
- Implement enhanced monitoring and alerting for similar registry changes across the network to detect and respond to future attempts promptly."""
references = ["https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-scheduledjob"]
risk_score = 47
rule_id = "9aa0e1f6-52ce-42e1-abb3-09657cee2698"
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Defense Evasion",
"Tactic: Execution",
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Sysmon",
"Data Source: Microsoft Defender XDR",
"Data Source: SentinelOne",
"Data Source: Crowdstrike",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
registry where host.os.type == "windows" and event.type == "change" and
registry.value : "EnableAt" and
registry.data.strings : ("1", "0x00000001")
'''
setup = """## Setup
This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
Setup instructions: https://ela.st/install-elastic-defend
### Additional data sources
This rule also supports the following third-party data sources. For setup instructions, refer to the links below:
- [CrowdStrike](https://ela.st/crowdstrike-integration)
- [Microsoft Defender XDR](https://ela.st/m365-defender)
- [SentinelOne Cloud Funnel](https://ela.st/sentinel-one-cloud-funnel)
- [Sysmon Registry Events](https://ela.st/sysmon-event-reg-setup)
"""
[[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.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1053"
name = "Scheduled Task/Job"
reference = "https://attack.mitre.org/techniques/T1053/"
[[rule.threat.technique.subtechnique]]
id = "T1053.002"
name = "At"
reference = "https://attack.mitre.org/techniques/T1053/002/"
[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
Stages and Predicates
Stage 1: registry
registry where host.os.type == "windows" and event.type == "change" and
registry.value : "EnableAt" and
registry.data.strings : ("1", "0x00000001")
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"change" |
registry.data.strings | wildcard |
| field:"Details" kind:wildcard |
registry.value | wildcard |
| field:"registry_value_name" kind:wildcard value:"EnableAt" |
Suspicious Browser Preferences File Modification
#Identifies the modification of commonly used browsers settings via Preferences change. Adversaries may install a rogue browser extension or disable certain browser hardening settings to maintain persistence or evade restrictions.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Rule Body
[rule]
description = """
Identifies the modification of commonly used browsers settings via Preferences change. Adversaries may install a rogue
browser extension or disable certain browser hardening settings to maintain persistence or evade restrictions.
"""
id = "5d51b060-3285-4e2f-9197-74f980a6cdb0"
license = "Elastic License v2"
name = "Suspicious Browser Preferences File Modification"
os_list = ["windows"]
reference = ["https://syntax-err0r.github.io/Silently_Install_Chrome_Extension.html"]
version = "1.0.6"
query = '''
file where event.action == "overwrite" and file.name : ("Preferences", "Secure Preferences") and
process.executable != null and
file.path :
("?:\\Users\\*\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Preferences",
"?:\\Users\\*\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Secure Preferences",
"?:\\users\\*\\appdata\\local\\microsoft\\edge\\user data\\default\\Preferences",
"?:\\users\\*\\appdata\\local\\microsoft\\edge\\user data\\default\\Secure Preferences") and
not user.id : ("S-1-5-18", "S-1-5-19", "S-1-5-19") and
not process.executable :
("?:\\Program Files\\*.exe",
"?:\\Program Files (x86)\\*.exe",
"C:\\Windows\\explorer.exe",
"C:\\Windows\\System32\\xcopy.exe",
"C:\\Windows\\System32\\Robocopy.exe",
"C:\\Windows\\System32\\wscript.exe",
"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"C:\\Users\\*\\AppData\\Local\\Microsoft\\DefaultSetup\\DefaultSetup.exe",
"C:\\Users\\*\\.cache\\selenium\\chromedriver\\win64\\138.0.7204.157\\chromedriver.exe") and
not (process.code_signature.subject_name : "Microsoft*" and process.code_signature.trusted == true and
process.executable : ("?:\\Users\\*\\AppData\\Local\\Microsoft\\EdgeWebView\\Application\\*\\msedgewebview2.exe",
"?:\\Users\\*\\AppData\\Local\\Microsoft\\Edge SxS\\Application\\msedge.exe",
"?:\\Users\\*\\AppData\\Local\\Microsoft\\Edge\\Application\\msedge.exe",
"?:\\Users\\*\\AppData\\Local\\Temp\\IXP???.TMP\\MEDefaultPCReset.exe")) and
not (process.code_signature.trusted == true and
process.code_signature.subject_name :
("Google LLC", "PASSWORD BOSS LLC", "Piriform Ltd", "Piriform Software Ltd", "UiPath, Inc.",
"Gen Digital Inc.", "SOFT SOLUTIONS HUB LLC", "PIRIFORM SOFTWARE LIMITED", "SOFT SOLUTIONS HUB LLC",
"Guangxi Yunao Network Technology Co. Ltd.", "Andrew Ziem", "ECHO INFINI SDN. BHD."))
'''
min_endpoint_version = "8.1.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1176"
name = "Software Extensions"
reference = "https://attack.mitre.org/techniques/T1176/"
[[threat.technique.subtechnique]]
id = "T1176.001"
name = "Browser Extensions"
reference = "https://attack.mitre.org/techniques/T1176/001/"
[threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[internal]
min_endpoint_version = "8.1.0"
Stages and Predicates
Stage 1: file
file where event.action == "overwrite" and file.name : ("Preferences", "Secure Preferences") and
process.executable != null and
file.path :
("?:\\Users\\*\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Preferences",
"?:\\Users\\*\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Secure Preferences",
"?:\\users\\*\\appdata\\local\\microsoft\\edge\\user data\\default\\Preferences",
"?:\\users\\*\\appdata\\local\\microsoft\\edge\\user data\\default\\Secure Preferences") and
not user.id : ("S-1-5-18", "S-1-5-19", "S-1-5-19") and
not process.executable :
("?:\\Program Files\\*.exe",
"?:\\Program Files (x86)\\*.exe",
"C:\\Windows\\explorer.exe",
"C:\\Windows\\System32\\xcopy.exe",
"C:\\Windows\\System32\\Robocopy.exe",
"C:\\Windows\\System32\\wscript.exe",
"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"C:\\Users\\*\\AppData\\Local\\Microsoft\\DefaultSetup\\DefaultSetup.exe",
"C:\\Users\\*\\.cache\\selenium\\chromedriver\\win64\\138.0.7204.157\\chromedriver.exe") and
not (process.code_signature.subject_name : "Microsoft*" and process.code_signature.trusted == true and
process.executable : ("?:\\Users\\*\\AppData\\Local\\Microsoft\\EdgeWebView\\Application\\*\\msedgewebview2.exe",
"?:\\Users\\*\\AppData\\Local\\Microsoft\\Edge SxS\\Application\\msedge.exe",
"?:\\Users\\*\\AppData\\Local\\Microsoft\\Edge\\Application\\msedge.exe",
"?:\\Users\\*\\AppData\\Local\\Temp\\IXP???.TMP\\MEDefaultPCReset.exe")) and
not (process.code_signature.trusted == true and
process.code_signature.subject_name :
("Google LLC", "PASSWORD BOSS LLC", "Piriform Ltd", "Piriform Software Ltd", "UiPath, Inc.",
"Gen Digital Inc.", "SOFT SOLUTIONS HUB LLC", "PIRIFORM SOFTWARE LIMITED", "SOFT SOLUTIONS HUB LLC",
"Guangxi Yunao Network Technology Co. Ltd.", "Andrew Ziem", "ECHO INFINI SDN. BHD."))
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"overwrite" |
file.name | wildcard |
| field:"file.name" kind:wildcard |
file.path | wildcard |
| field:"TargetFilename" kind:wildcard |
process.executable | is_not_null | field:"Image" kind:is_not_null |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.code_signature.subject_name | eq | Google LLC, PASSWORD BOSS LLC, Piriform Ltd, Piriform Software Ltd, UiPath, Inc., Gen Digital Inc., SOFT SOLUTIONS HUB LLC, PIRIFORM SOFTWARE LIMITED, SOFT SOLUTIONS HUB LLC, Guangxi Yunao Network Technology Co. Ltd., Andrew Ziem, ECHO INFINI SDN. BHD. | excludes:process.code_signature.subject_name |
process.code_signature.trusted | eq | true | excludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true" |
process.code_signature.subject_name | starts_with | Microsoft | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Microsoft" |
process.executable | wildcard | ?:\Users\*\AppData\Local\Microsoft\EdgeWebView\Application\*\msedgewebview2.exe, ?:\Users\*\AppData\Local\Microsoft\Edge SxS\Application\msedge.exe, ?:\Users\*\AppData\Local\Microsoft\Edge\Application\msedge.exe, ?:\Users\*\AppData\Local\Temp\IXP???.TMP\MEDefaultPCReset.exe | excludes:process.executable |
process.executable | wildcard | ?:\Program Files\*.exe, ?:\Program Files (x86)\*.exe, C:\Windows\explorer.exe, C:\Windows\System32\xcopy.exe, C:\Windows\System32\Robocopy.exe, C:\Windows\System32\wscript.exe, C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe, C:\Users\*\AppData\Local\Microsoft\DefaultSetup\DefaultSetup.exe, C:\Users\*\.cache\selenium\chromedriver\win64\138.0.7204.157\chromedriver.exe | excludes:process.executable |
user.id | eq | S-1-5-18, S-1-5-19, S-1-5-19 | excludes:user.id field:"user.id" value:"S-1-5-18" field:"user.id" value:"S-1-5-19" field:"user.id" value:"S-1-5-19" |
Suspicious Powershell Child Process
#Detects when Powershell (pwsh) spawns a highly abnormal or suspicious child process. Powershell usage on macOS is extremely rare but usage of Powershell to spawn a process like curl or osascript is almost always indicative of malicious behavior.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Rule Body
[rule]
description = """
Detects when Powershell (pwsh) spawns a highly abnormal or suspicious child process. Powershell usage on macOS is
extremely rare but usage of Powershell to spawn a process like curl or osascript is almost always indicative of
malicious behavior.
"""
id = "72f9191c-f099-4349-8c73-794b4ee8c4ea"
license = "Elastic License v2"
name = "Suspicious Powershell Child Process"
os_list = ["macos"]
version = "1.0.15"
query = '''
process where event.type == "start" and
(process.parent.name == "pwsh" or process.Ext.effective_parent.name == "pwsh") and
process.name like~ ("curl", "nscurl", "osascript") and
not process.args like~ "http://localhost*" and
not (
process.parent.code_signature.team_id == "UBF8T346G9" and process.parent.code_signature.trusted == true and
process.args == "--aws-sigv4" and process.args like~ "aws:amz:*:monitoring" and process.args == "--config"
)
'''
min_endpoint_version = "8.8.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.8.0"
Stages and Predicates
Stage 1: process
process where event.type == "start" and
(process.parent.name == "pwsh" or process.Ext.effective_parent.name == "pwsh") and
process.name like~ ("curl", "nscurl", "osascript") and
not process.args like~ "http://localhost*" and
not (
process.parent.code_signature.team_id == "UBF8T346G9" and process.parent.code_signature.trusted == true and
process.args == "--aws-sigv4" and process.args like~ "aws:amz:*:monitoring" and process.args == "--config"
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.Ext.effective_parent.name | eq |
| field:"process.Ext.effective_parent.name" kind:eq value:"pwsh" |
process.name | wildcard |
| field:"process_basename" kind:wildcard |
process.parent.name | eq |
| field:"parent_process_basename" kind:eq value:"pwsh" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.args | eq | --aws-sigv4 | excludes:process.args field:"process.args" value:"--aws-sigv4" |
process.args | eq | --config | excludes:process.args field:"process.args" value:"--config" |
process.args | wildcard | aws:amz:*:monitoring | excludes:process.args field:"process.args" value:"aws:amz:*:monitoring" |
process.parent.code_signature.team_id | eq | UBF8T346G9 | excludes:process.parent.code_signature.team_id field:"process.parent.code_signature.team_id" value:"UBF8T346G9" |
process.parent.code_signature.trusted | eq | true | excludes:process.parent.code_signature.trusted field:"process.parent.code_signature.trusted" value:"true" |
process.args | starts_with | http://localhost | excludes:process.args field:"process.args" value:"http://localhost" |
Telnet Authentication Bypass via User Environment Variable
#Identifies potential exploitation of a Telnet remote authentication bypass vulnerability (CVE-2026-24061) in GNU Inetutils telnetd. The vulnerability allows unauthenticated access by supplying a crafted -f <username> value via the USER environment variable, resulting in a login process spawned with elevated privileges.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Privilege Escalation | |
| Lateral Movement |
Rule Body
[metadata]
creation_date = "2026/01/26"
integration = ["auditd_manager"]
maturity = "production"
updated_date = "2026/03/24"
[rule]
author = ["Elastic"]
description = """
Identifies potential exploitation of a Telnet remote authentication bypass vulnerability (CVE-2026-24061) in GNU Inetutils
telnetd. The vulnerability allows unauthenticated access by supplying a crafted `-f <username>` value via the `USER` environment
variable, resulting in a login process spawned with elevated privileges.
"""
from = "now-9m"
index = ["auditbeat-*", "logs-auditd_manager.auditd-*"]
language = "eql"
license = "Elastic License v2"
name = "Telnet Authentication Bypass via User Environment Variable"
note = """## Triage and analysis
### Investigating Telnet Authentication Bypass via User Environment Variable
CVE-2026-24061 is a critical authentication bypass vulnerability affecting `telnetd` in GNU Inetutils. By supplying a
crafted `-f root` value through the USER environment variable, a remote attacker can bypass authentication and gain
unauthorized root-level access. This exploit results in the `login` process being executed with attacker-controlled
arguments, typically spawned by `telnetd` or via `xinetd`.
This rule detects suspicious `login` executions associated with Telnet services that include the `-f` flag, which
forces authentication as a specified user and is indicative of exploitation attempts.
#### Possible investigation steps
- Investigate the process execution chain (parent process tree) for the suspicious `login` process.
- Confirm whether `login` was spawned by `telnetd` or indirectly via `xinetd`.
- Review the command-line arguments passed to `login`, paying special attention to the presence of `-f` and any
attempts to authenticate as `root` or other privileged users.
- Validate whether the Telnet service is expected to be running on the affected host.
- Telnet is deprecated and should rarely be exposed or enabled in modern environments.
- Investigate post-authentication activity originating from the compromised session.
- Look for command execution, file modifications, privilege escalation attempts, or persistence mechanisms.
- Review network connections initiated after the suspicious login event.
- Check for additional alerts or suspicious activity on the same host within the past 48 hours.
- Determine whether the system is running a vulnerable version of GNU Inetutils telnetd.
### False positive analysis
- Legitimate use of the `-f` flag with `login` is extremely rare and typically restricted to trusted, local workflows.
- False positives may occur in highly customized or legacy environments where Telnet is still in use.
- Any benign occurrences should be carefully validated and documented before adding exceptions.
### Related Rules
- Potential Telnet Authentication Bypass (CVE-2026-24061) - "ab7795cc-0e0b-4f9d-a934-1f17a58f869a"
### Response and remediation
- Immediately isolate the affected host to prevent further unauthorized access or lateral movement.
- Terminate suspicious Telnet sessions and collect volatile forensic data where possible.
- Investigate for signs of credential access, persistence, or follow-on exploitation.
- Patch or upgrade GNU Inetutils to a version that addresses CVE-2026-24061.
- Disable the Telnet service entirely if it is not explicitly required.
- Enforce the use of secure alternatives such as SSH for remote administration.
- Rotate credentials for any accounts that may have been exposed or accessed.
- Perform a full system integrity review and antimalware scan.
- Update hardening, monitoring, and logging policies to improve detection of legacy remote access abuse.
"""
references = [
"https://www.safebreach.com/blog/safebreach-labs-root-cause-analysis-and-poc-exploit-for-cve-2026-24061/",
"https://security-tracker.debian.org/tracker/CVE-2026-24061"
]
risk_score = 99
rule_id = "eb3150eb-e9fb-4a64-a0fc-aa66cdd35632"
severity = "critical"
tags = [
"Domain: Endpoint",
"OS: Linux",
"Use Case: Threat Detection",
"Tactic: Initial Access",
"Tactic: Lateral Movement",
"Resources: Investigation Guide",
"Use Case: Vulnerability",
"Data Source: Auditd Manager"
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
sequence by host.id with maxspan=1s
[process where host.os.type == "linux" and event.type == "start" and event.action in ("process_started", "executed") and process.name in ("telnetd", "xinetd")] by process.pid
[process where host.os.type == "linux" and event.type == "start" and event.action in ("process_started", "executed") and process.name == "login" and process.args : "-*f*"] by process.parent.pid
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1190"
name = "Exploit Public-Facing Application"
reference = "https://attack.mitre.org/techniques/T1190/"
[rule.threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1210"
name = "Exploitation of Remote Services"
reference = "https://attack.mitre.org/techniques/T1210/"
[rule.threat.tactic]
id = "TA0008"
name = "Lateral Movement"
reference = "https://attack.mitre.org/tactics/TA0008/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "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/"
Stages and Predicates
Ordered sequence: each step below must occur in order within 1s, correlated by host.id, process.parent.pid, process.pid.
Stage 1: process
[process where host.os.type == "linux" and event.type == "start" and event.action in ("process_started", "executed") and process.name in ("telnetd", "xinetd")] by process.pid
Stage 2: process
[process where host.os.type == "linux" and event.type == "start" and event.action in ("process_started", "executed") and process.name == "login" and process.args : "-*f*"] by process.parent.pid
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | in |
| field:"EventType" kind:in |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args | wildcard |
| field:"process.args" kind:wildcard value:"-*f*" |
process.name | eq |
| field:"process_basename" kind:eq value:"login" |
process.name | in |
| field:"process_basename" kind:in |
UAC Bypass via DelegateExecute Registry Modification
#Identifies attempts to bypass User Account Control (UAC) by modifying the DelegateExecute registry value. Attackers bypass UAC to stealthily execute code with elevated permissions.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation | |
| Defense Impairment |
Rule Body
[rule]
description = """
Identifies attempts to bypass User Account Control (UAC) by modifying the DelegateExecute registry value. Attackers
bypass UAC to stealthily execute code with elevated permissions.
"""
id = "25c41954-5d42-4530-b9cb-bdaf9d028ce7"
license = "Elastic License v2"
name = "UAC Bypass via DelegateExecute Registry Modification"
os_list = ["windows"]
reference = [
"https://medium.com/cybersecpadawan/utilizing-a-common-windows-binary-to-escalate-to-system-privileges-c16482cced4b",
]
version = "1.0.34"
query = '''
sequence by process.entity_id with maxspan=1m
[process where event.action == "start" and
process.Ext.token.integrity_level_name == "medium" and process.executable != null and not
/* excludes OpenWith which is used to delegate handling a file type to a chosen program */
process.executable : ("?:\\Windows\\System32\\OpenWith.exe", "?:\\Windows\\SysWOW64\\OpenWith.exe") and
/* exclude signed third party programs */
not process.executable : ("?:\\Program Files\\*.exe", "?:\\Program Files (x86)\\*.exe") and
not (process.code_signature.subject_name in ("Stanislav Zinukhov", "Google Inc", "IP Zinukhov Stanislav Igorevich", "Vera") and
process.code_signature.trusted == true) and
not process.executable : "?:\\Windows\\explorer.exe" and
not (process.executable : "C:\\Windows\\regedit.exe" and
process.parent.executable : ("C:\\Program Files\\Omnissa\\DEM\\FlexService.exe", "C:\\Program Files\\Immidio\\Flex Profiles\\FlexService.exe"))
]
[registry where
registry.value : "DelegateExecute" and registry.hive : "HKEY_USERS" and
not (process.executable : "?:\\Windows\\regedit.exe" and registry.path : "HKEY_USERS\\S-1-*_Classes\\AppX*\\Shell\\open\\command\\DelegateExecute") and
not process.executable : "?:\\Windows\\explorer.exe"
]
'''
min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1548"
name = "Abuse Elevation Control Mechanism"
reference = "https://attack.mitre.org/techniques/T1548/"
[[threat.technique.subtechnique]]
id = "T1548.002"
name = "Bypass User Account Control"
reference = "https://attack.mitre.org/techniques/T1548/002/"
[threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1112"
name = "Modify Registry"
reference = "https://attack.mitre.org/techniques/T1112/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Ordered sequence: each step below must occur in order within 1m, correlated by process.entity_id.
Stage 1: process
[process where event.action == "start" and
process.Ext.token.integrity_level_name == "medium" and process.executable != null and not
process.executable : ("?:\\Windows\\System32\\OpenWith.exe", "?:\\Windows\\SysWOW64\\OpenWith.exe") and
not process.executable : ("?:\\Program Files\\*.exe", "?:\\Program Files (x86)\\*.exe") and
not (process.code_signature.subject_name in ("Stanislav Zinukhov", "Google Inc", "IP Zinukhov Stanislav Igorevich", "Vera") and
process.code_signature.trusted == true) and
not process.executable : "?:\\Windows\\explorer.exe" and
not (process.executable : "C:\\Windows\\regedit.exe" and
process.parent.executable : ("C:\\Program Files\\Omnissa\\DEM\\FlexService.exe", "C:\\Program Files\\Immidio\\Flex Profiles\\FlexService.exe"))
]
Stage 2: registry
[registry where
registry.value : "DelegateExecute" and registry.hive : "HKEY_USERS" and
not (process.executable : "?:\\Windows\\regedit.exe" and registry.path : "HKEY_USERS\\S-1-*_Classes\\AppX*\\Shell\\open\\command\\DelegateExecute") and
not process.executable : "?:\\Windows\\explorer.exe"
]
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"start" |
process.Ext.token.integrity_level_name | eq |
| field:"process.Ext.token.integrity_level_name" kind:eq value:"medium" |
process.executable | is_not_null | field:"Image" kind:is_not_null | |
registry.hive | wildcard |
| field:"registry.hive" kind:wildcard value:"HKEY_USERS" |
registry.value | wildcard |
| field:"registry_value_name" kind:wildcard value:"DelegateExecute" |
Exclusions
The rule actively suppresses these predicates.
Unusual Network Connection via RunDLL32
#Identifies unusual instances of rundll32.exe making outbound network connections. This may be indicative of adversarial command and control activity.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Rule Body
[rule]
description = """
Identifies unusual instances of rundll32.exe making outbound network connections. This may be indicative of adversarial
command and control activity.
"""
id = "2e708541-c6e8-4ded-923f-78a6c160987e"
license = "Elastic License v2"
name = "Unusual Network Connection via RunDLL32"
os_list = ["windows"]
version = "1.0.35"
query = '''
sequence by process.entity_id with maxspan=5m
[process where event.action == "start" and process.name : "rundll32.exe" and process.args_count == 1 and
not (process.code_signature.subject_name == "Teramind Inc." and
process.code_signature.trusted == true and process.Ext.token.integrity_level_name == "system" and
process.args == "/update" and process.parent.name == "tmagentsvc.exe") and
not process.args : "C:\\Windows\\system32\\rundll32.exe *,*"]
[network where event.action == "connection_attempted" and process.name : "rundll32.exe"]
'''
min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 1
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"
[[threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[[threat.technique.subtechnique]]
id = "T1218.011"
name = "Rundll32"
reference = "https://attack.mitre.org/techniques/T1218/011/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "7.15.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 : "rundll32.exe" and process.args_count == 1 and
not (process.code_signature.subject_name == "Teramind Inc." and
process.code_signature.trusted == true and process.Ext.token.integrity_level_name == "system" and
process.args == "/update" and process.parent.name == "tmagentsvc.exe") and
not process.args : "C:\\Windows\\system32\\rundll32.exe *,*"]
Stage 2: network
[network where event.action == "connection_attempted" and process.name : "rundll32.exe"]
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq |
process.args_count | eq |
| field:"process.args_count" kind:eq value:"1" |
process.name | wildcard |
| field:"process_basename" kind:wildcard value:"rundll32.exe" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.Ext.token.integrity_level_name | eq | system | excludes:process.Ext.token.integrity_level_name field:"process.Ext.token.integrity_level_name" value:"system" |
process.args | eq | /update | excludes:process.args field:"process.args" value:"/update" |
process.code_signature.subject_name | eq | Teramind Inc. | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Teramind Inc." |
process.code_signature.trusted | eq | true | excludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true" |
process.parent.name | eq | tmagentsvc.exe | excludes:process.parent.name field:"process.parent.name" value:"tmagentsvc.exe" |
process.args | wildcard | C:\Windows\system32\rundll32.exe *,* | excludes:process.args field:"process.args" value:"C:\Windows\system32\rundll32.exe *,*" |
Volume Shadow Copy Deletion via WMIC
#Identifies use of wmic.exe for shadow copy deletion on endpoints. This commonly occurs in tandem with ransomware or other destructive attacks.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Impact |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
[metadata]
creation_date = "2020/02/18"
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
maturity = "production"
updated_date = "2026/05/03"
[rule]
author = ["Elastic"]
description = """
Identifies use of wmic.exe for shadow copy deletion on endpoints. This commonly occurs in tandem with ransomware or
other destructive attacks.
"""
from = "now-9m"
index = [
"endgame-*",
"logs-crowdstrike.fdr*",
"logs-endpoint.events.process-*",
"logs-m365_defender.event-*",
"logs-sentinel_one_cloud_funnel.*",
"logs-system.security*",
"logs-windows.forwarded*",
"logs-windows.sysmon_operational-*",
"winlogbeat-*",
]
language = "eql"
license = "Elastic License v2"
name = "Volume Shadow Copy Deletion via WMIC"
risk_score = 73
rule_id = "dc9c1f74-dac3-48e3-b47f-eb79db358f57"
severity = "high"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Impact",
"Resources: Investigation Guide",
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Windows Security Event Logs",
"Data Source: Microsoft Defender XDR",
"Data Source: Sysmon",
"Data Source: SentinelOne",
"Data Source: Crowdstrike",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "windows" and event.type == "start" and
(process.name : "WMIC.exe" or ?process.pe.original_file_name == "wmic.exe") and
process.args : "delete" and process.args : "shadowcopy"
'''
note = """## Triage and analysis
### Investigating Volume Shadow Copy Deletion via WMIC
#### Possible investigation steps
- What recovery data did WMIC try to delete?
- Focus: `process.command_line` scope: "shadowcopy delete", "ID=", "VolumeName=", "where", "/node:", or broad no-filter deletion.
- Implication: escalate when the command removes all shadows, targets a remote node, or lacks a narrow snapshot or volume filter; lower suspicion only when it targets one expected snapshot or volume and parent, account, host, and later process evidence fit that task.
- Is this the expected Microsoft WMIC binary for the host?
- Focus: `process.executable`, `process.pe.original_file_name`, `process.code_signature.subject_name`, and `process.code_signature.trusted`.
- Implication: escalate when WMIC is renamed, runs outside a Windows system path, has a non-Microsoft or untrusted signature, or mismatches its original file name; Microsoft-signed system-path WMIC lowers identity risk but does not clear shadow-copy deletion.
- Which launcher and account initiated the deletion?
- Focus: `process.parent.executable`, `process.parent.command_line`, `user.id`, `user.name`, and `user.domain`.
- Implication: escalate when a document, browser, archive tool, script host, interactive user, or unexplained remote-management parent launches WMIC; lower suspicion only when parent command, account, and host identify the exact recovery, imaging, lab-reset, or authorized test runner.
- Did the same host or lineage run other recovery-inhibition or encryption-prep commands?
- Why: ransomware often mixes WMIC with "vssadmin.exe", "wbadmin.exe", "bcdedit.exe", "REAgentC.exe", "diskshadow.exe", service-stop commands, or encryption tooling.
- Focus: same-`host.id` process starts, scoped to `process.parent.entity_id` when present, for recovery-inhibition utilities, service stops, backup-agent tampering, or encryption tools. $investigate_2
- Hint: without `process.entity_id`, pivot by `host.id` + `process.pid` near the alert and treat lineage as weaker.
- Implication: escalate when WMIC is adjacent to additional recovery inhibition, backup tampering, service stops, or encryption preparation; keep scope narrower when process activity stays limited to one coherent maintenance or test sequence.
- If local evidence is suspicious or unresolved, is the activity broader than one host workflow?
- Focus: same-`user.id` alerts for impact, execution, credential, or recovery-inhibition activity. $investigate_0
- Hint: review same-`host.id` alerts for alternate shadow-copy deletion utilities, backup tampering, or repeated destructive command lines. $investigate_1
- Implication: escalate scope when the user or host shows related impact or execution alerts beyond this command; keep host-local only when both pivots stay confined to the same narrow command sequence.
- Escalate for unauthorized shadow-copy deletion, remote targeting, destructive preparation, or broader spread; close only when command scope, binary identity, parent/account context, same-host corroboration, and related alerts bind to one recognized workflow; preserve evidence and escalate when mixed or incomplete.
### False positive analysis
- Treat WMIC shadow-copy deletion as a recovery-inhibition anti-pattern. Benign closure is narrow: telemetry must show one expected snapshot or volume, a parent command for that exact task, the expected account and host, and no contradictory same-host recovery-inhibition or encryption-prep activity. Use change records or test plans only as corroboration.
- Do not close as benign when the command removes all shadows, uses "/node:" remote targeting, has unexplained lineage, or appears with service-stop, backup-tampering, or encryption-prep activity. Recurrence, WMIC identity, or a stated maintenance window is not enough when process evidence remains broad or contradictory.
- Before creating an exception, require a confirmed benign case with the exact `process.command_line` scope, `process.parent.executable`, `process.parent.command_line`, `user.id`, and `host.id`. Build the exception from that minimum pattern, never on "wmic.exe", `process.name`, or "shadowcopy" alone.
### Response and remediation
- If confirmed benign, reverse temporary containment and document the command scope, parent workflow, account, host, and corroborating maintenance or test evidence. Create an exception only when the same workflow recurs consistently for the same account and host scope.
- If suspicious but unconfirmed, export the alert, process tree, full command line, parent command line, account, host identifiers, and related-alert results before containment. Apply reversible containment first, such as heightened monitoring or temporary administrative-access restrictions for the affected host or account; isolate the endpoint only if process evidence suggests active encryption, backup tampering, or broader destructive activity.
- If confirmed malicious, preserve the process tree and command evidence before stopping processes or deleting artifacts. Isolate the endpoint to prevent further impact, suspend or reset involved accounts when the same `user.id` shows unauthorized activity, and remove only the scripts, scheduled tasks, services, or tools identified through the process investigation.
- Restore recovery capability after containment: re-enable or repair affected VSS, backup, and recovery settings, validate that snapshots or backup jobs are functioning, and confirm no related recovery-inhibition commands remain active on the same host or scoped host set.
- Post-incident hardening: restrict WMIC and VSS-management access on sensitive hosts, use application control where WMIC is not required, retain the process evidence that proved the case, and record any observed variants such as "vssadmin.exe", PowerShell Win32_ShadowCopy deletion, "wbadmin.exe", "bcdedit.exe", or "diskshadow.exe" in the case notes.
"""
setup = """## Setup
This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
Setup instructions: https://ela.st/install-elastic-defend
### Additional data sources
This rule also supports the following third-party data sources. For setup instructions, refer to the links below:
- [CrowdStrike](https://ela.st/crowdstrike-integration)
- [Microsoft Defender XDR](https://ela.st/m365-defender)
- [SentinelOne Cloud Funnel](https://ela.st/sentinel-one-cloud-funnel)
- [Sysmon Event ID 1 - Process Creation](https://ela.st/sysmon-event-1-setup)
- [Windows Process Creation Logs](https://ela.st/audit-process-creation)
"""
[rule.investigation_fields]
field_names = [
"@timestamp",
"host.name",
"host.id",
"user.id",
"process.entity_id",
"process.pid",
"process.executable",
"process.pe.original_file_name",
"process.command_line",
"process.parent.entity_id",
"process.parent.executable",
"process.parent.command_line",
"process.code_signature.subject_name",
"process.code_signature.trusted",
]
[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 = "Process events from the same parent"
description = ""
providers = [
[
{ excluded = false, field = "event.category", queryType = "phrase", value = "process", valueType = "string" },
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "process.parent.entity_id", queryType = "phrase", value = "{{process.parent.entity_id}}", valueType = "string" }
]
]
relativeFrom = "now-1h"
relativeTo = "now"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1490"
name = "Inhibit System Recovery"
reference = "https://attack.mitre.org/techniques/T1490/"
[rule.threat.tactic]
id = "TA0040"
name = "Impact"
reference = "https://attack.mitre.org/tactics/TA0040/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1047"
name = "Windows Management Instrumentation"
reference = "https://attack.mitre.org/techniques/T1047/"
[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
Stages and Predicates
Stage 1: process
process where host.os.type == "windows" and event.type == "start" and
(process.name : "WMIC.exe" or ?process.pe.original_file_name == "wmic.exe") and
process.args : "delete" and process.args : "shadowcopy"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args | wildcard |
| field:"process.args" kind:wildcard |
process.name | wildcard |
| field:"process_basename" kind:wildcard value:"WMIC.exe" |
process.pe.original_file_name | eq |
| field:"OriginalFileName" kind:eq value:"wmic.exe" |
VScode Project File Infection via Osascript
#Detects when Osascript is used to modify a VScode project file. XCSSET has been observed recently utilizing AppleScript to inject malicious payloads and commands within VScode project files on compromised systems.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Persistence |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| macOS | ESF event write (NOTIFY): Fires after a process writes data to a file. |
Rule Body
[rule]
description = """
Detects when Osascript is used to modify a VScode project file. XCSSET has been observed recently utilizing AppleScript
to inject malicious payloads and commands within VScode project files on compromised systems.
"""
id = "e9fb14ff-6d88-4c31-a1a8-4f48722b0c6a"
license = "Elastic License v2"
name = "VScode Project File Infection via Osascript"
os_list = ["macos"]
reference = [
"https://www.microsoft.com/en-us/security/blog/2025/03/11/new-xcsset-malware-adds-new-obfuscation-persistence-techniques-to-infect-xcode-projects/",
]
version = "1.0.4"
query = '''
file where event.action == "modification" and (process.name == "osascript" or Effective_process.name == "osascript") and file.extension == "pbxproj"
'''
min_endpoint_version = "8.16.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "Effective_process.entity_id"
state = 0
[[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.001"
name = "Compromise Software Dependencies and Development Tools"
reference = "https://attack.mitre.org/techniques/T1195/001/"
[threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1554"
name = "Compromise Host Software Binary"
reference = "https://attack.mitre.org/techniques/T1554/"
[threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[internal]
min_endpoint_version = "8.16.0"
Stages and Predicates
Stage 1: file
file where event.action == "modification" and (process.name == "osascript" or Effective_process.name == "osascript") and file.extension == "pbxproj"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Effective_process.name | eq |
| field:"Effective_process.name" kind:eq value:"osascript" |
event.action | eq |
| field:"EventType" kind:eq value:"modification" |
file.extension | eq |
| field:"file.extension" kind:eq value:"pbxproj" |
process.name | eq |
| field:"process_basename" kind:eq value:"osascript" |