Detection rules › Elastic
Elastic rules: 0w
Alerts From Multiple Integrations by User Name
#This rule uses alert data to determine when multiple alerts from different integrations with unique event categories and involving the same user.name are triggered. Analysts can use this to prioritize triage and response, as these users are more likely to be compromised.
Rule Body
[metadata]
creation_date = "2025/12/15"
maturity = "production"
updated_date = "2026/02/16"
[rule]
author = ["Elastic"]
description = """
This rule uses alert data to determine when multiple alerts from different integrations with unique event categories and
involving the same user.name are triggered. Analysts can use this to prioritize triage and response, as these users are
more likely to be compromised.
"""
from = "now-60m"
interval = "30m"
language = "esql"
license = "Elastic License v2"
name = "Alerts From Multiple Integrations by User Name"
risk_score = 73
rule_id = "1dd99dbf-b98d-4956-876b-f13bc0ce017f"
severity = "high"
tags = ["Use Case: Threat Detection", "Rule Type: Higher-Order Rule", "Resources: Investigation Guide"]
timestamp_override = "event.ingested"
type = "esql"
query = '''
from .alerts-security.*
// any alerts excluding low severity and the noisy ones
| where kibana.alert.rule.name is not null and user.name is not null and kibana.alert.risk_score > 21 and
not kibana.alert.rule.type in ("threat_match", "machine_learning") and
not user.id in ("S-1-5-18", "S-1-5-19", "S-1-5-20", "0") and
not KQL("""kibana.alert.rule.tags : "Rule Type: Higher-Order Rule" """) and
// Top noisy influencing rules
// Agent Spoofing - Mismatched Agent ID
// Compression DLL Loaded by Unusual Process
// Process Termination followed by Deletion
// Suspicious PrintSpooler Service Executable File Creation
// Potential PrintNightmare File Modification
// Multiple Vault Web Credentials Read
// Machine Learning Detected a Suspicious Windows Event with a High Malicious Probability Score
not kibana.alert.rule.rule_id in ("3115bd2c-0baa-4df0-80ea-45e474b5ef93", "d197478e-39f0-4347-a22f-ba654718b148", "09443c92-46b3-45a4-8f25-383b028b258d", "5bb4a95d-5a08-48eb-80db-4c3a63ec78a8", "5e87f165-45c2-4b80-bfa5-52822552c997", "44fc462c-1159-4fa8-b1b7-9b6296ab4f96", "994e40aa-8c85-43de-825e-15f665375ee8")
// group alerts by user.name and extract values of interest for alert triage
| stats Esql.event_module_distinct_count = COUNT_DISTINCT(event.module),
Esql.rule_name_distinct_count = COUNT_DISTINCT(kibana.alert.rule.name),
Esql.event_category_distinct_count = COUNT_DISTINCT(event.category),
Esql.rule_risk_score_distinct_count = COUNT_DISTINCT(kibana.alert.risk_score),
Esql.event_module_values = VALUES(event.module),
Esql.rule_name_values = VALUES(kibana.alert.rule.name),
Esql.message_values = VALUES(message),
Esql.event_category_values = VALUES(event.category),
Esql.event_action_values = VALUES(event.action),
Esql.source_ip_values = VALUES(source.ip),
Esql.destination_ip_values = VALUES(destination.ip),
Esql.host_id_values = VALUES(host.id),
Esql.agent_id_values = VALUES(agent.id),
Esql.rule_severity_values = VALUES(kibana.alert.risk_score) by user.name, user.id
// filter for alerts from same destination.ip reported by different integrations with unique categories and with different severity levels
| where Esql.event_module_distinct_count >= 2 and Esql.event_category_distinct_count >= 2 and (Esql.rule_risk_score_distinct_count >= 2 or Esql.rule_severity_values == 73 or Esql.rule_severity_values == 99)
| keep user.name, Esql.*
'''
note = """## Triage and analysis
> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
### Investigating Alerts From Multiple Integrations by User Name
The detection rule uses alert data to determine when multiple alerts from different integrations involving the same user.name are triggered.
### Possible investigation steps
- Review the alert details to identify the specific user involved and the different modules and rules that triggered the alert.
- Examine the timeline of the alerts to understand the sequence of events and determine if there is a pattern or progression in the tactics used.
- Correlate the alert data with other logs and telemetry from the host, such as process creation, network connections, and file modifications, to gather additional context.
- Investigate any known vulnerabilities or misconfigurations on the host that could have been exploited by the adversary.
- Check for any indicators of compromise (IOCs) associated with the alerts, such as suspicious IP addresses, domains, or file hashes, and search for these across the network.
- Assess the impact and scope of the potential compromise by determining if other hosts or systems have similar alerts or related activity.
### False positive analysis
- Alerts from routine administrative tasks may trigger multiple tactics. Review and exclude known benign activities such as scheduled software updates or system maintenance.
- Security tools running on the host might generate alerts across different tactics. Identify and exclude alerts from trusted security applications to reduce noise.
- Automated scripts or batch processes can mimic adversarial behavior. Analyze and whitelist these processes if they are verified as non-threatening.
- Frequent alerts from development or testing environments can be misleading. Consider excluding these environments from the rule or applying a different risk score.
- User behavior anomalies, such as accessing multiple systems or applications, might trigger alerts. Implement user behavior baselines to differentiate between normal and suspicious activities.
### Response and remediation
- Isolate the affected host from the network immediately to prevent further lateral movement by the adversary.
- Conduct a thorough forensic analysis of the host to identify the specific vulnerabilities exploited and gather evidence of the attack phases involved.
- Remove any identified malicious software or unauthorized access tools from the host, ensuring all persistence mechanisms are eradicated.
- Apply security patches and updates to the host to address any exploited vulnerabilities and prevent similar attacks.
- Restore the host from a known good backup if necessary, ensuring that the backup is free from compromise.
- Monitor the host and network for any signs of re-infection or further suspicious activity, using enhanced logging and alerting based on the identified attack patterns.
- Escalate the incident to the appropriate internal or external cybersecurity teams for further investigation and potential legal action if the attack is part of a larger campaign."""
Stages and Predicates
Stage 1: from
from .alerts-security.*
Stage 2: where
| where kibana.alert.rule.name is not null and user.name is not null and kibana.alert.risk_score > 21 and
not kibana.alert.rule.type in ("threat_match", "machine_learning") and
not user.id in ("S-1-5-18", "S-1-5-19", "S-1-5-20", "0") and
not KQL("""kibana.alert.rule.tags : "Rule Type: Higher-Order Rule" """) and
not kibana.alert.rule.rule_id in ("3115bd2c-0baa-4df0-80ea-45e474b5ef93", "d197478e-39f0-4347-a22f-ba654718b148", "09443c92-46b3-45a4-8f25-383b028b258d", "5bb4a95d-5a08-48eb-80db-4c3a63ec78a8", "5e87f165-45c2-4b80-bfa5-52822552c997", "44fc462c-1159-4fa8-b1b7-9b6296ab4f96", "994e40aa-8c85-43de-825e-15f665375ee8")
Stage 3: stats
| stats Esql.event_module_distinct_count = COUNT_DISTINCT(event.module),
Esql.rule_name_distinct_count = COUNT_DISTINCT(kibana.alert.rule.name),
Esql.event_category_distinct_count = COUNT_DISTINCT(event.category),
Esql.rule_risk_score_distinct_count = COUNT_DISTINCT(kibana.alert.risk_score),
Esql.event_module_values = VALUES(event.module),
Esql.rule_name_values = VALUES(kibana.alert.rule.name),
Esql.message_values = VALUES(message),
Esql.event_category_values = VALUES(event.category),
Esql.event_action_values = VALUES(event.action),
Esql.source_ip_values = VALUES(source.ip),
Esql.destination_ip_values = VALUES(destination.ip),
Esql.host_id_values = VALUES(host.id),
Esql.agent_id_values = VALUES(agent.id),
Esql.rule_severity_values = VALUES(kibana.alert.risk_score) by user.name, user.id
Stage 4: where
| where Esql.event_module_distinct_count >= 2 and Esql.event_category_distinct_count >= 2 and (Esql.rule_risk_score_distinct_count >= 2 or Esql.rule_severity_values == 73 or Esql.rule_severity_values == 99)
Stage 5: keep
| keep user.name, Esql.*
Indicators
These rows show field, operator, and value matches.
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
kibana.alert.rule.rule_id | in | 09443c92-46b3-45a4-8f25-383b028b258d, 3115bd2c-0baa-4df0-80ea-45e474b5ef93, 44fc462c-1159-4fa8-b1b7-9b6296ab4f96, 5bb4a95d-5a08-48eb-80db-4c3a63ec78a8, 5e87f165-45c2-4b80-bfa5-52822552c997, 994e40aa-8c85-43de-825e-15f665375ee8, d197478e-39f0-4347-a22f-ba654718b148 | excludes:kibana.alert.rule.rule_id |
kibana.alert.rule.tags | eq | Rule Type: Higher-Order Rule | excludes:kibana.alert.rule.tags field:"kibana.alert.rule.tags" value:"Rule Type: Higher-Order Rule" |
kibana.alert.rule.type | in | machine_learning, threat_match | excludes:kibana.alert.rule.type field:"kibana.alert.rule.type" value:"machine_learning" field:"kibana.alert.rule.type" value:"threat_match" |
user.id | in | 0, S-1-5-18, S-1-5-19, S-1-5-20 | excludes:user.id |
Output Fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
user.name | KEEP user.name |
Esql.* | KEEP Esql.* |
AWS Bedrock API Key Phantom User Activity Outside Bedrock
#Identifies an Amazon Bedrock API key phantom user (an IAM user whose name starts with "BedrockAPIKey-") acting as the caller of a non-Bedrock API request, such as IAM, STS, EC2, VPC, or KMS calls. These users are provisioned by AWS to back a Bedrock bearer token and carry the AmazonBedrockLimitedAccess managed policy, which also grants IAM, VPC, and KMS reconnaissance. A phantom user performing activity outside of Bedrock indicates its credentials are being used beyond their intended scope, which is the privilege-escalation path realized: an attacker who created standard IAM access keys for the phantom user is now using them for reconnaissance or lateral movement outside the Bedrock authentication boundary.
Known False Positives
- Automation or SDK tooling configured with a Bedrock API key may call non-Bedrock APIs for benign credential validation. Ubiquitous no-op STS identity calls (GetCallerIdentity, GetSessionToken, GetAccessKeyInfo) are excluded; other non-Bedrock activity by a BedrockAPIKey-* principal — recon, privilege escalation, lateral movement, or exfiltration — is unexpected for an inference-only key. Confirm the key and source in "source.ip"/"user_agent.original" are sanctioned.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Rule Body
[metadata]
creation_date = "2026/07/06"
integration = ["aws"]
maturity = "production"
updated_date = "2026/07/06"
[rule]
author = ["Elastic"]
description = """
Identifies an Amazon Bedrock API key phantom user (an IAM user whose name starts with "BedrockAPIKey-") acting as the
caller of a non-Bedrock API request, such as IAM, STS, EC2, VPC, or KMS calls. These users are provisioned by AWS to back
a Bedrock bearer token and carry the AmazonBedrockLimitedAccess managed policy, which also grants IAM, VPC, and KMS
reconnaissance. A phantom user performing activity outside of Bedrock indicates its credentials are being used beyond
their intended scope, which is the privilege-escalation path realized: an attacker who created standard IAM access keys
for the phantom user is now using them for reconnaissance or lateral movement outside the Bedrock authentication boundary.
"""
false_positives = [
"""
Automation or SDK tooling configured with a Bedrock API key may call non-Bedrock APIs for benign
credential validation. Ubiquitous no-op STS identity calls (GetCallerIdentity, GetSessionToken,
GetAccessKeyInfo) are excluded; other non-Bedrock activity by a BedrockAPIKey-* principal — recon,
privilege escalation, lateral movement, or exfiltration — is unexpected for an inference-only key.
Confirm the key and source in "source.ip"/"user_agent.original" are sanctioned.
""",
]
from = "now-30m"
index = ["logs-aws.cloudtrail-*"]
language = "kuery"
license = "Elastic License v2"
name = "AWS Bedrock API Key Phantom User Activity Outside Bedrock"
note = """## Triage and analysis
### Investigating AWS Bedrock API Key Phantom User Activity Outside Bedrock
Amazon Bedrock API key phantom users ("BedrockAPIKey-*") exist only to back a Bedrock bearer token and carry the AmazonBedrockLimitedAccess managed policy. That policy grants Bedrock control-plane actions plus IAM, VPC, and KMS reconnaissance, so if an attacker adds standard IAM access keys (or a console login) to the phantom user, those credentials can be used for reconnaissance and lateral movement well beyond Bedrock.
This rule fires when a "BedrockAPIKey-*" user is the caller of an API request whose service is not Bedrock. Because the phantom user has no legitimate reason to act outside Bedrock, such activity is the privilege-escalation path realized.
### Possible investigation steps
- Review "aws.cloudtrail.user_identity.arn", "event.provider", and "event.action" to understand what non-Bedrock activity the phantom user performed.
- Inspect "source.ip"/"source.as.number" and "user_agent.original", and determine whether the phantom user holds IAM access keys or a login profile (the escalation pivot).
- Review the full sequence of the phantom user's actions for reconnaissance (IAM/EC2/STS enumeration) or attempts to access other resources.
- Correlate with the credential-addition event (CreateAccessKey/CreateLoginProfile on the same user).
### False positive analysis
- Phantom users are not meant to perform non-Bedrock activity, so this should be rare. Validate any intentional repurposing before excluding the identity.
### Response and remediation
- If unauthorized, disable and remove the phantom user's IAM access keys and login profile, and delete the phantom user after preserving forensic evidence.
- Review the account for resources the phantom user may have accessed or modified.
- Deploy an SCP denying "iam:CreateAccessKey" and "iam:CreateLoginProfile" on "arn:aws:iam::*:user/BedrockAPIKey-*" to prevent the pivot.
"""
references = [
"https://www.beyondtrust.com/blog/entry/aws-bedrock-security-guide-api-keys-detection-response",
"https://www.beyondtrust.com/blog/entry/aws-bedrock-security-api-keys",
"https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys.html",
]
risk_score = 73
rule_id = "56788ae8-794b-4ade-affd-534aa5c9e28d"
setup = "This rule requires AWS CloudTrail logs ingested via the Elastic AWS integration. See https://docs.elastic.co/integrations/aws/cloudtrail for setup details."
severity = "high"
tags = [
"Domain: Cloud",
"Domain: LLM",
"Data Source: AWS",
"Data Source: AWS CloudTrail",
"Data Source: Amazon Web Services",
"Data Source: AWS IAM",
"Data Source: Amazon Bedrock",
"Use Case: Threat Detection",
"Tactic: Privilege Escalation",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "query"
query = '''
data_stream.dataset: "aws.cloudtrail"
and aws.cloudtrail.user_identity.type: "IAMUser"
and user.name: BedrockAPIKey-*
and not event.provider: (
"bedrock.amazonaws.com" or "signin.amazonaws.com" or
"agreement-marketplace.amazonaws.com" or "discovery-marketplace.amazonaws.com"
)
and not event.action: ("GetCallerIdentity" or "GetSessionToken" or "GetAccessKeyInfo")
'''
[[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 = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
Stages and Predicates
Stage 1: query
data_stream.dataset: "aws.cloudtrail"
and aws.cloudtrail.user_identity.type: "IAMUser"
and user.name: BedrockAPIKey-*
and not event.provider: (
"bedrock.amazonaws.com" or "signin.amazonaws.com" or
"agreement-marketplace.amazonaws.com" or "discovery-marketplace.amazonaws.com"
)
and not event.action: ("GetCallerIdentity" or "GetSessionToken" or "GetAccessKeyInfo")
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
aws.cloudtrail.user_identity.type | eq |
| field:"aws::userIdentity.type" kind:eq value:"IAMUser" |
data_stream.dataset | eq |
| field:"data_stream.dataset" kind:eq value:"aws.cloudtrail" |
user.name | wildcard |
| field:"user" kind:wildcard value:"BedrockAPIKey-*" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
event.action | in | GetAccessKeyInfo, GetCallerIdentity, GetSessionToken | excludes:event.action field:"event.action" value:"GetAccessKeyInfo" field:"event.action" value:"GetCallerIdentity" field:"event.action" value:"GetSessionToken" |
event.provider | in | agreement-marketplace.amazonaws.com, bedrock.amazonaws.com, discovery-marketplace.amazonaws.com, signin.amazonaws.com | excludes:event.provider |
AWS STS AssumeRole with New MFA Device
#Identifies when a user has assumed a role using a new MFA device. Users can assume a role to obtain temporary credentials and access AWS resources using the AssumeRole API of AWS Security Token Service (STS). While a new MFA device is not always indicative of malicious behavior it should be verified as adversaries can use this technique for persistence and privilege escalation.
Known False Positives
- AWS administrators or automated processes might regularly assume roles for legitimate administrative purposes and to perform periodic tasks such as data backups, updates, or deployments.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation | |
| Lateral Movement |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
- AWS AssumeRoleWithWebIdentity from Kubernetes SA and External ASN (Elastic)
- AWS STS Role Assumption by Service (Elastic)
- AWS STS Role Assumption by User (Elastic)
- AWS STS Role Chaining (Elastic)
- AWS Suspicious SAML Activity (Sigma)
- RoleAssumes by Multiple Useragents (Panther)
Rule Body
[metadata]
creation_date = "2024/10/25"
integration = ["aws"]
maturity = "production"
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = """
Identifies when a user has assumed a role using a new MFA device. Users can assume a role to obtain temporary credentials and access AWS resources using the AssumeRole API of AWS Security Token Service (STS).
While a new MFA device is not always indicative of malicious behavior it should be verified as adversaries can use this technique for persistence and privilege escalation.
"""
false_positives = [
"AWS administrators or automated processes might regularly assume roles for legitimate administrative purposes and to perform periodic tasks such as data backups, updates, or deployments.",
]
from = "now-6m"
index = ["filebeat-*", "logs-aws.cloudtrail-*"]
interval = "5m"
language = "kuery"
license = "Elastic License v2"
name = "AWS STS AssumeRole with New MFA Device"
note = """## Triage and analysis
### Investigating AWS STS AssumeRole with New MFA Device
AWS Security Token Service (STS) allows users to assume roles and gain temporary credentials for accessing AWS resources. This process can involve Multi-Factor Authentication (MFA) for enhanced security. However, adversaries may exploit new MFA devices to maintain persistence or escalate privileges. The detection rule identifies successful role assumptions with new MFA devices, flagging potential misuse for further investigation.
### Possible investigation steps
- Review the event details in AWS CloudTrail to identify the user who assumed the role, focusing on the `user.id` or `aws.cloudtrail.user_identity.arn` field to determine if the user is legitimate and authorized to use the new MFA device.
- Check the serialNumber in `aws.cloudtrail.request_parameters` to verify the registration and legitimacy of the new MFA device associated with the role assumption.
- Investigate the context of the AssumeRole action by examining surrounding events to understand if it was part of a legitimate workflow or an unusual activity.
- Cross-reference with any recent changes in user permissions or MFA device registrations.
- Correlate the event with other logs or alerts to identify any patterns of suspicious behavior, such as multiple role assumptions or changes in MFA devices within a short timeframe.
- Contact the user or relevant team to confirm if the new MFA device registration and role assumption were expected and authorized.
### False positive analysis
- New employee onboarding processes may trigger this rule when new MFA devices are issued. To manage this, create exceptions for known onboarding activities by correlating with HR records or onboarding schedules.
- Routine device replacements or upgrades can result in new MFA devices being registered. Implement a process to track and verify device changes through IT support tickets or asset management systems.
- Users with multiple roles or responsibilities might frequently switch roles using different MFA devices. Establish a baseline of normal behavior for these users and create exceptions for their typical activity patterns.
- Organizational policy changes that require MFA updates can lead to multiple new MFA device registrations. Coordinate with security teams to whitelist these events during policy rollout periods.
- Temporary contractors or third-party vendors may use new MFA devices when accessing AWS resources. Ensure that their access is logged and reviewed, and create temporary exceptions for their known access periods.
### Response and remediation
- Immediately revoke the temporary credentials associated with the assumed role to prevent unauthorized access to AWS resources.
- Verify the legitimacy of the new MFA device by contacting the user or administrator associated with the role assumption. Confirm whether the device was intentionally registered and used.
- If the new MFA device is determined to be unauthorized, disable or remove it from the user's account to prevent further misuse.
- Conduct a review of recent AWS CloudTrail logs to identify any suspicious activities or patterns associated with the user or role in question, focusing on privilege escalation or lateral movement attempts.
- Escalate the incident to the security operations team for further investigation and to determine if additional containment measures are necessary.
- Implement additional monitoring and alerting for unusual MFA device registrations and role assumptions to enhance detection of similar threats in the future.
- Review and update IAM policies and MFA device management procedures to ensure they align with best practices for security and access control.
## Setup
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
references = [
"https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html",
"https://github.com/RhinoSecurityLabs/cloudgoat/blob/d5863b80afd082d853f2e8df1955c6393695a4da/scenarios/iam_privesc_by_key_rotation/README.md",
]
risk_score = 21
rule_id = "a22f566b-5b23-4412-880d-c6c957acd321"
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: Persistence",
"Tactic: Lateral Movement",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
data_stream.dataset:aws.cloudtrail
and event.provider:sts.amazonaws.com
and event.action:(AssumeRole or AssumeRoleWithSAML or AssumeRoleWithWebIdentity)
and event.outcome:success
and aws.cloudtrail.flattened.request_parameters.serialNumber:*
'''
[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",
"aws.cloudtrail.resources.arn",
"aws.cloudtrail.resources.type",
"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 = "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 = "T1556"
name = "Modify Authentication Process"
reference = "https://attack.mitre.org/techniques/T1556/"
[[rule.threat.technique.subtechnique]]
id = "T1556.006"
name = "Multi-Factor Authentication"
reference = "https://attack.mitre.org/techniques/T1556/006/"
[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[[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 = "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.new_terms]
field = "new_terms_fields"
value = ["user.id", "aws.cloudtrail.flattened.request_parameters.serialNumber"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-10d"
Stages and Predicates
Stage 1: new_terms
data_stream.dataset:aws.cloudtrail
and event.provider:sts.amazonaws.com
and event.action:(AssumeRole or AssumeRoleWithSAML or AssumeRoleWithWebIdentity)
and event.outcome:success
and aws.cloudtrail.flattened.request_parameters.serialNumber:*
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
aws.cloudtrail.flattened.request_parameters.serialNumber | is_not_null | field:"aws.cloudtrail.flattened.request_parameters.serialNumber" kind:is_not_null | |
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:"sts.amazonaws.com" |
Elastic Defend and Email Alerts Correlation
#This rule correlates any Elastic Defend alert with an email security related alert by target user name. This may indicate the successful execution of a phishing attack.
Rule Body
[metadata]
creation_date = "2025/11/19"
integration = ["endpoint", "checkpoint_email"]
maturity = "production"
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = """
This rule correlates any Elastic Defend alert with an email security related alert by target user name. This may indicate
the successful execution of a phishing attack.
"""
from = "now-1h"
interval = "45m"
language = "esql"
license = "Elastic License v2"
name = "Elastic Defend and Email Alerts Correlation"
risk_score = 73
rule_id = "c562a800-cf97-464e-9d6f-84db91e86e10"
severity = "high"
tags = [
"Use Case: Threat Detection",
"Rule Type: Higher-Order Rule",
"Resources: Investigation Guide",
"Data Source: Elastic Defend",
"Data Source: Check Point Harmony Email & Collaboration",
"Domain: Email",
"Domain: Endpoint"
]
timestamp_override = "event.ingested"
type = "esql"
query = '''
from logs-endpoint.alerts-*, logs-checkpoint_email.event-* metadata _id
// Email or Elastic Defend alerts where user name is populated
| where
(event.category == "email" and event.kind == "alert" and destination.user.name is not null) or
(event.module == "endpoint" and data_stream.dataset == "endpoint.alerts" and user.name is not null)
// extract target user name from email and endpoint alerts
| eval email_alert_target_user_name = CASE(event.category == "email", destination.user.name, null),
elastic_defend_alert_user_name = CASE(event.module == "endpoint" and data_stream.dataset == "endpoint.alerts", user.name, null)
| eval Esql.target_user_name = COALESCE(email_alert_target_user_name, elastic_defend_alert_user_name)
| where Esql.target_user_name is not null
// group by Esql.target_user_name
| stats Esql.alerts_count = COUNT(*),
Esql.event_module_distinct_count = COUNT_DISTINCT(event.module),
Esql.event_module_values = VALUES(event.module),
Esql.message_values = VALUES(message),
Esql.event_action_values = VALUES(event.action),
Esql.process_executable_values = VALUES(process.executable),
Esql.host_id_values = VALUES(host.id),
Esql.source_user_name = VALUES(source.user.name),
Esql.rule_name_values = VALUES(rule.name)
by Esql.target_user_name
// alert when same user is observed in an endpoint and email alert
| where Esql.event_module_distinct_count >= 2
| keep Esql.alerts_count, Esql.event_module_values, Esql.host_id_values, Esql.source_user_name, Esql.target_user_name, Esql.message_values, Esql.rule_name_values, Esql.event_action_values
'''
note = """## Triage and analysis
### Investigating Elastic Defend and Email Alerts Correlation
This rule correlates any Elastic Defend alert with an email security related alert by target user name.
### Possible investigation steps
- Review the alert details to identify the specific host and users involved.
- Investigate the individual alerts for the target user name and see if they are related.
- Review all emails received from Esql.source_user_name and if there are other impacted users.
- Correlate the alert data with other logs and telemetry from the host, such as process creation, network connections, and file modifications, to gather additional context.
- Assess the impact and scope of the potential compromise by determining if other hosts or systems have similar alerts or related activity.
### False positive analysis
- Legitimate email marked as suspicious.
- Legitimate file or behavior marked as suspicious by Elastic Defend.
- Unrelated alerts where the target user name is too generic.
### Response and remediation
- Isolate the affected host from the network immediately to prevent further lateral movement by the adversary.
- Conduct a thorough forensic analysis of the host.
- Remove any identified malicious software or unauthorized access tools from the host, ensuring all persistence mechanisms are eradicated.
- Restore the host from a known good backup if necessary, ensuring that the backup is free from compromise.
- Monitor the host and network for any signs of re-infection or further suspicious activity, using enhanced logging and alerting based on the identified attack patterns.
- Escalate the incident to the appropriate internal or external cybersecurity teams for further investigation and potential legal action if the attack is part of a larger campaign."""
Stages and Predicates
Stage 1: from
from logs-endpoint.alerts-*, logs-checkpoint_email.event-* metadata _id
Stage 2: where
| where
(event.category == "email" and event.kind == "alert" and destination.user.name is not null) or
(event.module == "endpoint" and data_stream.dataset == "endpoint.alerts" and user.name is not null)
Stage 3: eval
| eval email_alert_target_user_name = CASE(event.category == "email", destination.user.name, null),
elastic_defend_alert_user_name = CASE(event.module == "endpoint" and data_stream.dataset == "endpoint.alerts", user.name, null)
elastic_defend_alert_user_name =event.module == "endpoint" and data_stream.dataset == "endpoint.alerts"user.namenullemail_alert_target_user_name =event.category == "email"destination.user.namenullStage 4: eval
| eval Esql.target_user_name = COALESCE(email_alert_target_user_name, elastic_defend_alert_user_name)
Stage 5: where
| where Esql.target_user_name is not null
Stage 6: stats
| stats Esql.alerts_count = COUNT(*),
Esql.event_module_distinct_count = COUNT_DISTINCT(event.module),
Esql.event_module_values = VALUES(event.module),
Esql.message_values = VALUES(message),
Esql.event_action_values = VALUES(event.action),
Esql.process_executable_values = VALUES(process.executable),
Esql.host_id_values = VALUES(host.id),
Esql.source_user_name = VALUES(source.user.name),
Esql.rule_name_values = VALUES(rule.name)
by Esql.target_user_name
Stage 7: where
| where Esql.event_module_distinct_count >= 2
Stage 8: keep
| keep Esql.alerts_count, Esql.event_module_values, Esql.host_id_values, Esql.source_user_name, Esql.target_user_name, Esql.message_values, Esql.rule_name_values, Esql.event_action_values
Indicators
These rows show field, operator, and value matches.
Output Fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
Esql.alerts_count | KEEP Esql.alerts_count |
Esql.event_module_values | KEEP Esql.event_module_values |
Esql.host_id_values | KEEP Esql.host_id_values |
Esql.source_user_name | KEEP Esql.source_user_name |
Esql.target_user_name | KEEP Esql.target_user_name |
Esql.message_values | KEEP Esql.message_values |
Esql.rule_name_values | KEEP Esql.rule_name_values |
Esql.event_action_values | KEEP Esql.event_action_values |
Entra ID Protection - Risk Detection - Sign-in Risk
#Identifies sign-in risk detection events via Microsofts Entra ID Protection service. Entra ID Protection detects sign-in activity such as anonymized IP addresses, unlikely travel, password spray, and more.
Known False Positives
- Users accessing their accounts from anonymized IP addresses, such as VPNs or Tor, may trigger this rule. If this is expected behavior in your environment, consider adjusting the rule or adding exceptions for specific users or IP ranges.
- Users who frequently travel or access their accounts from different geographic locations may trigger this rule due to the unlikely travel detection mechanism. If this is expected behavior, consider adjusting the rule or adding exceptions for specific users.
- Users who have recently changed their passwords may trigger this rule due to the password spray detection mechanism. If this is expected behavior, consider adjusting the rule or adding exceptions for specific users.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Credential Access | |
| Command & Control |
Rules Detecting the Same Action
These rules filter on the same operation.
- [Entra ID] Authentication Method Changed for Privileged Account (Kusto)
- Account Created and Deleted in Short Timeframe (Kusto)
- Account Created And Deleted Within A Close Time Frame (Sigma)
- Account created from non-approved sources (Kusto)
- Account created or deleted by non-approved user (Kusto)
- Addition of a Temporary Access Pass to a Privileged Account (Kusto)
- Authentication Method Changed for Privileged Account (Kusto)
- Authentication Methods Changed for Privileged Account (Kusto)
Rule Body
[metadata]
creation_date = "2025/04/29"
integration = ["azure"]
maturity = "production"
promotion = true
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = """
Identifies sign-in risk detection events via Microsofts Entra ID Protection service. Entra ID Protection detects sign-in
activity such as anonymized IP addresses, unlikely travel, password spray, and more.
"""
false_positives = [
"""
Users accessing their accounts from anonymized IP addresses, such as VPNs or Tor, may trigger this rule. If this is
expected behavior in your environment, consider adjusting the rule or adding exceptions for specific users or IP
ranges.
""",
"""
Users who frequently travel or access their accounts from different geographic locations may trigger this rule due
to the unlikely travel detection mechanism. If this is expected behavior, consider adjusting the rule or adding
exceptions for specific users.
""",
"""
Users who have recently changed their passwords may trigger this rule due to the password spray detection mechanism.
If this is expected behavior, consider adjusting the rule or adding exceptions for specific users.
""",
]
from = "now-9m"
index = ["logs-azure.identity_protection-*"]
language = "kuery"
license = "Elastic License v2"
max_signals = 1000
name = "Entra ID Protection - Risk Detection - Sign-in Risk"
note = """## Triage and analysis
This rule detects sign-in risk detection events via Microsoft Entra ID Protection. It identifies various risk event types such as anonymized IP addresses, unlikely travel, password spray, and more. These events can indicate potential malicious activity or compromised accounts.
### Possible investigation steps
- Review the `azure.identityprotection.properties.risk_event_type` field to understand the specific risk event type detected.
- Check the `azure.identityprotection.properties.risk_level` field to determine the severity of the risk event.
- Check the `azure.identityprotection.properties.risk_detail` field for additional context on the risk event.
- Review the `azure.correlation_id` field to correlate this event with other related events in your environment.
- Review the `azure.identityprotection.properties.additional_info` field for any additional information provided by Entra ID Protection.
- Review the `azure.identityprotection.properties.detection_timing_type` field to understand when the risk event was detected. Offline detections may indicate a delayed response to a potential threat while real-time detections indicate immediate risk assessment.
- Check the `azure.identityprotection.properties.user_principal_name` field to identify the user account associated with the risk event. This can help determine if the account is compromised or if the risk event is expected behavior for that user. Triage the user account with other events from Entra ID audit or sign-in logs to identify any suspicious activity or patterns.
### False positive analysis
- Users accessing their accounts from anonymized IP addresses, such as VPNs or Tor, may trigger this rule. If this is expected behavior in your environment, consider adjusting the rule or adding exceptions for specific users or IP ranges.
- Users who frequently travel or access their accounts from different geographic locations may trigger this rule due to the unlikely travel detection mechanism. If this is expected behavior, consider adjusting the rule or adding exceptions for specific users.
- Users who have recently changed their passwords may trigger this rule due to the password spray detection mechanism. If this is expected behavior, consider adjusting the rule or adding exceptions for specific users.
### Response and remediation
- Investigate the user account associated with the risk event to determine if it has been compromised or if the risk event is expected behavior.
- If the risk event indicates a compromised account, take appropriate actions such as resetting the password, enabling multi-factor authentication, or disabling the account temporarily.
- Review authentication material such as primary refresh tokens (PRTs) or OAuth tokens to ensure they have not been compromised. If necessary, revoke these tokens to prevent further access.
- Implement sign-in risk policies in Entra ID Protection to automatically respond to risk events, such as requiring multi-factor authentication or blocking sign-ins from risky locations.
- Ensure multi-factor authentication is enabled for all user accounts to provide an additional layer of security against compromised accounts.
- Consider using high risk detections and conditional access evaluations to enforce stricter security measures for accounts or enable access revocation.
"""
references = [
"https://www.volexity.com/blog/2025/04/22/phishing-for-codes-russian-threat-actors-target-microsoft-365-oauth-workflows/",
"https://github.com/dirkjanm/ROADtools",
"https://dirkjanm.io/phishing-for-microsoft-entra-primary-refresh-tokens/",
"https://learn.microsoft.com/en-us/entra/id-protection/concept-identity-protection-risks#risk-types-and-detection",
"https://www.microsoft.com/en-us/security/blog/2025/05/27/new-russia-affiliated-actor-void-blizzard-targets-critical-sectors-for-espionage/",
]
risk_score = 73
rule_id = "064a2e08-25da-11f0-b1f1-f661ea17fbcd"
setup = """#### Required Microsoft Entra ID Protection Logs
To use this rule, ensure that Microsoft Entra ID Protection logs are being collected and streamed into the Elastic Stack via the Azure integration.
### Additional notes
For information on troubleshooting the maximum alerts warning please refer to this [guide](https://www.elastic.co/guide/en/security/current/alerts-ui-monitor.html#troubleshoot-max-alerts).
"""
severity = "high"
tags = [
"Domain: Cloud",
"Domain: Identity",
"Data Source: Azure",
"Data Source: Entra ID",
"Use Case: Identity and Access Audit",
"Use Case: Threat Detection",
"Use Case: Risk Detection",
"Tactic: Initial Access",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "query"
query = '''
data_stream.dataset: "azure.identity_protection" and
event.action: "User Risk Detection" and
azure.identityprotection.properties.activity: "signin" and
not azure.identityprotection.properties.risk_state: (
"remediated" or "dismissed" or "confirmedSafe"
)
'''
[[rule.severity_mapping]]
field = "azure.identityprotection.properties.risk_level"
operator = "equals"
severity = "high"
value = "high"
[[rule.severity_mapping]]
field = "azure.identityprotection.properties.risk_level"
operator = "equals"
severity = "medium"
value = "medium"
[[rule.severity_mapping]]
field = "azure.identityprotection.properties.risk_level"
operator = "equals"
severity = "low"
value = "low"
[[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 = "T1110"
name = "Brute Force"
reference = "https://attack.mitre.org/techniques/T1110/"
[[rule.threat.technique.subtechnique]]
id = "T1110.003"
name = "Password Spraying"
reference = "https://attack.mitre.org/techniques/T1110/003/"
[[rule.threat.technique]]
id = "T1556"
name = "Modify Authentication Process"
reference = "https://attack.mitre.org/techniques/T1556/"
[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 = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"
[rule.threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"
[rule.investigation_fields]
field_names = [
"@timestamp",
"event.action",
"azure.identityprotection.properties.risk_event_type",
"azure.identityprotection.properties.risk_level",
"azure.identityprotection.properties.risk_detail",
"azure.identityprotection.properties.user_principal_name",
"azure.identityprotection.properties.user_display_name",
"azure.identityprotection.properties.risk_state",
"azure.identityprotection.properties.risk_type",
"azure.identityprotection.properties.risk_reasons",
"azure.identityprotection.properties.ip_address",
"azure.identityprotection.properties.location",
"azure.identityprotection.properties.detection_timing_type",
]
Stages and Predicates
Stage 1: query
data_stream.dataset: "azure.identity_protection" and
event.action: "User Risk Detection" and
azure.identityprotection.properties.activity: "signin" and
not azure.identityprotection.properties.risk_state: (
"remediated" or "dismissed" or "confirmedSafe"
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
azure.identityprotection.properties.activity | eq |
| field:"azure.identityprotection.properties.activity" kind:eq value:"signin" |
data_stream.dataset | eq |
| field:"data_stream.dataset" kind:eq value:"azure.identity_protection" |
event.action | eq |
| field:"EventType" kind:eq value:"User Risk Detection" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
azure.identityprotection.properties.risk_state | in | confirmedSafe, dismissed, remediated | excludes:azure.identityprotection.properties.risk_state field:"azure.identityprotection.properties.risk_state" value:"confirmedSafe" field:"azure.identityprotection.properties.risk_state" value:"dismissed" field:"azure.identityprotection.properties.risk_state" value:"remediated" |
First Time Seen DNS Query to RMM Domain
#Detects DNS queries to commonly abused remote monitoring and management (RMM) or remote access software domains from processes that are not browsers. Intended to surface RMM clients, scripts, or other non-browser activity contacting these services.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 22: DNSEvent (DNS query) |
Rule Body
[metadata]
creation_date = "2026/03/03"
integration = ["endpoint", "windows"]
maturity = "production"
updated_date = "2026/07/02"
[rule]
author = ["Elastic"]
description = """
Detects DNS queries to commonly abused remote monitoring and management (RMM) or remote access software domains from processes that are not browsers.
Intended to surface RMM clients, scripts, or other non-browser activity contacting these services.
"""
from = "now-7205m"
interval = "5m"
language = "esql"
license = "Elastic License v2"
name = "First Time Seen DNS Query to RMM Domain"
note = """## Triage and analysis
### Investigating First Time Seen DNS Query to RMM Domain
This rule flags DNS queries to commonly abused RMM or remote access domains when the requesting process is not a browser. Legitimate RMM and remote desktop software is frequently abused for C2, persistence, and lateral movement.
### Possible investigation steps
- Identify the process process.executable that performed the DNS query and verify if it is an approved RMM or remote access tool.
- Review the full process tree and parent process to understand how the binary was launched.
- Check process.code_signature for trusted RMM publishers; unsigned or unexpected signers may indicate abuse or trojanized installers.
- Correlate with the companion rule "First Time Seen Remote Monitoring and Management Tool" for the same host to see if the RMM process was first-time seen.
- Investigate other alerts for the same host or user in the past 48 hours.
### False positive analysis
- Approved RMM or remote support tools used by IT will trigger this rule; consider allowlisting by process path or code signer for known managed tools.
- Some updaters or installers (e.g. signed by the RMM vendor) may resolve these domains; combine with process name or parent context to reduce noise.
### Response and remediation
- If unauthorized RMM use is confirmed: isolate the host, remove the RMM software, rotate credentials, and block the domains at DNS/firewall where policy permits.
- Enforce policy that only approved RMM tools from approved publishers may be used, and only by authorized staff.
"""
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:
- [Sysmon Event ID 22 - DNS Query](https://ela.st/sysmon-event-22-setup)
"""
references = [
"https://attack.mitre.org/techniques/T1219/002/",
"https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-025a",
"https://lolrmm.io/",
]
risk_score = 47
rule_id = "e5f6a7b8-c9d0-8e1f-2a3b-4c5d6e7f8a9b"
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Command and Control",
"Resources: Investigation Guide",
"Data Source: Elastic Defend",
"Data Source: Sysmon"
]
timestamp_override = "event.ingested"
type = "esql"
query = '''
FROM logs-endpoint.events.network-*, logs-windows.sysmon_operational-* METADATA _index
| WHERE host.os.type == "windows"
AND event.category == "network"
AND event.action in ("lookup_requested", "DNSEvent (DNS query)")
AND dns.question.name IS NOT NULL
// Exclude browser processes
| WHERE NOT
process.name IN (
"chrome.exe", "msedge.exe", "MicrosoftEdge.exe", "MicrosoftEdgeCP.exe",
"firefox.exe", "iexplore.exe", "safari.exe", "brave.exe",
"opera.exe", "vivaldi.exe", "msedgewebview2.exe"
)
// Extract the parent domain (last two labels, e.g. example.com)
| GROK dns.question.name """(?:[^.]+\.)+(?<parent_domain>[^.]+\.[^.]+)$"""
| EVAL parent_domain = COALESCE(parent_domain, dns.question.name)
// Known RMM parent domains, add or remove entries here as your environment changes.
| WHERE parent_domain IN (
"01com.com",
"247ithelp.com",
"action1.com",
"addigy.com",
"aeroadmin.com",
"ammyy.com",
"anydesk.com",
"anyplace-control.com",
"anysupport.net",
"atera.com",
"aurelius.host",
"auvik.com",
"aweray.com",
"aweray.net",
"backdrop.cloud",
"barracudamsp.com",
"beamyourscreen.com",
"beanywhere.com",
"beinsync.com",
"beinsync.net",
"beyondtrustcloud.com",
"bomgar.com",
"bomgarcloud.com",
"centrastage.net",
"centuriontech.com",
"connectwise.com",
"crossloop.com",
"dameware.com",
"datto.com",
"datto.net",
"deskday.ai",
"deskroll.com",
"desktopstreaming.com",
"distantdesktop.com",
"donkz.nl",
"dwservice.net",
"ehorus.com",
"electric.ai",
"emcosoftware.com",
"ericom.com",
"fastsupport.com",
"fastviewer.com",
"fixme.it",
"fleetdeck.io",
"gatherplace.com",
"gatherplace.net",
"getgo.com",
"getscreen.me",
"gotoassist.at",
"gotoassist.com",
"gotoassist.me",
"gotohttp.com",
"gotoresolve.com",
"goverlan.com",
"heartbeatrm.com",
"helpme.net",
"helpwire.app",
"hoptodesk.com",
"hostedrmm.com",
"immy.bot",
"immybot.com",
"imperosoftware.com",
"instanthousecall.com",
"instanthousecall.net",
"intelliadmin.com",
"internapcdn.net",
"internetid.ru",
"iperius-rs.com",
"iperius.net",
"iperiusremote.com",
"islonline.com",
"islonline.net",
"itarian.com",
"itsupport247.net",
"jumpcloud.com",
"jumpdesktop.com",
"jumpto.me",
"kabuto.io",
"kabutoservices.com",
"kaseya.com",
"kaseya.net",
"kickidler.com",
"laplink.com",
"level.io",
"liongard.com",
"litemanager.com",
"litemanager.ru",
"logicnow.com",
"logmein-gateway.com",
"logmein.com",
"logmeininc.com",
"logmeinrescue.com",
"logmeinrescue.eu",
"lunixar.com",
"meshcentral.com",
"mikogo.com",
"mikogo4.com",
"miradore.com",
"msp360.com",
"mygreenpc.com",
"n-able.com",
"naverisk.com",
"nchuser.com",
"netop.com",
"netsupportmanager.com",
"netsupportsoftware.com",
"netviewer.com",
"ninjaone.com",
"ninjarmm.com",
"ninjarmm.net",
"nomachine.com",
"ntrsupport.com",
"opti-tune.com",
"optitune.us",
"oray.com",
"oray.net",
"panorama9.com",
"parsec.app",
"parsecusercontent.com",
"pcvisit.de",
"pilixo.com",
"playanext.com",
"pulseway.com",
"qetqo.com",
"r-hud.net",
"real-time-collaboration.com",
"remmon.hu",
"remote.it",
"remote.management",
"remotecall.com",
"remotedesktop.com",
"remotepc.com",
"remotetopc.com",
"remoteutilities.com",
"remotix.com",
"remotly.com",
"repairshopr.com",
"rmansys.ru",
"rmmservice.ca",
"rmmservice.eu",
"royalapps.com",
"rport.io",
"rudesktop.ru",
"rustdesk.com",
"rview.com",
"screenconnect.com",
"screenmeet.com",
"scrn.mt",
"servably.com",
"server-eye.de",
"set.me",
"setme.net",
"showmypc.com",
"signalserver.xyz",
"simple-help.com",
"skyfex.com",
"sorillus.com",
"splashtop.com",
"splashtop.eu",
"spyanywhere.com",
"spytech-web.com",
"startsupport.com",
"superops.ai",
"superops.com",
"superopsalpha.com",
"superopsbeta.com",
"supremocontrol.com",
"swi-rc.com",
"swi-tc.com",
"syncroapi.com",
"syncromsp.com",
"syspectr.com",
"system-monitor.com",
"systemmonitor.us",
"tacticalrmm.com",
"tailscale.com",
"teamviewer.com",
"techinline.net",
"tele-desk.com",
"tiflux.com",
"tightvnc.com",
"tmate.io",
"todesk.com",
"twingate.com",
"ultraviewer.net",
"ultravnc.com",
"vnc.com",
"weezo.me",
"weezo.net",
"xeox.com",
"zoho.eu",
"zohoassist.com",
"zohoassist.jp"
)
// Aggregate by parent domain and get 1st time seen timestamp as well as unique count of agents
| STATS
event_count = COUNT(*),
Esql.first_time_seen = MIN(@timestamp),
Esql.count_distinct_host_id = COUNT_DISTINCT(host.id),
Esql.process_executable_values = VALUES(process.executable),
Esql.dns_question_name_values = VALUES(dns.question.name),
Esql.host_name_values = VALUES(host.name),
Esql.host_id_values = VALUES(host.id),
Esql.user_name_values = VALUES(user.name),
Esql.user_id_values = VALUES(user.id),
Esql.namespace_values = VALUES(data_stream.namespace) BY parent_domain
// Calculate the time difference between first time seen and rule execution time
| eval Esql.recent = DATE_DIFF("minute", Esql.first_time_seen, now())
// First time seen is within 6m of the rule execution time and first seen in the last 5 days as per the rule from schedule and limited to 1 unique host
| where Esql.recent <= 6 and Esql.count_distinct_host_id == 1
// populate fields for rule exception and triage
| eval host.name = MV_FIRST(Esql.host_name_values),
host.id = MV_FIRST(Esql.host_id_values),
user.name = MV_FIRST(Esql.user_name_values),
user.id = MV_FIRST(Esql.user_id_values),
data_stream.namespace = MV_FIRST(Esql.namespace_values),
process.executable = MV_FIRST(Esql.process_executable_values),
dns.question.name = MV_FIRST(Esql.dns_question_name_values)
| keep host.name, host.id, user.name, user.id, data_stream.namespace, process.executable, dns.question.name, Esql.*
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1219"
name = "Remote Access Tools"
reference = "https://attack.mitre.org/techniques/T1219/"
[[rule.threat.technique.subtechnique]]
id = "T1219.002"
name = "Remote Desktop Software"
reference = "https://attack.mitre.org/techniques/T1219/002/"
[rule.threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"
Stages and Predicates
Stage 1: from
FROM logs-endpoint.events.network-*, logs-windows.sysmon_operational-* METADATA _index
Stage 2: where
| WHERE host.os.type == "windows"
AND event.category == "network"
AND event.action in ("lookup_requested", "DNSEvent (DNS query)")
AND dns.question.name IS NOT NULL
Stage 3: where
| WHERE NOT
process.name IN (
"chrome.exe", "msedge.exe", "MicrosoftEdge.exe", "MicrosoftEdgeCP.exe",
"firefox.exe", "iexplore.exe", "safari.exe", "brave.exe",
"opera.exe", "vivaldi.exe", "msedgewebview2.exe"
)
Stage 4: grok
| GROK dns.question.name """(?:[^.]+\.)+(?<parent_domain>[^.]+\.[^.]+)$"""
Stage 5: eval
| EVAL parent_domain = COALESCE(parent_domain, dns.question.name)
Stage 6: where
| WHERE parent_domain IN (
"01com.com",
"247ithelp.com",
"action1.com",
"addigy.com",
"aeroadmin.com",
"ammyy.com",
"anydesk.com",
"anyplace-control.com",
"anysupport.net",
"atera.com",
"aurelius.host",
"auvik.com",
"aweray.com",
"aweray.net",
"backdrop.cloud",
"barracudamsp.com",
"beamyourscreen.com",
"beanywhere.com",
"beinsync.com",
"beinsync.net",
"beyondtrustcloud.com",
"bomgar.com",
"bomgarcloud.com",
"centrastage.net",
"centuriontech.com",
"connectwise.com",
"crossloop.com",
"dameware.com",
"datto.com",
"datto.net",
"deskday.ai",
"deskroll.com",
"desktopstreaming.com",
"distantdesktop.com",
"donkz.nl",
"dwservice.net",
"ehorus.com",
"electric.ai",
"emcosoftware.com",
"ericom.com",
"fastsupport.com",
"fastviewer.com",
"fixme.it",
"fleetdeck.io",
"gatherplace.com",
"gatherplace.net",
"getgo.com",
"getscreen.me",
"gotoassist.at",
"gotoassist.com",
"gotoassist.me",
"gotohttp.com",
"gotoresolve.com",
"goverlan.com",
"heartbeatrm.com",
"helpme.net",
"helpwire.app",
"hoptodesk.com",
"hostedrmm.com",
"immy.bot",
"immybot.com",
"imperosoftware.com",
"instanthousecall.com",
"instanthousecall.net",
"intelliadmin.com",
"internapcdn.net",
"internetid.ru",
"iperius-rs.com",
"iperius.net",
"iperiusremote.com",
"islonline.com",
"islonline.net",
"itarian.com",
"itsupport247.net",
"jumpcloud.com",
"jumpdesktop.com",
"jumpto.me",
"kabuto.io",
"kabutoservices.com",
"kaseya.com",
"kaseya.net",
"kickidler.com",
"laplink.com",
"level.io",
"liongard.com",
"litemanager.com",
"litemanager.ru",
"logicnow.com",
"logmein-gateway.com",
"logmein.com",
"logmeininc.com",
"logmeinrescue.com",
"logmeinrescue.eu",
"lunixar.com",
"meshcentral.com",
"mikogo.com",
"mikogo4.com",
"miradore.com",
"msp360.com",
"mygreenpc.com",
"n-able.com",
"naverisk.com",
"nchuser.com",
"netop.com",
"netsupportmanager.com",
"netsupportsoftware.com",
"netviewer.com",
"ninjaone.com",
"ninjarmm.com",
"ninjarmm.net",
"nomachine.com",
"ntrsupport.com",
"opti-tune.com",
"optitune.us",
"oray.com",
"oray.net",
"panorama9.com",
"parsec.app",
"parsecusercontent.com",
"pcvisit.de",
"pilixo.com",
"playanext.com",
"pulseway.com",
"qetqo.com",
"r-hud.net",
"real-time-collaboration.com",
"remmon.hu",
"remote.it",
"remote.management",
"remotecall.com",
"remotedesktop.com",
"remotepc.com",
"remotetopc.com",
"remoteutilities.com",
"remotix.com",
"remotly.com",
"repairshopr.com",
"rmansys.ru",
"rmmservice.ca",
"rmmservice.eu",
"royalapps.com",
"rport.io",
"rudesktop.ru",
"rustdesk.com",
"rview.com",
"screenconnect.com",
"screenmeet.com",
"scrn.mt",
"servably.com",
"server-eye.de",
"set.me",
"setme.net",
"showmypc.com",
"signalserver.xyz",
"simple-help.com",
"skyfex.com",
"sorillus.com",
"splashtop.com",
"splashtop.eu",
"spyanywhere.com",
"spytech-web.com",
"startsupport.com",
"superops.ai",
"superops.com",
"superopsalpha.com",
"superopsbeta.com",
"supremocontrol.com",
"swi-rc.com",
"swi-tc.com",
"syncroapi.com",
"syncromsp.com",
"syspectr.com",
"system-monitor.com",
"systemmonitor.us",
"tacticalrmm.com",
"tailscale.com",
"teamviewer.com",
"techinline.net",
"tele-desk.com",
"tiflux.com",
"tightvnc.com",
"tmate.io",
"todesk.com",
"twingate.com",
"ultraviewer.net",
"ultravnc.com",
"vnc.com",
"weezo.me",
"weezo.net",
"xeox.com",
"zoho.eu",
"zohoassist.com",
"zohoassist.jp"
)
Stage 7: stats
| STATS
event_count = COUNT(*),
Esql.first_time_seen = MIN(@timestamp),
Esql.count_distinct_host_id = COUNT_DISTINCT(host.id),
Esql.process_executable_values = VALUES(process.executable),
Esql.dns_question_name_values = VALUES(dns.question.name),
Esql.host_name_values = VALUES(host.name),
Esql.host_id_values = VALUES(host.id),
Esql.user_name_values = VALUES(user.name),
Esql.user_id_values = VALUES(user.id),
Esql.namespace_values = VALUES(data_stream.namespace) BY parent_domain
Stage 8: eval
| eval Esql.recent = DATE_DIFF("minute", Esql.first_time_seen, now())
Stage 9: where
| where Esql.recent <= 6 and Esql.count_distinct_host_id == 1
Stage 10: eval
| eval host.name = MV_FIRST(Esql.host_name_values),
host.id = MV_FIRST(Esql.host_id_values),
user.name = MV_FIRST(Esql.user_name_values),
user.id = MV_FIRST(Esql.user_id_values),
data_stream.namespace = MV_FIRST(Esql.namespace_values),
process.executable = MV_FIRST(Esql.process_executable_values),
dns.question.name = MV_FIRST(Esql.dns_question_name_values)
Stage 11: keep
| keep host.name, host.id, user.name, user.id, data_stream.namespace, process.executable, dns.question.name, Esql.*
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Esql.count_distinct_host_id | eq |
| field:"Esql.count_distinct_host_id" kind:eq value:"1" |
Esql.recent | le |
| field:"Esql.recent" kind:le value:"6" |
dns.question.name | is_not_null | field:"QueryName" kind:is_not_null | |
event.action | in |
| field:"EventType" kind:in |
event.category | eq |
| field:"event.category" kind:eq value:"network" |
parent_domain | in |
| field:"parent_domain" kind:in |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.name | in | MicrosoftEdge.exe, MicrosoftEdgeCP.exe, brave.exe, chrome.exe, firefox.exe, iexplore.exe, msedge.exe, msedgewebview2.exe, opera.exe, safari.exe, vivaldi.exe | excludes:process.name |
Output Fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
host.name | KEEP host.name |
host.id | KEEP host.id |
user.name | KEEP user.name |
user.id | KEEP user.id |
data_stream.namespace | KEEP data_stream.namespace |
process.executable | KEEP process.executable |
dns.question.name | KEEP dns.question.name |
Esql.* | KEEP Esql.* |
Forbidden Direct Interactive Kubernetes API Request
#This rule leverages a combination of Defend for Containers and Kubernetes audit logs to detect the execution of forbidden interactive Kubernetes API requests. An adversary may need to execute interactive Kubernetes API requests to gain access to the Kubernetes API server or other resources within the cluster. These requests are often used to enumerate the Kubernetes API server or other resources within the cluster, and may indicate an attempt to move laterally within the cluster. Attackers may attempt to access resources that are forbidden by the authorization policy. Note that this rule may not trigger if the authorization token of the request is expanded within the process argument list, as the length of the "process.args" field may lead to the field being ignored.
Known False Positives
- There is a potential for false positives if the direct interactive Kubernetes API requests are used for legitimate purposes, such as debugging or troubleshooting. It is important to investigate any alerts generated by this rule to determine if they are indicative of malicious activity or part of legitimate container activity.
- There is a risk of false positives if there are several containers named the same, as the rule may correlate the request to the wrong container.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Discovery |
Rule Body
[metadata]
creation_date = "2026/01/21"
integration = ["cloud_defend", "kubernetes"]
maturity = "production"
min_stack_comments = "Defend for Containers integration was re-introduced in 9.3.0"
min_stack_version = "9.3.0"
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = """
This rule leverages a combination of Defend for Containers and Kubernetes audit logs to detect the execution of forbidden
interactive Kubernetes API requests. An adversary may need to execute interactive Kubernetes API requests to gain access
to the Kubernetes API server or other resources within the cluster. These requests are often used to enumerate the
Kubernetes API server or other resources within the cluster, and may indicate an attempt to move laterally within the
cluster. Attackers may attempt to access resources that are forbidden by the authorization policy. Note that this rule may
not trigger if the authorization token of the request is expanded within the process argument list, as the length of the
"process.args" field may lead to the field being ignored.
"""
false_positives = [
"""
There is a potential for false positives if the direct interactive Kubernetes API requests are used for legitimate purposes,
such as debugging or troubleshooting. It is important to investigate any alerts generated by this rule to determine
if they are indicative of malicious activity or part of legitimate container activity.
""",
"""
There is a risk of false positives if there are several containers named the same, as the rule may correlate the request
to the wrong container.
""",
]
from = "now-6m"
index = ["logs-cloud_defend.process*", "logs-kubernetes.audit_logs-*"]
interval = "5m"
language = "eql"
license = "Elastic License v2"
name = "Forbidden Direct Interactive Kubernetes API Request"
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 Forbidden Direct Interactive Kubernetes API Request
This rule correlates an interactive command execution inside a container with a Kubernetes API request that is explicitly forbidden, signaling hands-on-keyboard probing and unauthorized access attempts. It matters because attackers use live shells to enumerate cluster resources and test privileges for lateral movement or escalation. Example: after compromising a pod, an operator opens a shell and runs kubectl get secrets or curls the API server with the pod’s token, repeatedly receiving 403 Forbidden.
### Possible investigation steps
- Correlate the pod, container, namespace, node, and service account from the alert, then quickly pull the matching audit entries to see the verb, resource, requestURI, and userAgent for the forbidden calls.
- Determine whether the container image normally includes utilities like kubectl/curl/openssl or if they were dropped into the pod, and review recent file writes and package installs to differentiate admin debugging from hands-on-keyboard activity.
- Inspect the pod’s service account bindings and effective RBAC in the target namespace to confirm least privilege and understand why the request was denied, then check for other successful API requests from the same identity around the same timeframe.
- Review network connections from the pod to the API server (and any proxies) during the session to validate direct access paths, source IPs, and whether a mounted service account token from /var/run/secrets was used.
- Validate whether this was an authorized SRE/debug session by contacting the workload owner and checking for recent kubectl exec or ephemeral debug activity; if not expected, expand the search for similar forbidden attempts from other pods.
### False positive analysis
- An authorized kubectl exec or ephemeral debug session inside a pod where an engineer runs kubectl or curl to probe API resources and, because the pod’s service account is intentionally least‑privileged, the requests are forbidden as expected.
- Benign interactive troubleshooting that mistakenly uses the wrong namespace or queries cluster‑scoped endpoints from within the container (e.g., curl/openssl to the API server), causing the audit logs to show forbid decisions even though no malicious access was attempted.
### Response and remediation
- Immediately terminate the interactive shell (e.g., sh/bash) in the offending container and isolate the pod by applying a deny-egress NetworkPolicy in its namespace that blocks outbound connections to https://kubernetes.default.svc and the API server IPs.
- Revoke and rotate credentials by deleting the pod and its ServiceAccount token Secret, temporarily setting automountServiceAccountToken: false on the workload, and redeploying with a new ServiceAccount after validating RBAC least privilege.
- Remove attacker tooling and persistence by rebuilding the container image to exclude kubectl/curl/openssl/socat/ncat, clearing writable volume mounts that contain dropped binaries or scripts, and redeploying from a trusted registry.
- Sweep for spread by identifying pods running the same image or on the same node and terminating any interactive processes issuing Kubernetes API requests from within containers, then restart those workloads cleanly.
- Escalate to incident response if you observe successful API operations (200/201) on secrets, configmaps, or RBAC objects, exec into other pods, or privileged container settings (privileged=true, hostNetwork, or hostPID), indicating lateral movement or credential compromise.
- Harden going forward by tightening RBAC on the new ServiceAccount, enforcing Gatekeeper/OPA policies to deny images that include kubectl/curl and block interactive shells, setting readOnlyRootFilesystem and dropping NET_ADMIN, and restricting API server access via egress controls.
"""
risk_score = 47
rule_id = "5d1c962d-5d2a-48d4-bdcf-e980e3914947"
severity = "medium"
tags = [
"Data Source: Elastic Defend for Containers",
"Data Source: Kubernetes",
"Domain: Container",
"Domain: Kubernetes",
"OS: Linux",
"Use Case: Threat Detection",
"Tactic: Execution",
"Tactic: Discovery",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
sequence with maxspan=1s
[process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and (
process.name in ("wget", "curl", "openssl", "socat", "ncat", "kubectl") or
(
/* Account for tools that execute utilities as a subprocess, in this case the target utility name will appear as a process arg */
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish", "busybox") and
process.args in (
"wget", "/bin/wget", "/usr/bin/wget", "/usr/local/bin/wget",
"ssl_client", "/bin/ssl_client", "/usr/bin/ssl_client", "/usr/local/bin/ssl_client",
"curl", "/bin/curl", "/usr/bin/curl", "/usr/local/bin/curl",
"openssl", "/bin/openssl", "/usr/bin/openssl", "/usr/local/bin/openssl",
"socat", "/bin/socat", "/usr/bin/socat", "/usr/local/bin/socat",
"ncat", "/bin/ncat", "/usr/bin/ncat", "/usr/local/bin/ncat",
"kubectl", "/bin/kubectl", "/usr/bin/kubectl", "/usr/local/bin/kubectl"
) and
/* default exclusion list to not FP on default multi-process commands */
not process.args in (
"which", "/bin/which", "/usr/bin/which", "/usr/local/bin/which",
"man", "/bin/man", "/usr/bin/man", "/usr/local/bin/man",
"chmod", "/bin/chmod", "/usr/bin/chmod", "/usr/local/bin/chmod",
"chown", "/bin/chown", "/usr/bin/chown", "/usr/local/bin/chown"
)
)
) and process.interactive == true and container.id like "*"
] by orchestrator.resource.name
[any where data_stream.dataset == "kubernetes.audit_logs" and kubernetes.audit.stage in ("ResponseComplete", "ResponseStarted") and
`kubernetes.audit.annotations.authorization_k8s_io/decision` == "forbid"
] by `kubernetes.audit.user.extra.authentication.kubernetes.io/pod-name`
'''
[[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.technique]]
id = "T1609"
name = "Container Administration Command"
reference = "https://attack.mitre.org/techniques/T1609/"
[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[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
Ordered sequence: each step below must occur in order within 1s, correlated by kubernetes.audit.user.extra.authentication.kubernetes.io/pod-name, orchestrator.resource.name.
Stage 1: process
[process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and (
process.name in ("wget", "curl", "openssl", "socat", "ncat", "kubectl") or
(
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish", "busybox") and
process.args in (
"wget", "/bin/wget", "/usr/bin/wget", "/usr/local/bin/wget",
"ssl_client", "/bin/ssl_client", "/usr/bin/ssl_client", "/usr/local/bin/ssl_client",
"curl", "/bin/curl", "/usr/bin/curl", "/usr/local/bin/curl",
"openssl", "/bin/openssl", "/usr/bin/openssl", "/usr/local/bin/openssl",
"socat", "/bin/socat", "/usr/bin/socat", "/usr/local/bin/socat",
"ncat", "/bin/ncat", "/usr/bin/ncat", "/usr/local/bin/ncat",
"kubectl", "/bin/kubectl", "/usr/bin/kubectl", "/usr/local/bin/kubectl"
) and
not process.args in (
"which", "/bin/which", "/usr/bin/which", "/usr/local/bin/which",
"man", "/bin/man", "/usr/bin/man", "/usr/local/bin/man",
"chmod", "/bin/chmod", "/usr/bin/chmod", "/usr/local/bin/chmod",
"chown", "/bin/chown", "/usr/bin/chown", "/usr/local/bin/chown"
)
)
) and process.interactive == true and container.id like "*"
] by orchestrator.resource.name
Stage 2: any
[any where data_stream.dataset == "kubernetes.audit_logs" and kubernetes.audit.stage in ("ResponseComplete", "ResponseStarted") and
`kubernetes.audit.annotations.authorization_k8s_io/decision` == "forbid"
] by `kubernetes.audit.user.extra.authentication.kubernetes.io/pod-name`
Indicators
These rows show field, operator, and value matches.
GCP Pub/Sub Subscription Deletion
#Identifies the deletion of a subscription in Google Cloud Platform (GCP). In GCP, the publisher-subscriber relationship (Pub/Sub) is an asynchronous messaging service that decouples event-producing and event-processing services. A subscription is a named resource representing the stream of messages to be delivered to the subscribing application.
Known False Positives
- Subscription deletions may be done by a system or network administrator. Verify whether the user email, resource name, and/or hostname should be making changes in your environment. Subscription deletions by 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 |
|---|---|
| Defense Impairment | |
| Impact |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| GCP | google.pubsub.Subscriber.DeleteSubscription: Delete subscription |
Rule Body
[metadata]
creation_date = "2020/09/23"
integration = ["gcp"]
maturity = "production"
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = """
Identifies the deletion of a subscription in Google Cloud Platform (GCP). In GCP, the publisher-subscriber relationship
(Pub/Sub) is an asynchronous messaging service that decouples event-producing and event-processing services. A
subscription is a named resource representing the stream of messages to be delivered to the subscribing application.
"""
false_positives = [
"""
Subscription deletions may be done by a system or network administrator. Verify whether the user email, resource
name, and/or hostname should be making changes in your environment. Subscription deletions by unfamiliar users or
hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule.
""",
]
index = ["filebeat-*", "logs-gcp*"]
language = "kuery"
license = "Elastic License v2"
name = "GCP Pub/Sub Subscription Deletion"
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 GCP Pub/Sub Subscription Deletion
Google Cloud Pub/Sub is a messaging service that enables asynchronous communication between event producers and consumers. Subscriptions in Pub/Sub are crucial for message delivery to applications. Adversaries may delete subscriptions to disrupt communication, evade detection, or impair defenses. The detection rule monitors audit logs for successful subscription deletions, flagging potential defense evasion activities.
### Possible investigation steps
- Review the audit logs for the specific event.action: google.pubsub.v*.Subscriber.DeleteSubscription to identify the user or service account responsible for the deletion.
- Check the event.dataset:gcp.audit logs for any preceding or subsequent actions by the same user or service account to determine if there is a pattern of suspicious activity.
- Investigate the context of the deleted subscription by examining the associated project and any related resources to understand the potential impact on the application or service.
- Verify if the deletion aligns with any recent changes or maintenance activities within the organization to rule out legitimate actions.
- Assess the permissions and roles assigned to the user or service account to ensure they are appropriate and not overly permissive, which could indicate a security risk.
- Consult with the relevant application or service owners to confirm whether the subscription deletion was authorized and necessary.
### False positive analysis
- Routine maintenance activities by administrators may lead to subscription deletions that are not malicious. To manage this, create exceptions for known maintenance windows or specific admin accounts.
- Automated scripts or tools used for managing Pub/Sub resources might delete subscriptions as part of their normal operation. Identify these scripts and exclude their actions from triggering alerts by using service account identifiers.
- Development and testing environments often involve frequent creation and deletion of subscriptions. Exclude these environments from alerts by filtering based on project IDs or environment tags.
- Subscription deletions as part of a resource cleanup process can be non-threatening. Document and exclude these processes by identifying patterns in the audit logs, such as specific user agents or IP addresses associated with cleanup operations.
### Response and remediation
- Immediately verify the legitimacy of the subscription deletion by contacting the responsible team or individual to confirm if the action was authorized.
- If unauthorized, revoke access for the user or service account involved in the deletion to prevent further unauthorized actions.
- Restore the deleted subscription from backup or recreate it if necessary, ensuring that message delivery to the application is resumed.
- Conduct a thorough review of audit logs to identify any other suspicious activities or patterns that may indicate further compromise.
- Implement additional access controls and monitoring for Pub/Sub resources to prevent unauthorized deletions in the future.
- Escalate the incident to the security operations team for further investigation and to determine if additional systems or data were affected.
- Update incident response plans and playbooks to include specific procedures for handling Pub/Sub subscription deletions and similar threats.
## Setup
The GCP Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
references = ["https://cloud.google.com/pubsub/docs/overview"]
risk_score = 21
rule_id = "cc89312d-6f47-48e4-a87c-4977bd4633c3"
severity = "low"
tags = [
"Domain: Cloud",
"Data Source: GCP",
"Data Source: Google Cloud Platform",
"Use Case: Log Auditing",
"Tactic: Defense Evasion",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "query"
query = '''
data_stream.dataset:gcp.audit and event.action:google.pubsub.v*.Subscriber.DeleteSubscription and event.outcome:success
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"
[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 = "T1489"
name = "Service Stop"
reference = "https://attack.mitre.org/techniques/T1489/"
[rule.threat.tactic]
id = "TA0040"
name = "Impact"
reference = "https://attack.mitre.org/tactics/TA0040/"
Stages and Predicates
Stage 1: query
data_stream.dataset:gcp.audit and event.action:google.pubsub.v*.Subscriber.DeleteSubscription 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:"gcp.audit" |
event.action | wildcard |
| field:"EventType" kind:wildcard value:"google.pubsub.v*.Subscriber.DeleteSubscription" |
event.outcome | eq |
| field:"event.outcome" kind:eq value:"success" |
IPv4/IPv6 Forwarding Activity
#This rule monitors for the execution of commands that enable IPv4 and IPv6 forwarding on Linux systems. Enabling IP forwarding can be used to route network traffic between different network interfaces, potentially allowing attackers to pivot between networks, exfiltrate data, or establish command and control channels.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Rule Body
[metadata]
creation_date = "2024/11/04"
integration = ["endpoint", "sentinel_one_cloud_funnel", "crowdstrike"]
maturity = "production"
updated_date = "2026/03/24"
[rule]
author = ["Elastic"]
description = """
This rule monitors for the execution of commands that enable IPv4 and IPv6 forwarding on Linux systems. Enabling IP
forwarding can be used to route network traffic between different network interfaces, potentially allowing attackers to
pivot between networks, exfiltrate data, or establish command and control channels.
"""
from = "now-9m"
index = ["endgame-*", "logs-endpoint.events.process*", "logs-sentinel_one_cloud_funnel.*", "logs-crowdstrike.fdr*"]
language = "eql"
license = "Elastic License v2"
name = "IPv4/IPv6 Forwarding Activity"
note = """## Triage and analysis
> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
### Investigating IPv4/IPv6 Forwarding Activity
IPv4/IPv6 forwarding allows a Linux system to route traffic between network interfaces, facilitating network communication. While essential for legitimate network operations, adversaries can exploit this capability to pivot across networks, exfiltrate data, or maintain control channels. The detection rule identifies suspicious command executions that enable IP forwarding, focusing on specific command patterns and processes, thus highlighting potential misuse.
### Possible investigation steps
- Review the process command line details to understand the context in which IP forwarding was enabled, focusing on the specific command patterns identified in the alert.
- Identify the parent process of the suspicious command execution using the process.parent.executable field to determine if it was initiated by a legitimate or potentially malicious process.
- Check the user account associated with the process execution to assess if the action was performed by an authorized user or if there are signs of compromised credentials.
- Investigate recent network activity on the host to identify any unusual traffic patterns or connections that could indicate data exfiltration or lateral movement.
- Correlate the alert with other security events or logs from the same host or network segment to identify any related suspicious activities or patterns.
- Assess the system's current configuration and network topology to determine if enabling IP forwarding could have been part of a legitimate administrative task or if it poses a security risk.
### False positive analysis
- Routine administrative tasks may trigger the rule when system administrators enable IP forwarding for legitimate network configuration purposes. To manage this, create exceptions for known administrative scripts or processes that regularly perform these actions.
- Automated scripts or configuration management tools like Ansible or Puppet might execute commands that match the rule's criteria. Identify these tools and exclude their processes from the rule to prevent false alerts.
- Network testing or troubleshooting activities often require temporary enabling of IP forwarding. Document and exclude these activities when performed by trusted users or during scheduled maintenance windows.
- Virtualization or container orchestration platforms may enable IP forwarding as part of their normal operations. Recognize these platforms and adjust the rule to ignore their specific processes or command patterns.
- Security tools or network monitoring solutions might also enable IP forwarding for analysis purposes. Verify these tools and exclude their processes to avoid unnecessary alerts.
### Response and remediation
- Immediately isolate the affected Linux system from the network to prevent further unauthorized access or data exfiltration.
- Terminate any suspicious processes identified by the detection rule, particularly those enabling IP forwarding, to halt potential lateral movement or data exfiltration.
- Conduct a thorough review of network traffic logs to identify any unusual or unauthorized connections that may indicate command and control activity.
- Revert any unauthorized changes to system configurations, specifically those related to IP forwarding settings, to restore the system to its secure state.
- Escalate the incident to the security operations team for further investigation and to determine if additional systems are compromised.
- Implement network segmentation to limit the ability of attackers to pivot between networks in the future.
- Enhance monitoring and alerting for similar suspicious activities by tuning detection systems to recognize patterns associated with IP forwarding misuse."""
risk_score = 21
rule_id = "5a138e2e-aec3-4240-9843-56825d0bc569"
severity = "low"
tags = [
"Domain: Endpoint",
"OS: Linux",
"Use Case: Threat Detection",
"Tactic: Command and Control",
"Data Source: Elastic Defend",
"Data Source: SentinelOne",
"Data Source: Elastic Endgame",
"Resources: Investigation Guide",
"Data Source: Crowdstrike",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "start", "exec_event", "ProcessRollup2") and
?process.parent.executable != null and process.command_line like (
"*net.ipv4.ip_forward*", "*/proc/sys/net/ipv4/ip_forward*", "*net.ipv6.conf.all.forwarding*",
"*/proc/sys/net/ipv6/conf/all/forwarding*"
) and (
(process.name == "sysctl" and process.args like ("*-w*", "*--write*", "*=*")) or
(
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and process.args == "-c" and
process.command_line like "*echo *"
)
) and
not (
process.parent.name like~ ("privsep-helper", "platform-python*", "init.ipv6-global", "wsl-bootstrap") or
?process.parent.executable == "/usr/sbin/sshd" or
?process.parent.args in (
"/usr/lib/pritunl/usr/bin/pritunl", "/usr/bin/dockerd-rootless.sh", "/etc/rc.d/init.d/network", "/etc/rc0.d/K90network"
) or
?process.parent.args like "/etc/untangle/post-network-hook.d/*"
)
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1090"
name = "Proxy"
reference = "https://attack.mitre.org/techniques/T1090/"
[[rule.threat.technique.subtechnique]]
id = "T1090.001"
name = "Internal Proxy"
reference = "https://attack.mitre.org/techniques/T1090/001/"
[[rule.threat.technique]]
id = "T1572"
name = "Protocol Tunneling"
reference = "https://attack.mitre.org/techniques/T1572/"
[rule.threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"
Stages and Predicates
Stage 1: process
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "start", "exec_event", "ProcessRollup2") and
?process.parent.executable != null and process.command_line like (
"*net.ipv4.ip_forward*", "*/proc/sys/net/ipv4/ip_forward*", "*net.ipv6.conf.all.forwarding*",
"*/proc/sys/net/ipv6/conf/all/forwarding*"
) and (
(process.name == "sysctl" and process.args like ("*-w*", "*--write*", "*=*")) or
(
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and process.args == "-c" and
process.command_line like "*echo *"
)
) and
not (
process.parent.name like~ ("privsep-helper", "platform-python*", "init.ipv6-global", "wsl-bootstrap") or
?process.parent.executable == "/usr/sbin/sshd" or
?process.parent.args in (
"/usr/lib/pritunl/usr/bin/pritunl", "/usr/bin/dockerd-rootless.sh", "/etc/rc.d/init.d/network", "/etc/rc0.d/K90network"
) or
?process.parent.args like "/etc/untangle/post-network-hook.d/*"
)
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 | eq |
| field:"process.args" kind:eq value:"-c" |
process.args | wildcard |
| field:"process.args" kind:wildcard |
process.command_line | wildcard |
| field:"CommandLine" kind:wildcard |
process.name | eq |
| field:"process_basename" kind:eq value:"sysctl" |
process.name | in |
| field:"process_basename" kind:in |
process.parent.executable | is_not_null | field:"ParentImage" kind:is_not_null |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.parent.args | in | /etc/rc.d/init.d/network, /etc/rc0.d/K90network, /usr/bin/dockerd-rootless.sh, /usr/lib/pritunl/usr/bin/pritunl | excludes:process.parent.args |
process.parent.args | starts_with | /etc/untangle/post-network-hook.d/ | excludes:process.parent.args field:"process.parent.args" value:"/etc/untangle/post-network-hook.d/" |
process.parent.executable | eq | /usr/sbin/sshd | excludes:process.parent.executable field:"process.parent.executable" value:"/usr/sbin/sshd" |
process.parent.name | wildcard | privsep-helper, platform-python*, init.ipv6-global, wsl-bootstrap | excludes:process.parent.name |
M365 Exchange Inbox Forwarding Rule Created
#Identifies when a new Inbox forwarding rule is created in Microsoft 365. Inbox rules process messages in the Inbox based on conditions and take actions. In this case, the rules will forward the emails to a defined address. Attackers can abuse Inbox Rules to intercept and exfiltrate email data without making organization-wide configuration changes or having the corresponding privileges.
Known False Positives
- Users and Administrators can create inbox rules for legitimate purposes. Verify if it complies with the company policy and done with the user's consent. Exceptions can be added to this rule to filter expected behavior.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Collection |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
- M365 Exchange Inbox Rule with Obfuscated Name (Elastic)
- M365 Exchange Mail Flow Transport Rule Created (Elastic)
- M365 Exchange Mailbox High-Risk Permission Delegated (Elastic)
- Mail redirect via ExO transport rule (Kusto)
- Malicious Inbox Rule (Kusto)
- O365 BEC Email Hiding Rule Created (Splunk)
- O365 Email New Inbox Rule Created (Splunk)
- O365 New Forwarding Mailflow Rule Created (Splunk)
Rule Body
[metadata]
creation_date = "2021/03/29"
integration = ["o365"]
maturity = "production"
updated_date = "2026/05/27"
[rule]
author = ["Elastic", "Gary Blackwell", "Austin Songer", "Marco Pedrinazzi"]
description = """
Identifies when a new Inbox forwarding rule is created in Microsoft 365. Inbox rules process messages in the Inbox based
on conditions and take actions. In this case, the rules will forward the emails to a defined address. Attackers can
abuse Inbox Rules to intercept and exfiltrate email data without making organization-wide configuration changes or
having the corresponding privileges.
"""
false_positives = [
"""
Users and Administrators can create inbox rules for legitimate purposes. Verify if it complies with the company
policy and done with the user's consent. Exceptions can be added to this rule to filter expected behavior.
""",
]
from = "now-9m"
index = ["logs-o365.audit-*", "filebeat-*"]
language = "eql"
license = "Elastic License v2"
name = "M365 Exchange Inbox Forwarding Rule Created"
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 M365 Exchange Inbox Forwarding Rule Created
Microsoft 365 allows users to create inbox rules to automate email management, such as forwarding messages to another address. While useful, attackers can exploit these rules to secretly redirect emails, facilitating data exfiltration. The detection rule monitors for the creation of such forwarding rules, focusing on successful events that specify forwarding parameters, thus identifying potential unauthorized email redirection activities.
### Possible investigation steps
- Review the event details to identify the user account associated with the creation of the forwarding rule by examining the o365.audit.Parameters.
- Check the destination email address specified in the forwarding rule (ForwardTo, ForwardAsAttachmentTo, or RedirectTo) to determine if it is an external or suspicious address.
- Investigate the user's recent activity logs in Microsoft 365 to identify any unusual or unauthorized actions, focusing on event.dataset:o365.audit and event.provider:Exchange.
- Verify if the user has a legitimate reason to create such a forwarding rule by consulting with their manager or reviewing their role and responsibilities.
- Assess if there have been any recent security incidents or alerts related to the user or the destination email address to identify potential compromise.
- Consider disabling the forwarding rule temporarily and notifying the user and IT security team if the rule appears suspicious or unauthorized.
### False positive analysis
- Legitimate forwarding rules set by users for convenience or workflow purposes may trigger alerts. Review the context of the rule creation, such as the user and the destination address, to determine if it aligns with normal business operations.
- Automated systems or third-party applications that integrate with Microsoft 365 might create forwarding rules as part of their functionality. Identify these systems and consider excluding their associated accounts from the rule.
- Temporary forwarding rules set during user absence, such as vacations or leaves, can be mistaken for malicious activity. Implement a process to document and approve such rules, allowing for their exclusion from monitoring during the specified period.
- Internal forwarding to trusted domains or addresses within the organization might not pose a security risk. Establish a list of trusted internal addresses and configure exceptions for these in the detection rule.
- Frequent rule changes by specific users, such as IT administrators or support staff, may be part of their job responsibilities. Monitor these accounts separately and adjust the rule to reduce noise from expected behavior.
### Response and remediation
- Immediately disable the forwarding rule by accessing the affected user's mailbox settings in Microsoft 365 and removing any unauthorized forwarding rules.
- Conduct a thorough review of the affected user's email account for any signs of compromise, such as unusual login activity or unauthorized changes to account settings.
- Reset the password for the affected user's account and enforce multi-factor authentication (MFA) to prevent further unauthorized access.
- Notify the user and relevant IT security personnel about the incident, providing details of the unauthorized rule and any potential data exposure.
- Escalate the incident to the security operations team for further investigation and to determine if other accounts may have been targeted or compromised.
- Implement additional monitoring on the affected account and similar high-risk accounts to detect any further suspicious activity or rule changes.
- Review and update email security policies and configurations to prevent similar incidents, ensuring that forwarding rules are monitored and restricted as necessary.
## Setup
The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
references = [
"https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/responding-to-a-compromised-email-account?view=o365-worldwide",
"https://docs.microsoft.com/en-us/powershell/module/exchange/new-inboxrule?view=exchange-ps",
"https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/detect-and-remediate-outlook-rules-forms-attack?view=o365-worldwide",
"https://raw.githubusercontent.com/PwC-IR/Business-Email-Compromise-Guide/main/Extractor%20Cheat%20Sheet.pdf",
"https://www.microsoft.com/en-us/security/blog/2026/04/06/ai-enabled-device-code-phishing-campaign-april-2026/"
]
risk_score = 47
rule_id = "ec8efb0c-604d-42fa-ac46-ed1cfbc38f78"
severity = "medium"
tags = [
"Domain: Cloud",
"Domain: SaaS",
"Domain: Email",
"Data Source: Microsoft 365",
"Data Source: Microsoft 365 Audit Logs",
"Use Case: Configuration Audit",
"Tactic: Collection",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
web where
event.provider == "Exchange" and
event.action in (
"New-InboxRule",
"Set-InboxRule",
"Set-Mailbox",
"Set-TransportRule",
"New-TransportRule"
) and event.outcome == "success" and
(
(?o365.audit.Parameters.ForwardTo != null and not endsWith~(?o365.audit.Parameters.ForwardTo, user.domain)) or
(?o365.audit.Parameters.ForwardAsAttachmentTo != null and not endsWith~(?o365.audit.Parameters.ForwardAsAttachmentTo, user.domain)) or
(?o365.audit.Parameters.ForwardingAddress != null and not endsWith~(?o365.audit.Parameters.ForwardingAddress, user.domain)) or
(?o365.audit.Parameters.ForwardingSmtpAddress != null and not endsWith~(?o365.audit.Parameters.ForwardingSmtpAddress, user.domain)) or
(?o365.audit.Parameters.RedirectTo != null and not endsWith~(?o365.audit.Parameters.RedirectTo, user.domain)) or
(?o365.audit.Parameters.RedirectToRecipients != null and not endsWith~(?o365.audit.Parameters.RedirectToRecipients, user.domain)) or
(?o365.audit.Parameters.RedirectMessageTo != null and not endsWith~(?o365.audit.Parameters.RedirectMessageTo, user.domain)) or
(?o365.audit.Parameters.BlindCopyTo != null and not endsWith~(?o365.audit.Parameters.BlindCopyTo, user.domain))
)
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1114"
name = "Email Collection"
reference = "https://attack.mitre.org/techniques/T1114/"
[[rule.threat.technique.subtechnique]]
id = "T1114.003"
name = "Email Forwarding Rule"
reference = "https://attack.mitre.org/techniques/T1114/003/"
[rule.threat.tactic]
id = "TA0009"
name = "Collection"
reference = "https://attack.mitre.org/tactics/TA0009/"
Stages and Predicates
Stage 1: web
web where
event.provider == "Exchange" and
event.action in (
"New-InboxRule",
"Set-InboxRule",
"Set-Mailbox",
"Set-TransportRule",
"New-TransportRule"
) and event.outcome == "success" and
(
(?o365.audit.Parameters.ForwardTo != null and not endsWith~(?o365.audit.Parameters.ForwardTo, user.domain)) or
(?o365.audit.Parameters.ForwardAsAttachmentTo != null and not endsWith~(?o365.audit.Parameters.ForwardAsAttachmentTo, user.domain)) or
(?o365.audit.Parameters.ForwardingAddress != null and not endsWith~(?o365.audit.Parameters.ForwardingAddress, user.domain)) or
(?o365.audit.Parameters.ForwardingSmtpAddress != null and not endsWith~(?o365.audit.Parameters.ForwardingSmtpAddress, user.domain)) or
(?o365.audit.Parameters.RedirectTo != null and not endsWith~(?o365.audit.Parameters.RedirectTo, user.domain)) or
(?o365.audit.Parameters.RedirectToRecipients != null and not endsWith~(?o365.audit.Parameters.RedirectToRecipients, user.domain)) or
(?o365.audit.Parameters.RedirectMessageTo != null and not endsWith~(?o365.audit.Parameters.RedirectMessageTo, user.domain)) or
(?o365.audit.Parameters.BlindCopyTo != null and not endsWith~(?o365.audit.Parameters.BlindCopyTo, user.domain))
)
Indicators
These rows show field, operator, and value matches.
M365 Security Compliance Admin Signal
#Identifies administrative actions in the Microsoft 365 Security & Compliance Center including cmdlet execution, RBAC changes, security insights, and user permission modifications. These events can indicate legitimate administrative activity or potential defense evasion through security control modifications such as DLP policy removal, compliance rule changes, or privilege escalation. This building block rule generates security events for correlation, threat hunting, and telemetry collection.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Persistence | |
| Defense Impairment |
Telemetry Coverage
Rule Body
[metadata]
bypass_bbr_timing = true
creation_date = "2026/02/20"
integration = ["o365"]
maturity = "production"
updated_date = "2026/03/24"
[rule]
author = ["Elastic"]
building_block_type = "default"
description = """
Identifies administrative actions in the Microsoft 365 Security & Compliance Center including cmdlet execution, RBAC
changes, security insights, and user permission modifications. These events can indicate legitimate administrative
activity or potential defense evasion through security control modifications such as DLP policy removal, compliance
rule changes, or privilege escalation. This building block rule generates security events for correlation, threat
hunting, and telemetry collection.
"""
from = "now-9m"
index = ["logs-o365.audit-*", "filebeat-*"]
language = "kuery"
license = "Elastic License v2"
name = "M365 Security Compliance Admin Signal"
references = [
"https://learn.microsoft.com/en-us/purview/audit-log-activities",
"https://learn.microsoft.com/en-us/office/office-365-management-api/office-365-management-activity-api-schema#enum-auditlogrecordtype---type-edmint32",
]
risk_score = 21
rule_id = "314557e1-a642-4dbc-af43-321bc04b6618"
setup = """### Additional notes
For information on troubleshooting the maximum alerts warning please refer to this [guide](https://www.elastic.co/guide/en/security/current/alerts-ui-monitor.html#troubleshoot-max-alerts).
"""
severity = "low"
tags = [
"Domain: Cloud",
"Domain: SaaS",
"Data Source: Microsoft 365",
"Data Source: Microsoft 365 Audit Logs",
"Data Source: Microsoft Purview",
"Use Case: Threat Detection",
"Use Case: Configuration Auditing",
"Tactic: Defense Evasion",
"Tactic: Persistence",
"Rule Type: BBR",
]
timestamp_override = "event.ingested"
type = "query"
query = '''
event.dataset:o365.audit and
event.code:(SecurityComplianceCenterEOPCmdlet or SecurityComplianceInsights or SecurityComplianceRBAC or SecurityComplianceUserChange)
'''
[[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 = "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 = "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
event.dataset:o365.audit and
event.code:(SecurityComplianceCenterEOPCmdlet or SecurityComplianceInsights or SecurityComplianceRBAC or SecurityComplianceUserChange)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.code | in |
| field:"EventID" kind:in |
event.dataset | eq |
| field:"event.dataset" kind:eq value:"o365.audit" |
Microsoft Sentinel External Alerts
#Generates a detection alert for each Microsoft Sentinel alert written to the configured indices. Enabling this rule allows you to immediately begin investigating Microsoft Sentinel alerts in the app.
Rule Body
[metadata]
creation_date = "2025/07/31"
integration = ["microsoft_sentinel"]
maturity = "production"
promotion = true
updated_date = "2025/10/17"
[rule]
author = ["Elastic"]
description = """
Generates a detection alert for each Microsoft Sentinel alert written to the configured indices. Enabling this rule
allows you to immediately begin investigating Microsoft Sentinel alerts in the app.
"""
from = "now-2m"
index = ["logs-microsoft_sentinel.alert-*"]
interval = "1m"
language = "kuery"
license = "Elastic License v2"
max_signals = 1000
name = "Microsoft Sentinel External Alerts"
note = """ Triage and analysis
## Investigating Microsoft Sentinel External Alerts
Microsoft Sentinel is a cloud-native SIEM tool that aggregates security data for threat detection and response. The rule identifies each alert logged in Sentinel, enabling analysts to swiftly investigate potential threats.
### Possible investigation steps
- Examine the timeline of events leading up to the alert to identify any unusual or suspicious activities that may have occurred.
- Cross-reference the alert with other related alerts or logs in Microsoft Sentinel to determine if this is part of a larger pattern or isolated incident.
- Investigate the source and context of the alert to identify any patterns or anomalies that could indicate manipulation or false positives.
- Consult the Microsoft Sentinel investigation guide and resources tagged in the alert for specific guidance on handling similar threats.
### False positive analysis
- Alerts triggered by routine administrative tasks can be false positives. Identify these tasks and create exceptions to prevent unnecessary alerts.
- Frequent alerts from known safe IP addresses or domains may not indicate a threat. Whitelist these sources to reduce noise.
- Alerts generated by automated scripts or scheduled tasks that are part of regular operations can be excluded by setting up filters for these specific activities.
- Non-threatening alerts from internal network scans or vulnerability assessments should be reviewed and excluded if they are part of regular security practices.
- Alerts from test environments or sandboxed systems can be false positives. Exclude these environments from alert generation to focus on genuine threats.
### Response and remediation
- Contain the threat by isolating affected systems from the network to prevent further spread or data exfiltration.
- Review and terminate any suspicious processes or sessions identified in the alert to halt ongoing malicious activities.
- Conduct a thorough analysis of the alert details to identify any compromised accounts or credentials and reset passwords immediately.
- Apply relevant security patches or updates to affected systems to close any vulnerabilities exploited by the adversary.
- Restore affected systems from clean backups to ensure the integrity and security of the environment.
- Monitor network traffic and system logs closely for any signs of recurring or related suspicious activities.
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if additional resources are needed.
"""
references = ["https://docs.elastic.co/en/integrations/microsoft_sentinel"]
risk_score = 47
rule_id = "74147312-ba03-4bea-91d1-040d54c1e8c3"
rule_name_override = "microsoft_sentinel.alert.properties.friendly_name"
setup = """## Setup
### Microsoft Sentinel Alert Integration
This rule is designed to capture alert events generated by the Microsoft Sentinel integration and promote them as Elastic detection alerts.
To capture Microsoft Sentinel alerts, install and configure the Microsoft Sentinel integration to ingest alert events into the `logs-microsoft_sentinel.alert-*` index pattern.
If this rule is enabled alongside the External Alerts promotion rule (UUID: eb079c62-4481-4d6e-9643-3ca499df7aaa), you may receive duplicate alerts for the same Sentinel events. Consider adding a rule exception for the External Alert rule to exclude data_stream.dataset:microsoft_sentinel.alert to avoid receiving duplicate alerts.
### Additional notes
For information on troubleshooting the maximum alerts warning please refer to this [guide](https://www.elastic.co/guide/en/security/current/alerts-ui-monitor.html#troubleshoot-max-alerts).
"""
severity = "medium"
tags = [
"Data Source: Microsoft Sentinel",
"Use Case: Threat Detection",
"Resources: Investigation Guide",
"Promotion: External Alerts",
]
timestamp_override = "event.ingested"
type = "query"
query = '''
event.kind: alert and data_stream.dataset: microsoft_sentinel.alert
'''
[[rule.risk_score_mapping]]
field = "microsoft_sentinel.alert.properties.confidence_score"
operator = "equals"
value = ""
[[rule.severity_mapping]]
field = "event.severity"
operator = "equals"
severity = "low"
value = "21"
[[rule.severity_mapping]]
field = "event.severity"
operator = "equals"
severity = "medium"
value = "47"
[[rule.severity_mapping]]
field = "event.severity"
operator = "equals"
severity = "high"
value = "73"
[[rule.severity_mapping]]
field = "event.severity"
operator = "equals"
severity = "critical"
value = "99"
Stages and Predicates
Stage 1: query
event.kind: alert and data_stream.dataset: microsoft_sentinel.alert
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
data_stream.dataset | eq |
| field:"data_stream.dataset" kind:eq value:"microsoft_sentinel.alert" |
event.kind | eq |
| field:"event.kind" kind:eq value:"alert" |
Netcat Listener Established via rlwrap
#Monitors for the execution of a netcat listener via rlwrap. rlwrap is a 'readline wrapper', a small utility that uses the GNU Readline library to allow the editing of keyboard input for any command. This utility can be used in conjunction with netcat to gain a more stable reverse shell.
Known False Positives
- Netcat is a dual-use tool that can be used for benign or malicious activity. Netcat is included in some Linux distributions so its presence is not necessarily suspicious. Some normal use of this program, while uncommon, may originate from scripts, automation tools, and frameworks.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Command & Control |
Rule Body
[metadata]
creation_date = "2023/09/22"
integration = ["endpoint", "crowdstrike", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2026/03/24"
[rule]
author = ["Elastic"]
description = """
Monitors for the execution of a netcat listener via rlwrap. rlwrap is a 'readline wrapper', a small utility that uses
the GNU Readline library to allow the editing of keyboard input for any command. This utility can be used in conjunction
with netcat to gain a more stable reverse shell.
"""
false_positives = [
"""
Netcat is a dual-use tool that can be used for benign or malicious activity. Netcat is included in some Linux
distributions so its presence is not necessarily suspicious. Some normal use of this program, while uncommon, may
originate from scripts, automation tools, and frameworks.
""",
]
from = "now-9m"
index = [
"endgame-*",
"logs-crowdstrike.fdr*",
"logs-endpoint.events.process*",
"logs-sentinel_one_cloud_funnel.*",
]
language = "eql"
license = "Elastic License v2"
name = "Netcat Listener Established via rlwrap"
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 Netcat Listener Established via rlwrap
Netcat, a versatile networking tool, can establish connections for data transfer or remote shell access. When combined with rlwrap, which enhances command-line input, it can create a more stable reverse shell environment. Adversaries exploit this to maintain persistent access. The detection rule identifies such misuse by monitoring rlwrap's execution with netcat-related arguments, signaling potential unauthorized activity.
### Possible investigation steps
- Review the process execution details to confirm the presence of rlwrap with netcat-related arguments by examining the process.name and process.args fields.
- Check the process start time and correlate it with any known scheduled tasks or user activity to determine if the execution was expected or authorized.
- Investigate the source IP address and port used in the netcat connection to identify potential external connections or data exfiltration attempts.
- Analyze the user account associated with the process execution to verify if the account has a history of similar activities or if it has been compromised.
- Examine any related network traffic logs to identify unusual patterns or connections that coincide with the alert, focusing on the host where the process was executed.
- Look for any additional processes spawned by the netcat listener to detect further malicious activity or persistence mechanisms.
### False positive analysis
- Development and testing environments may frequently use rlwrap with netcat for legitimate purposes, such as testing network applications or scripts. To manage this, create exceptions for specific user accounts or IP addresses known to be involved in development activities.
- System administrators might use rlwrap with netcat for troubleshooting or network diagnostics. Identify and exclude these activities by setting up rules that recognize the specific command patterns or user roles associated with administrative tasks.
- Automated scripts or cron jobs that utilize rlwrap and netcat for routine maintenance or monitoring can trigger false positives. Review and whitelist these scripts by their unique process identifiers or command structures to prevent unnecessary alerts.
- Educational or training environments where rlwrap and netcat are used for learning purposes can generate alerts. Implement exceptions based on the environment's network segment or user group to reduce noise from these benign activities.
### Response and remediation
- Immediately isolate the affected host from the network to prevent further unauthorized access or data exfiltration.
- Terminate the rlwrap and netcat processes on the affected host to disrupt the reverse shell connection.
- Conduct a forensic analysis of the affected system to identify any additional malicious activities or persistence mechanisms.
- Review and secure any compromised accounts or credentials that may have been used or accessed during the incident.
- Apply security patches and updates to the affected system to mitigate any exploited vulnerabilities.
- Enhance monitoring and logging on the affected host and network to detect similar activities in the future.
- Report the incident to the appropriate internal security team or external authorities if required, following organizational protocols."""
risk_score = 47
rule_id = "0f56369f-eb3d-459c-a00b-87c2bf7bdfc5"
setup = """## Setup
This rule requires data coming in from Elastic Defend.
### Elastic Defend Integration Setup
Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows
the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
#### Prerequisite Requirements:
- Fleet is required for Elastic Defend.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
- Click "Add Elastic Defend".
- Configure the integration name and optionally add a description.
- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
- We suggest to select "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
- Click "Save and Continue".
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
"""
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Linux",
"Use Case: Threat Detection",
"Tactic: Execution",
"Data Source: Elastic Defend",
"Data Source: Elastic Endgame",
"Data Source: Crowdstrike",
"Data Source: SentinelOne",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "linux" and event.type == "start" and
event.action in ("exec", "exec_event", "start", "ProcessRollup2") and
process.name == "rlwrap" and process.args in ("nc", "ncat", "netcat", "nc.openbsd", "socat") and
process.args : "*l*" and process.args_count >= 4
'''
[[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 = "T1095"
name = "Non-Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1095/"
[rule.threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"
Stages and Predicates
Stage 1: process
process where host.os.type == "linux" and event.type == "start" and
event.action in ("exec", "exec_event", "start", "ProcessRollup2") and
process.name == "rlwrap" and process.args in ("nc", "ncat", "netcat", "nc.openbsd", "socat") and
process.args : "*l*" and process.args_count >= 4
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 | in |
| field:"process.args" kind:in |
process.args | wildcard |
| field:"process.args" kind:wildcard value:"*l*" |
process.args_count | ge |
| field:"process.args_count" kind:ge value:"4" |
process.name | eq |
| field:"process_basename" kind:eq value:"rlwrap" |
Newly Observed Palo Alto Network Alert
#This rule detects Palo Alto Network alerts that are observed for the first time in the previous 5 days of alert history. Analysts can use this to prioritize triage and response.
Rule Body
[metadata]
creation_date = "2026/01/21"
integration = ["panw"]
maturity = "production"
updated_date = "2026/07/20"
[rule]
author = ["Elastic"]
description = """
This rule detects Palo Alto Network alerts that are observed for the first time in the previous 5 days of alert history.
Analysts can use this to prioritize triage and response.
"""
from = "now-7205m"
interval = "5m"
language = "esql"
license = "Elastic License v2"
name = "Newly Observed Palo Alto Network Alert"
risk_score = 99
rule_id = "283683eb-f2ce-40a5-be16-fa931cb5f504"
severity = "critical"
tags = ["Use Case: Threat Detection", "Rule Type: Higher-Order Rule", "Resources: Investigation Guide", "Domain: Network", "Data Source: PAN-OS"]
timestamp_override = "event.ingested"
type = "esql"
query = '''
FROM logs-panw.panos-*, filebeat-* metadata _id
// exclude Informational and Low severity levels (4 and 5)
| where data_stream.dataset == "panw.panos" and
TO_INTEGER(event.severity) <= 3 and
event.action != "flood_detected" and
(event.kind IS NULL or event.kind != "metric")
| STATS Esql.alerts_count = count(*),
Esql.first_time_seen = MIN(@timestamp),
Esql.distinct_count_src_ip = COUNT_DISTINCT(source.ip),
Esql.distinct_count_dst_ip = COUNT_DISTINCT(destination.ip),
src_ip = VALUES(source.ip),
dst_ip = VALUES(destination.ip),
url_dom = VALUES(url.domain),
url_path = VALUES(url.path) by rule.name, event.action, event.type, event.kind, event.severity
// first time seen is within 10m of the rule execution time within last 5 days
| eval Esql.recent = DATE_DIFF("minute", Esql.first_time_seen, now())
| where Esql.recent <= 10 and Esql.alerts_count <= 5 and Esql.distinct_count_src_ip <= 2 and Esql.distinct_count_dst_ip <= 2
// move dynamic fields to ECS quivalent for rule exceptions
| eval source.ip = MV_FIRST(src_ip),
destination.ip = MV_FIRST(dst_ip),
url.domain = MV_FIRST(url_dom),
url.path = MV_FIRST(url_path)
| keep rule.name, event.*, Esql.*, source.ip, destination.ip, url.domain, url.path
'''
note = """## Triage and analysis
### Investigating Newly Observed Palo Alto Network Alert
This rule surfaces newly observed, low-frequency high severity Palo Alto Network alert within the last 5 days.
Because the alert has not been seen previously for this rule and host, it should be prioritized for validation to determine
whether it represents a true compromise or rare benign activity.
### Investigation Steps
- Identify the source address, affected host and review the associated rule name to understand the behavior that triggered the alert.
- Validate the source address under which the activity occurred and assess whether it aligns with normal behavior.
- Refer to the specific alert details like event.original to get more context.
### False Positive Considerations
- Vulnerability scanners and pentesting.
- Administrative scripts or automation tools can trigger detections when first introduced.
- Development or testing environments may produce one-off behaviors that resemble malicious techniques.
### Response and Remediation
- If the activity is confirmed malicious, isolate the affected host to prevent further execution or lateral movement.
- Terminate malicious processes and remove any dropped files or persistence mechanisms.
- Collect forensic artifacts to understand initial access and execution flow.
- Patch or remediate any vulnerabilities or misconfigurations that enabled the behavior.
- If benign, document the finding and consider tuning or exception handling to reduce future noise.
- Continue monitoring the host and environment for recurrence of the behavior or related alerts."""
references = ["https://www.elastic.co/docs/reference/integrations/panw"]
Stages and Predicates
Stage 1: from
FROM logs-panw.panos-*, filebeat-* metadata _id
Stage 2: where
| where data_stream.dataset == "panw.panos" and
TO_INTEGER(event.severity) <= 3 and
event.action != "flood_detected" and
(event.kind IS NULL or event.kind != "metric")
Stage 3: stats
| STATS Esql.alerts_count = count(*),
Esql.first_time_seen = MIN(@timestamp),
Esql.distinct_count_src_ip = COUNT_DISTINCT(source.ip),
Esql.distinct_count_dst_ip = COUNT_DISTINCT(destination.ip),
src_ip = VALUES(source.ip),
dst_ip = VALUES(destination.ip),
url_dom = VALUES(url.domain),
url_path = VALUES(url.path) by rule.name, event.action, event.type, event.kind, event.severity
Stage 4: eval
| eval Esql.recent = DATE_DIFF("minute", Esql.first_time_seen, now())
Stage 5: where
| where Esql.recent <= 10 and Esql.alerts_count <= 5 and Esql.distinct_count_src_ip <= 2 and Esql.distinct_count_dst_ip <= 2
Stage 6: eval
| eval source.ip = MV_FIRST(src_ip),
destination.ip = MV_FIRST(dst_ip),
url.domain = MV_FIRST(url_dom),
url.path = MV_FIRST(url_path)
Stage 7: keep
| keep rule.name, event.*, Esql.*, source.ip, destination.ip, url.domain, url.path
Indicators
These rows show field, operator, and value matches.
Output Fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
rule.name | KEEP rule.name |
event.* | KEEP event.* |
Esql.* | KEEP Esql.* |
source.ip | KEEP source.ip |
destination.ip | KEEP destination.ip |
url.domain | KEEP url.domain |
url.path | KEEP url.path |
Okta Multiple OS Names Detected for a Single DT Hash
#Identifies when a single Okta device token hash (dt_hash) is associated with multiple operating system types. This is highly anomalous because a device token is tied to a specific device and its operating system. This alert strongly indicates that an attacker has stolen a device token and is using it to impersonate a legitimate user from a different machine.
Known False Positives
- Applications will tag the operating system as null when the device is not recognized as a managed device. In environments where users frequently switch between managed and unmanaged devices, this may lead to false positives.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
- First Occurrence of Okta User Session Started via Proxy (Elastic)
- MFA Fatigue (OKTA) (Kusto)
- Okta AiTM Phishing Attempt Blocked by FastPass (Panther)
- Okta Authentication Failed During MFA Challenge (Splunk)
- Okta Fast Pass phishing Detection (Kusto)
- Okta FastPass Phishing Detection (Sigma)
- Okta FastPass Phishing Detection (Elastic)
- Okta MFA Bruteforce Attack (YARA-L)
Rule Body
[metadata]
creation_date = "2025/10/22"
integration = ["okta"]
maturity = "production"
updated_date = "2026/03/24"
[rule]
author = ["Elastic"]
description = """
Identifies when a single Okta device token hash (dt_hash) is associated with multiple operating system types. This is
highly anomalous because a device token is tied to a specific device and its operating system. This alert strongly
indicates that an attacker has stolen a device token and is using it to impersonate a legitimate user from a
different machine.
"""
false_positives = [
"""
Applications will tag the operating system as null when the device is not recognized as a managed device. In
environments where users frequently switch between managed and unmanaged devices, this may lead to false positives.
""",
]
from = "now-60m"
index = ["logs-okta.system-*"]
language = "kuery"
license = "Elastic License v2"
name = "Okta Multiple OS Names Detected for a Single DT Hash"
note = """## Triage and analysis
### Investigating Okta Multiple OS Names Detected for a Single DT Hash
This rule detects when a single Okta device token hash (dt_hash) is associated with multiple operating system types. This is highly anomalous because a device token is tied to a specific device and its operating system. This alert strongly indicates that an attacker has stolen a device token token and is using it to impersonate a legitimate user from a different machine.
### Possible investigation steps
- Review the `okta.debug_context.debug_data.dt_hash` field to identify the specific device
trust hash associated with multiple operating systems.
- Examine the `user.email` field to determine which user account is associated with the suspicious activity
- Analyze the `source.ip` field to identify the IP addresses from which the different operating systems were reported. Look for any unusual or unexpected locations.
- Review the `user_agent.os.name` field to see the different operating systems reported for the
same dt_hash. This will help identify the nature of the anomaly.
- Check the `event.action` field to understand the context of the authentication events (e.g., MFA verification, standard authentication).
- Investigate the timeline of events to see when the different operating systems were reported for the same dt_hash. Look for patterns or sequences that may indicate malicious activity.
- Correlate this activity with other security events in your environment, such as failed login attempts, unusual access patterns, or alerts from endpoint security solutions.
### False positive analysis
- Applications will tag the operating system as null when the device is not recognized as a managed device
- In environments where users frequently switch between managed and unmanaged devices, this may lead to false positives.
### Response and remediation
- Immediately investigate the user account associated with the suspicious activity to determine if it has been compromised.
- If compromise is confirmed, reset the user's credentials and enforce multi-factor authentication (MFA)
- Revoke any active sessions associated with the compromised account to prevent further unauthorized access.
- Review and monitor the affected dt_hash for any further suspicious activity.
- Educate users about the importance of device security and the risks associated with device tokens.
- Implement additional monitoring for device token tokens and consider using conditional access policies to restrict access based on device compliance status.
"""
risk_score = 73
rule_id = "fb3ca230-af4e-11f0-900d-f661ea17fbcc"
severity = "high"
tags = [
"Domain: Identity",
"Data Source: Okta",
"Data Source: Okta System Logs",
"Use Case: Threat Detection",
"Tactic: Credential Access",
"Resources: Investigation Guide"
]
timestamp_override = "event.ingested"
type = "threshold"
query = '''
data_stream.dataset: "okta.system"
and not okta.debug_context.debug_data.dt_hash: "-"
and user_agent.os.name: *
and event.action: (
"user.authentication.verify" or
"user.authentication.auth_via_mfa"
)
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1539"
name = "Steal Web Session Cookie"
reference = "https://attack.mitre.org/techniques/T1539/"
[rule.threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
[rule.investigation_fields]
field_names = [
"@timestamp",
"okta.debug_context.debug_data.dt_hash",
"user.email",
"source.ip",
"user_agent.os.name",
"event.action",
]
[rule.threshold]
field = ["okta.debug_context.debug_data.dt_hash"]
value = 1
[[rule.threshold.cardinality]]
field = "user_agent.os.name"
value = 2
Stages and Predicates
Stage 1: query
data_stream.dataset: "okta.system"
and not okta.debug_context.debug_data.dt_hash: "-"
and user_agent.os.name: *
and event.action: (
"user.authentication.verify" or
"user.authentication.auth_via_mfa"
)
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" |
event.action | in |
| field:"EventType" kind:in |
user_agent.os.name | is_not_null | field:"user_agent.os.name" kind:is_not_null |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
okta.debug_context.debug_data.dt_hash | eq | - | excludes:okta.debug_context.debug_data.dt_hash field:"okta.debug_context.debug_data.dt_hash" value:"-" |
Persistence via BITS SetNotifyCmdLine Method
#Identifies suspicious execution from the Windows Background Intelligent Transfer Service (BITS) service via BITS SetNotifyCmdLine method. This method specifies a program to execute when a BITS job enters the BG_JOB_STATE_ERROR or BG_JOB_STATE_TRANSFERRED state. This feature can be abused to maintain stealthy persistence on an infected system.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Rule Body
[rule]
description = """
Identifies suspicious execution from the Windows Background Intelligent Transfer Service (BITS) service via BITS
SetNotifyCmdLine method. This method specifies a program to execute when a BITS job enters the BG_JOB_STATE_ERROR or
BG_JOB_STATE_TRANSFERRED state. This feature can be abused to maintain stealthy persistence on an infected system.
"""
id = "3400fac0-3978-4cc5-a82d-69d08625c3ad"
license = "Elastic License v2"
name = "Persistence via BITS SetNotifyCmdLine Method"
os_list = ["windows"]
reference = [
"https://blog.menasec.net/2021/05/hunting-for-suspicious-usage-of.html",
"https://docs.microsoft.com/en-us/windows/win32/api/bits1_5/nf-bits1_5-ibackgroundcopyjob2-setnotifycmdline",
"https://www.elastic.co/security-labs/bits-and-bytes-analyzing-bitsloth",
]
version = "1.0.30"
query = '''
process where event.action == "start" and
/* child process of the BITS service */
process.parent.name == "svchost.exe" and process.parent.args == "BITS" and
(
/* commonly abused trusted programs */
process.pe.original_file_name in ("cscript.exe", "wscript.exe", "PowerShell.EXE", "Cmd.Exe", "MSHTA.EXE", "RUNDLL32.EXE",
"REGSVR32.EXE", "MSBuild.exe", "InstallUtil.exe", "RegAsm.exe", "wmic.exe", "CMSTP.EXE", "wuauclt.exe", "CertUtil.exe") or
/* programs unsigned or with untrusted code signature status running from users home folder */
(process.code_signature.trusted != true and process.executable : "?:\\Users\\*") or
/* suspicious paths */
process.executable : ("?:\\Users\\Public\\*", "?:\\ProgramData\\*", "?:\\Users\\*\\AppData\\*", "?:\\Windows\\Microsoft.NET\\*")
)
/* false positives */
and not (process.code_signature.subject_name :
("YANDEX LLC", "McAfee, LLC", "AVG Technologies USA, Inc.", "Reason Cybersecurity Inc.") and
process.code_signature.trusted == true) and
not (process.name : "wmic.exe" and process.args : "MSFT_MpComputerStatus" and process.args : "get") and
not (process.name : "rundll32.exe" and process.args : "?:\\Program Files (x86)\\PCPitstop\\Super Shield\\*") and
not process.hash.sha256 in ("65aee904ab6008a25963a85941039baae02e9a120e338ad2635ec4be9ddf2e73",
"867a86be9ab8dfa8f2d4997dd7f4df584709f9677d35efa94ddf0d2be224351a",
"fbdbf5f13818503b5d311c233af6467f5f9a462418bcc4558c1561df0c033d7c",
"bca7e687a39ac52d8ddb0e95f0886ba3d194ff55a11cdf09fc2b0da9ebbad572",
"11d659e714ff6d393a30c6c560062e82587b50462aeb33db3dda508009d3ed76",
"5aff8a288cbb22900a0c21088ca5af4447d492ebc35caed757e93a2ccdfa4455")
'''
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 = "T1197"
name = "BITS Jobs"
reference = "https://attack.mitre.org/techniques/T1197/"
[threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Stage 1: process
process where event.action == "start" and
process.parent.name == "svchost.exe" and process.parent.args == "BITS" and
(
process.pe.original_file_name in ("cscript.exe", "wscript.exe", "PowerShell.EXE", "Cmd.Exe", "MSHTA.EXE", "RUNDLL32.EXE",
"REGSVR32.EXE", "MSBuild.exe", "InstallUtil.exe", "RegAsm.exe", "wmic.exe", "CMSTP.EXE", "wuauclt.exe", "CertUtil.exe") or
(process.code_signature.trusted != true and process.executable : "?:\\Users\\*") or
process.executable : ("?:\\Users\\Public\\*", "?:\\ProgramData\\*", "?:\\Users\\*\\AppData\\*", "?:\\Windows\\Microsoft.NET\\*")
)
and not (process.code_signature.subject_name :
("YANDEX LLC", "McAfee, LLC", "AVG Technologies USA, Inc.", "Reason Cybersecurity Inc.") and
process.code_signature.trusted == true) and
not (process.name : "wmic.exe" and process.args : "MSFT_MpComputerStatus" and process.args : "get") and
not (process.name : "rundll32.exe" and process.args : "?:\\Program Files (x86)\\PCPitstop\\Super Shield\\*") and
not process.hash.sha256 in ("65aee904ab6008a25963a85941039baae02e9a120e338ad2635ec4be9ddf2e73",
"867a86be9ab8dfa8f2d4997dd7f4df584709f9677d35efa94ddf0d2be224351a",
"fbdbf5f13818503b5d311c233af6467f5f9a462418bcc4558c1561df0c033d7c",
"bca7e687a39ac52d8ddb0e95f0886ba3d194ff55a11cdf09fc2b0da9ebbad572",
"11d659e714ff6d393a30c6c560062e82587b50462aeb33db3dda508009d3ed76",
"5aff8a288cbb22900a0c21088ca5af4447d492ebc35caed757e93a2ccdfa4455")
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"start" |
process.code_signature.trusted | ne |
| field:"process.code_signature.trusted" kind:ne value:"true" |
process.executable | wildcard |
| field:"Image" kind:wildcard |
process.parent.args | eq |
| field:"process.parent.args" kind:eq value:"BITS" |
process.parent.name | eq |
| field:"parent_process_basename" kind:eq value:"svchost.exe" |
process.pe.original_file_name | in |
| field:"OriginalFileName" kind:in |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.args | eq | MSFT_MpComputerStatus | excludes:process.args field:"process.args" value:"MSFT_MpComputerStatus" |
process.args | eq | get | excludes:process.args field:"process.args" value:"get" |
process.name | eq | wmic.exe | excludes:process.name field:"process.name" value:"wmic.exe" |
process.args | starts_with | ?:\Program Files (x86)\PCPitstop\Super Shield\ | excludes:process.args field:"process.args" value:"?:\Program Files (x86)\PCPitstop\Super Shield\" |
process.name | eq | rundll32.exe | excludes:process.name field:"process.name" value:"rundll32.exe" |
process.code_signature.subject_name | eq | YANDEX LLC, McAfee, LLC, AVG Technologies USA, Inc., Reason Cybersecurity Inc. | 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.hash.sha256 | in | 11d659e714ff6d393a30c6c560062e82587b50462aeb33db3dda508009d3ed76, 5aff8a288cbb22900a0c21088ca5af4447d492ebc35caed757e93a2ccdfa4455, 65aee904ab6008a25963a85941039baae02e9a120e338ad2635ec4be9ddf2e73, 867a86be9ab8dfa8f2d4997dd7f4df584709f9677d35efa94ddf0d2be224351a, bca7e687a39ac52d8ddb0e95f0886ba3d194ff55a11cdf09fc2b0da9ebbad572, fbdbf5f13818503b5d311c233af6467f5f9a462418bcc4558c1561df0c033d7c | excludes:process.hash.sha256 |
Potential Exploitation of an Unquoted Service Path Vulnerability
#Adversaries may leverage unquoted service path vulnerabilities to escalate privileges. By placing an executable in a higher-level directory within the path of an unquoted service executable, Windows will natively launch this executable from its defined path variable instead of the benign one in a deeper directory, thus leading to code execution.
MITRE ATT&CK Coverage
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 = "2023/07/13"
integration = ["endpoint", "m365_defender", "sentinel_one_cloud_funnel", "windows", "system", "crowdstrike"]
maturity = "production"
updated_date = "2026/05/04"
[rule]
author = ["Elastic"]
description = """
Adversaries may leverage unquoted service path vulnerabilities to escalate privileges. By placing an executable in a
higher-level directory within the path of an unquoted service executable, Windows will natively launch this executable
from its defined path variable instead of the benign one in a deeper directory, thus leading to code execution.
"""
from = "now-9m"
index = [
"endgame-*",
"logs-endpoint.events.process-*",
"logs-m365_defender.event-*",
"logs-sentinel_one_cloud_funnel.*",
"logs-system.security*",
"logs-windows.sysmon_operational-*",
"logs-crowdstrike.fdr*",
]
language = "eql"
license = "Elastic License v2"
name = "Potential Exploitation of an Unquoted Service Path Vulnerability"
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 Exploitation of an Unquoted Service Path Vulnerability
Unquoted service paths in Windows can be exploited by adversaries to escalate privileges. When a service path lacks quotes, Windows may execute a malicious executable placed in a higher-level directory. The detection rule identifies suspicious processes starting from common unquoted paths, signaling potential exploitation attempts. This helps in early detection and mitigation of privilege escalation threats.
### Possible investigation steps
- Review the process executable path to confirm if it matches the patterns specified in the query, such as "?:\\\\Program.exe" or executables within "C:\\\\Program Files (x86)\\\\" or "C:\\\\Program Files\\\\".
- Check the parent process of the suspicious executable to determine how it was initiated and assess if it aligns with expected behavior.
- Investigate the file creation and modification timestamps of the suspicious executable to identify any recent changes that could indicate malicious activity.
- Analyze the user account associated with the process start event to determine if it has the necessary privileges and if the activity is consistent with the user's typical behavior.
- Examine the system's event logs for any related activities or anomalies around the time the suspicious process was started, such as other process executions or file modifications.
- Cross-reference the executable's hash with known threat intelligence databases to identify if it is associated with any known malware or suspicious activity.
### False positive analysis
- Legitimate software installations or updates may trigger the rule if they temporarily create executables in common unquoted paths. Users can create exceptions for known software update processes to prevent unnecessary alerts.
- System administrators might use scripts or tools that inadvertently place executables in unquoted paths for legitimate purposes. Identifying and documenting these tools can help in setting up exclusions.
- Some enterprise applications may have legitimate executables in unquoted paths due to legacy configurations. Review and verify these applications, then configure exceptions for them to avoid false positives.
- Regularly scheduled tasks or maintenance scripts that run from unquoted paths can be mistaken for malicious activity. Ensure these tasks are documented and excluded from the rule if they are verified as safe.
- Security tools or monitoring software might simulate or test unquoted path vulnerabilities as part of their operations. Confirm these activities with the security team and exclude them if they are part of routine security assessments.
### Response and remediation
- Immediately isolate the affected system from the network to prevent further exploitation or lateral movement by the adversary.
- Terminate any suspicious processes identified by the detection rule, specifically those matching the unquoted service path pattern.
- Conduct a thorough review of the service configurations on the affected system to identify and correct any unquoted service paths. Ensure all service paths are properly quoted to prevent future exploitation.
- Remove any unauthorized executables found in higher-level directories that could be used to exploit the unquoted service path vulnerability.
- Restore the affected system from a known good backup if malicious activity is confirmed and system integrity is compromised.
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if additional systems are affected.
- Implement enhanced monitoring and logging for similar suspicious activities across the network to detect and respond to future attempts promptly."""
risk_score = 21
rule_id = "12de29d4-bbb0-4eef-b687-857e8a163870"
severity = "low"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Privilege Escalation",
"Data Source: Elastic Defend",
"Data Source: Microsoft Defender XDR",
"Data Source: SentinelOne",
"Data Source: Elastic Endgame",
"Data Source: Sysmon",
"Data Source: Windows Security Event Logs",
"Data Source: Crowdstrike",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "windows" and event.type == "start" and
(
process.executable : "?:\\Program.exe" or
process.executable regex """(C:\\Program Files \(x86\)\\|C:\\Program Files\\)\w+.exe"""
)
'''
setup = """## Setup
This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
Setup instructions: https://ela.st/install-elastic-defend
### Additional data sources
This rule also supports the following third-party data sources. For setup instructions, refer to the links below:
- [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.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1574"
name = "Hijack Execution Flow"
reference = "https://attack.mitre.org/techniques/T1574/"
[[rule.threat.technique.subtechnique]]
id = "T1574.009"
name = "Path Interception by Unquoted Path"
reference = "https://attack.mitre.org/techniques/T1574/009/"
[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
Stages and Predicates
Stage 1: process
process where host.os.type == "windows" and event.type == "start" and
(
process.executable : "?:\\Program.exe" or
process.executable regex """(C:\\Program Files \(x86\)\\|C:\\Program Files\\)\w+.exe"""
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.executable | regex_match |
| field:"Image" kind:regex_match value:"(C:\Program Files (x86)\|C:\Program Files\)\w+.exe" |
process.executable | wildcard |
| field:"Image" kind:wildcard value:"?:\Program.exe" |
Potential Microsoft Outlook Remote Code Execution
#Identifies when Microsoft Outlook registers a new COM object followed by loading the configured module. This behavior is consistent with the successful exploitation of CVE-2024-21378 (a remote code execution in Microsoft Outlook).
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Execution |
Rule Body
[rule]
description = """
Identifies when Microsoft Outlook registers a new COM object followed by loading the configured module. This behavior is
consistent with the successful exploitation of CVE-2024-21378 (a remote code execution in Microsoft Outlook).
"""
id = "27203f2c-7959-4195-bba1-9f2bdbf75ffa"
license = "Elastic License v2"
name = "Potential Microsoft Outlook Remote Code Execution"
os_list = ["windows"]
reference = [
"https://www.netspi.com/blog/technical/red-team-operations/microsoft-outlook-remote-code-execution-cve-2024-21378/",
]
version = "1.0.4"
query = '''
sequence with maxspan=3m
[registry where event.action == "modification" and process.name : "outlook.exe" and
registry.data.strings != null and registry.path : "HKEY_USERS\\*_Classes\\CLSID\\*"] as event0
[library where event.action == "load" and process.name : "outlook.exe" and
dll.Ext.relative_file_creation_time <= 900 and
(dll.code_signature.exists == false or dll.code_signature.trusted == false) and
stringcontains~(event0.registry.data.strings, dll.name) and
not dll.path :
("?:\\Windows\\assembly\\NativeImages*",
"?:\\Windows\\Microsoft.NET\\*",
"?:\\Windows\\WinSxS\\*",
"?:\\Windows\\System32\\*",
"?:\\Windows\\SysWOW64\\*",
"?:\\Windows\\apppatch\\*",
"?:\\Program Files\\*",
"?:\\Program Files (x86)\\*")]
'''
min_endpoint_version = "8.4.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 = "T1566"
name = "Phishing"
reference = "https://attack.mitre.org/techniques/T1566/"
[[threat.technique.subtechnique]]
id = "T1566.001"
name = "Spearphishing Attachment"
reference = "https://attack.mitre.org/techniques/T1566/001/"
[threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1203"
name = "Exploitation for Client Execution"
reference = "https://attack.mitre.org/techniques/T1203/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[internal]
min_endpoint_version = "8.4.0"
Stages and Predicates
Stage 1: registry
[registry where event.action == "modification" and process.name : "outlook.exe" and
registry.data.strings != null and registry.path : "HKEY_USERS\\*_Classes\\CLSID\\*"] as event0
Stage 2: library
[library where event.action == "load" and process.name : "outlook.exe" and
dll.Ext.relative_file_creation_time <= 900 and
(dll.code_signature.exists == false or dll.code_signature.trusted == false) and
stringcontains~(event0.registry.data.strings, dll.name) and
not dll.path :
("?:\\Windows\\assembly\\NativeImages*",
"?:\\Windows\\Microsoft.NET\\*",
"?:\\Windows\\WinSxS\\*",
"?:\\Windows\\System32\\*",
"?:\\Windows\\SysWOW64\\*",
"?:\\Windows\\apppatch\\*",
"?:\\Program Files\\*",
"?:\\Program Files (x86)\\*")]
Indicators
These rows show field, operator, and value matches.
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
dll.path | starts_with | ?:\Windows\assembly\NativeImages, ?:\Windows\Microsoft.NET\, ?:\Windows\WinSxS\, ?:\Windows\System32\, ?:\Windows\SysWOW64\, ?:\Windows\apppatch\, ?:\Program Files\, ?:\Program Files (x86)\ | excludes:dll.path |
Potential Mining Pool Command Detection
#This rule detects the execution of a process with potential mining pool commandline arguments. Adversaries may leverage the resources of compromised systems to mine cryptocurrency, to generate revenue. This activity may impact system performance and availability.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Impact |
Rule Body
[rule]
description = """
This rule detects the execution of a process with potential mining pool commandline arguments. Adversaries may leverage
the resources of compromised systems to mine cryptocurrency, to generate revenue. This activity may impact system
performance and availability.
"""
id = "fcc42a61-4507-4918-867b-d673e5b065dc"
license = "Elastic License v2"
name = "Potential Mining Pool Command Detection"
os_list = ["linux"]
reference = ["https://falco.org/blog/falco-detect-cryptomining/"]
version = "1.0.11"
query = '''
process where event.type == "start" and event.action == "exec" and process.parent.executable != null and (
process.name like (
"telnet.netkit", "ping", "telnet", "xmrig", "dash", "bash", "sh", "zsh", "ash", "fish", "ksh", "tcsh",
"csh", "nohup", "pgrep", "python*", "perl*", "ruby*", "php*", "lua*", "sed", "pkill", "docker", "dig",
"nslookup", "inetutils-telnet", "nc", "ncat", "netcat", "netcat.openbsd", "netcat.traditional", "nc.openbsd",
"nc.traditional", "curl", "wget", "sudo", "grep", ".*"
) or
process.executable like (
"/tmp/*", "/var/tmp/*", "/dev/shm/*", "/boot/*", "./*", "/sys/*", "/lost+found/*", "/media/*", "/proc/*",
"/var/backups/*", "/var/log/*", "/var/mail/*", "/var/spool/*"
)
) and
process.command_line like (
"*cnpool.cc*", "*lindon-pool.win*", "*supportxmr.com*", "*comgandalph3000.com*", "*minergate.com*",
"*fjhan.club*", "*emercoin.com*", "*poolto.be*", "*520fjh.org*", "*xmrpool.xyz*", "*simka.pw*", "*noobxmr.com*",
"*miner.rocks*", "*minerpool.pw*", "*minemonero.gq*", "*usxmrpool.com*", "*moneroocean.stream*", "*mypool.online*",
"*xmrpool.de*", "*emergate.net*", "*ip28.net*", "*mine.bz*", "*dwarfpool.com*", "*xmrig.com*", "*koto-pool.work*",
"*monerorx.com*", "*zarabotaibitok.ru*", "*mining-help.ru*", "*mine2gether.com*", "*moneropool.com*", "*viaxmr.com*",
"*minerrocks.com*", "*miningpoolhub.com*", "*cortins.tk*", "*pooldd.com*", "*unmineable.com*", "*f2pool.com*",
"*graef.in*", "*nanopool.org*", "*myxmr.pw*", "*ratchetmining.com*", "*cryptmonero.com*", "*xmrminer.cc*",
"*riefly.id*", "*iwanttoearn.money*", "*herominers.com*", "*xmrpool.me*", "*miners.pro*", "*luckpool.net*",
"*twotouchauthentication.online*", "*hashvault.pro*", "*4i7i.com*", "*miningocean.org*", "*2miners.com*",
"*xmrpool.eu*", "*monerpool.org*", "*joulecoin.org*", "*suprnova.cc*", "*monerocean.stream*", "*bohemianpool.com*",
"*crypto-pool.fr*", "*xmr.pt*", "*alimabi.cn*", "*teracycle.net*", "*monerogb.com*", "*armornetwork.org*",
"*emercoin.net*", "*poolmining.org*", "*minexmr.cn*", "*moriaxmr.com*", "*ethereumpool.co*", "*minercircle.com*",
"*prohash.net*", "*zer0day.ru*", "*crypto-pool.info*", "*pool.support*", "*siamining.com*", "*5b6b7b.ru*",
"*c3pool.com*", "*somec.cc*", "*hellominer.com*", "*usa-138.com*", "*mixpools.org*", "*xmrpool.net*",
"*moneroworld.com*", "*minerxmr.ru*", "*d5pool.us*", "*hashcity.org*", "*hex7e4.ru*", "*zpool.ca*", "*minexmr.com*",
"*monerohash.com*", "*multipool.us*", "*moneropool.nl*", "*nbminer.com*", "*ppxxmr.com*", "*xmrfast.com*",
"*webhop.net*", "*ethpool.org*", "*slushpool.com*", "*antpool.com*", "*nicehash.com*", "*nicehash.net*",
"*zergpool.com*", "*mining-dutch.nl*", "*blockmasters.co*", "*bsod.pw*", "*fairpool.xyz*", "*miningrigrentals.com*",
"*hashing24.com*", "*ethermine.org*", "*flexpool.io*", "*hiveon.net*", "*sparkpool.com*", "*2miners.org*",
"*poolin.com*", "*viabtc.com*", "*f2pool.org*", "*coinhive.com*", "*cryptoloot.pro*", "*webmine.cz*",
"*minero.cc*", "*monerohash.org*", "*monerohash.net*", "*moneropool.ru*", "*moneroocean.stream*", "*rx.unmineable.com*"
) and not (
process.parent.name in ("sendmail", "postfix-local", "check-quota", "zmcontrol", "find", "timeout", "php") or
process.name in ("timeout", "host", "ptxas") or
process.command_line like ("*zpool.cache*", "*app/jobs/ant-sec_observe-income.py*") or
process.parent.args == "/scripts/run_certbot.sh" or
process.parent.command_line == "runc init" or
(process.parent.command_line == "/bin/bash /usr/local/bin/soc_guard.sh" and process.executable == "/usr/bin/grep") or
(process.parent.name like "php*" and process.command_line like "*/var/tools/koalaping/bin/ping.php*") or
(
process.parent.command_line == "/bin/bash /root/nicehash/nicehash_api.sh /main/api/v2/mining/algo/stats" and
process.command_line like "python3 /root/nicehash/nicehash.py -b https://api2.nicehash.com -o * -m GET -p /main/api/v2/mining/algo/stats"
)
)
'''
min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.technique.subtechnique]]
id = "T1059.004"
name = "Unix Shell"
reference = "https://attack.mitre.org/techniques/T1059/004/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1496"
name = "Resource Hijacking"
reference = "https://attack.mitre.org/techniques/T1496/"
[threat.tactic]
id = "TA0040"
name = "Impact"
reference = "https://attack.mitre.org/tactics/TA0040/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Stage 1: process
process where event.type == "start" and event.action == "exec" and process.parent.executable != null and (
process.name like (
"telnet.netkit", "ping", "telnet", "xmrig", "dash", "bash", "sh", "zsh", "ash", "fish", "ksh", "tcsh",
"csh", "nohup", "pgrep", "python*", "perl*", "ruby*", "php*", "lua*", "sed", "pkill", "docker", "dig",
"nslookup", "inetutils-telnet", "nc", "ncat", "netcat", "netcat.openbsd", "netcat.traditional", "nc.openbsd",
"nc.traditional", "curl", "wget", "sudo", "grep", ".*"
) or
process.executable like (
"/tmp/*", "/var/tmp/*", "/dev/shm/*", "/boot/*", "./*", "/sys/*", "/lost+found/*", "/media/*", "/proc/*",
"/var/backups/*", "/var/log/*", "/var/mail/*", "/var/spool/*"
)
) and
process.command_line like (
"*cnpool.cc*", "*lindon-pool.win*", "*supportxmr.com*", "*comgandalph3000.com*", "*minergate.com*",
"*fjhan.club*", "*emercoin.com*", "*poolto.be*", "*520fjh.org*", "*xmrpool.xyz*", "*simka.pw*", "*noobxmr.com*",
"*miner.rocks*", "*minerpool.pw*", "*minemonero.gq*", "*usxmrpool.com*", "*moneroocean.stream*", "*mypool.online*",
"*xmrpool.de*", "*emergate.net*", "*ip28.net*", "*mine.bz*", "*dwarfpool.com*", "*xmrig.com*", "*koto-pool.work*",
"*monerorx.com*", "*zarabotaibitok.ru*", "*mining-help.ru*", "*mine2gether.com*", "*moneropool.com*", "*viaxmr.com*",
"*minerrocks.com*", "*miningpoolhub.com*", "*cortins.tk*", "*pooldd.com*", "*unmineable.com*", "*f2pool.com*",
"*graef.in*", "*nanopool.org*", "*myxmr.pw*", "*ratchetmining.com*", "*cryptmonero.com*", "*xmrminer.cc*",
"*riefly.id*", "*iwanttoearn.money*", "*herominers.com*", "*xmrpool.me*", "*miners.pro*", "*luckpool.net*",
"*twotouchauthentication.online*", "*hashvault.pro*", "*4i7i.com*", "*miningocean.org*", "*2miners.com*",
"*xmrpool.eu*", "*monerpool.org*", "*joulecoin.org*", "*suprnova.cc*", "*monerocean.stream*", "*bohemianpool.com*",
"*crypto-pool.fr*", "*xmr.pt*", "*alimabi.cn*", "*teracycle.net*", "*monerogb.com*", "*armornetwork.org*",
"*emercoin.net*", "*poolmining.org*", "*minexmr.cn*", "*moriaxmr.com*", "*ethereumpool.co*", "*minercircle.com*",
"*prohash.net*", "*zer0day.ru*", "*crypto-pool.info*", "*pool.support*", "*siamining.com*", "*5b6b7b.ru*",
"*c3pool.com*", "*somec.cc*", "*hellominer.com*", "*usa-138.com*", "*mixpools.org*", "*xmrpool.net*",
"*moneroworld.com*", "*minerxmr.ru*", "*d5pool.us*", "*hashcity.org*", "*hex7e4.ru*", "*zpool.ca*", "*minexmr.com*",
"*monerohash.com*", "*multipool.us*", "*moneropool.nl*", "*nbminer.com*", "*ppxxmr.com*", "*xmrfast.com*",
"*webhop.net*", "*ethpool.org*", "*slushpool.com*", "*antpool.com*", "*nicehash.com*", "*nicehash.net*",
"*zergpool.com*", "*mining-dutch.nl*", "*blockmasters.co*", "*bsod.pw*", "*fairpool.xyz*", "*miningrigrentals.com*",
"*hashing24.com*", "*ethermine.org*", "*flexpool.io*", "*hiveon.net*", "*sparkpool.com*", "*2miners.org*",
"*poolin.com*", "*viabtc.com*", "*f2pool.org*", "*coinhive.com*", "*cryptoloot.pro*", "*webmine.cz*",
"*minero.cc*", "*monerohash.org*", "*monerohash.net*", "*moneropool.ru*", "*moneroocean.stream*", "*rx.unmineable.com*"
) and not (
process.parent.name in ("sendmail", "postfix-local", "check-quota", "zmcontrol", "find", "timeout", "php") or
process.name in ("timeout", "host", "ptxas") or
process.command_line like ("*zpool.cache*", "*app/jobs/ant-sec_observe-income.py*") or
process.parent.args == "/scripts/run_certbot.sh" or
process.parent.command_line == "runc init" or
(process.parent.command_line == "/bin/bash /usr/local/bin/soc_guard.sh" and process.executable == "/usr/bin/grep") or
(process.parent.name like "php*" and process.command_line like "*/var/tools/koalaping/bin/ping.php*") or
(
process.parent.command_line == "/bin/bash /root/nicehash/nicehash_api.sh /main/api/v2/mining/algo/stats" and
process.command_line like "python3 /root/nicehash/nicehash.py -b https://api2.nicehash.com -o * -m GET -p /main/api/v2/mining/algo/stats"
)
)
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.command_line | wildcard |
| field:"CommandLine" kind:wildcard |
process.executable | wildcard |
| field:"Image" kind:wildcard |
process.name | wildcard |
| field:"process_basename" kind:wildcard |
process.parent.executable | is_not_null | field:"ParentImage" kind:is_not_null |
Exclusions
The rule actively suppresses these predicates.
Potential Privilege Escalation via Fuse Binary
#This rule identifies the execution of the "fuse" binary by the root user, excluding cases where the user's group is not root or the parent process is sudo. Such behavior is likely considered anomalous and may suggest an attempt at privilege escalation, potentially leveraging the CVE-2023-0386 vulnerability.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Rule Body
[rule]
description = """
This rule identifies the execution of the "fuse" binary by the root user, excluding cases where the user's group is not
root or the parent process is sudo. Such behavior is likely considered anomalous and may suggest an attempt at privilege
escalation, potentially leveraging the CVE-2023-0386 vulnerability.
"""
id = "fdb6fde5-3af3-4759-a4cc-2c6847b09565"
license = "Elastic License v2"
name = "Potential Privilege Escalation via Fuse Binary"
os_list = ["linux"]
reference = [
"https://securityonline.info/poc-exploit-released-for-linux-kernel-privilege-escalation-cve-2023-0386-bug/",
"https://github.com/xkaneiki/CVE-2023-0386",
]
version = "1.0.13"
query = '''
process where event.type == "start" and event.action == "exec" and
process.parent.name == "fuse" and process.name == "fusermount" and
user.id == 0 and not (group.id == 0 or process.name == "sudo")
'''
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 = "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 = "7.15.0"
Stages and Predicates
Stage 1: process
process where event.type == "start" and event.action == "exec" and
process.parent.name == "fuse" and process.name == "fusermount" and
user.id == 0 and not (group.id == 0 or process.name == "sudo")
Indicators
These rows show field, operator, and value matches.
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
group.id | eq | 0 | excludes:group.id field:"group.id" value:"0" |
process.name | eq | sudo | excludes:process.name field:"process.name" value:"sudo" |
Potential Reverse Shell
#This detection rule identifies suspicious network traffic patterns associated with TCP reverse shell activity. This activity consists of a parent-child relationship where a network event is followed by the creation of a shell process. An attacker may establish a Linux TCP reverse shell to gain remote access to a target system.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Command & Control |
Rule Body
[metadata]
creation_date = "2023/07/04"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/03/24"
[rule]
author = ["Elastic"]
description = """
This detection rule identifies suspicious network traffic patterns associated with TCP reverse shell activity. This
activity consists of a parent-child relationship where a network event is followed by the creation of a shell process.
An attacker may establish a Linux TCP reverse shell to gain remote access to a target system.
"""
from = "now-9m"
index = ["logs-endpoint.events.network*", "logs-endpoint.events.process*"]
language = "eql"
license = "Elastic License v2"
name = "Potential Reverse Shell"
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 Reverse Shell
Reverse shells are tools that adversaries use to gain remote access to a system by initiating a connection from the target back to the attacker. This detection rule identifies such activity by monitoring for network events followed by shell process creation on Linux systems. It flags suspicious patterns, such as shell processes with interactive flags or spawned by tools like socat, indicating potential unauthorized access attempts.
### Possible investigation steps
- Review the network event details to identify the source and destination IP addresses involved in the connection attempt or acceptance. Pay special attention to any external IP addresses that are not part of the internal network ranges.
- Examine the process tree to understand the parent-child relationship, focusing on the shell process creation following the network event. Verify if the shell process was spawned by a known tool like socat.
- Check the process arguments for interactive flags such as "-i" or "-l" to determine if the shell was intended to be interactive, which could indicate malicious intent.
- Investigate the user account associated with the process to determine if it is a legitimate user or if there are signs of compromise, such as unusual login times or locations.
- Correlate the event with other security logs or alerts to identify any additional suspicious activities or patterns that might indicate a broader attack campaign.
- Assess the risk and impact of the potential reverse shell by determining if any sensitive data or critical systems could have been accessed or compromised.
### False positive analysis
- Legitimate administrative tasks using interactive shells may trigger this rule. System administrators often use shells with interactive flags for maintenance. To mitigate, create exceptions for known administrator accounts or specific IP addresses.
- Automated scripts or cron jobs that use shell commands with interactive flags can be mistaken for reverse shells. Review and whitelist these scripts by process name or parent process ID to prevent false alerts.
- Tools like socat are used in legitimate network troubleshooting and testing. If socat is frequently used in your environment, consider excluding specific command patterns or user accounts associated with its legitimate use.
- Development environments may spawn shell processes as part of testing or deployment workflows. Identify and exclude these environments by host ID or process name to reduce noise.
- Internal network connections that match the rule's criteria but are part of normal operations can be excluded by specifying internal IP ranges or known service accounts.
### Response and remediation
- Immediately isolate the affected host from the network to prevent further unauthorized access or data exfiltration.
- Terminate any suspicious shell processes identified by the detection rule, especially those initiated by socat or with interactive flags.
- Conduct a forensic analysis of the affected system to identify any additional indicators of compromise, such as unauthorized user accounts or modified files.
- Review and secure network configurations to ensure that only authorized IP addresses can initiate connections to critical systems.
- Update and patch the affected system and any related software to close vulnerabilities that may have been exploited.
- Implement enhanced monitoring and logging on the affected host and network to detect any further attempts at reverse shell activity.
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if broader organizational impacts exist."""
references = [
"https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md",
]
risk_score = 73
rule_id = "48b3d2e3-f4e8-41e6-95e6-9b2091228db3"
setup = """## Setup
This rule requires data coming in from Elastic Defend.
### Elastic Defend Integration Setup
Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
#### Prerequisite Requirements:
- Fleet is required for Elastic Defend.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
- Click "Add Elastic Defend".
- Configure the integration name and optionally add a description.
- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
- Click "Save and Continue".
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
"""
severity = "high"
tags = [
"Domain: Endpoint",
"OS: Linux",
"Use Case: Threat Detection",
"Tactic: Execution",
"Data Source: Elastic Defend",
"Resources: Investigation Guide",
]
type = "eql"
query = '''
sequence by host.id with maxspan=5s
[network where event.type == "start" and host.os.type == "linux" and
event.action in ("connection_attempted", "connection_accepted") and
process.name : ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish", "socat") and destination.ip != null and
not cidrmatch(destination.ip, "127.0.0.0/8", "169.254.0.0/16", "224.0.0.0/4", "::1")] by process.entity_id
[process where event.type == "start" and host.os.type == "linux" and event.action in ("exec", "fork") and
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and (
(process.args : ("-i", "-l")) or (process.parent.name == "socat" and process.parent.args : "*exec*")
)] by process.parent.entity_id
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[rule.threat.technique.subtechnique]]
id = "T1059.004"
name = "Unix Shell"
reference = "https://attack.mitre.org/techniques/T1059/004/"
[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"
[[rule.threat.technique]]
id = "T1095"
name = "Non-Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1095/"
[rule.threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"
Stages and Predicates
Ordered sequence: each step below must occur in order within 5s, correlated by host.id, process.entity_id, process.parent.entity_id.
Stage 1: network
[network where event.type == "start" and host.os.type == "linux" and
event.action in ("connection_attempted", "connection_accepted") and
process.name : ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish", "socat") and destination.ip != null and
not cidrmatch(destination.ip, "127.0.0.0/8", "169.254.0.0/16", "224.0.0.0/4", "::1")] by process.entity_id
Stage 2: process
[process where event.type == "start" and host.os.type == "linux" and event.action in ("exec", "fork") and
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and (
(process.args : ("-i", "-l")) or (process.parent.name == "socat" and process.parent.args : "*exec*")
)] by process.parent.entity_id
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
destination.ip | is_not_null | field:"dest_ip" kind:is_not_null | |
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 |
process.name | in |
| field:"process_basename" kind:in |
process.name | wildcard |
| field:"process_basename" kind:wildcard |
process.parent.args | wildcard |
| field:"process.parent.args" kind:wildcard value:"*exec*" |
process.parent.name | eq |
| field:"parent_process_basename" kind:eq value:"socat" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
destination.ip | cidr_match | 127.0.0.0/8, 169.254.0.0/16, 224.0.0.0/4, ::1 | excludes:destination.ip |
Protected Process Light Bypass via DLL Tampering
#Identifies attempts to tamper with a DLL associated with a Protected Process Light (PPL) process. The purpose of PPL is to protect critical system processes against modification, access, or tampering via open process functions. An attacker may attempt to tamper with the DLL associated with a PPL process in order to bypass PPL protection and inject malicious code into the protected process, elevating their privileges. This privilege escalation can enable them to evade or disable security software, and access sensitive information such as credentials.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Rule Body
[rule]
description = """
Identifies attempts to tamper with a DLL associated with a Protected Process Light (PPL) process. The purpose of PPL is
to protect critical system processes against modification, access, or tampering via open process functions. An attacker
may attempt to tamper with the DLL associated with a PPL process in order to bypass PPL protection and inject malicious
code into the protected process, elevating their privileges. This privilege escalation can enable them to evade or
disable security software, and access sensitive information such as credentials.
"""
id = "905f4c30-a8c5-40a5-80e3-a50c5613432f"
license = "Elastic License v2"
name = "Protected Process Light Bypass via DLL Tampering"
os_list = ["windows"]
reference = [
"https://googleprojectzero.blogspot.com/2018/08/windows-exploitation-tricks-exploiting.html",
"https://www.elastic.co/blog/protecting-windows-protected-processes",
"https://www.elastic.co/security-labs/Hunting-for-Suspicious-Windows-Libraries-for-Execution-and-Evasion",
"https://www.elastic.co/blog/process-ghosting-a-new-executable-image-tampering-attack",
]
version = "1.0.49"
query = '''
sequence by process.entity_id
[process where event.action == "start" and process.Ext.protection != null and
process.Ext.protection != "PsProtectedSignerAntimalware-Light" and
not (process.executable : "?:\\Program Files\\Windows Defender Advanced Threat Protection\\MsSense.exe" and
process.parent.executable : "?:\\Windows\\System32\\services.exe")]
[library where dll.Ext.defense_evasions : "Process Tampering: Code integrity violation" and
not (dll.code_signature.trusted == true and
dll.code_signature.subject_name :
("ESET, spol. s r.o.",
"Acronis International GmbH",
"Kaseya Corporation",
"Veeam Software Group GmbH",
"Trend Micro, Inc.",
"Sophos Ltd",
"Sophos Limited",
"DeviceLock, Inc",
"Cynet Security LTD")) and
not process.executable : "?:\\Program Files (x86)\\Common Files\\BattlEye\\BEService.exe" and
/* potential services child processes */
not (process.executable : "?:\\Windows\\System32\\services.exe" and dll.name : "*.exe") and
not (dll.path :
("?:\\Windows\\WinSxS\\Temp\\PendingDeletes\\$$DeleteMe*",
"?:\\Windows\\WinSxS\\amd64_microsoft-windows-hotpatches_*_hotpatch.dll",
"?:\\Windows\\SMSS-*.tmp",
"?:\\Windows\\System32\\win32k.sys",
"?:\\ProgramData\\Microsoft\\Windows Defender Advanced Threat Protection\\Platform\\*.exe") and
dll.code_signature.subject_name : ("Microsoft Windows", "Microsoft Windows Publisher") and
dll.code_signature.trusted == true) and
not dll.path : "C:\\ProgramData\\SecureWorks\\TaegisAgent\\{*}\\TaegisInj.x64.dll" and
not dll.hash.sha256 :
("6f8761d35b531dde2e8fd60bdcfd16cee46d48b84a2e0c28fecd1b66675faf48",
"545a3aec876c49c56693f48f5fde740487330ca097775d9a434157aabf25db10",
"ab813df167f8b6afe13f67231328f28fa3b0efeed8460f8b5e8a4228a8cded4e",
"ce0f4cd9d9af178aead83df4f46146f1c66cc2c3e600c8aafa0a392fc5ad9637",
"00af34a5cca727b768d6030ca15e0f728e5855c23c73c78712aaee69fa14b489",
"cd5bd7618b6b70f5463b1279e692ec694978c7419c3360ad07fe69e8c9a48e7c",
"5a53be7287634f941e18ea3496ada9b336294311cd50bb4c02ec8d51cbdf4555",
"ce0f4cd9d9af178aead83df4f46146f1c66cc2c3e600c8aafa0a392fc5ad9637",
"cec41d7f35cf59669bad11ac70783856b2566425b9f59e3c459ef08f735bb405",
"94113324af3244b7a90b12837ad305769d91bde430f02d71c0a3f4df8670d87c",
"8ffcfebcd71d0ef03772e80e381abf72a482c6f091e29700ab59100fe9f82304",
"6957be7503737453c3feab129d4924fca55e7b0c026ec878d0d040765002732c",
"5a53be7287634f941e18ea3496ada9b336294311cd50bb4c02ec8d51cbdf4555",
"5d59d9f32b8f1c4e5161714f1f07bd366f6c71c0ef72a7b7e66e4ac58f646ecd",
"a5d83fffaac68fb3e924cba92d2f9f18c6377b4af21da00f32d5573aaab64d18",
"600b4ddc2fae87aaa400992c8ea4998908651900345d0b18d9b7d1ce916e02a4",
"42db05ee12cb94a0bc3676831f915bfbd71927a5bd2561a051c275038ba3f0ad",
"40eb09efd0fd767c665cd23360ece6a106e25d5bb692dcd16c63fe8ff1d29079",
"bc0715826ce01c4782065a28eaef6547dc60cd60b6069ef76e5a26635e510256",
"399ae476e53ad179f6238c0b7c8235d830490b0dbab981ac77ee73c4b35cf095",
"14da1fbca85ff2b8ac19ab63f4b7019614865ce8d87bce68100c97174b786ff5",
"8d6fff5727cded57898398f1d620375e26bab07e8875a4fe840178a2fc5207b5",
"128ae380509edbf0b17bb8a01110df57e310ec11dba9e9c6e5708098d6603247",
"3153fd9425111477a2dd15921eb13b2fc98210b5e59ce93238e4cec10ebd30a9",
"b177344a37bac9f492fcd8718655f634dc74ddc909c66dffd2b05f7bffb9da0f",
"0c8809a707a34414a2169138bb8749e22fc5437d533c538cff9480a13b768ec5",
"0f5521daedebfbb0b2f000510a36f9b01364d6dfbd2c983fe9ba7ff52d5bf0a9",
"8f033c102beb8ce272fa0d9c41fe1d80e650c32dfd04e0508d738756ad97d3d0",
"f38aea6d696424dd2c59b5293f1dc4ee21f074482e4ee25bd73148c5573a9b4b",
"e87fde91e0250e88127b38cb70d927c38726403e082b53bb62051c6c82c4fe62",
"ece86e8a88de3a06ebda73d8945dda04df9a94a0c8f949c9c3e1c3d2355ca526",
/* DeviceLock BackupClient - DLDrvUserMode64.dll (unsigned) */
"671126f4ac6fa36a9f0101d8fd798595dff0357132e29da6448333678acc34a6",
/* SecureWorks TaegisInj.x64.dll (new hash) */
"390b87da25c2b894adab6b8de4756ae5c5c8c3438d00681b138c2bcf812807f2",
/* tumldr.dll - LLP Gamma Technologies */
"46f3db2d2f869c9c4273176ca9b14249b0cd7c15c6dbcfc6e09dc5498030ffa9",
/* SophosAmsiProvider.dll */
"a0ccfd904b6d082c77a879ba76e504c6001887ceea215962a2e8a4075a7ff444",
/* UniAccessLite.MozartBreathManifest2.dll - LeagSoft */
"b676ccc54357b5f7689c7420de1633962b128ac29f4b9ac2e7186aef81b517cd",
/* mfc100.dll - Microsoft Corporation */
"ef2e0df287af95855b6b13173259df847a2cb8a1872ba3d4573e82abd4fb9699")
]
until [process where event.action == "end"]
'''
min_endpoint_version = "8.0.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1211"
name = "Exploitation for Defense Evasion"
reference = "https://attack.mitre.org/techniques/T1211/"
[[threat.technique]]
id = "T1574"
name = "Hijack Execution Flow"
reference = "https://attack.mitre.org/techniques/T1574/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "8.0.0"
Stages and Predicates
Ordered sequence: each step below must occur in order, correlated by process.entity_id.
Stage 1: process
[process where event.action == "start" and process.Ext.protection != null and
process.Ext.protection != "PsProtectedSignerAntimalware-Light" and
not (process.executable : "?:\\Program Files\\Windows Defender Advanced Threat Protection\\MsSense.exe" and
process.parent.executable : "?:\\Windows\\System32\\services.exe")]
Stage 2: library
[library where dll.Ext.defense_evasions : "Process Tampering: Code integrity violation" and
not (dll.code_signature.trusted == true and
dll.code_signature.subject_name :
("ESET, spol. s r.o.",
"Acronis International GmbH",
"Kaseya Corporation",
"Veeam Software Group GmbH",
"Trend Micro, Inc.",
"Sophos Ltd",
"Sophos Limited",
"DeviceLock, Inc",
"Cynet Security LTD")) and
not process.executable : "?:\\Program Files (x86)\\Common Files\\BattlEye\\BEService.exe" and
not (process.executable : "?:\\Windows\\System32\\services.exe" and dll.name : "*.exe") and
not (dll.path :
("?:\\Windows\\WinSxS\\Temp\\PendingDeletes\\$$DeleteMe*",
"?:\\Windows\\WinSxS\\amd64_microsoft-windows-hotpatches_*_hotpatch.dll",
"?:\\Windows\\SMSS-*.tmp",
"?:\\Windows\\System32\\win32k.sys",
"?:\\ProgramData\\Microsoft\\Windows Defender Advanced Threat Protection\\Platform\\*.exe") and
dll.code_signature.subject_name : ("Microsoft Windows", "Microsoft Windows Publisher") and
dll.code_signature.trusted == true) and
not dll.path : "C:\\ProgramData\\SecureWorks\\TaegisAgent\\{*}\\TaegisInj.x64.dll" and
not dll.hash.sha256 :
("6f8761d35b531dde2e8fd60bdcfd16cee46d48b84a2e0c28fecd1b66675faf48",
"545a3aec876c49c56693f48f5fde740487330ca097775d9a434157aabf25db10",
"ab813df167f8b6afe13f67231328f28fa3b0efeed8460f8b5e8a4228a8cded4e",
"ce0f4cd9d9af178aead83df4f46146f1c66cc2c3e600c8aafa0a392fc5ad9637",
"00af34a5cca727b768d6030ca15e0f728e5855c23c73c78712aaee69fa14b489",
"cd5bd7618b6b70f5463b1279e692ec694978c7419c3360ad07fe69e8c9a48e7c",
"5a53be7287634f941e18ea3496ada9b336294311cd50bb4c02ec8d51cbdf4555",
"ce0f4cd9d9af178aead83df4f46146f1c66cc2c3e600c8aafa0a392fc5ad9637",
"cec41d7f35cf59669bad11ac70783856b2566425b9f59e3c459ef08f735bb405",
"94113324af3244b7a90b12837ad305769d91bde430f02d71c0a3f4df8670d87c",
"8ffcfebcd71d0ef03772e80e381abf72a482c6f091e29700ab59100fe9f82304",
"6957be7503737453c3feab129d4924fca55e7b0c026ec878d0d040765002732c",
"5a53be7287634f941e18ea3496ada9b336294311cd50bb4c02ec8d51cbdf4555",
"5d59d9f32b8f1c4e5161714f1f07bd366f6c71c0ef72a7b7e66e4ac58f646ecd",
"a5d83fffaac68fb3e924cba92d2f9f18c6377b4af21da00f32d5573aaab64d18",
"600b4ddc2fae87aaa400992c8ea4998908651900345d0b18d9b7d1ce916e02a4",
"42db05ee12cb94a0bc3676831f915bfbd71927a5bd2561a051c275038ba3f0ad",
"40eb09efd0fd767c665cd23360ece6a106e25d5bb692dcd16c63fe8ff1d29079",
"bc0715826ce01c4782065a28eaef6547dc60cd60b6069ef76e5a26635e510256",
"399ae476e53ad179f6238c0b7c8235d830490b0dbab981ac77ee73c4b35cf095",
"14da1fbca85ff2b8ac19ab63f4b7019614865ce8d87bce68100c97174b786ff5",
"8d6fff5727cded57898398f1d620375e26bab07e8875a4fe840178a2fc5207b5",
"128ae380509edbf0b17bb8a01110df57e310ec11dba9e9c6e5708098d6603247",
"3153fd9425111477a2dd15921eb13b2fc98210b5e59ce93238e4cec10ebd30a9",
"b177344a37bac9f492fcd8718655f634dc74ddc909c66dffd2b05f7bffb9da0f",
"0c8809a707a34414a2169138bb8749e22fc5437d533c538cff9480a13b768ec5",
"0f5521daedebfbb0b2f000510a36f9b01364d6dfbd2c983fe9ba7ff52d5bf0a9",
"8f033c102beb8ce272fa0d9c41fe1d80e650c32dfd04e0508d738756ad97d3d0",
"f38aea6d696424dd2c59b5293f1dc4ee21f074482e4ee25bd73148c5573a9b4b",
"e87fde91e0250e88127b38cb70d927c38726403e082b53bb62051c6c82c4fe62",
"ece86e8a88de3a06ebda73d8945dda04df9a94a0c8f949c9c3e1c3d2355ca526",
"671126f4ac6fa36a9f0101d8fd798595dff0357132e29da6448333678acc34a6",
"390b87da25c2b894adab6b8de4756ae5c5c8c3438d00681b138c2bcf812807f2",
"46f3db2d2f869c9c4273176ca9b14249b0cd7c15c6dbcfc6e09dc5498030ffa9",
"a0ccfd904b6d082c77a879ba76e504c6001887ceea215962a2e8a4075a7ff444",
"b676ccc54357b5f7689c7420de1633962b128ac29f4b9ac2e7186aef81b517cd",
"ef2e0df287af95855b6b13173259df847a2cb8a1872ba3d4573e82abd4fb9699")
]
Until: process
until [process where event.action == "end"]
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
dll.Ext.defense_evasions | wildcard |
| field:"dll.Ext.defense_evasions" kind:wildcard value:"Process Tampering: Code integrity violation" |
event.action | eq |
| field:"EventType" kind:eq |
process.Ext.protection | is_not_null | field:"process.Ext.protection" kind:is_not_null | |
process.Ext.protection | ne |
| field:"process.Ext.protection" kind:ne value:"PsProtectedSignerAntimalware-Light" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.executable | eq | ?:\Program Files\Windows Defender Advanced Threat Protection\MsSense.exe | excludes:process.executable field:"process.executable" value:"?:\Program Files\Windows Defender Advanced Threat Protection\MsSense.exe" |
process.parent.executable | eq | ?:\Windows\System32\services.exe | excludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\System32\services.exe" |
dll.code_signature.subject_name | eq | ESET, spol. s r.o., Acronis International GmbH, Kaseya Corporation, Veeam Software Group GmbH, Trend Micro, Inc., Sophos Ltd, Sophos Limited, DeviceLock, Inc, Cynet Security LTD | excludes:dll.code_signature.subject_name |
dll.code_signature.trusted | eq | true | excludes:dll.code_signature.trusted field:"dll.code_signature.trusted" value:"true" |
dll.code_signature.subject_name | eq | Microsoft Windows, Microsoft Windows Publisher | excludes:dll.code_signature.subject_name field:"dll.code_signature.subject_name" value:"Microsoft Windows" field:"dll.code_signature.subject_name" value:"Microsoft Windows Publisher" |
dll.path | wildcard | ?:\Windows\WinSxS\Temp\PendingDeletes\$$DeleteMe*, ?:\Windows\WinSxS\amd64_microsoft-windows-hotpatches_*_hotpatch.dll, ?:\Windows\SMSS-*.tmp, ?:\Windows\System32\win32k.sys, ?:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Platform\*.exe | excludes:dll.path |
dll.name | ends_with | .exe | excludes:dll.name field:"dll.name" value:".exe" |
process.executable | eq | ?:\Windows\System32\services.exe | excludes:process.executable field:"process.executable" value:"?:\Windows\System32\services.exe" |
dll.hash.sha256 | eq | 6f8761d35b531dde2e8fd60bdcfd16cee46d48b84a2e0c28fecd1b66675faf48, 545a3aec876c49c56693f48f5fde740487330ca097775d9a434157aabf25db10, ab813df167f8b6afe13f67231328f28fa3b0efeed8460f8b5e8a4228a8cded4e, ce0f4cd9d9af178aead83df4f46146f1c66cc2c3e600c8aafa0a392fc5ad9637, 00af34a5cca727b768d6030ca15e0f728e5855c23c73c78712aaee69fa14b489, cd5bd7618b6b70f5463b1279e692ec694978c7419c3360ad07fe69e8c9a48e7c, 5a53be7287634f941e18ea3496ada9b336294311cd50bb4c02ec8d51cbdf4555, ce0f4cd9d9af178aead83df4f46146f1c66cc2c3e600c8aafa0a392fc5ad9637, cec41d7f35cf59669bad11ac70783856b2566425b9f59e3c459ef08f735bb405, 94113324af3244b7a90b12837ad305769d91bde430f02d71c0a3f4df8670d87c, 8ffcfebcd71d0ef03772e80e381abf72a482c6f091e29700ab59100fe9f82304, 6957be7503737453c3feab129d4924fca55e7b0c026ec878d0d040765002732c, 5a53be7287634f941e18ea3496ada9b336294311cd50bb4c02ec8d51cbdf4555, 5d59d9f32b8f1c4e5161714f1f07bd366f6c71c0ef72a7b7e66e4ac58f646ecd, a5d83fffaac68fb3e924cba92d2f9f18c6377b4af21da00f32d5573aaab64d18, 600b4ddc2fae87aaa400992c8ea4998908651900345d0b18d9b7d1ce916e02a4, 42db05ee12cb94a0bc3676831f915bfbd71927a5bd2561a051c275038ba3f0ad, 40eb09efd0fd767c665cd23360ece6a106e25d5bb692dcd16c63fe8ff1d29079, bc0715826ce01c4782065a28eaef6547dc60cd60b6069ef76e5a26635e510256, 399ae476e53ad179f6238c0b7c8235d830490b0dbab981ac77ee73c4b35cf095, 14da1fbca85ff2b8ac19ab63f4b7019614865ce8d87bce68100c97174b786ff5, 8d6fff5727cded57898398f1d620375e26bab07e8875a4fe840178a2fc5207b5, 128ae380509edbf0b17bb8a01110df57e310ec11dba9e9c6e5708098d6603247, 3153fd9425111477a2dd15921eb13b2fc98210b5e59ce93238e4cec10ebd30a9, b177344a37bac9f492fcd8718655f634dc74ddc909c66dffd2b05f7bffb9da0f, 0c8809a707a34414a2169138bb8749e22fc5437d533c538cff9480a13b768ec5, 0f5521daedebfbb0b2f000510a36f9b01364d6dfbd2c983fe9ba7ff52d5bf0a9, 8f033c102beb8ce272fa0d9c41fe1d80e650c32dfd04e0508d738756ad97d3d0, f38aea6d696424dd2c59b5293f1dc4ee21f074482e4ee25bd73148c5573a9b4b, e87fde91e0250e88127b38cb70d927c38726403e082b53bb62051c6c82c4fe62, ece86e8a88de3a06ebda73d8945dda04df9a94a0c8f949c9c3e1c3d2355ca526, 671126f4ac6fa36a9f0101d8fd798595dff0357132e29da6448333678acc34a6, 390b87da25c2b894adab6b8de4756ae5c5c8c3438d00681b138c2bcf812807f2, 46f3db2d2f869c9c4273176ca9b14249b0cd7c15c6dbcfc6e09dc5498030ffa9, a0ccfd904b6d082c77a879ba76e504c6001887ceea215962a2e8a4075a7ff444, b676ccc54357b5f7689c7420de1633962b128ac29f4b9ac2e7186aef81b517cd, ef2e0df287af95855b6b13173259df847a2cb8a1872ba3d4573e82abd4fb9699 | excludes:dll.hash.sha256 |
dll.path | wildcard | C:\ProgramData\SecureWorks\TaegisAgent\{*}\TaegisInj.x64.dll | excludes:dll.path field:"dll.path" value:"C:\ProgramData\SecureWorks\TaegisAgent\{*}\TaegisInj.x64.dll" |
process.executable | eq | ?:\Program Files (x86)\Common Files\BattlEye\BEService.exe | excludes:process.executable field:"process.executable" value:"?:\Program Files (x86)\Common Files\BattlEye\BEService.exe" |
Remotely Started Services via RPC
#Identifies remote execution of Windows services over remote procedure call (RPC). This could be indicative of lateral movement, but will be noisy if commonly done by administrators.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Lateral Movement |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2020/11/16"
integration = ["endpoint", "windows"]
maturity = "production"
updated_date = "2026/05/04"
[transform]
[[transform.osquery]]
label = "Osquery - Retrieve DNS Cache"
query = "SELECT * FROM dns_cache"
[[transform.osquery]]
label = "Osquery - Retrieve All Services"
query = "SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services"
[[transform.osquery]]
label = "Osquery - Retrieve Services Running on User Accounts"
query = """
SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE
NOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR
user_account == null)
"""
[[transform.osquery]]
label = "Osquery - Retrieve Service Unsigned Executables with Virustotal Link"
query = """
SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,
services.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =
authenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'
"""
[rule]
author = ["Elastic"]
description = """
Identifies remote execution of Windows services over remote procedure call (RPC). This could be indicative of lateral
movement, but will be noisy if commonly done by administrators.
"""
from = "now-9m"
index = [
"logs-endpoint.events.process-*",
"logs-endpoint.events.network-*",
"winlogbeat-*",
"logs-windows.sysmon_operational-*",
]
language = "eql"
license = "Elastic License v2"
name = "Remotely Started Services via RPC"
note = """## Triage and analysis
### Investigating Remotely Started Services via RPC
The Service Control Manager Remote Protocol is a client/server protocol used for configuring and controlling service programs running on a remote computer. A remote service management session begins with the client initiating the connection request to the server. If the server grants the request, the connection is established. The client can then make multiple requests to modify, query the configuration, or start and stop services on the server by using the same session until the session is terminated.
This rule detects the remote creation or start of a service by correlating a `services.exe` network connection and the spawn of a child process.
> **Note**:
> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/current/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.
#### Possible investigation steps
- Review login events (e.g., 4624) in the alert timeframe to identify the account used to perform this action. Use the `source.address` field to help identify the source system.
- Review network events from the source system using the source port identified on the alert and try to identify the program used to initiate the action.
- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.
- Investigate other alerts associated with the user/host during the past 48 hours.
- Validate if the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.
- Examine the host for derived artifacts that indicate suspicious activities:
- Analyze the process executable using a private sandboxed analysis system.
- Observe and collect information about the following activities in both the sandbox and the alert subject host:
- Attempts to contact external domains and addresses.
- Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.
- Examine the DNS cache for suspicious or anomalous entries.
- $osquery_0
- Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.
- Examine the host services for suspicious or anomalous entries.
- $osquery_1
- $osquery_2
- $osquery_3
- Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.
- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.
### False positive analysis
- Remote management software like SCCM may trigger this rule. If noisy on your environment, consider adding exceptions.
### Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Isolate the involved hosts to prevent further post-compromise behavior.
- If the triage identified malware, search the environment for additional compromised hosts.
- Implement temporary network rules, procedures, and segmentation to contain the malware.
- Stop suspicious processes.
- Immediately block the identified indicators of compromise (IoCs).
- Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
- Remove and block malicious artifacts identified during triage.
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
- 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 = """## 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:
- [Sysmon Event ID 1 - Process Creation](https://ela.st/sysmon-event-1-setup)
- [Sysmon Event ID 3 - Network Connection](https://ela.st/sysmon-event-3-setup)
"""
references = [
"https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-scmr/705b624a-13de-43cc-b8a2-99573da3635f",
"https://www.elastic.co/security-labs/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper",
]
risk_score = 47
rule_id = "aa9a274d-6b53-424d-ac5e-cb8ca4251650"
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Lateral Movement",
"Resources: Investigation Guide",
"Data Source: Elastic Defend",
"Data Source: Sysmon",
]
type = "eql"
query = '''
sequence with maxspan=1s
[network where host.os.type == "windows" and process.name : "services.exe" and
network.direction : ("incoming", "ingress") and network.transport == "tcp" and
source.port >= 49152 and destination.port >= 49152 and source.ip != "127.0.0.1" and source.ip != "::1"
] by host.id, process.entity_id
[process where host.os.type == "windows" and
event.type == "start" and process.parent.name : "services.exe" and
not (process.executable : "?:\\Windows\\System32\\msiexec.exe" and process.args : "/V") and
not process.executable : (
"?:\\Pella Corporation\\OSCToGPAutoService\\OSCToGPAutoSvc.exe",
"?:\\Pella Corporation\\Pella Order Management\\GPAutoSvc.exe",
"?:\\Pella Corporation\\Pella Order Management\\GPAutoSvc.exe",
"?:\\Program Files (x86)\\*.exe",
"?:\\Program Files\\*.exe",
"?:\\Windows\\ADCR_Agent\\adcrsvc.exe",
"?:\\Windows\\AdminArsenal\\PDQ*.exe",
"?:\\Windows\\CAInvokerService.exe",
"?:\\Windows\\ccmsetup\\ccmsetup.exe",
"?:\\Windows\\eset-remote-install-service.exe",
"?:\\Windows\\ProPatches\\Scheduler\\STSchedEx.exe",
"?:\\Windows\\PSEXESVC.EXE",
"?:\\Windows\\RemoteAuditService.exe",
"?:\\Windows\\servicing\\TrustedInstaller.exe",
"?:\\Windows\\System32\\certsrv.exe",
"?:\\Windows\\System32\\sppsvc.exe",
"?:\\Windows\\System32\\srmhost.exe",
"?:\\Windows\\System32\\svchost.exe",
"?:\\Windows\\System32\\taskhostex.exe",
"?:\\Windows\\System32\\upfc.exe",
"?:\\Windows\\System32\\vds.exe",
"?:\\Windows\\System32\\VSSVC.exe",
"?:\\Windows\\System32\\wbem\\WmiApSrv.exe",
"?:\\Windows\\SysWOW64\\NwxExeSvc\\NwxExeSvc.exe",
"?:\\Windows\\Veeam\\Backup\\VeeamDeploymentSvc.exe",
"?:\\Windows\\VeeamLogShipper\\VeeamLogShipper.exe",
"?:\\Windows\\VeeamVssSupport\\VeeamGuestHelper.exe"
)] by host.id, process.parent.entity_id
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1021"
name = "Remote Services"
reference = "https://attack.mitre.org/techniques/T1021/"
[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 = "T1569"
name = "System Services"
reference = "https://attack.mitre.org/techniques/T1569/"
[[rule.threat.technique.subtechnique]]
id = "T1569.002"
name = "Service Execution"
reference = "https://attack.mitre.org/techniques/T1569/002/"
[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
Stages and Predicates
Ordered sequence: each step below must occur in order within 1s, correlated by host.id, process.entity_id, process.parent.entity_id.
Stage 1: network
[network where host.os.type == "windows" and process.name : "services.exe" and
network.direction : ("incoming", "ingress") and network.transport == "tcp" and
source.port >= 49152 and destination.port >= 49152 and source.ip != "127.0.0.1" and source.ip != "::1"
] by host.id, process.entity_id
Stage 2: process
[process where host.os.type == "windows" and
event.type == "start" and process.parent.name : "services.exe" and
not (process.executable : "?:\\Windows\\System32\\msiexec.exe" and process.args : "/V") and
not process.executable : (
"?:\\Pella Corporation\\OSCToGPAutoService\\OSCToGPAutoSvc.exe",
"?:\\Pella Corporation\\Pella Order Management\\GPAutoSvc.exe",
"?:\\Pella Corporation\\Pella Order Management\\GPAutoSvc.exe",
"?:\\Program Files (x86)\\*.exe",
"?:\\Program Files\\*.exe",
"?:\\Windows\\ADCR_Agent\\adcrsvc.exe",
"?:\\Windows\\AdminArsenal\\PDQ*.exe",
"?:\\Windows\\CAInvokerService.exe",
"?:\\Windows\\ccmsetup\\ccmsetup.exe",
"?:\\Windows\\eset-remote-install-service.exe",
"?:\\Windows\\ProPatches\\Scheduler\\STSchedEx.exe",
"?:\\Windows\\PSEXESVC.EXE",
"?:\\Windows\\RemoteAuditService.exe",
"?:\\Windows\\servicing\\TrustedInstaller.exe",
"?:\\Windows\\System32\\certsrv.exe",
"?:\\Windows\\System32\\sppsvc.exe",
"?:\\Windows\\System32\\srmhost.exe",
"?:\\Windows\\System32\\svchost.exe",
"?:\\Windows\\System32\\taskhostex.exe",
"?:\\Windows\\System32\\upfc.exe",
"?:\\Windows\\System32\\vds.exe",
"?:\\Windows\\System32\\VSSVC.exe",
"?:\\Windows\\System32\\wbem\\WmiApSrv.exe",
"?:\\Windows\\SysWOW64\\NwxExeSvc\\NwxExeSvc.exe",
"?:\\Windows\\Veeam\\Backup\\VeeamDeploymentSvc.exe",
"?:\\Windows\\VeeamLogShipper\\VeeamLogShipper.exe",
"?:\\Windows\\VeeamVssSupport\\VeeamGuestHelper.exe"
)] by host.id, process.parent.entity_id
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
destination.port | ge |
| field:"DestinationPort" kind:ge value:"49152" |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
network.direction | wildcard |
| field:"Initiated" kind:wildcard |
network.transport | eq |
| field:"Protocol" kind:eq value:"tcp" |
process.name | wildcard |
| field:"process_basename" kind:wildcard value:"services.exe" |
process.parent.name | wildcard |
| field:"parent_process_basename" kind:wildcard value:"services.exe" |
source.ip | ne |
| field:"src_ip" kind:ne |
source.port | ge |
| field:"SourcePort" kind:ge value:"49152" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.args | eq | /V | excludes:process.args field:"process.args" value:"/V" |
process.executable | eq | ?:\Windows\System32\msiexec.exe | excludes:process.executable field:"process.executable" value:"?:\Windows\System32\msiexec.exe" |
process.executable | wildcard | ?:\Pella Corporation\OSCToGPAutoService\OSCToGPAutoSvc.exe, ?:\Pella Corporation\Pella Order Management\GPAutoSvc.exe, ?:\Pella Corporation\Pella Order Management\GPAutoSvc.exe, ?:\Program Files (x86)\*.exe, ?:\Program Files\*.exe, ?:\Windows\ADCR_Agent\adcrsvc.exe, ?:\Windows\AdminArsenal\PDQ*.exe, ?:\Windows\CAInvokerService.exe, ?:\Windows\ccmsetup\ccmsetup.exe, ?:\Windows\eset-remote-install-service.exe, ?:\Windows\ProPatches\Scheduler\STSchedEx.exe, ?:\Windows\PSEXESVC.EXE, ?:\Windows\RemoteAuditService.exe, ?:\Windows\servicing\TrustedInstaller.exe, ?:\Windows\System32\certsrv.exe, ?:\Windows\System32\sppsvc.exe, ?:\Windows\System32\srmhost.exe, ?:\Windows\System32\svchost.exe, ?:\Windows\System32\taskhostex.exe, ?:\Windows\System32\upfc.exe, ?:\Windows\System32\vds.exe, ?:\Windows\System32\VSSVC.exe, ?:\Windows\System32\wbem\WmiApSrv.exe, ?:\Windows\SysWOW64\NwxExeSvc\NwxExeSvc.exe, ?:\Windows\Veeam\Backup\VeeamDeploymentSvc.exe, ?:\Windows\VeeamLogShipper\VeeamLogShipper.exe, ?:\Windows\VeeamVssSupport\VeeamGuestHelper.exe | excludes:process.executable |
Shellcode Injection from Mounted Device
#Identifies the call of code injection related Windows API with suspicious parameters that align with shellcode execution and where the origin of the suspicious call is located in a remote file share.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Rule Body
[rule]
description = """
Identifies the call of code injection related Windows API with suspicious parameters that align with shellcode execution
and where the origin of the suspicious call is located in a remote file share.
"""
id = "5754cf6f-9ba7-4520-a0a5-9498af1baaf3"
license = "Elastic License v2"
name = "Shellcode Injection from Mounted Device"
os_list = ["windows"]
version = "1.0.5"
query = '''
api where
process.Ext.api.name in ("VirtualAlloc", "VirtualProtect", "WriteProcessMemory", "VirtualProtectEx", "VirtualAllocEx", "MapViewOfFile", "MapViewOfFile2") and
process.executable != null and process.parent.executable != null and
process.Ext.api.parameters.size >= 4000 and
process.Ext.api.behaviors in ("shellcode", "allocate_shellcode") and
process.thread.Ext.call_stack_final_user_module.protection_provenance_path like "\\device\\mup\\*" and
process.thread.Ext.call_stack_final_user_module.name == "Unbacked" and
process.thread.Ext.call_stack_summary in
("ntdll.dll|Unbacked",
"ntdll.dll|kernelbase.dll|Unbacked",
"ntdll.dll|kernelbase.dll|kernel32.dll|Unbacked") and
not (process.Ext.api.name == "VirtualProtect" and
_arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info like ("c:\\windows\\sys?????\\ntdll.dll!LdrLoadDll*", "c:\\windows\\sys?????\\kernelbase.dll!LoadLibrary*"))) and
not _arraysearch(process.thread.Ext.call_stack, $entry,
$entry.callsite_trailing_bytes in
("418bc74903c683600c004889388970084b891c34488b4df04833cce8586ef7ff4c8d5c2440498b5b38498b7340498be3415f415e415c5f5dc3cccccccccccccc",
"498d043483600c004889384489700849891c37488b4df04833cce89ce6f8ff4c8d5c2450498b5b38498b7340498be3415f415e415c5f5dc3cccccccccccccc48",
"8bd885c0797a41832600e8c59b090085c0746dff1537eebaff488b1570d91a00488d0d69d91a008bf8ff5218488d1595bbf9ff4883c018488d4c2440448bc348",
"488bc84885c00f845b020000488bc3f0480fb10d05ed2200483bc30f8500010000488b05f5ec2200480500000004488905f0ec2200e9f5000000b901000000e8"))
'''
min_endpoint_version = "8.14.2"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
tree = true
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "8.14.2"
Stages and Predicates
Stage 1: api
api where
process.Ext.api.name in ("VirtualAlloc", "VirtualProtect", "WriteProcessMemory", "VirtualProtectEx", "VirtualAllocEx", "MapViewOfFile", "MapViewOfFile2") and
process.executable != null and process.parent.executable != null and
process.Ext.api.parameters.size >= 4000 and
process.Ext.api.behaviors in ("shellcode", "allocate_shellcode") and
process.thread.Ext.call_stack_final_user_module.protection_provenance_path like "\\device\\mup\\*" and
process.thread.Ext.call_stack_final_user_module.name == "Unbacked" and
process.thread.Ext.call_stack_summary in
("ntdll.dll|Unbacked",
"ntdll.dll|kernelbase.dll|Unbacked",
"ntdll.dll|kernelbase.dll|kernel32.dll|Unbacked") and
not (process.Ext.api.name == "VirtualProtect" and
_arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info like ("c:\\windows\\sys?????\\ntdll.dll!LdrLoadDll*", "c:\\windows\\sys?????\\kernelbase.dll!LoadLibrary*"))) and
not _arraysearch(process.thread.Ext.call_stack, $entry,
$entry.callsite_trailing_bytes in
("418bc74903c683600c004889388970084b891c34488b4df04833cce8586ef7ff4c8d5c2440498b5b38498b7340498be3415f415e415c5f5dc3cccccccccccccc",
"498d043483600c004889384489700849891c37488b4df04833cce89ce6f8ff4c8d5c2450498b5b38498b7340498be3415f415e415c5f5dc3cccccccccccccc48",
"8bd885c0797a41832600e8c59b090085c0746dff1537eebaff488b1570d91a00488d0d69d91a008bf8ff5218488d1595bbf9ff4883c018488d4c2440448bc348",
"488bc84885c00f845b020000488bc3f0480fb10d05ed2200483bc30f8500010000488b05f5ec2200480500000004488905f0ec2200e9f5000000b901000000e8"))
Indicators
These rows show field, operator, and value matches.
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 | |
process.Ext.api.name | eq | VirtualProtect | excludes:process.Ext.api.name field:"process.Ext.api.name" value:"VirtualProtect" |
Suspicious Crypto Wallet Process Termination
#Detects when the Killall or Pkill binary are used to terminate the Ledger Live or Trezor Suite process. The vast majority of users will not terminate a process in this way. Threat actors who are attempting to hijack or backdoor an existing installation will need to terminate any existing or running processes for the application in order to modify its source files.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry Coverage
Rule Body
[rule]
description = """
Detects when the Killall or Pkill binary are used to terminate the Ledger Live or Trezor Suite process. The vast
majority of users will not terminate a process in this way. Threat actors who are attempting to hijack or backdoor an
existing installation will need to terminate any existing or running processes for the application in order to modify
its source files.
"""
id = "f0b29612-c189-405b-bf73-88bcc4f35bab"
license = "Elastic License v2"
name = "Suspicious Crypto Wallet Process Termination"
os_list = ["macos"]
reference = [
"https://www.jamf.com/blog/jtl-digitstealer-macos-infostealer-analysis/",
"https://www.huntress.com/blog/amos-stealer-chatgpt-grok-ai-trust",
]
version = "1.0.1"
query = '''
process where event.type == "start" and event.action == "exec" and process.name in ("killall", "pkill") and
process.args like ("Ledger Live", "Trezor Suite")
'''
min_endpoint_version = "8.11.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"
[[threat.technique.subtechnique]]
id = "T1562.001"
name = "Disable or Modify Tools"
reference = "https://attack.mitre.org/techniques/T1562/001/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "8.11.0"
Stages and Predicates
Stage 1: process
process where event.type == "start" and event.action == "exec" and process.name in ("killall", "pkill") and
process.args like ("Ledger Live", "Trezor Suite")
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 | wildcard |
| field:"process.args" kind:wildcard |
process.name | in |
| field:"process_basename" kind:in |
Suspicious Security Product Enumeration
#Enumeration of security products may be a precursor to Defense Evasion.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery |
Rule Body
[rule]
description = "Enumeration of security products may be a precursor to Defense Evasion."
id = "8749c08b-58f5-4e7c-ab15-3551b7541f7a"
license = "Elastic License v2"
name = "Suspicious Security Product Enumeration"
os_list = ["windows"]
version = "1.0.18"
query = '''
api where
process.Ext.api.name like "IWbemServices::CreateInstanceEnum*" and process.Ext.token.integrity_level_name != "system" and
process.Ext.api.parameters.operation == "AntiVirusProduct" and
process.Ext.api.metadata.client_is_local == true and process.parent.executable != null and user.id != "S-1-5-18" and
/* ignore process cache enrichment failures */
process.Ext.api.metadata.client_process_id == null and
/* exclusions */
not(
(process.name in ("MpCmdRun.exe", "MsMpEng.exe") and
process.code_signature.subject_name == "Microsoft Windows Publisher" and process.code_signature.trusted == true and
process.executable :
("?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*.exe",
"?:\\Program Files\\Microsoft Security Client\\*.exe",
"?:\\Program Files\\Windows Defender\\*.exe",
"?:\\Program Files (x86)\\Windows Defender\\*.exe",
"?:\\Program Files (x86)\\Lenovo\\System Update\\ConfigScheduledTask.exe") and
process.parent.executable :
("?:\\Windows\\System32\\services.exe",
"?:\\Windows\\System32\\svchost.exe",
"?:\\Program Files\\Windows Defender\\MpCmdRun.exe",
"?:\\Program Files\\Common Files\\microsoft shared\\ClickToRun\\OfficeClickToRun.exe")) or
(process.executable : "\\Device\\HarddiskVolume*\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MpCmdRun.exe" and
process.parent.executable : "\\Device\\HarddiskVolume*\\Windows\\System32\\svchost.exe") or
(process.executable :
("?:\\Windows\\System32\\MRT.exe",
"?:\\$WINDOWS.~BT\\Sources\\SetupHost.exe",
"?:\\Windows\\SysWOW64\\systeminfo.exe",
"?:\\Windows\\System32\\systeminfo.exe",
"?:\\Program Files\\Windows Defender\\MpCmdRun.exe",
"C:\\Program Files\\Windows Defender\\MsMpEng.exe",
"C:\\Program Files\\Microsoft Visual Studio\\20??\\Professional\\Common?\\IDE\\devenv.exe") and
process.code_signature.subject_name in ("Microsoft Windows", "Microsoft Corporation") and process.code_signature.trusted == true) or
(process.executable : ("?:\\$Windows.~??\\Sources\\SetupHost.exe", "?:\\$WINDOWS.~??\\Sources\\mighost.exe") and
process.code_signature.subject_name == "Microsoft Windows" and process.code_signature.trusted == true) or
(process.executable : "C:\\Windows\\System32\\svchost.exe" and process.parent.executable : "?:\\Windows\\System32\\services.exe") or
(process.executable : "C:\\Program Files (x86)\\Ivanti\\EPM Agent\\Inventory\\ldiscn32.exe" and
process.code_signature.subject_name == "Ivanti, Inc." and process.code_signature.trusted == true) or
(process.executable : "C:\\Program Files (x86)\\ASUS\\AsusFanControlService\\*\\AsusFanControlService.exe" and
process.code_signature.subject_name == "ASUSTeK COMPUTER INC." and process.code_signature.trusted == true) or
(process.executable :
("?:\\Program Files\\GLPI-Agent\\perl\\bin\\glpi-agent.exe",
"?:\\Windows\\SysWOW64\\EasyResume.exe",
"?:\\Windows\\SysWOW64\\Lenovo\\PowerMgr\\EasyResume.exe") and
process.parent.executable : "?:\\Windows\\System32\\services.exe") or
(process.executable : "?:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" and process.Ext.api.parameters.operation == "Win32_DeviceGuard" and
process.parent.executable like "?:\\Program Files\\Microsoft Cloud Managed Desktop Extension\\CMDExtension\\Microsoft.Management.Services.CloudManagedDesktop.Agent.exe") or
(process.executable : "?:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" and
process.parent.executable : "?:\\Windows\\System32\\cmd.exe" and user.id == "S-1-5-18" and
process.Ext.api.parameters.operation == "Win32_DeviceGuard" and
process.command_line == "Powershell \"(Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\\Microsoft\\Windows\\DeviceGuard).SecurityServicesRunning\"") or
(process.executable : "?:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" and
process.parent.executable : "?:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" and
user.id == "S-1-5-18" and process.command_line like "*HexProductState*") or
(process.command_line : "powershell \"Get-CimInstance -Namespace root/SecurityCenter2 -ClassName AntiVirusProduct\"" and
process.parent.executable : "C:\\Users\\*\\AppData\\Local\\Programs\\DrSprinto\\DrSprinto.exe") or
(process.command_line : "\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -Version 5.1 -s -NoLogo -NoProfile" and
process.parent.executable : "C:\\Windows\\_ScriptingFramework\\Modul\\Engine.exe") or
(process.name in ("powershell.exe", "pwsh.exe") and process.Ext.api.parameters.operation == "Win32_DeviceGuard") or
(process.executable : "?:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" and
process.parent.executable : ("?:\\Windows\\explorer.exe", "?:\\Windows\\System32\\cmd.exe", "?:\\Program Files\\Mesh Agent\\MeshAgent.exe") and
process.command_line : ("powershell",
"C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" ",
"\"C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe\" -noexit -command import-module ActiveDirectory",
"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe \"Get-CimInstance -classname 'Win32_DeviceGuard' -namespace 'root\\Microsoft\\Windows\\DeviceGuard' | select-Object -property 'SecurityServicesRunning' | Out-File 'C:\\Program Files\\SCAP Compliance Checker 5.10.1\\Local\\LOCALHOST_*.tmp'\"",
"powershell.exe -NoLogo -NoProfile -command \"try { $VBSStatus=(Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\\Microsoft\\Windows\\DeviceGuard).VirtualizationBasedSecurityStatus; if ($VBSStatus -eq $null) { Write-Output 0 } else { Write-Output $VBSStatus } } catch { Write-Output 0 }\"")) or
(process.code_signature.subject_name in ("CPUID", "Lakeside Software, LLC", "CYBELSOFT", "Connectwise, LLC",
"Corsair Memory, Inc.", "Ivanti, Inc.", "POINTWARE INFORMATICA LTDA", "ASUSTeK COMPUTER INC.", "Snow Software AB",
"IObit CO., LTD", "ESET, spol. s r.o.", "Sophos Ltd", "WithSecure Oyj", "Trend Micro, Inc.", "Belarc, Inc.",
"KASEYA HOLDINGS INC.", "Elliptic Laboratories ASA", "IObit Information Technology", "CPUID S.A.R.L.U.", "CPUID",
"Panda Security S.L", "Shenzhen Drive The Life Technology Co.,Ltd.", "PDQ.com Corporation", "KERISH PRODUCTS LLP") and
process.code_signature.trusted == true) or
process.executable :
("C:\\Program Files (x86)\\Varian\\KeystoneAgent\\VMS.Keystone.DeploymentAgent.exe",
"C:\\Program Files\\FusionInventory-Agent\\perl\\bin\\perl.exe",
"C:\\Program Files\\FusionInventory-Agent\\perl\\bin\\fusioninventory-agent.exe",
"C:\\Program Files (x86)\\Varian\\KeystoneAgent\\VMS.Keystone.DeploymentAgent.exe",
"C:\\Program Files\\AzureConnectedMachineAgent\\GCArcService2\\GC\\gc_worker.exe",
"C:\\Program Files (x86)\\Belarc\\BelarcAdvisor\\BelarcAdvisor.exe",
"C:\\Program Files (x86)\\FusionInventory-Agent\\perl\\bin\\fusioninventory-agent.exe",
"C:\\Windows\\System32\\CompatTelRunner.exe",
"C:\\Windows\\SysWOW64\\systeminfo.exe",
"C:\\Windows\\System32\\systeminfo.exe",
"C:\\Program Files\\Windows Defender\\MpCmdRun.exe",
"C:\\Program Files (x86)\\Kaseya\\KSAASS*\\AgentMon.exe",
"C:\\Program Files\\BMC Software\\Client Management\\Client\\bin\\mtxagent.exe",
"C:\\Program Files (x86)\\LANDesk\\LDClient\\LDISCN32.EXE",
"C:\\Program Files\\GLPI-Agent\\perl\\bin\\glpi-agent.exe",
"C:\\Program Files (x86)\\GLPI-Agent\\perl\\bin\\glpi-agent.exe",
"C:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MpCmdRun.exe",
"C:\\Program Files (x86)\\Google\\Chrome\\Application\\*\\elevation_service.exe",
"C:\\Program Files\\Microsoft Visual Studio\\20??\\Enterprise\\Common?\\IDE\\devenv.exe",
"C:\\Program Files (x86)\\OSTotoSoft\\DriverTalent\\HardWareReport.exe",
"C:\\Windows\\System32\\UsoClient.exe",
"C:\\Windows\\CCM\\CcmExec.exe",
"C:\\Windows\\system32\\wsmprovhost.exe",
"\\Device\\Mup\\*.exe",
"C:\\Windows\\Microsoft.NET\\Framework64\\v4.*\\mscorsvw.exe",
"C:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\4.*\\MpCmdRun.exe",
"C:\\Program Files\\Microsoft Visual Studio\\*\\Common?\\IDE\\devenv.exe",
"C:\\Program Files\\Microsoft OneDrive\\*\\FileCoAuth.exe") or
(process.parent.executable : "?:\\Windows\\System32\\WmiPrvSe.exe" and process.name == "powershell.exe" and
process.command_line : "\"C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\PowerShell.exe\" -NoLogo -Noninteractive -NoProfile -ExecutionPolicy Bypass \"& 'C:\\WINDOWS\\CCM\\SystemTemp\\*.ps1'\"") or
(process.name : "powershell.exe" and
process.parent.executable : ("C:\\Program Files\\Tychon\\TychonEngine.exe", "C:\\Windows\\System32\\EVENTSENTRY\\eventsentry_svc_x64.exe")) or
(process.name : "powershell.exe" and
process.command_line : ("powershell Get-CimInstance –ClassName Win32_DeviceGuard –Namespace root\\Microsoft\\Windows\\DeviceGuard",
"\"C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\PowerShell.exe\" -NoLogo -Noninteractive -NoProfile -ExecutionPolicy Bypass \"& 'C:\\WINDOWS\\CCM\\SystemTemp\\*.ps1'\" True")) or
(process.name : "cscript.exe" and process.parent.executable : "C:\\Program Files (x86)\\Bostonpost Technology\\Property Manager *\\propertymanager.exe") or
(process.name : "powershell.exe" and
process.parent.executable : ("C:\\Program Files\\Windows Defender Advanced Threat Protection\\SenseIR.exe",
"C:\\ProgramData\\Microsoft\\Windows Defender Advanced Threat Protection\\Platform\\*\\SenseIR.exe")) or
(process.executable : "?:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" and
process.command_line : "*\\CommandCenterAgent\\agent.ps1*") or
(process.parent.executable : "?:\\Windows\\System32\\wscript.exe" and
process.command_line : "*\\CommandCenterAgent\\*")
)
'''
min_endpoint_version = "8.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1518"
name = "Software Discovery"
reference = "https://attack.mitre.org/techniques/T1518/"
[[threat.technique.subtechnique]]
id = "T1518.001"
name = "Security Software Discovery"
reference = "https://attack.mitre.org/techniques/T1518/001/"
[threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"
[internal]
min_endpoint_version = "8.15.0"
Stages and Predicates
Stage 1: api
api where
process.Ext.api.name like "IWbemServices::CreateInstanceEnum*" and process.Ext.token.integrity_level_name != "system" and
process.Ext.api.parameters.operation == "AntiVirusProduct" and
process.Ext.api.metadata.client_is_local == true and process.parent.executable != null and user.id != "S-1-5-18" and
process.Ext.api.metadata.client_process_id == null and
not(
(process.name in ("MpCmdRun.exe", "MsMpEng.exe") and
process.code_signature.subject_name == "Microsoft Windows Publisher" and process.code_signature.trusted == true and
process.executable :
("?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*.exe",
"?:\\Program Files\\Microsoft Security Client\\*.exe",
"?:\\Program Files\\Windows Defender\\*.exe",
"?:\\Program Files (x86)\\Windows Defender\\*.exe",
"?:\\Program Files (x86)\\Lenovo\\System Update\\ConfigScheduledTask.exe") and
process.parent.executable :
("?:\\Windows\\System32\\services.exe",
"?:\\Windows\\System32\\svchost.exe",
"?:\\Program Files\\Windows Defender\\MpCmdRun.exe",
"?:\\Program Files\\Common Files\\microsoft shared\\ClickToRun\\OfficeClickToRun.exe")) or
(process.executable : "\\Device\\HarddiskVolume*\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MpCmdRun.exe" and
process.parent.executable : "\\Device\\HarddiskVolume*\\Windows\\System32\\svchost.exe") or
(process.executable :
("?:\\Windows\\System32\\MRT.exe",
"?:\\$WINDOWS.~BT\\Sources\\SetupHost.exe",
"?:\\Windows\\SysWOW64\\systeminfo.exe",
"?:\\Windows\\System32\\systeminfo.exe",
"?:\\Program Files\\Windows Defender\\MpCmdRun.exe",
"C:\\Program Files\\Windows Defender\\MsMpEng.exe",
"C:\\Program Files\\Microsoft Visual Studio\\20??\\Professional\\Common?\\IDE\\devenv.exe") and
process.code_signature.subject_name in ("Microsoft Windows", "Microsoft Corporation") and process.code_signature.trusted == true) or
(process.executable : ("?:\\$Windows.~??\\Sources\\SetupHost.exe", "?:\\$WINDOWS.~??\\Sources\\mighost.exe") and
process.code_signature.subject_name == "Microsoft Windows" and process.code_signature.trusted == true) or
(process.executable : "C:\\Windows\\System32\\svchost.exe" and process.parent.executable : "?:\\Windows\\System32\\services.exe") or
(process.executable : "C:\\Program Files (x86)\\Ivanti\\EPM Agent\\Inventory\\ldiscn32.exe" and
process.code_signature.subject_name == "Ivanti, Inc." and process.code_signature.trusted == true) or
(process.executable : "C:\\Program Files (x86)\\ASUS\\AsusFanControlService\\*\\AsusFanControlService.exe" and
process.code_signature.subject_name == "ASUSTeK COMPUTER INC." and process.code_signature.trusted == true) or
(process.executable :
("?:\\Program Files\\GLPI-Agent\\perl\\bin\\glpi-agent.exe",
"?:\\Windows\\SysWOW64\\EasyResume.exe",
"?:\\Windows\\SysWOW64\\Lenovo\\PowerMgr\\EasyResume.exe") and
process.parent.executable : "?:\\Windows\\System32\\services.exe") or
(process.executable : "?:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" and process.Ext.api.parameters.operation == "Win32_DeviceGuard" and
process.parent.executable like "?:\\Program Files\\Microsoft Cloud Managed Desktop Extension\\CMDExtension\\Microsoft.Management.Services.CloudManagedDesktop.Agent.exe") or
(process.executable : "?:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" and
process.parent.executable : "?:\\Windows\\System32\\cmd.exe" and user.id == "S-1-5-18" and
process.Ext.api.parameters.operation == "Win32_DeviceGuard" and
process.command_line == "Powershell \"(Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\\Microsoft\\Windows\\DeviceGuard).SecurityServicesRunning\"") or
(process.executable : "?:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" and
process.parent.executable : "?:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" and
user.id == "S-1-5-18" and process.command_line like "*HexProductState*") or
(process.command_line : "powershell \"Get-CimInstance -Namespace root/SecurityCenter2 -ClassName AntiVirusProduct\"" and
process.parent.executable : "C:\\Users\\*\\AppData\\Local\\Programs\\DrSprinto\\DrSprinto.exe") or
(process.command_line : "\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -Version 5.1 -s -NoLogo -NoProfile" and
process.parent.executable : "C:\\Windows\\_ScriptingFramework\\Modul\\Engine.exe") or
(process.name in ("powershell.exe", "pwsh.exe") and process.Ext.api.parameters.operation == "Win32_DeviceGuard") or
(process.executable : "?:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" and
process.parent.executable : ("?:\\Windows\\explorer.exe", "?:\\Windows\\System32\\cmd.exe", "?:\\Program Files\\Mesh Agent\\MeshAgent.exe") and
process.command_line : ("powershell",
"C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" ",
"\"C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe\" -noexit -command import-module ActiveDirectory",
"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe \"Get-CimInstance -classname 'Win32_DeviceGuard' -namespace 'root\\Microsoft\\Windows\\DeviceGuard' | select-Object -property 'SecurityServicesRunning' | Out-File 'C:\\Program Files\\SCAP Compliance Checker 5.10.1\\Local\\LOCALHOST_*.tmp'\"",
"powershell.exe -NoLogo -NoProfile -command \"try { $VBSStatus=(Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\\Microsoft\\Windows\\DeviceGuard).VirtualizationBasedSecurityStatus; if ($VBSStatus -eq $null) { Write-Output 0 } else { Write-Output $VBSStatus } } catch { Write-Output 0 }\"")) or
(process.code_signature.subject_name in ("CPUID", "Lakeside Software, LLC", "CYBELSOFT", "Connectwise, LLC",
"Corsair Memory, Inc.", "Ivanti, Inc.", "POINTWARE INFORMATICA LTDA", "ASUSTeK COMPUTER INC.", "Snow Software AB",
"IObit CO., LTD", "ESET, spol. s r.o.", "Sophos Ltd", "WithSecure Oyj", "Trend Micro, Inc.", "Belarc, Inc.",
"KASEYA HOLDINGS INC.", "Elliptic Laboratories ASA", "IObit Information Technology", "CPUID S.A.R.L.U.", "CPUID",
"Panda Security S.L", "Shenzhen Drive The Life Technology Co.,Ltd.", "PDQ.com Corporation", "KERISH PRODUCTS LLP") and
process.code_signature.trusted == true) or
process.executable :
("C:\\Program Files (x86)\\Varian\\KeystoneAgent\\VMS.Keystone.DeploymentAgent.exe",
"C:\\Program Files\\FusionInventory-Agent\\perl\\bin\\perl.exe",
"C:\\Program Files\\FusionInventory-Agent\\perl\\bin\\fusioninventory-agent.exe",
"C:\\Program Files (x86)\\Varian\\KeystoneAgent\\VMS.Keystone.DeploymentAgent.exe",
"C:\\Program Files\\AzureConnectedMachineAgent\\GCArcService2\\GC\\gc_worker.exe",
"C:\\Program Files (x86)\\Belarc\\BelarcAdvisor\\BelarcAdvisor.exe",
"C:\\Program Files (x86)\\FusionInventory-Agent\\perl\\bin\\fusioninventory-agent.exe",
"C:\\Windows\\System32\\CompatTelRunner.exe",
"C:\\Windows\\SysWOW64\\systeminfo.exe",
"C:\\Windows\\System32\\systeminfo.exe",
"C:\\Program Files\\Windows Defender\\MpCmdRun.exe",
"C:\\Program Files (x86)\\Kaseya\\KSAASS*\\AgentMon.exe",
"C:\\Program Files\\BMC Software\\Client Management\\Client\\bin\\mtxagent.exe",
"C:\\Program Files (x86)\\LANDesk\\LDClient\\LDISCN32.EXE",
"C:\\Program Files\\GLPI-Agent\\perl\\bin\\glpi-agent.exe",
"C:\\Program Files (x86)\\GLPI-Agent\\perl\\bin\\glpi-agent.exe",
"C:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MpCmdRun.exe",
"C:\\Program Files (x86)\\Google\\Chrome\\Application\\*\\elevation_service.exe",
"C:\\Program Files\\Microsoft Visual Studio\\20??\\Enterprise\\Common?\\IDE\\devenv.exe",
"C:\\Program Files (x86)\\OSTotoSoft\\DriverTalent\\HardWareReport.exe",
"C:\\Windows\\System32\\UsoClient.exe",
"C:\\Windows\\CCM\\CcmExec.exe",
"C:\\Windows\\system32\\wsmprovhost.exe",
"\\Device\\Mup\\*.exe",
"C:\\Windows\\Microsoft.NET\\Framework64\\v4.*\\mscorsvw.exe",
"C:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\4.*\\MpCmdRun.exe",
"C:\\Program Files\\Microsoft Visual Studio\\*\\Common?\\IDE\\devenv.exe",
"C:\\Program Files\\Microsoft OneDrive\\*\\FileCoAuth.exe") or
(process.parent.executable : "?:\\Windows\\System32\\WmiPrvSe.exe" and process.name == "powershell.exe" and
process.command_line : "\"C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\PowerShell.exe\" -NoLogo -Noninteractive -NoProfile -ExecutionPolicy Bypass \"& 'C:\\WINDOWS\\CCM\\SystemTemp\\*.ps1'\"") or
(process.name : "powershell.exe" and
process.parent.executable : ("C:\\Program Files\\Tychon\\TychonEngine.exe", "C:\\Windows\\System32\\EVENTSENTRY\\eventsentry_svc_x64.exe")) or
(process.name : "powershell.exe" and
process.command_line : ("powershell Get-CimInstance –ClassName Win32_DeviceGuard –Namespace root\\Microsoft\\Windows\\DeviceGuard",
"\"C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\PowerShell.exe\" -NoLogo -Noninteractive -NoProfile -ExecutionPolicy Bypass \"& 'C:\\WINDOWS\\CCM\\SystemTemp\\*.ps1'\" True")) or
(process.name : "cscript.exe" and process.parent.executable : "C:\\Program Files (x86)\\Bostonpost Technology\\Property Manager *\\propertymanager.exe") or
(process.name : "powershell.exe" and
process.parent.executable : ("C:\\Program Files\\Windows Defender Advanced Threat Protection\\SenseIR.exe",
"C:\\ProgramData\\Microsoft\\Windows Defender Advanced Threat Protection\\Platform\\*\\SenseIR.exe")) or
(process.executable : "?:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" and
process.command_line : "*\\CommandCenterAgent\\agent.ps1*") or
(process.parent.executable : "?:\\Windows\\System32\\wscript.exe" and
process.command_line : "*\\CommandCenterAgent\\*")
)
Indicators
These rows show field, operator, and value matches.
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.Ext.api.parameters.operation | eq | Win32_DeviceGuard | excludes:process.Ext.api.parameters.operation field:"process.Ext.api.parameters.operation" value:"Win32_DeviceGuard" |
process.command_line | eq | Powershell "(Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\Microsoft\Windows\DeviceGuard).SecurityServicesRunning" | excludes:process.command_line |
process.executable | eq | ?:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe | excludes:process.executable field:"process.executable" value:"?:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" |
process.parent.executable | eq | ?:\Windows\System32\cmd.exe | excludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\System32\cmd.exe" |
user.id | eq | S-1-5-18 | excludes:user.id field:"user.id" value:"S-1-5-18" |
process.parent.executable | eq | ?:\Program Files\Microsoft Cloud Managed Desktop Extension\CMDExtension\Microsoft.Management.Services.CloudManagedDesktop.Agent.exe | excludes:process.parent.executable field:"process.parent.executable" value:"?:\Program Files\Microsoft Cloud Managed Desktop Extension\CMDExtension\Microsoft.Management.Services.CloudManagedDesktop.Agent.exe" |
process.name | in | powershell.exe, pwsh.exe | excludes:process.name field:"process.name" value:"powershell.exe" field:"process.name" value:"pwsh.exe" |
process.code_signature.subject_name | eq | ASUSTeK COMPUTER INC. | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"ASUSTeK COMPUTER INC." |
process.code_signature.trusted | eq | true | excludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true" |
process.executable | wildcard | C:\Program Files (x86)\ASUS\AsusFanControlService\*\AsusFanControlService.exe | excludes:process.executable field:"process.executable" value:"C:\Program Files (x86)\ASUS\AsusFanControlService\*\AsusFanControlService.exe" |
process.code_signature.subject_name | eq | Ivanti, Inc. | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Ivanti, Inc." |
process.executable | eq | C:\Program Files (x86)\Ivanti\EPM Agent\Inventory\ldiscn32.exe | excludes:process.executable field:"process.executable" value:"C:\Program Files (x86)\Ivanti\EPM Agent\Inventory\ldiscn32.exe" |
process.code_signature.subject_name | eq | Microsoft Windows Publisher | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Microsoft Windows Publisher" |
process.executable | wildcard | ?:\ProgramData\Microsoft\Windows Defender\Platform\*.exe, ?:\Program Files\Microsoft Security Client\*.exe, ?:\Program Files\Windows Defender\*.exe, ?:\Program Files (x86)\Windows Defender\*.exe, ?:\Program Files (x86)\Lenovo\System Update\ConfigScheduledTask.exe | excludes:process.executable |
process.name | in | MpCmdRun.exe, MsMpEng.exe | excludes:process.name field:"process.name" value:"MpCmdRun.exe" field:"process.name" value:"MsMpEng.exe" |
process.parent.executable | eq | ?:\Windows\System32\services.exe, ?:\Windows\System32\svchost.exe, ?:\Program Files\Windows Defender\MpCmdRun.exe, ?:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeClickToRun.exe | excludes:process.parent.executable |
process.code_signature.subject_name | eq | Microsoft Windows | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Microsoft Windows" |
process.executable | eq | ?:\$Windows.~??\Sources\SetupHost.exe, ?:\$WINDOWS.~??\Sources\mighost.exe | excludes:process.executable field:"process.executable" value:"?:\$Windows.~??\Sources\SetupHost.exe" field:"process.executable" value:"?:\$WINDOWS.~??\Sources\mighost.exe" |
process.code_signature.subject_name | in | ASUSTeK COMPUTER INC., Belarc, Inc., CPUID, CPUID S.A.R.L.U., CYBELSOFT, Connectwise, LLC, Corsair Memory, Inc., ESET, spol. s r.o., Elliptic Laboratories ASA, IObit CO., LTD, IObit Information Technology, Ivanti, Inc., KASEYA HOLDINGS INC., KERISH PRODUCTS LLP, Lakeside Software, LLC, PDQ.com Corporation, POINTWARE INFORMATICA LTDA, Panda Security S.L, Shenzhen Drive The Life Technology Co.,Ltd., Snow Software AB, Sophos Ltd, Trend Micro, Inc., WithSecure Oyj | excludes:process.code_signature.subject_name |
process.code_signature.subject_name | in | Microsoft Corporation, Microsoft Windows | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Microsoft Corporation" field:"process.code_signature.subject_name" value:"Microsoft Windows" |
process.executable | eq | ?:\Windows\System32\MRT.exe, ?:\$WINDOWS.~BT\Sources\SetupHost.exe, ?:\Windows\SysWOW64\systeminfo.exe, ?:\Windows\System32\systeminfo.exe, ?:\Program Files\Windows Defender\MpCmdRun.exe, C:\Program Files\Windows Defender\MsMpEng.exe, C:\Program Files\Microsoft Visual Studio\20??\Professional\Common?\IDE\devenv.exe | excludes:process.executable |
process.command_line | eq | "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -Version 5.1 -s -NoLogo -NoProfile | excludes:process.command_line |
process.parent.executable | eq | C:\Windows\_ScriptingFramework\Modul\Engine.exe | excludes:process.parent.executable field:"process.parent.executable" value:"C:\Windows\_ScriptingFramework\Modul\Engine.exe" |
process.command_line | eq | powershell "Get-CimInstance -Namespace root/SecurityCenter2 -ClassName AntiVirusProduct" | excludes:process.command_line |
process.parent.executable | wildcard | C:\Users\*\AppData\Local\Programs\DrSprinto\DrSprinto.exe | excludes:process.parent.executable field:"process.parent.executable" value:"C:\Users\*\AppData\Local\Programs\DrSprinto\DrSprinto.exe" |
process.command_line | match | HexProductState | excludes:process.command_line field:"process.command_line" value:"HexProductState" |
process.parent.executable | eq | ?:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe | excludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" |
process.command_line | match | \CommandCenterAgent\ | excludes:process.command_line field:"process.command_line" value:"\CommandCenterAgent\" |
process.parent.executable | eq | ?:\Windows\System32\wscript.exe | excludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\System32\wscript.exe" |
process.command_line | match | \CommandCenterAgent\agent.ps1 | excludes:process.command_line field:"process.command_line" value:"\CommandCenterAgent\agent.ps1" |
process.command_line | wildcard | "C:\WINDOWS\system32\WindowsPowerShell\v1.0\PowerShell.exe" -NoLogo -Noninteractive -NoProfile -ExecutionPolicy Bypass "& 'C:\WINDOWS\CCM\SystemTemp\*.ps1'" | excludes:process.command_line |
process.name | eq | powershell.exe | excludes:process.name field:"process.name" value:"powershell.exe" |
process.parent.executable | eq | ?:\Windows\System32\WmiPrvSe.exe | excludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\System32\WmiPrvSe.exe" |
process.command_line | wildcard | powershell Get-CimInstance –ClassName Win32_DeviceGuard –Namespace root\Microsoft\Windows\DeviceGuard, "C:\WINDOWS\system32\WindowsPowerShell\v1.0\PowerShell.exe" -NoLogo -Noninteractive -NoProfile -ExecutionPolicy Bypass "& 'C:\WINDOWS\CCM\SystemTemp\*.ps1'" True | excludes:process.command_line |
process.command_line | wildcard | powershell, C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe, "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" , "C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" -noexit -command import-module ActiveDirectory, C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe "Get-CimInstance -classname 'Win32_DeviceGuard' -namespace 'root\Microsoft\Windows\DeviceGuard' | select-Object -property 'SecurityServicesRunning' | Out-File 'C:\Program Files\SCAP Compliance Checker 5.10.1\Local\LOCALHOST_*.tmp'", powershell.exe -NoLogo -NoProfile -command "try { $VBSStatus=(Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\Microsoft\Windows\DeviceGuard).VirtualizationBasedSecurityStatus; if ($VBSStatus -eq $null) { Write-Output 0 } else { Write-Output $VBSStatus } } catch { Write-Output 0 }" | excludes:process.command_line |
process.parent.executable | eq | ?:\Windows\explorer.exe, ?:\Windows\System32\cmd.exe, ?:\Program Files\Mesh Agent\MeshAgent.exe | excludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\explorer.exe" field:"process.parent.executable" value:"?:\Windows\System32\cmd.exe" field:"process.parent.executable" value:"?:\Program Files\Mesh Agent\MeshAgent.exe" |
process.executable | eq | ?:\Program Files\GLPI-Agent\perl\bin\glpi-agent.exe, ?:\Windows\SysWOW64\EasyResume.exe, ?:\Windows\SysWOW64\Lenovo\PowerMgr\EasyResume.exe | excludes:process.executable field:"process.executable" value:"?:\Program Files\GLPI-Agent\perl\bin\glpi-agent.exe" field:"process.executable" value:"?:\Windows\SysWOW64\EasyResume.exe" field:"process.executable" value:"?:\Windows\SysWOW64\Lenovo\PowerMgr\EasyResume.exe" |
process.parent.executable | eq | ?:\Windows\System32\services.exe | excludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\System32\services.exe" |
process.executable | eq | C:\Windows\System32\svchost.exe | excludes:process.executable field:"process.executable" value:"C:\Windows\System32\svchost.exe" |
process.executable | wildcard | \Device\HarddiskVolume*\ProgramData\Microsoft\Windows Defender\Platform\*\MpCmdRun.exe | excludes:process.executable field:"process.executable" value:"\Device\HarddiskVolume*\ProgramData\Microsoft\Windows Defender\Platform\*\MpCmdRun.exe" |
process.parent.executable | wildcard | \Device\HarddiskVolume*\Windows\System32\svchost.exe | excludes:process.parent.executable field:"process.parent.executable" value:"\Device\HarddiskVolume*\Windows\System32\svchost.exe" |
process.name | eq | cscript.exe | excludes:process.name field:"process.name" value:"cscript.exe" |
process.parent.executable | wildcard | C:\Program Files (x86)\Bostonpost Technology\Property Manager *\propertymanager.exe | excludes:process.parent.executable field:"process.parent.executable" value:"C:\Program Files (x86)\Bostonpost Technology\Property Manager *\propertymanager.exe" |
process.parent.executable | eq | C:\Program Files\Tychon\TychonEngine.exe, C:\Windows\System32\EVENTSENTRY\eventsentry_svc_x64.exe | excludes:process.parent.executable field:"process.parent.executable" value:"C:\Program Files\Tychon\TychonEngine.exe" field:"process.parent.executable" value:"C:\Windows\System32\EVENTSENTRY\eventsentry_svc_x64.exe" |
process.parent.executable | wildcard | C:\Program Files\Windows Defender Advanced Threat Protection\SenseIR.exe, C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Platform\*\SenseIR.exe | excludes:process.parent.executable field:"process.parent.executable" value:"C:\Program Files\Windows Defender Advanced Threat Protection\SenseIR.exe" field:"process.parent.executable" value:"C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Platform\*\SenseIR.exe" |
process.executable | wildcard | C:\Program Files (x86)\Varian\KeystoneAgent\VMS.Keystone.DeploymentAgent.exe, C:\Program Files\FusionInventory-Agent\perl\bin\perl.exe, C:\Program Files\FusionInventory-Agent\perl\bin\fusioninventory-agent.exe, C:\Program Files (x86)\Varian\KeystoneAgent\VMS.Keystone.DeploymentAgent.exe, C:\Program Files\AzureConnectedMachineAgent\GCArcService2\GC\gc_worker.exe, C:\Program Files (x86)\Belarc\BelarcAdvisor\BelarcAdvisor.exe, C:\Program Files (x86)\FusionInventory-Agent\perl\bin\fusioninventory-agent.exe, C:\Windows\System32\CompatTelRunner.exe, C:\Windows\SysWOW64\systeminfo.exe, C:\Windows\System32\systeminfo.exe, C:\Program Files\Windows Defender\MpCmdRun.exe, C:\Program Files (x86)\Kaseya\KSAASS*\AgentMon.exe, C:\Program Files\BMC Software\Client Management\Client\bin\mtxagent.exe, C:\Program Files (x86)\LANDesk\LDClient\LDISCN32.EXE, C:\Program Files\GLPI-Agent\perl\bin\glpi-agent.exe, C:\Program Files (x86)\GLPI-Agent\perl\bin\glpi-agent.exe, C:\ProgramData\Microsoft\Windows Defender\Platform\*\MpCmdRun.exe, C:\Program Files (x86)\Google\Chrome\Application\*\elevation_service.exe, C:\Program Files\Microsoft Visual Studio\20??\Enterprise\Common?\IDE\devenv.exe, C:\Program Files (x86)\OSTotoSoft\DriverTalent\HardWareReport.exe, C:\Windows\System32\UsoClient.exe, C:\Windows\CCM\CcmExec.exe, C:\Windows\system32\wsmprovhost.exe, \Device\Mup\*.exe, C:\Windows\Microsoft.NET\Framework64\v4.*\mscorsvw.exe, C:\ProgramData\Microsoft\Windows Defender\Platform\4.*\MpCmdRun.exe, C:\Program Files\Microsoft Visual Studio\*\Common?\IDE\devenv.exe, C:\Program Files\Microsoft OneDrive\*\FileCoAuth.exe | excludes:process.executable |
Uncommon DNS Request via Bun or Node.js
#This rule detects uncommon DNS requests via Bun or Node.js. Adversaries may leverage these tools via a supply chain attack of a compromised developer's package to execute malicious code and steal/exfiltrate data.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Rule Body
[metadata]
creation_date = "2026/05/21"
integration = ["endpoint"]
maturity = "production"
min_stack_version = "9.3.0"
min_stack_comments = "DNS for Linux support was introduced in 9.3.0"
updated_date = "2026/06/01"
[rule]
author = ["Elastic"]
description = """
This rule detects uncommon DNS requests via Bun or Node.js. Adversaries may leverage these tools
via a supply chain attack of a compromised developer's package to execute malicious code and
steal/exfiltrate data.
"""
from = "now-9m"
index = ["logs-endpoint.events.network-*"]
language = "kuery"
license = "Elastic License v2"
name = "Uncommon DNS Request via Bun or Node.js"
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 Uncommon DNS Request via Bun or Node.js
This rule flags rare DNS lookups made by Bun or Node.js on an endpoint, which can reveal unexpected network activity from developer tooling or JavaScript runtimes. It matters because a compromised package or script can use these processes to contact attacker-controlled infrastructure, hide command-and-control traffic, or stage data theft. A common pattern is a poisoned dependency that runs during install or execution and resolves a unique subdomain before pulling a second-stage payload.
### Possible investigation steps
- Review the full command line, parent and ancestor chain, execution path, and working directory to determine whether the lookup came from a developer workflow, package install hook, build task, or an unexpected script.
- Identify the code or dependency responsible by examining recent changes to package manifests, lockfiles, installed modules, and any preinstall, postinstall, prepare, or other lifecycle scripts near the alert time.
- Enrich the queried domain to determine whether it belongs to expected registries or internal services, and treat newly registered, low-reputation, typo-squatted, or high-entropy subdomains as stronger indicators of compromise.
- Pivot on nearby runtime and network activity from the same execution context to see whether the DNS request was followed by outbound connections, downloads, archive extraction, credential access, or child processes that suggest staging or exfiltration.
- Validate the user and host context by checking whether the activity occurred in a CI runner, developer workstation, or production server, and compare it against that asset’s normal JavaScript runtime behavior to separate legitimate builds from anomalous execution.
### False positive analysis
- A legitimate dependency installation, build, or test run can cause Bun or Node.js to resolve previously unseen domains introduced by new modules or lifecycle scripts, so verify the lookup aligns with an expected package operation by reviewing the command line, parent process, and recent changes to package manifests or lockfiles.
- An approved internal application or automation script may use Bun or Node.js for service discovery or environment-specific hostname resolution, so confirm the queried domain belongs to known internal infrastructure and that the script path and execution context match the host’s normal role.
### Response and remediation
- Isolate the affected workstation, server, or CI runner from the network, stop the suspicious Bun or Node.js process tree, and preserve the working directory, package files, and user profile artifacts for follow-on analysis.
- Remove the malicious package or script and delete attacker persistence such as modified package.json lifecycle hooks, poisoned lockfiles, startup folder entries, scheduled tasks, cron jobs, launch agents, systemd services, and shell profile changes created around the compromise.
- Block the resolved domains and any follow-on destinations at DNS, proxy, and firewall controls, and revoke or rotate credentials the runtime could access, including repository tokens, cloud keys, SSH keys, API secrets, and values stored in .npmrc files or environment variables.
- Restore the asset to a known-good state by rebuilding it from a clean image or trusted baseline, reinstalling dependencies only from vetted registries and approved lockfiles, and verifying no unexpected Bun or Node.js scripts remain in application, temp, or user-writable paths.
- Escalate to incident response immediately if the same package, domain, or script is present on multiple hosts, if developer repositories or CI pipelines were modified, or if there is any sign that source code, secrets, or customer data was accessed or exfiltrated.
- Harden the environment by enforcing dependency pinning and package allowlists, disabling unnecessary install-time script execution, restricting direct internet access for build systems, and adding detections for Bun or Node.js making DNS requests to rare or newly registered domains.
"""
references = [
"https://github.com/nrwl/nx-console/issues/3139",
]
risk_score = 21
rule_id = "55be0398-e72d-4c02-a916-b11d62af0e29"
severity = "low"
tags = [
"Domain: Endpoint",
"OS: Linux",
"OS: macOS",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Command and Control",
"Data Source: Elastic Defend",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
event.category:network and host.os.type:(linux or macos or windows) and event.action:lookup_requested and
process.name:(bun or bun.exe or node or node.exe or nodejs) and dns.question.name:(* and not localhost)
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[rule.threat.tactic]
name = "Command and Control"
id = "TA0011"
reference = "https://attack.mitre.org/tactics/TA0011/"
[[rule.threat.technique]]
name = "Web Service"
id = "T1102"
reference = "https://attack.mitre.org/techniques/T1102/"
[[rule.threat.technique]]
name = "Application Layer Protocol"
id = "T1071"
reference = "https://attack.mitre.org/techniques/T1071/"
[[rule.threat.technique.subtechnique]]
name = "DNS"
id = "T1071.004"
reference = "https://attack.mitre.org/techniques/T1071/004/"
[rule.new_terms]
field = "new_terms_fields"
value = ["host.id", "dns.question.name"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-7d"
Stages and Predicates
Stage 1: new_terms
event.category:network and host.os.type:(linux or macos or windows) and event.action:lookup_requested and
process.name:(bun or bun.exe or node or node.exe or nodejs) and dns.question.name:(* and not localhost)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
dns.question.name | is_not_null | field:"QueryName" kind:is_not_null | |
event.action | eq |
| field:"EventType" kind:eq value:"lookup_requested" |
event.category | eq |
| field:"event.category" kind:eq value:"network" |
process.name | in |
| field:"process_basename" kind:in |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
dns.question.name | eq | localhost | excludes:dns.question.name field:"dns.question.name" value:"localhost" |
Unsigned or Untrusted binary Execution via Cron
#Detects the execution of an unsigned or untrusted binary by Cron. Cron is a common persistence mechanism used by threat actors, even on macOS. A recent DPRK sample dubbed "ThiefBucket" utilized Cron for persistence in order to executed an unsigned payload. The use of Cron is not entirely common on macOS and using it to execute an unsigned or untrusted application is even more unusual.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Persistence |
Telemetry Coverage
Rule Body
[rule]
description = """
Detects the execution of an unsigned or untrusted binary by Cron. Cron is a common persistence mechanism used by threat
actors, even on macOS. A recent DPRK sample dubbed "ThiefBucket" utilized Cron for persistence in order to executed an
unsigned payload. The use of Cron is not entirely common on macOS and using it to execute an unsigned or untrusted
application is even more unusual.
"""
id = "d18ce577-74ba-40c3-9f9f-6031dfe76b2c"
license = "Elastic License v2"
name = "Unsigned or Untrusted binary Execution via Cron"
os_list = ["macos"]
reference = ["https://www.jamf.com/blog/jamf-threat-labs-observes-targeted-attacks-amid-fbi-warnings/"]
version = "1.0.6"
query = '''
process where event.type == "start" and event.action == "exec" and process.parent.name == "cron" and
(process.code_signature.trusted == false or process.code_signature.exists == false) and
(process.Ext.effective_parent.executable == "/usr/sbin/cron" or process.Ext.effective_parent.name like~ ".*")
'''
min_endpoint_version = "8.11.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1053"
name = "Scheduled Task/Job"
reference = "https://attack.mitre.org/techniques/T1053/"
[[threat.technique.subtechnique]]
id = "T1053.003"
name = "Cron"
reference = "https://attack.mitre.org/techniques/T1053/003/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1053"
name = "Scheduled Task/Job"
reference = "https://attack.mitre.org/techniques/T1053/"
[[threat.technique.subtechnique]]
id = "T1053.003"
name = "Cron"
reference = "https://attack.mitre.org/techniques/T1053/003/"
[threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[internal]
min_endpoint_version = "8.11.0"
Stages and Predicates
Stage 1: process
process where event.type == "start" and event.action == "exec" and process.parent.name == "cron" and
(process.code_signature.trusted == false or process.code_signature.exists == false) and
(process.Ext.effective_parent.executable == "/usr/sbin/cron" or process.Ext.effective_parent.name like~ ".*")
Indicators
These rows show field, operator, and value matches.