Detection rules › Elastic
Elastic rules: 2a
AWS GuardDuty Publishing Destination Deleted
#Detects the deletion of an Amazon GuardDuty publishing destination. Publishing destinations export GuardDuty findings to S3, Security Lake, or EventBridge for long-term retention and SIEM ingestion. An adversary with GuardDuty administrative access may delete a publishing destination to prevent findings from reaching external storage or a security operations center, reducing the visibility of their activity while leaving the GuardDuty detector active.
Known False Positives
- Decommissioning of a GuardDuty publishing destination during a planned security architecture migration may trigger this rule. Validate that the deletion is associated with a known infrastructure change and that an alternative destination was configured.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2026/08/14"
integration = ["aws"]
maturity = "production"
updated_date = "2026/08/14"
[rule]
author = ["Elastic"]
description = """
Detects the deletion of an Amazon GuardDuty publishing destination. Publishing destinations
export GuardDuty findings to S3, Security Lake, or EventBridge for long-term retention and
SIEM ingestion. An adversary with GuardDuty administrative access may delete a publishing
destination to prevent findings from reaching external storage or a security operations center,
reducing the visibility of their activity while leaving the GuardDuty detector active.
"""
false_positives = [
"""
Decommissioning of a GuardDuty publishing destination during a planned security architecture
migration may trigger this rule. Validate that the deletion is associated with a known
infrastructure change and that an alternative destination was configured.
""",
]
from = "now-6m"
index = ["logs-aws.cloudtrail-*"]
language = "kuery"
license = "Elastic License v2"
name = "AWS GuardDuty Publishing Destination Deleted"
note = """## Triage and analysis
### Investigating AWS GuardDuty Publishing Destination Deleted
Amazon GuardDuty publishing destinations export threat findings to S3 buckets, Amazon Security Lake, or EventBridge buses for retention and downstream SIEM ingestion. Deleting a publishing destination severs this pipeline: findings still appear in the GuardDuty console but are no longer exported, making it harder for security operations to correlate GuardDuty alerts with other event sources.
This action is uncommon in production environments. Legitimate deletions occur during planned migrations to a new destination or when decommissioning GuardDuty in an account.
### Possible investigation steps
- Identify the caller from `aws.cloudtrail.user_identity.arn` and `user.name`. Verify this identity has a documented reason to modify GuardDuty configuration.
- Check `aws.cloudtrail.request_parameters` for the destination ID and detector ID. Query GuardDuty to confirm whether any publishing destination remains configured.
- Review CloudTrail for other GuardDuty control-plane actions by the same identity in the surrounding time window: `DeleteDetector`, `UpdateDetector`, `CreateFilter`, `CreateIPSet`.
- Determine whether a replacement destination was configured before or after the deletion.
- Correlate with IAM changes that may have granted GuardDuty administrative access to the calling identity.
### Response and remediation
- If unauthorized, immediately re-create the publishing destination to restore findings export.
- Rotate credentials for the calling identity and review all actions taken by those credentials.
- Apply an SCP or IAM policy restricting `guardduty:DeletePublishingDestination` to a dedicated security operations role.
- Review GuardDuty member account configurations to confirm the action was not replicated across multiple accounts.
"""
references = [
"https://docs.aws.amazon.com/guardduty/latest/APIReference/API_DeletePublishingDestination.html",
"https://hackingthe.cloud/aws/avoiding-detection/modify-guardduty-config/",
]
risk_score = 47
rule_id = "29901591-a2c9-4ac3-b1c9-36fd1df0f4c1"
setup = "The AWS integration must be ingesting management events into `logs-aws.cloudtrail-*`. GuardDuty management events are logged by default."
severity = "medium"
tags = [
"Domain: Cloud",
"Platform: AWS",
"Data Source: AWS CloudTrail",
"Service: AWS GuardDuty",
"Rule Type: Custom Query (KQL)",
"Tactic: Defense Evasion",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "query"
query = '''
data_stream.dataset: "aws.cloudtrail"
and event.provider: "guardduty.amazonaws.com"
and event.action: "DeletePublishingDestination"
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.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.investigation_fields]
field_names = [
"@timestamp",
"aws.cloudtrail.user_identity.arn",
"aws.cloudtrail.user_identity.type",
"user.name",
"event.action",
"event.outcome",
"aws.cloudtrail.request_parameters",
"source.ip",
"cloud.region",
"cloud.account.id",
]
Stages and Predicates
Stage 1: query
data_stream.dataset: "aws.cloudtrail"
and event.provider: "guardduty.amazonaws.com"
and event.action: "DeletePublishingDestination"
and event.outcome: "success"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
data_stream.dataset | eq |
| field:"data_stream.dataset" kind:eq value:"aws.cloudtrail" |
event.action | eq |
| field:"EventType" kind:eq value:"DeletePublishingDestination" |
event.outcome | eq |
| field:"event.outcome" kind:eq value:"success" |
event.provider | eq |
| field:"Provider_Name" kind:eq value:"guardduty.amazonaws.com" |
Browser Process Spawned from an Unusual Parent
#Identifies instances where a browser is launched with remote debugging, headless automation, or minimal arguments from an unusual parent process. This may indicate an attempt to broker or tamper with a browser session for credential theft.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access | |
| Collection |
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 = "2025/08/27"
integration = ["windows", "endpoint", "system", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2026/04/22"
[rule]
author = ["Elastic"]
description = """
Identifies instances where a browser is launched with remote debugging, headless automation, or minimal arguments from
an unusual parent process. This may indicate an attempt to broker or tamper with a browser session for credential theft.
"""
from = "now-9m"
index = [
"endgame-*",
"logs-endpoint.events.process-*",
"logs-m365_defender.event-*",
"logs-sentinel_one_cloud_funnel.*",
"logs-system.security*",
"logs-windows.forwarded*",
"logs-windows.sysmon_operational-*",
"winlogbeat-*",
]
language = "eql"
license = "Elastic License v2"
name = "Browser Process Spawned from an Unusual Parent"
references = ["https://www.elastic.co/security-labs/katz-and-mouse-game"]
risk_score = 73
rule_id = "46b01bb5-cff2-4a00-9f87-c041d9eab554"
severity = "high"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Credential Access",
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Windows Security Event Logs",
"Data Source: Microsoft Defender XDR",
"Data Source: Sysmon",
"Data Source: SentinelOne",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "windows" and event.type == "start" and
process.name : ("chrome.exe", "msedge.exe") and
process.parent.executable != null and
(
process.command_line : (
"\"C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe\"",
"\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\"",
"\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" --headless --disable-logging --log-level=3 --v=0",
"\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" --headless --log-level=3",
"\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" --headless",
"\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" --remote-debugging-port=922? --profile-directory=\"Default\"*",
"\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" --headless --restore-last-session --remote-debugging-port=45452*"
) or
(process.args : "--remote-debugging-port=922?" and process.args : "--window-position=-*,-*")
) and
not process.parent.executable :
("C:\\Windows\\explorer.exe",
"C:\\Program Files (x86)\\*.exe",
"C:\\Program Files\\*.exe",
"C:\\Windows\\System32\\rdpinit.exe",
"C:\\Windows\\System32\\sihost.exe",
"C:\\Windows\\System32\\RuntimeBroker.exe",
"C:\\Windows\\System32\\SECOCL64.exe")
'''
note = """## Triage and analysis
### Investigating Browser Process Spawned from an Unusual Parent
#### Possible investigation steps
- What browser-brokering path did the alert capture?
- Focus: `process.command_line`, `process.parent.executable`, `process.parent.command_line`, and `process.Ext.ancestry`.
- Implication: escalate with one corroborator when Chrome or Edge starts with high-risk arguments such as "--remote-debugging-port", "--user-data-dir", "--profile-directory", "--headless", offscreen window positioning, or bare browser execution from an unexplained shell, script host, Office app, archive tool, LOLBin, or remote-admin parent; lower suspicion only when a stable signed automation, RPA, support, or test-runner parent uses the same bounded debug or profile behavior for the same user-host cohort.
- Is the browser and launcher identity consistent with a signed automation toolchain?
- Focus: `process.executable`, `process.code_signature.subject_name`, `process.code_signature.trusted`, and `process.parent.code_signature.subject_name`.
- Implication: escalate when the browser or launcher is unsigned, user-writable, mismatched to its product identity, or signed by an unexpected publisher; identity looks cleaner when Chrome or Edge and the launcher signer match the same recognized toolchain, but identity alone does not clear the browser-brokering behavior.
- Does the user, host, and session context fit the launch?
- Focus: `user.id`, `user.name`, `host.id`, `process.Ext.session_info.logon_type`, and `process.Ext.authentication_id`. $investigate_4
- Hint: if Windows Security logs are available, pivot `process.Ext.authentication_id` plus `host.id` to `winlog.event_data.TargetLogonId` for 4624 session origin, `source.ip`, and `winlog.event_data.AuthenticationPackageName`; search `winlog.event_data.SubjectLogonId` separately for 4648 explicit-credential context. Missing auth telemetry is unresolved, not benign.
- Implication: escalate when the browser starts from a service, scheduled, remote, or explicit-credential session that does not match the user-host role; lower suspicion when the session, parent, and user-host cohort all fit the same recognized automation pattern.
- Do network events show DevTools brokering or unexpected egress?
- Focus: if network telemetry is available, review browser- and parent-scoped connection events on `host.id` for `process.entity_id` and `process.parent.entity_id`: `source.ip`, `destination.ip`, and `destination.port`. $investigate_2
- Hint: separately review DNS events for `dns.question.name`; DNS events do not carry connection-side `source.ip` or `destination.ip`. The linked transform includes browser and parent `process.entity_id` values to catch browser egress and parent-side DevTools client connections. Missing network telemetry is unresolved, not benign.
- Implication: escalate when a parent or non-browser process connects over loopback to the browser debugging port, or when the browser reaches rare public destinations unrelated to the same automation pattern; lower suspicion when traffic stays inside recognized vendor, proxy, test, or local automation paths for that parent and command line.
- Do file events show browser-store collection or staged output?
- Focus: if file telemetry is available, review file events on `host.id` for `process.entity_id` and `process.parent.entity_id`: `file.path` and `file.Ext.original.path`, especially copied or renamed browser-store artifacts such as "Login Data", "Cookies", "Local State", or "LocalPrefs.json". $investigate_3
- Hint: if entity IDs are unavailable, pivot with `host.id`, process IDs, and a tight alert window; absence of file telemetry does not close the alert.
- Implication: escalate when the process writes copied browser databases, archives, exported tokens, or renamed outputs in user-writable paths; lower suspicion when file activity stays inside the recognized automation cache or download path and no browser-store artifacts are staged.
- Is the same browser-brokering pattern present beyond this process?
- Focus: if local evidence is suspicious or unresolved, review recent alerts for the same `user.id` and then the same `host.id`.
- Hint: user-scoped related alerts: $investigate_0
- Hint: host-scoped related alerts: $investigate_1
- Implication: escalate scope when the same parent, command-line pattern, destination, or browser-store artifact repeats across hosts or users; recurrence of one exact automation pattern supports exception review but does not override contradictory telemetry.
- What disposition does the evidence support?
- Focus: behavior path, browser and launcher identity, session context, DevTools or egress evidence, browser-store artifacts, and scope.
- Implication: escalate when an unexpected parent drives a browser debug interface, hidden automation, or profile targeting with suspicious session, network, file, or scope evidence; close only when alert-local process evidence and available session, network, file, and scope evidence all bind to one recognized automation, support, or test workflow; preserve and escalate when evidence is mixed or visibility is incomplete.
### False positive analysis
- Browser automation, QA, RPA, monitoring, enterprise management, remote-support, and security-testing workflows can legitimately launch Chrome or Edge with debug or headless behavior only when the signals converge: a stable signed launcher, bounded debug/profile arguments, the expected `user.id` and `host.id` cohort, and no parent-side DevTools client or browser-store staging outside that toolchain. When optional network or file telemetry is available, require it to fit the same workflow. For security testing, also confirm the activity is contained to the intended hosts and users.
- Before creating an exception, validate that `process.parent.executable`, `process.executable`, `process.code_signature.subject_name`, `process.command_line`, `user.id`, and `host.id` recur across prior alerts from this rule. Avoid exceptions on `process.name`, browser install paths, or remote-debugging text alone because those match both benign automation and credential-theft launchers.
### Response and remediation
- If confirmed benign, reverse temporary containment and document the evidence that proved the workflow: browser and launcher identity, parent command line, user-host scope, and any corroborating destinations or file artifacts. Create an exception only after the same confirmed pattern recurs across prior alerts from this rule.
- If suspicious but unconfirmed, export the alert, process tree, browser and parent command lines, relevant `process.entity_id` values, debugging port or profile arguments, and any collected file or network evidence before containment. Preserve copied browser stores, staged archives, dropped tools, and relevant browser-session state; apply reversible containment first, such as browser-session revocation, heightened monitoring on the affected `user.id` and `host.id`, or temporary destination controls.
- If confirmed malicious, record volatile browser-session state and preserve staged artifacts before terminating the browser or parent. Then isolate the host through endpoint response or equivalent controls when the host role can tolerate interruption. Block confirmed malicious destinations and hashes for the parent launcher, staged tool, or tampered browser binary; reset exposed credentials and revoke sessions when browser-store or cookie-theft evidence is present.
- After containment, scope related users and hosts for the same `process.parent.executable`, `process.command_line`, browser-store artifact, or confirmed destination pattern from network review. Remove only the unauthorized extensions, staged artifacts, or launcher components identified during investigation. Close the entry path by disabling the unauthorized launcher or restoring browser policy if it was changed.
"""
setup = """## Setup
This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
Setup instructions: https://ela.st/install-elastic-defend
### Additional data sources
This rule also supports the following third-party data sources. For setup instructions, refer to the links below:
- [Microsoft Defender XDR](https://ela.st/m365-defender)
- [SentinelOne Cloud Funnel](https://ela.st/sentinel-one-cloud-funnel)
- [Sysmon Event ID 1 - Process Creation](https://ela.st/sysmon-event-1-setup)
- [Windows Process Creation Logs](https://ela.st/audit-process-creation)
"""
[rule.investigation_fields]
field_names = [
"@timestamp",
"host.id",
"user.name",
"user.id",
"process.entity_id",
"process.executable",
"process.command_line",
"process.parent.entity_id",
"process.parent.executable",
"process.parent.command_line",
"process.code_signature.subject_name",
"process.code_signature.trusted",
"process.parent.code_signature.subject_name",
"process.Ext.authentication_id",
"process.Ext.session_info.logon_type",
]
[[transform.investigate]]
label = "Alerts associated with the user"
description = ""
providers = [
[
{ excluded = false, field = "event.kind", queryType = "phrase", value = "signal", valueType = "string" },
{ excluded = false, field = "user.id", queryType = "phrase", value = "{{user.id}}", valueType = "string" }
]
]
relativeFrom = "now-48h/h"
relativeTo = "now"
[[transform.investigate]]
label = "Alerts associated with the host"
description = ""
providers = [
[
{ excluded = false, field = "event.kind", queryType = "phrase", value = "signal", valueType = "string" },
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" }
]
]
relativeFrom = "now-48h/h"
relativeTo = "now"
[[transform.investigate]]
label = "Network activity for browser and parent processes"
description = ""
providers = [
[
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.entity_id}}", valueType = "string" },
{ excluded = false, field = "event.category", queryType = "phrase", value = "network", valueType = "string" }
],
[
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.parent.entity_id}}", valueType = "string" },
{ excluded = false, field = "event.category", queryType = "phrase", value = "network", valueType = "string" }
]
]
relativeFrom = "now-1h"
relativeTo = "now"
[[transform.investigate]]
label = "File activity for browser and parent processes"
description = ""
providers = [
[
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.entity_id}}", valueType = "string" },
{ excluded = false, field = "event.category", queryType = "phrase", value = "file", valueType = "string" }
],
[
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.parent.entity_id}}", valueType = "string" },
{ excluded = false, field = "event.category", queryType = "phrase", value = "file", valueType = "string" }
]
]
relativeFrom = "now-1h"
relativeTo = "now"
[[transform.investigate]]
label = "Authentication events for the linked session"
description = ""
providers = [
[
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "winlog.event_data.TargetLogonId", queryType = "phrase", value = "{{process.Ext.authentication_id}}", valueType = "string" },
{ excluded = false, field = "event.code", queryType = "phrase", value = "4624", valueType = "string" }
]
]
relativeFrom = "now-48h/h"
relativeTo = "now"
[[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.technique]]
id = "T1555"
name = "Credentials from Password Stores"
reference = "https://attack.mitre.org/techniques/T1555/"
[[rule.threat.technique.subtechnique]]
id = "T1555.003"
name = "Credentials from Web Browsers"
reference = "https://attack.mitre.org/techniques/T1555/003/"
[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 = "T1185"
name = "Browser Session Hijacking"
reference = "https://attack.mitre.org/techniques/T1185/"
[rule.threat.tactic]
id = "TA0009"
name = "Collection"
reference = "https://attack.mitre.org/tactics/TA0009/"
Stages and Predicates
Stage 1: process
process where host.os.type == "windows" and event.type == "start" and
process.name : ("chrome.exe", "msedge.exe") and
process.parent.executable != null and
(
process.command_line : (
"\"C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe\"",
"\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\"",
"\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" --headless --disable-logging --log-level=3 --v=0",
"\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" --headless --log-level=3",
"\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" --headless",
"\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" --remote-debugging-port=922? --profile-directory=\"Default\"*",
"\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" --headless --restore-last-session --remote-debugging-port=45452*"
) or
(process.args : "--remote-debugging-port=922?" and process.args : "--window-position=-*,-*")
) and
not process.parent.executable :
("C:\\Windows\\explorer.exe",
"C:\\Program Files (x86)\\*.exe",
"C:\\Program Files\\*.exe",
"C:\\Windows\\System32\\rdpinit.exe",
"C:\\Windows\\System32\\sihost.exe",
"C:\\Windows\\System32\\RuntimeBroker.exe",
"C:\\Windows\\System32\\SECOCL64.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.args | wildcard |
| field:"process.args" kind:wildcard |
process.command_line | wildcard |
| field:"CommandLine" 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.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.parent.executable | wildcard | C:\Windows\explorer.exe, C:\Program Files (x86)\*.exe, C:\Program Files\*.exe, C:\Windows\System32\rdpinit.exe, C:\Windows\System32\sihost.exe, C:\Windows\System32\RuntimeBroker.exe, C:\Windows\System32\SECOCL64.exe | excludes:process.parent.executable |
Entra ID Conditional Access Policy (CAP) Modified
#Identifies a modification to a conditional access policy (CAP) in Microsoft Entra ID. Adversaries may modify existing CAPs to loosen access controls and maintain persistence in the environment with a compromised identity or entity.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Azure | Update conditional access policy |
Rules Detecting the Same Action
These rules filter on the same operation.
- Azure MFA Disabled (Panther)
- Azure Policy Violation Detected (Panther)
- CA Policy Removed by Non Approved Actor (Sigma)
- CA Policy Updated by Non Approved Actor (Sigma)
- Certificate-Based Authentication Enabled (Sigma)
- Changes to Device Registration Policy (Sigma)
- Conditional Access - A Conditional Access app exclusion has changed (Kusto)
- Conditional Access - A Conditional Access Device platforms condition has changed (the Device platforms condition can be spoofed) (Kusto)
Rule Body
[metadata]
creation_date = "2020/09/01"
integration = ["azure"]
maturity = "production"
updated_date = "2026/07/08"
[rule]
author = ["Elastic"]
description = """
Identifies a modification to a conditional access policy (CAP) in Microsoft Entra ID. Adversaries may modify existing CAPs to loosen access controls and maintain persistence in the environment with a compromised identity or entity.
"""
from = "now-9m"
index = ["filebeat-*", "logs-azure.auditlogs-*"]
language = "kuery"
license = "Elastic License v2"
name = "Entra ID Conditional Access Policy (CAP) Modified"
note = """## Triage and analysis
## Investigation Guide: Microsoft Entra ID Conditional Access Policy (CAP) Modified
Azure Conditional Access Policies (CAPs) are critical for enforcing secure access requirements such as multi-factor authentication (MFA), restricting specific users or groups, and managing sign-in conditions. Modifying these policies can be a technique for weakening an organization’s defenses and maintaining persistence after initial access.
This rule detects a successful update to a Conditional Access Policy in Microsoft Entra ID (formerly Azure AD).
### Possible Investigation Steps
- **Identify the user who modified the policy:**
- Check the value of `azure.auditlogs.properties.initiated_by.user.userPrincipalName` to determine the identity that made the change.
- Investigate their recent activity to determine if this change was expected or authorized.
- **Review the modified policy name:**
- Look at `azure.auditlogs.properties.target_resources.*.display_name` to find the name of the affected policy.
- Determine whether this policy is related to critical controls (e.g., requiring MFA for admins).
- **Analyze the policy change:**
- Compare the `old_value` and `new_value` fields under `azure.auditlogs.properties.target_resources.*.modified_properties.*`.
- Look for security-reducing changes, such as:
- Removing users/groups from enforcement.
- Disabling MFA or risk-based conditions.
- Introducing exclusions that reduce the policy’s coverage.
- **Correlate with other activity:**
- Pivot on `azure.auditlogs.properties.activity_datetime` to identify if any suspicious sign-ins occurred after the policy was modified.
- Check for related authentication logs, particularly from the same IP address (`azure.auditlogs.properties.initiated_by.user.ipAddress`).
- **Assess the user's legitimacy:**
- Review the initiator’s Azure role, group memberships, and whether their account was recently elevated or compromised.
- Investigate whether this user has a history of modifying policies or if this is anomalous.
### Validation & False Positive Considerations
- **Authorized administrative changes:** Some organizations routinely update CAPs as part of policy tuning or role-based access reviews.
- **Security reviews or automation:** Scripts, CI/CD processes, or third-party compliance tools may programmatically update CAPs.
- **Employee lifecycle events:** Policy changes during employee onboarding/offboarding may include updates to access policies.
If any of these cases apply and align with the activity's context, consider tuning the rule or adding exceptions for expected patterns.
### Response & Remediation
- Revert unauthorized or insecure changes to the Conditional Access Policy immediately.
- Temporarily increase monitoring of CAP modifications and sign-in attempts.
- Lock or reset the credentials of the user account that made the change if compromise is suspected.
- Conduct a broader access review of conditional access policies and privileged user activity.
- Implement stricter change management and alerting around CAP changes.
"""
references = [
"https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/overview",
"https://www.rezonate.io/blog/microsoft-entra-id-the-complete-guide-to-conditional-access-policies/"
]
risk_score = 73
rule_id = "bc48bba7-4a23-4232-b551-eca3ca1e3f20"
severity = "high"
tags = [
"Domain: Cloud",
"Data Source: Azure",
"Data Source: Microsoft Entra ID",
"Data Source: Microsoft Entra ID Audit Logs",
"Use Case: Identity and Access Audit",
"Use Case: Configuration Audit",
"Tactic: Persistence",
"Resources: Investigation Guide"
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
data_stream.dataset: "azure.auditlogs"
and event.action:"Update conditional access policy"
and event.outcome: "success"
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1556"
name = "Modify Authentication Process"
reference = "https://attack.mitre.org/techniques/T1556/"
[[rule.threat.technique.subtechnique]]
id = "T1556.009"
name = "Conditional Access Policies"
reference = "https://attack.mitre.org/techniques/T1556/009/"
[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1556"
name = "Modify Authentication Process"
reference = "https://attack.mitre.org/techniques/T1556/"
[[rule.threat.technique.subtechnique]]
id = "T1556.009"
name = "Conditional Access Policies"
reference = "https://attack.mitre.org/techniques/T1556/009/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[rule.new_terms]
field = "new_terms_fields"
value = ["azure.auditlogs.properties.initiated_by.user.userPrincipalName", "source.as.number"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-7d"
Stages and Predicates
Stage 1: new_terms
data_stream.dataset: "azure.auditlogs"
and event.action:"Update conditional access policy"
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:"azure.auditlogs" |
event.action | eq |
| field:"EventType" kind:eq value:"Update conditional access policy" |
event.outcome | eq |
| field:"event.outcome" kind:eq value:"success" |
Entra ID Service Principal with Unusual Source ASN
#Identifies Entra ID service principal sign-ins where the workload identity and source autonomous system number (ASN) together have not appeared in recent history. Attackers who obtain application secrets or tokens often authenticate from unfamiliar hosting providers, residential or VPN egress, or networks outside normal automation footprints, which can precede data access, lateral movement, or ransomware activity in the tenant. The detection emphasizes first-seen network context for non-interactive workload identities.
Known False Positives
- New deployments, DR sites, IP rotation, or first-time CI/CD expansion can produce a genuinely new (service principal, ASN) pair without malicious intent. Baseline expected apps and approve new network paths.
- Geo-IP and ASN enrichment updates can occasionally shift how a stable egress is labeled, creating a one-time "new" tuple.
- Shared or reused service principal secrets across teams may register as new paths when first used from another site.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Stealth |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Azure | Success: Successful sign-in |
Rules Detecting the Same Action
These rules filter on the same operation.
- [Entra ID] Suspicious Continuous OAuth Token Usage (Kusto)
- Anomalous sign-in location by user account and authenticating application (Kusto)
- Anomalous Single Factor Signin (Kusto)
- Authentications of Privileged Accounts Outside of Expected Controls (Kusto)
- Azure Portal sign in from another Azure Tenant (Kusto)
- Azure Service Principal Sign-In Followed by Arc Cluster Credential Access (Elastic)
- Azure SignIn via Legacy Authentication Protocol (Panther)
- Cisco - firewall block but success logon to Microsoft Entra ID (Kusto)
Rule Body
[metadata]
creation_date = "2026/03/10"
integration = ["azure"]
maturity = "production"
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = """
Identifies Entra ID service principal sign-ins where the workload identity and source autonomous system number (ASN)
together have not appeared in recent history. Attackers who obtain application secrets or tokens often authenticate
from unfamiliar hosting providers, residential or VPN egress, or networks outside normal automation footprints, which
can precede data access, lateral movement, or ransomware activity in the tenant. The detection emphasizes first-seen
network context for non-interactive workload identities.
"""
false_positives = [
"""
New deployments, DR sites, IP rotation, or first-time CI/CD expansion can produce a genuinely new
(service principal, ASN) pair without malicious intent. Baseline expected apps and approve new network paths.
""",
"""
Geo-IP and ASN enrichment updates can occasionally shift how a stable egress is labeled, creating a one-time
\"new\" tuple.
""",
"""
Shared or reused service principal secrets across teams may register as new paths when first used from another site.
""",
]
from = "now-65m"
index = ["filebeat-*", "logs-azure.signinlogs-*"]
interval = "1h"
language = "kuery"
license = "Elastic License v2"
name = "Entra ID Service Principal with Unusual Source ASN"
note = """## Triage and analysis
### Investigating Entra ID Service Principal with Unusual Source ASN
This rule matches successful **ServicePrincipalSignInLogs** events where `azure.signinlogs.properties.service_principal_id`
and `source.as.number` together have not appeared in the rule history window. It is a first-seen network path signal for
the workload identity, not proof of compromise by itself.
#### Possible investigation steps
- Confirm the event is **ServicePrincipalSignInLogs** with a successful outcome and review `azure.signinlogs.properties.status.error_code` on the source document if needed.
- Identify the application using `azure.signinlogs.properties.app_display_name`, `azure.signinlogs.properties.app_id`, and `azure.signinlogs.properties.service_principal_id`. In Entra ID, review the enterprise application or app registration (first-party, partner, or internal automation).
- Review `source.ip`, `source.as.organization.name`, `source.as.number`, and `source.geo.*` against the owning team’s expected regions, cloud subscriptions, and CI/CD or automation footprint.
- Compare `@timestamp` to maintenance windows, releases, and planned infrastructure changes.
- Where possible, enrich `source.ip` with internal CMDB, cloud asset inventory, or threat intelligence (residential or low-reputation ASNs warrant more scrutiny than a known cloud provider already used by this app).
- In Entra sign-in logs, pivot on the same `service_principal_id` or `app_id` and review prior successful sign-ins for typical ASNs and egress patterns; a one-off path may be a new pipeline or stolen credentials used from a new host.
- Review Entra audit logs for recent changes to this application: client secrets, certificates, federated credentials, owners, API permissions, or app role assignments, especially shortly before the alert.
- Query Azure Activity, Microsoft Graph, or workload-specific logs after the sign-in time using `azure.signinlogs.properties.correlation_id` or `session_id` when present to see what resources the identity accessed (subscriptions, Key Vault, mail, privileged roles).
- Search for related alerts in the same time window involving the same `app_id` or `source.ip` (for example OAuth abuse, consent, Arc or Kubernetes access, or directory role changes).
- Note that the rule query excludes Microsoft-labeled `source.as.organization.name` values; high-value investigations should also review raw sign-in data for suspicious activity that only appears under those labels.
### False positive analysis
- New regions, subscriptions, GitHub Actions or Azure DevOps pools, DR exercises, or vendor migrations can produce a legitimate first-seen ASN for the service principal. Validate with the owner and document expected paths before excluding.
- Amazon- and Google-labeled ASNs are in scope by design; adversaries may egress through AWS or GCP. Expect more noise from legitimate automation in those clouds and prefer allowlisting reviewed `app_id` or automation accounts over disabling the rule.
- GeoIP or ASN enrichment updates can occasionally produce a one-time new tuple; compare to historical events for the same IP if available.
### Response and remediation
- If the path is unexpected and risky audit activity preceded the sign-in, treat as a potential credential incident: rotate application secrets and certificates, revoke sessions or tokens as applicable, and review Conditional Access and workload identity policies for the application.
- Review and reduce API permissions, OAuth scopes, and directory or subscription roles granted to the application; remove unused access.
- Document approved automation and network baselines so repeat first-seen ASN alerts can be triaged faster.
"""
references = [
"https://learn.microsoft.com/en-us/entra/identity/monitoring-health/concept-sign-ins",
"https://learn.microsoft.com/en-us/entra/identity/conditional-access/workload-identities",
"https://www.microsoft.com/en-us/security/blog/2025/08/27/storm-0501s-evolving-techniques-lead-to-cloud-based-ransomware/",
"https://www.wiz.io/blog/lateral-movement-risks-in-the-cloud-and-how-to-prevent-them-part-3-from-compromis",
]
risk_score = 47
rule_id = "db97a2aa-3ba5-4fa5-b8b9-bf42284edb5f"
severity = "medium"
tags = [
"Domain: Cloud",
"Domain: Identity",
"Data Source: Azure",
"Data Source: Microsoft Entra ID",
"Data Source: Microsoft Entra ID Sign-In Logs",
"Use Case: Identity and Access Audit",
"Use Case: Threat Detection",
"Tactic: Initial Access",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
data_stream.dataset:azure.signinlogs
and azure.signinlogs.category:ServicePrincipalSignInLogs
and azure.signinlogs.properties.status.error_code:0
and azure.signinlogs.properties.service_principal_id:*
and source.as.number:*
and not source.as.organization.name:(*MICROSOFT* or *Microsoft*)
and not azure.signinlogs.properties.app_owner_tenant_id:(72f988bf-86f1-41af-91ab-2d7cd011db47 or f8cdef31-a31e-4b4a-93e4-5f571e91255a)
'''
[[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 = "T1078"
name = "Valid Accounts"
reference = "https://attack.mitre.org/techniques/T1078/"
[[rule.threat.technique.subtechnique]]
id = "T1078.004"
name = "Cloud Accounts"
reference = "https://attack.mitre.org/techniques/T1078/004/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[rule.investigation_fields]
field_names = [
"@timestamp",
"message",
"event.reason",
"source.ip",
"source.geo.country_name",
"source.geo.country_iso_code",
"user.name",
"azure.signinlogs.properties.service_principal_id",
"azure.signinlogs.properties.app_display_name",
"azure.signinlogs.properties.app_id",
"source.as.number",
"source.as.organization.name",
"azure.signinlogs.properties.resource_display_name",
"azure.signinlogs.properties.correlation_id",
"azure.signinlogs.properties.session_id",
]
[rule.new_terms]
field = "new_terms_fields"
value = [
"azure.signinlogs.properties.service_principal_id",
"source.as.number",
]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-10d"
Stages and Predicates
Stage 1: new_terms
data_stream.dataset:azure.signinlogs
and azure.signinlogs.category:ServicePrincipalSignInLogs
and azure.signinlogs.properties.status.error_code:0
and azure.signinlogs.properties.service_principal_id:*
and source.as.number:*
and not source.as.organization.name:(*MICROSOFT* or *Microsoft*)
and not azure.signinlogs.properties.app_owner_tenant_id:(72f988bf-86f1-41af-91ab-2d7cd011db47 or f8cdef31-a31e-4b4a-93e4-5f571e91255a)
Indicators
These rows show field, operator, and value matches.
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
source.as.organization.name | match | MICROSOFT | excludes:source.as.organization.name field:"source.as.organization.name" value:"MICROSOFT" |
source.as.organization.name | match | Microsoft | excludes:source.as.organization.name field:"source.as.organization.name" value:"Microsoft" |
azure.signinlogs.properties.app_owner_tenant_id | in | 72f988bf-86f1-41af-91ab-2d7cd011db47, f8cdef31-a31e-4b4a-93e4-5f571e91255a | excludes:azure.signinlogs.properties.app_owner_tenant_id field:"azure.signinlogs.properties.app_owner_tenant_id" value:"72f988bf-86f1-41af-91ab-2d7cd011db47" field:"azure.signinlogs.properties.app_owner_tenant_id" value:"f8cdef31-a31e-4b4a-93e4-5f571e91255a" |
Potential Okta Brute Force (Device Token Rotation)
#Detects potential brute force attacks against a single Okta user account where excessive unique device token hashes are generated, indicating automated tooling that fails to persist browser cookies between attempts.
Known False Positives
- A user experiencing login issues may generate multiple device tokens through repeated legitimate attempts.
- Automated testing or monitoring tools that do not persist cookies may trigger this rule.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
- Failed Logins from Unknown or Invalid User (Kusto)
- First Occurrence of Okta User Session Started via Proxy (Elastic)
- High-Risk Admin Activity (Kusto)
- Multiple Okta Sessions Detected for a Single User (Elastic)
- Multiple Okta User Authentication Events with Same Device Token Hash (Elastic)
- New Device/Location sign-in along with critical operation (Kusto)
- Okta AiTM Session Cookie Replay (Elastic)
- Okta Login From CrowdStrike Unmanaged Device (Panther)
Rule Body
[metadata]
creation_date = "2024/06/17"
integration = ["okta"]
maturity = "production"
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = """
Detects potential brute force attacks against a single Okta user account where excessive unique device token hashes
are generated, indicating automated tooling that fails to persist browser cookies between attempts.
"""
false_positives = [
"A user experiencing login issues may generate multiple device tokens through repeated legitimate attempts.",
"Automated testing or monitoring tools that do not persist cookies may trigger this rule.",
]
from = "now-30m"
language = "esql"
license = "Elastic License v2"
name = "Potential Okta Brute Force (Device Token Rotation)"
note = """## Triage and analysis
### Investigating Potential Okta Brute Force (Device Token Rotation)
This rule identifies excessive unique device token hashes generated for a single user account, indicating automated brute force tooling that fails to persist browser cookies between authentication attempts.
#### Possible investigation steps
- Identify the targeted user account and determine if it has elevated privileges or sensitive access.
- Review the source IP and check if it belongs to known proxy, VPN, or cloud infrastructure.
- Examine user agent strings for signs of automation, scripting tools, or inconsistent browser fingerprints.
- Check if Okta flagged the source as a known threat or proxy.
- Determine if any authentication attempts succeeded following the failed attempts.
- Review the user's recent activity for signs of account compromise.
### False positive analysis
- Users experiencing login issues may generate multiple device tokens through repeated legitimate attempts.
- Automated testing or monitoring tools that do not persist cookies may trigger this rule.
- Browser extensions or privacy tools that clear cookies between requests may cause device token rotation.
### Response and remediation
- If attack is confirmed, reset the user's password immediately.
- Block the source IP at the network perimeter.
- Review and potentially reset MFA for the targeted account.
- Monitor for any successful authentication that may indicate compromise.
- Contact the user to verify if they experienced legitimate login issues.
"""
references = [
"https://support.okta.com/help/s/article/Troubleshooting-Distributed-Brute-Force-andor-Password-Spray-attacks-in-Okta",
"https://www.okta.com/identity-101/brute-force/",
"https://support.okta.com/help/s/article/How-does-the-Device-Token-work?language=en_US",
"https://developer.okta.com/docs/reference/api/event-types/",
"https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy",
"https://sec.okta.com/articles/2023/08/cross-tenant-impersonation-prevention-and-detection",
"https://www.okta.com/resources/whitepaper-how-adaptive-mfa-can-help-in-mitigating-brute-force-attacks/",
"https://www.elastic.co/security-labs/monitoring-okta-threats-with-elastic-security",
"https://www.elastic.co/security-labs/starter-guide-to-understanding-okta",
]
risk_score = 21
rule_id = "23f18264-2d6d-11ef-9413-f661ea17fbce"
setup = "The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."
severity = "low"
tags = [
"Domain: Identity",
"Use Case: Identity and Access Audit",
"Data Source: Okta",
"Tactic: Credential Access",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "esql"
query = '''
FROM logs-okta.system-* METADATA _id, _version, _index
| WHERE
data_stream.dataset == "okta.system"
AND (event.action LIKE "user.authentication.*" OR event.action == "user.session.start")
AND okta.outcome.reason IN ("INVALID_CREDENTIALS", "LOCKED_OUT")
AND okta.actor.alternate_id IS NOT NULL
// Primary authn endpoint; sessions API provides additional coverage
AND (
okta.debug_context.debug_data.request_uri == "/api/v1/authn"
OR okta.debug_context.debug_data.request_uri LIKE "/api/v1/sessions*"
)
// Track whether each event has a device token
| EVAL has_dt_hash = CASE(okta.debug_context.debug_data.dt_hash IS NOT NULL, 1, 0)
// Aggregate by IP + user to detect single-user brute force
| STATS
Esql.unique_dt_hashes = COUNT_DISTINCT(okta.debug_context.debug_data.dt_hash),
Esql.total_attempts = COUNT(*),
Esql.attempts_with_dt = SUM(has_dt_hash),
Esql.unique_user_agents = COUNT_DISTINCT(okta.client.user_agent.raw_user_agent),
Esql.first_seen = MIN(@timestamp),
Esql.last_seen = MAX(@timestamp),
Esql.dt_hash_values = VALUES(okta.debug_context.debug_data.dt_hash),
Esql.event_action_values = VALUES(event.action),
Esql.user_agent_values = VALUES(okta.client.user_agent.raw_user_agent),
Esql.device_values = VALUES(okta.client.device),
Esql.is_proxy_values = VALUES(okta.security_context.is_proxy),
Esql.geo_country_values = VALUES(client.geo.country_name),
Esql.geo_city_values = VALUES(client.geo.city_name),
Esql.source_asn_values = VALUES(source.as.number),
Esql.source_asn_org_values = VALUES(source.as.organization.name),
Esql.threat_suspected_values = VALUES(okta.debug_context.debug_data.threat_suspected),
Esql.risk_level_values = VALUES(okta.debug_context.debug_data.risk_level),
Esql.risk_reasons_values = VALUES(okta.debug_context.debug_data.risk_reasons)
BY okta.client.ip, okta.actor.alternate_id
// Calculate automation detection metrics (float-safe division)
| EVAL Esql.dt_coverage = Esql.attempts_with_dt * 1.0 / Esql.total_attempts,
Esql.dt_per_attempt = Esql.unique_dt_hashes * 1.0 / Esql.total_attempts
// Detection branches:
// A) Many unique DT hashes relative to attempts = tooling generating new tokens per attempt
// B) High attempts + very low DT coverage = cookie-less automation (no DT sent at all)
// C) Multiple user agents for same user = evasion or automation
| WHERE
(Esql.unique_dt_hashes >= 7 AND Esql.total_attempts >= 10 AND Esql.dt_per_attempt >= 0.5)
OR (Esql.total_attempts >= 12 AND Esql.dt_coverage < 0.15)
OR (Esql.total_attempts >= 10 AND Esql.unique_user_agents >= 5)
| SORT Esql.total_attempts DESC
| KEEP Esql.*, okta.client.ip, okta.actor.alternate_id
'''
[[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.001"
name = "Password Guessing"
reference = "https://attack.mitre.org/techniques/T1110/001/"
[rule.threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
Stages and Predicates
Stage 1: from
FROM logs-okta.system-* METADATA _id, _version, _index
Stage 2: where
| WHERE
data_stream.dataset == "okta.system"
AND (event.action LIKE "user.authentication.*" OR event.action == "user.session.start")
AND okta.outcome.reason IN ("INVALID_CREDENTIALS", "LOCKED_OUT")
AND okta.actor.alternate_id IS NOT NULL
AND (
okta.debug_context.debug_data.request_uri == "/api/v1/authn"
OR okta.debug_context.debug_data.request_uri LIKE "/api/v1/sessions*"
)
Stage 3: eval
| EVAL has_dt_hash = CASE(okta.debug_context.debug_data.dt_hash IS NOT NULL, 1, 0)
has_dt_hash =okta.debug_context.debug_data.dt_hash IS NOT NULL10Stage 4: stats
| STATS
Esql.unique_dt_hashes = COUNT_DISTINCT(okta.debug_context.debug_data.dt_hash),
Esql.total_attempts = COUNT(*),
Esql.attempts_with_dt = SUM(has_dt_hash),
Esql.unique_user_agents = COUNT_DISTINCT(okta.client.user_agent.raw_user_agent),
Esql.first_seen = MIN(@timestamp),
Esql.last_seen = MAX(@timestamp),
Esql.dt_hash_values = VALUES(okta.debug_context.debug_data.dt_hash),
Esql.event_action_values = VALUES(event.action),
Esql.user_agent_values = VALUES(okta.client.user_agent.raw_user_agent),
Esql.device_values = VALUES(okta.client.device),
Esql.is_proxy_values = VALUES(okta.security_context.is_proxy),
Esql.geo_country_values = VALUES(client.geo.country_name),
Esql.geo_city_values = VALUES(client.geo.city_name),
Esql.source_asn_values = VALUES(source.as.number),
Esql.source_asn_org_values = VALUES(source.as.organization.name),
Esql.threat_suspected_values = VALUES(okta.debug_context.debug_data.threat_suspected),
Esql.risk_level_values = VALUES(okta.debug_context.debug_data.risk_level),
Esql.risk_reasons_values = VALUES(okta.debug_context.debug_data.risk_reasons)
BY okta.client.ip, okta.actor.alternate_id
Stage 5: eval
| EVAL Esql.dt_coverage = Esql.attempts_with_dt * 1.0 / Esql.total_attempts,
Esql.dt_per_attempt = Esql.unique_dt_hashes * 1.0 / Esql.total_attempts
Stage 6: where
| WHERE
(Esql.unique_dt_hashes >= 7 AND Esql.total_attempts >= 10 AND Esql.dt_per_attempt >= 0.5)
OR (Esql.total_attempts >= 12 AND Esql.dt_coverage < 0.15)
OR (Esql.total_attempts >= 10 AND Esql.unique_user_agents >= 5)
Stage 7: sort
| SORT Esql.total_attempts DESC
Stage 8: keep
| KEEP Esql.*, okta.client.ip, okta.actor.alternate_id
Indicators
These rows show field, operator, and value matches.
Output Fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
Esql.* | KEEP Esql.* |
okta.client.ip | KEEP okta.client.ip |
okta.actor.alternate_id | KEEP okta.actor.alternate_id |
Potential RemoteMonologue Attack
#Identifies attempt to perform session hijack via COM object registry modification by setting the RunAs value to Interactive User.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Defense Impairment |
Rules Detecting the Same Action
These rules filter on the same operation.
- LSASS Memory Dump Creation (Elastic)
- Network-Level Authentication (NLA) Disabled (Elastic)
- Office Test Registry Persistence (Elastic)
- Outlook Home Page Registry Modification (Elastic)
- Potential NetNTLMv1 Downgrade Attack (Elastic)
- WDAC Policy File by an Unusual Process (Elastic)
Rule Body
[metadata]
creation_date = "2025/04/14"
integration = ["endpoint", "m365_defender", "sentinel_one_cloud_funnel", "windows"]
maturity = "production"
updated_date = "2026/05/04"
[rule]
author = ["Elastic"]
description = """
Identifies attempt to perform session hijack via COM object registry modification by setting the RunAs value to
Interactive User.
"""
from = "now-9m"
index = [
"logs-endpoint.events.registry-*",
"endgame-*",
"logs-m365_defender.event-*",
"logs-sentinel_one_cloud_funnel.*",
"logs-windows.sysmon_operational-*",
]
language = "eql"
license = "Elastic License v2"
name = "Potential RemoteMonologue Attack"
note = """## Triage and analysis
### Investigating Potential RemoteMonologue Attack
### Possible investigation steps
- Review the registry event logs to confirm the modification of the RunAs value in the specified registry paths, ensuring the change was not part of a legitimate administrative action.
- Identify the user account and process responsible for the registry modification by examining the event logs for associated user and process information.
- Check for any recent remote authentication attempts or sessions on the affected host to determine if this activity is associated with lateral movement or not.
- Investigate the timeline of the registry change to correlate with any other suspicious activities or alerts on the host, such as the execution of unusual processes or network connections.
### False positive analysis
- Software updates or installations that modify COM settings.
- Automated scripts or management tools that adjust COM configurations.
### Response and remediation
- Immediately isolate the affected system from the network to prevent further unauthorized access or lateral movement by the adversary.
- Modify the registry value back to its secure state, ensuring that "RunAs" value is not set to "Interactive User".
- Conduct a thorough review of recent user activity and system logs to identify any unauthorized access or changes made during the period NLA was disabled.
- Reset passwords for all accounts that have accessed the affected system to mitigate potential credential compromise.
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if additional systems are affected.
- Implement enhanced monitoring on the affected system and similar endpoints to detect any further attempts to disable NLA or other suspicious activities.
"""
setup = """## Setup
This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
Setup instructions: https://ela.st/install-elastic-defend
### Additional data sources
This rule also supports the following third-party data sources. For setup instructions, refer to the links below:
- [Microsoft Defender XDR](https://ela.st/m365-defender)
- [SentinelOne Cloud Funnel](https://ela.st/sentinel-one-cloud-funnel)
- [Sysmon Registry Events](https://ela.st/sysmon-event-reg-setup)
"""
references = [
"https://www.ibm.com/think/x-force/remotemonologue-weaponizing-dcom-ntlm-authentication-coercions#1",
"https://github.com/xforcered/RemoteMonologue",
]
risk_score = 47
rule_id = "c18975f5-676c-4091-b626-81e8938aa2ee"
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Defense Evasion",
"Data Source: Elastic Defend",
"Data Source: Elastic Endgame",
"Data Source: Microsoft Defender XDR",
"Data Source: SentinelOne",
"Data Source: Sysmon",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
registry where host.os.type == "windows" and event.action != "deletion" and
registry.value == "RunAs" and registry.data.strings : "Interactive User" and
not
(
(
process.executable : (
"C:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\4.*\\MsMpEng.exe",
"C:\\Program Files\\Windows Defender\\MsMpEng.exe"
) and
registry.path : "*\\SOFTWARE\\Classes\\AppID\\{1111A26D-EF95-4A45-9F55-21E52ADF9887}\\RunAs"
) or
(
process.executable : (
"C:\\Program Files\\TeamViewer\\TeamViewer.exe",
"C:\\Program Files (x86)\\TeamViewer\\TeamViewer.exe"
) and
registry.path : "*\\SOFTWARE\\Classes\\AppID\\{850A928D-5456-4865-BBE5-42635F1EBCA1}\\RunAs"
) or
(
process.executable : "C:\\Windows\\System32\\svchost.exe" and
registry.path : "*\\S-1-*Classes\\AppID\\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\\RunAs"
) or
(
process.executable : "C:\\Windows\\System32\\SecurityHealthService.exe" and
registry.path : (
"*\\SOFTWARE\\Classes\\AppID\\{1D278EEF-5C38-4F2A-8C7D-D5C13B662567}\\RunAs",
"*\\SOFTWARE\\Classes\\AppID\\{7E55A26D-EF95-4A45-9F55-21E52ADF9878}\\RunAs"
)
) or
(
process.executable : "C:\\Windows\\System32\\SecurityHealthService.exe" and
registry.path : (
"*\\SOFTWARE\\Classes\\AppID\\{1D278EEF-5C38-4F2A-8C7D-D5C13B662567}\\RunAs",
"*\\SOFTWARE\\Classes\\AppID\\{7E55A26D-EF95-4A45-9F55-21E52ADF9878}\\RunAs"
)
) or
registry.path : (
"HKLM\\SOFTWARE\\Microsoft\\Office\\ClickToRun\\VREGISTRY_*",
"\\REGISTRY\\MACHINE\\SOFTWARE\\Microsoft\\Office\\ClickToRun\\VREGISTRY_*"
) or
(process.executable : "C:\\windows\\System32\\msiexec.exe" and ?user.id : "S-1-5-18")
)
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1112"
name = "Modify Registry"
reference = "https://attack.mitre.org/techniques/T1112/"
[[rule.threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1546"
name = "Event Triggered Execution"
reference = "https://attack.mitre.org/techniques/T1546/"
[[rule.threat.technique.subtechnique]]
id = "T1546.015"
name = "Component Object Model Hijacking"
reference = "https://attack.mitre.org/techniques/T1546/015/"
[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
Stages and Predicates
Stage 1: registry
registry where host.os.type == "windows" and event.action != "deletion" and
registry.value == "RunAs" and registry.data.strings : "Interactive User" and
not
(
(
process.executable : (
"C:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\4.*\\MsMpEng.exe",
"C:\\Program Files\\Windows Defender\\MsMpEng.exe"
) and
registry.path : "*\\SOFTWARE\\Classes\\AppID\\{1111A26D-EF95-4A45-9F55-21E52ADF9887}\\RunAs"
) or
(
process.executable : (
"C:\\Program Files\\TeamViewer\\TeamViewer.exe",
"C:\\Program Files (x86)\\TeamViewer\\TeamViewer.exe"
) and
registry.path : "*\\SOFTWARE\\Classes\\AppID\\{850A928D-5456-4865-BBE5-42635F1EBCA1}\\RunAs"
) or
(
process.executable : "C:\\Windows\\System32\\svchost.exe" and
registry.path : "*\\S-1-*Classes\\AppID\\{D3E34B21-9D75-101A-8C3D-00AA001A1652}\\RunAs"
) or
(
process.executable : "C:\\Windows\\System32\\SecurityHealthService.exe" and
registry.path : (
"*\\SOFTWARE\\Classes\\AppID\\{1D278EEF-5C38-4F2A-8C7D-D5C13B662567}\\RunAs",
"*\\SOFTWARE\\Classes\\AppID\\{7E55A26D-EF95-4A45-9F55-21E52ADF9878}\\RunAs"
)
) or
(
process.executable : "C:\\Windows\\System32\\SecurityHealthService.exe" and
registry.path : (
"*\\SOFTWARE\\Classes\\AppID\\{1D278EEF-5C38-4F2A-8C7D-D5C13B662567}\\RunAs",
"*\\SOFTWARE\\Classes\\AppID\\{7E55A26D-EF95-4A45-9F55-21E52ADF9878}\\RunAs"
)
) or
registry.path : (
"HKLM\\SOFTWARE\\Microsoft\\Office\\ClickToRun\\VREGISTRY_*",
"\\REGISTRY\\MACHINE\\SOFTWARE\\Microsoft\\Office\\ClickToRun\\VREGISTRY_*"
) or
(process.executable : "C:\\windows\\System32\\msiexec.exe" and ?user.id : "S-1-5-18")
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | ne |
| field:"EventType" kind:ne value:"deletion" |
registry.data.strings | wildcard |
| field:"Details" kind:wildcard value:"Interactive User" |
registry.value | eq |
| field:"registry_value_name" kind:eq value:"RunAs" |
Exclusions
The rule actively suppresses these predicates.
Process Creation from an Unusual WMI Client
#Identify attempts to create a process calling the WMI Win32_Process Create Method. Adversaries may use WMI to indirectly spawn a child process.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Rule Body
[rule]
description = """
Identify attempts to create a process calling the WMI Win32_Process Create Method. Adversaries may use WMI to indirectly
spawn a child process.
"""
id = "2cbb7988-4fea-4242-a0c0-25f4dd068946"
license = "Elastic License v2"
name = "Process Creation from an Unusual WMI Client"
os_list = ["windows"]
reference = ["https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/create-method-in-class-win32-process"]
version = "1.0.11"
query = '''
api where
process.Ext.api.name == "IWbemServices::ExecMethod" and
process.Ext.api.parameters.operation : "*Win32_Process::Create*" and
not (process.code_signature.trusted == true and
process.code_signature.subject_name in ("TENABLE, INC.", "Autodesk, Inc.", "Archer Technologies LLC", "Opera Norway AS",
"Beijing Qihu Technology Co., Ltd.", "ACD Systems International Inc.", "CS.NIWC-ATLANTIC.001", "Check Point Software Technologies Ltd.",
"VMware, Inc.", "Dell Technologies Inc.", "Atlassian Pty Ltd", "Recast Software, Inc.", "Specops Software Inc.", "Omnissa, LLC")) and
not process.executable :
("C:\\Program Files\\*.exe",
"C:\\Program Files (x86)\\*.exe",
"C:\\Windows\\System32\\wbem\\WMIC.exe",
"C:\\Windows\\System32\\svchost.exe",
"F:\\SuperGrate.exe",
"D:\\supergrate*",
"\\Device\\Mup\\*",
"\\Device\\HarddiskVolume5\\SuperGrate\\SuperGrate.exe",
"C:\\Windows\\System32\\cscript.exe",
"C:\\Windows\\SysWOW64\\cscript.exe",
"C:\\Windows\\System32\\inetsrv\\w3wp.exe",
"C:\\Program Files\\Qognify\\UpdateAgent\\bin\\VMS_UpdateAgent.exe",
"C:\\Program Files\\SCAP Compliance Checker 5.10.1\\lib64\\scc64.exe",
"?:\\Program Files\\Microsoft Configuration Manager\\bin\\X64\\smsexec.exe") and
not process.parent.executable : ("C:\\Program Files (x86)\\Avaya\\Avaya one-X Agent\\OneXAgentUI.exe") and
not (process.name == "powershell.exe" and process.parent.executable == "C:\\Program Files\\Microsoft Monitoring Agent\\Agent\\MonitoringHost.exe") and
not (process.executable : "C:\\Windows\\System32\\svchost.exe" and
process.parent.executable : "C:\\Windows\\System32\\services.exe" and
process.command_line :
("C:\\windows\\system32\\svchost.exe -k netsvcs -p",
"C:\\Windows\\system32\\svchost.exe -k netsvcs -p -s Winmgmt",
"C:\\Windows\\system32\\svchost.exe -k winmgmt -s Winmgmt",
"C:\\WINDOWS\\system32\\svchost.exe -k netsvcs -s Winmgmt")) and
not (process.executable : "C:\\Windows\\System32\\wsmprovhost.exe" and process.parent.executable : "C:\\Windows\\System32\\svchost.exe") and
not (process.name : "powershell.exe" and user.id == "S-1-5-18") and
not (process.name : "powershell.exe" and process.parent.executable : "D:\\ServiceNow\\PROD\\agent\\jre\\bin\\java.exe") and
not (process.name == "powershell.exe" and
process.command_line : ("powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -EncodedCommand CgAgACAAIAAgACYAYwBoAGMAcAAuAGMAbwBtACAANgA1ADAAMAAxACAAPgAgACQAbgB1AGwAbAAKACAAIAAgACAAJABlAHgAZQBjAF8AdwByAGEAcABwAGUAcgBfAHMAdAByACAAPQAgAFsAUwB5AHMAdABlAG0ALgBDAG8AbgBzAG8AbABlAF0AOgA6AEkAbgAuAFIAZQBhAGQAVABvAEUAbgBkACgAKQAKACAAIAAgACAAJABzAHAAbABpAHQAXwBwAGEAcgB0AHMAIAA9ACAAJABlAHgAZQBjAF8AdwByAGEAcABwAGUAcgBfAHMAdAByAC4AUwBwAGwAaQB0ACgAQAAoACIAYAAwAGAAMABgADAAYAAwACIAKQAsACAAMgAsACAAWwBTAHQAcgBpAG4AZwBTAHAAbABpAHQATwBwAHQAaQBvAG4AcwBdADoAOgBSAGUAbQBvAHYAZQBFAG0AcAB0AHkARQBuAHQAcgBpAGUAcwApAAoAIAAgACAAIABTAGUAdAAtAFYAYQByAGkAYQBiAGwAZQAgAC0ATgBhAG0AZQAgAGoAcwBvAG4AXwByAGEAdwAgAC0AVgBhAGwAdQBlACAAJABzAHAAbABpAHQAXwBwAGEAcgB0AHMAWwAxAF0ACgAgACAAIAAgACQAZQB4AGUAYwBfAHcAcgBhAHAAcABlAHIAIAA9ACAAWwBTAGMAcgBpAHAAdABCAGwAbwBjAGsAXQA6ADoAQwByAGUAYQB0AGUAKAAkAHMAcABsAGkAdABfAHAAYQByAHQAcwBbADAAXQApAAoAIAAgACAAIAAmACQAZQB4AGUAYwBfAHcAcgBhAHAAcABlAHIACgA=",
"\"powershell.exe\" & {Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType Hyphen -CommandParamVariation C -UseEncodedArguments -EncodedArgumentsParamVariation EA -Execute -ErrorAction Stop}",
"\"powershell.exe\" & {Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType Hyphen -EncodedCommandParamVariation E -Execute -ErrorAction Stop}",
"\"powershell.exe\" & {Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType Hyphen -CommandParamVariation C -Execute -ErrorAction Stop}",
"*dAByAHkAIAB7ACAAWwBDAG8AbgBzAG8AbABlAF0AOgA6AEkAbgBwAHUAdABFAG4AYwBvAGQAaQ*",
"*JABFAHIAcgBvAHIAQQBjAHQAaQBvAG4AUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAiAFMAdABvAHAAIgA*",
"*cABcAEEAcABwAEQAYQB0AGEAXABMAG8AYwBhAGwALwBBAGMAdABpAHYAZQBCAGEAYwBrAHUAcAAv*",
"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -executionpolicy unrestricted -noninteractive -nologo -noprofile -command \"& { [Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8; Write-Output SNC_PowerShell_PID=$pid*",
"*AkAGUAeABlAGMAXwB3AHIAYQBwAHAAZQByAF8AcwB0AHIALgBTAHAAbABpAHQAKABAACg*",
"\"C:\\Windows\\system32\\windowspowershell\\v1.0\\powershell.exe\" -ExecutionPolicy Unrestricted -Command \"& '\"C:\\Program Files\\Microsoft Monitoring Agent\\Agent\\Health Service State\\Monitoring Host Temporary Files *\\LaunchRestartHealthService.ps1*",
"\"powershell.exe\" & {Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType Hyphen -EncodedCommandParamVariation E -UseEncodedArguments -EncodedArgumentsParamVariation EncodedArguments -Execute -ErrorAction Stop}")) and
not (process.name : "powershell.exe" and
process.parent.executable : ("C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"C:\\Windows\\System32\\wsmprovhost.exe",
"?:\\Program Files\\PowerShell\\*\\pwsh.exe")) and
not (process.name : "powershell.exe" and
process.parent.executable : ("?:\\Users\\*\\.local\\bin\\claude.exe",
"?:\\Users\\*\\@anthropic-ai\\claude-code\\bin\\claude.exe")) and
not (process.executable : ("C:\\Windows\\SysWOW64\\msiexec.exe", "C:\\Windows\\System32\\msiexec.exe") and
process.parent.executable : ("C:\\Windows\\System32\\msiexec.exe", "C:\\Windows\\SysWOW64\\msiexec.exe") and
process.code_signature.subject_name == "Microsoft Windows" and
process.code_signature.trusted == true) and
not (process.executable : ("C:\\Windows\\System32\\wscript.exe", "C:\\Windows\\SysWOW64\\wscript.exe") and
process.parent.executable : "C:\\Windows\\System32\\svchost.exe")
'''
min_endpoint_version = "8.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1047"
name = "Windows Management Instrumentation"
reference = "https://attack.mitre.org/techniques/T1047/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[internal]
min_endpoint_version = "8.15.0"
Stages and Predicates
Stage 1: api
api where
process.Ext.api.name == "IWbemServices::ExecMethod" and
process.Ext.api.parameters.operation : "*Win32_Process::Create*" and
not (process.code_signature.trusted == true and
process.code_signature.subject_name in ("TENABLE, INC.", "Autodesk, Inc.", "Archer Technologies LLC", "Opera Norway AS",
"Beijing Qihu Technology Co., Ltd.", "ACD Systems International Inc.", "CS.NIWC-ATLANTIC.001", "Check Point Software Technologies Ltd.",
"VMware, Inc.", "Dell Technologies Inc.", "Atlassian Pty Ltd", "Recast Software, Inc.", "Specops Software Inc.", "Omnissa, LLC")) and
not process.executable :
("C:\\Program Files\\*.exe",
"C:\\Program Files (x86)\\*.exe",
"C:\\Windows\\System32\\wbem\\WMIC.exe",
"C:\\Windows\\System32\\svchost.exe",
"F:\\SuperGrate.exe",
"D:\\supergrate*",
"\\Device\\Mup\\*",
"\\Device\\HarddiskVolume5\\SuperGrate\\SuperGrate.exe",
"C:\\Windows\\System32\\cscript.exe",
"C:\\Windows\\SysWOW64\\cscript.exe",
"C:\\Windows\\System32\\inetsrv\\w3wp.exe",
"C:\\Program Files\\Qognify\\UpdateAgent\\bin\\VMS_UpdateAgent.exe",
"C:\\Program Files\\SCAP Compliance Checker 5.10.1\\lib64\\scc64.exe",
"?:\\Program Files\\Microsoft Configuration Manager\\bin\\X64\\smsexec.exe") and
not process.parent.executable : ("C:\\Program Files (x86)\\Avaya\\Avaya one-X Agent\\OneXAgentUI.exe") and
not (process.name == "powershell.exe" and process.parent.executable == "C:\\Program Files\\Microsoft Monitoring Agent\\Agent\\MonitoringHost.exe") and
not (process.executable : "C:\\Windows\\System32\\svchost.exe" and
process.parent.executable : "C:\\Windows\\System32\\services.exe" and
process.command_line :
("C:\\windows\\system32\\svchost.exe -k netsvcs -p",
"C:\\Windows\\system32\\svchost.exe -k netsvcs -p -s Winmgmt",
"C:\\Windows\\system32\\svchost.exe -k winmgmt -s Winmgmt",
"C:\\WINDOWS\\system32\\svchost.exe -k netsvcs -s Winmgmt")) and
not (process.executable : "C:\\Windows\\System32\\wsmprovhost.exe" and process.parent.executable : "C:\\Windows\\System32\\svchost.exe") and
not (process.name : "powershell.exe" and user.id == "S-1-5-18") and
not (process.name : "powershell.exe" and process.parent.executable : "D:\\ServiceNow\\PROD\\agent\\jre\\bin\\java.exe") and
not (process.name == "powershell.exe" and
process.command_line : ("powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -EncodedCommand CgAgACAAIAAgACYAYwBoAGMAcAAuAGMAbwBtACAANgA1ADAAMAAxACAAPgAgACQAbgB1AGwAbAAKACAAIAAgACAAJABlAHgAZQBjAF8AdwByAGEAcABwAGUAcgBfAHMAdAByACAAPQAgAFsAUwB5AHMAdABlAG0ALgBDAG8AbgBzAG8AbABlAF0AOgA6AEkAbgAuAFIAZQBhAGQAVABvAEUAbgBkACgAKQAKACAAIAAgACAAJABzAHAAbABpAHQAXwBwAGEAcgB0AHMAIAA9ACAAJABlAHgAZQBjAF8AdwByAGEAcABwAGUAcgBfAHMAdAByAC4AUwBwAGwAaQB0ACgAQAAoACIAYAAwAGAAMABgADAAYAAwACIAKQAsACAAMgAsACAAWwBTAHQAcgBpAG4AZwBTAHAAbABpAHQATwBwAHQAaQBvAG4AcwBdADoAOgBSAGUAbQBvAHYAZQBFAG0AcAB0AHkARQBuAHQAcgBpAGUAcwApAAoAIAAgACAAIABTAGUAdAAtAFYAYQByAGkAYQBiAGwAZQAgAC0ATgBhAG0AZQAgAGoAcwBvAG4AXwByAGEAdwAgAC0AVgBhAGwAdQBlACAAJABzAHAAbABpAHQAXwBwAGEAcgB0AHMAWwAxAF0ACgAgACAAIAAgACQAZQB4AGUAYwBfAHcAcgBhAHAAcABlAHIAIAA9ACAAWwBTAGMAcgBpAHAAdABCAGwAbwBjAGsAXQA6ADoAQwByAGUAYQB0AGUAKAAkAHMAcABsAGkAdABfAHAAYQByAHQAcwBbADAAXQApAAoAIAAgACAAIAAmACQAZQB4AGUAYwBfAHcAcgBhAHAAcABlAHIACgA=",
"\"powershell.exe\" & {Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType Hyphen -CommandParamVariation C -UseEncodedArguments -EncodedArgumentsParamVariation EA -Execute -ErrorAction Stop}",
"\"powershell.exe\" & {Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType Hyphen -EncodedCommandParamVariation E -Execute -ErrorAction Stop}",
"\"powershell.exe\" & {Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType Hyphen -CommandParamVariation C -Execute -ErrorAction Stop}",
"*dAByAHkAIAB7ACAAWwBDAG8AbgBzAG8AbABlAF0AOgA6AEkAbgBwAHUAdABFAG4AYwBvAGQAaQ*",
"*JABFAHIAcgBvAHIAQQBjAHQAaQBvAG4AUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAiAFMAdABvAHAAIgA*",
"*cABcAEEAcABwAEQAYQB0AGEAXABMAG8AYwBhAGwALwBBAGMAdABpAHYAZQBCAGEAYwBrAHUAcAAv*",
"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -executionpolicy unrestricted -noninteractive -nologo -noprofile -command \"& { [Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8; Write-Output SNC_PowerShell_PID=$pid*",
"*AkAGUAeABlAGMAXwB3AHIAYQBwAHAAZQByAF8AcwB0AHIALgBTAHAAbABpAHQAKABAACg*",
"\"C:\\Windows\\system32\\windowspowershell\\v1.0\\powershell.exe\" -ExecutionPolicy Unrestricted -Command \"& '\"C:\\Program Files\\Microsoft Monitoring Agent\\Agent\\Health Service State\\Monitoring Host Temporary Files *\\LaunchRestartHealthService.ps1*",
"\"powershell.exe\" & {Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType Hyphen -EncodedCommandParamVariation E -UseEncodedArguments -EncodedArgumentsParamVariation EncodedArguments -Execute -ErrorAction Stop}")) and
not (process.name : "powershell.exe" and
process.parent.executable : ("C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"C:\\Windows\\System32\\wsmprovhost.exe",
"?:\\Program Files\\PowerShell\\*\\pwsh.exe")) and
not (process.name : "powershell.exe" and
process.parent.executable : ("?:\\Users\\*\\.local\\bin\\claude.exe",
"?:\\Users\\*\\@anthropic-ai\\claude-code\\bin\\claude.exe")) and
not (process.executable : ("C:\\Windows\\SysWOW64\\msiexec.exe", "C:\\Windows\\System32\\msiexec.exe") and
process.parent.executable : ("C:\\Windows\\System32\\msiexec.exe", "C:\\Windows\\SysWOW64\\msiexec.exe") and
process.code_signature.subject_name == "Microsoft Windows" and
process.code_signature.trusted == true) and
not (process.executable : ("C:\\Windows\\System32\\wscript.exe", "C:\\Windows\\SysWOW64\\wscript.exe") and
process.parent.executable : "C:\\Windows\\System32\\svchost.exe")
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
process.Ext.api.name | eq |
| field:"process.Ext.api.name" kind:eq value:"IWbemServices::ExecMethod" |
process.Ext.api.parameters.operation | wildcard |
| field:"process.Ext.api.parameters.operation" kind:wildcard value:"*Win32_Process::Create*" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.code_signature.subject_name | eq | Microsoft Windows | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Microsoft Windows" |
process.code_signature.trusted | eq | true | excludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true" |
process.executable | eq | C:\Windows\SysWOW64\msiexec.exe, C:\Windows\System32\msiexec.exe | excludes:process.executable field:"process.executable" value:"C:\Windows\SysWOW64\msiexec.exe" field:"process.executable" value:"C:\Windows\System32\msiexec.exe" |
process.parent.executable | eq | C:\Windows\System32\msiexec.exe, C:\Windows\SysWOW64\msiexec.exe | excludes:process.parent.executable field:"process.parent.executable" value:"C:\Windows\System32\msiexec.exe" field:"process.parent.executable" value:"C:\Windows\SysWOW64\msiexec.exe" |
process.code_signature.subject_name | in | ACD Systems International Inc., Archer Technologies LLC, Atlassian Pty Ltd, Autodesk, Inc., Beijing Qihu Technology Co., Ltd., CS.NIWC-ATLANTIC.001, Check Point Software Technologies Ltd., Dell Technologies Inc., Omnissa, LLC, Opera Norway AS, Recast Software, Inc., Specops Software Inc., TENABLE, INC., VMware, Inc. | excludes:process.code_signature.subject_name |
process.command_line | eq | C:\windows\system32\svchost.exe -k netsvcs -p, C:\Windows\system32\svchost.exe -k netsvcs -p -s Winmgmt, C:\Windows\system32\svchost.exe -k winmgmt -s Winmgmt, C:\WINDOWS\system32\svchost.exe -k netsvcs -s Winmgmt | excludes:process.command_line |
process.executable | eq | C:\Windows\System32\svchost.exe | excludes:process.executable field:"process.executable" value:"C:\Windows\System32\svchost.exe" |
process.parent.executable | eq | C:\Windows\System32\services.exe | excludes:process.parent.executable field:"process.parent.executable" value:"C:\Windows\System32\services.exe" |
process.command_line | wildcard | powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -EncodedCommand CgAgACAAIAAgACYAYwBoAGMAcAAuAGMAbwBtACAANgA1ADAAMAAxACAAPgAgACQAbgB1AGwAbAAKACAAIAAgACAAJABlAHgAZQBjAF8AdwByAGEAcABwAGUAcgBfAHMAdAByACAAPQAgAFsAUwB5AHMAdABlAG0ALgBDAG8AbgBzAG8AbABlAF0AOgA6AEkAbgAuAFIAZQBhAGQAVABvAEUAbgBkACgAKQAKACAAIAAgACAAJABzAHAAbABpAHQAXwBwAGEAcgB0AHMAIAA9ACAAJABlAHgAZQBjAF8AdwByAGEAcABwAGUAcgBfAHMAdAByAC4AUwBwAGwAaQB0ACgAQAAoACIAYAAwAGAAMABgADAAYAAwACIAKQAsACAAMgAsACAAWwBTAHQAcgBpAG4AZwBTAHAAbABpAHQATwBwAHQAaQBvAG4AcwBdADoAOgBSAGUAbQBvAHYAZQBFAG0AcAB0AHkARQBuAHQAcgBpAGUAcwApAAoAIAAgACAAIABTAGUAdAAtAFYAYQByAGkAYQBiAGwAZQAgAC0ATgBhAG0AZQAgAGoAcwBvAG4AXwByAGEAdwAgAC0AVgBhAGwAdQBlACAAJABzAHAAbABpAHQAXwBwAGEAcgB0AHMAWwAxAF0ACgAgACAAIAAgACQAZQB4AGUAYwBfAHcAcgBhAHAAcABlAHIAIAA9ACAAWwBTAGMAcgBpAHAAdABCAGwAbwBjAGsAXQA6ADoAQwByAGUAYQB0AGUAKAAkAHMAcABsAGkAdABfAHAAYQByAHQAcwBbADAAXQApAAoAIAAgACAAIAAmACQAZQB4AGUAYwBfAHcAcgBhAHAAcABlAHIACgA=, "powershell.exe" & {Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType Hyphen -CommandParamVariation C -UseEncodedArguments -EncodedArgumentsParamVariation EA -Execute -ErrorAction Stop}, "powershell.exe" & {Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType Hyphen -EncodedCommandParamVariation E -Execute -ErrorAction Stop}, "powershell.exe" & {Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType Hyphen -CommandParamVariation C -Execute -ErrorAction Stop}, *dAByAHkAIAB7ACAAWwBDAG8AbgBzAG8AbABlAF0AOgA6AEkAbgBwAHUAdABFAG4AYwBvAGQAaQ*, *JABFAHIAcgBvAHIAQQBjAHQAaQBvAG4AUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAiAFMAdABvAHAAIgA*, *cABcAEEAcABwAEQAYQB0AGEAXABMAG8AYwBhAGwALwBBAGMAdABpAHYAZQBCAGEAYwBrAHUAcAAv*, C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy unrestricted -noninteractive -nologo -noprofile -command "& { [Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8; Write-Output SNC_PowerShell_PID=$pid*, *AkAGUAeABlAGMAXwB3AHIAYQBwAHAAZQByAF8AcwB0AHIALgBTAHAAbABpAHQAKABAACg*, "C:\Windows\system32\windowspowershell\v1.0\powershell.exe" -ExecutionPolicy Unrestricted -Command "& '"C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State\Monitoring Host Temporary Files *\LaunchRestartHealthService.ps1*, "powershell.exe" & {Out-ATHPowerShellCommandLineParameter -CommandLineSwitchType Hyphen -EncodedCommandParamVariation E -UseEncodedArguments -EncodedArgumentsParamVariation EncodedArguments -Execute -ErrorAction Stop} | excludes:process.command_line |
process.name | eq | powershell.exe | excludes:process.name field:"process.name" value:"powershell.exe" |
process.executable | eq | C:\Windows\System32\wscript.exe, C:\Windows\SysWOW64\wscript.exe | excludes:process.executable field:"process.executable" value:"C:\Windows\System32\wscript.exe" field:"process.executable" value:"C:\Windows\SysWOW64\wscript.exe" |
process.parent.executable | eq | C:\Windows\System32\svchost.exe | excludes:process.parent.executable field:"process.parent.executable" value:"C:\Windows\System32\svchost.exe" |
process.executable | eq | C:\Windows\System32\wsmprovhost.exe | excludes:process.executable field:"process.executable" value:"C:\Windows\System32\wsmprovhost.exe" |
process.parent.executable | eq | C:\Program Files\Microsoft Monitoring Agent\Agent\MonitoringHost.exe | excludes:process.parent.executable field:"process.parent.executable" value:"C:\Program Files\Microsoft Monitoring Agent\Agent\MonitoringHost.exe" |
process.parent.executable | eq | D:\ServiceNow\PROD\agent\jre\bin\java.exe | excludes:process.parent.executable field:"process.parent.executable" value:"D:\ServiceNow\PROD\agent\jre\bin\java.exe" |
process.parent.executable | wildcard | ?:\Users\*\.local\bin\claude.exe, ?:\Users\*\@anthropic-ai\claude-code\bin\claude.exe | excludes:process.parent.executable field:"process.parent.executable" value:"?:\Users\*\.local\bin\claude.exe" field:"process.parent.executable" value:"?:\Users\*\@anthropic-ai\claude-code\bin\claude.exe" |
process.parent.executable | wildcard | C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe, C:\Windows\System32\wsmprovhost.exe, ?:\Program Files\PowerShell\*\pwsh.exe | excludes:process.parent.executable field:"process.parent.executable" value:"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" field:"process.parent.executable" value:"C:\Windows\System32\wsmprovhost.exe" field:"process.parent.executable" value:"?:\Program Files\PowerShell\*\pwsh.exe" |
user.id | eq | S-1-5-18 | excludes:user.id field:"user.id" value:"S-1-5-18" |
process.executable | wildcard | C:\Program Files\*.exe, C:\Program Files (x86)\*.exe, C:\Windows\System32\wbem\WMIC.exe, C:\Windows\System32\svchost.exe, F:\SuperGrate.exe, D:\supergrate*, \Device\Mup\*, \Device\HarddiskVolume5\SuperGrate\SuperGrate.exe, C:\Windows\System32\cscript.exe, C:\Windows\SysWOW64\cscript.exe, C:\Windows\System32\inetsrv\w3wp.exe, C:\Program Files\Qognify\UpdateAgent\bin\VMS_UpdateAgent.exe, C:\Program Files\SCAP Compliance Checker 5.10.1\lib64\scc64.exe, ?:\Program Files\Microsoft Configuration Manager\bin\X64\smsexec.exe | excludes:process.executable |
process.parent.executable | eq | C:\Program Files (x86)\Avaya\Avaya one-X Agent\OneXAgentUI.exe | excludes:process.parent.executable field:"process.parent.executable" value:"C:\Program Files (x86)\Avaya\Avaya one-X Agent\OneXAgentUI.exe" |
Process Execution from Boot Directory
#This rule detects the execution of processes from the /boot directory. This may indicate an attempt to execute a process from a location that is not typical for executable files. This behavior is often associated with malicious activity.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Rule Body
[rule]
description = """
This rule detects the execution of processes from the /boot directory. This may indicate an attempt to execute a process
from a location that is not typical for executable files. This behavior is often associated with malicious activity.
"""
id = "87bd993d-d2fa-4047-bc7b-d6a4527d6ab8"
license = "Elastic License v2"
name = "Process Execution from Boot Directory"
os_list = ["linux"]
version = "1.0.12"
query = '''
process where event.type == "start" and event.action == "exec" and process.executable like "/boot/*" and
not (
process.executable in ("/boot/loader/entries", "/boot/dietpi/dietpi-login") or
process.parent.executable in (
"/boot/dietpi/dietpi-update", "/etc/cron.daily/dietpi", "/etc/cron.hourly/dietpi", "/boot/dietpi/dietpi-login"
)
)
'''
min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
tree = true
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0
tree = true
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.technique.subtechnique]]
id = "T1059.004"
name = "Unix Shell"
reference = "https://attack.mitre.org/techniques/T1059/004/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1036"
name = "Masquerading"
reference = "https://attack.mitre.org/techniques/T1036/"
[[threat.technique]]
id = "T1620"
name = "Reflective Code Loading"
reference = "https://attack.mitre.org/techniques/T1620/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Stage 1: process
process where event.type == "start" and event.action == "exec" and process.executable like "/boot/*" and
not (
process.executable in ("/boot/loader/entries", "/boot/dietpi/dietpi-login") or
process.parent.executable in (
"/boot/dietpi/dietpi-update", "/etc/cron.daily/dietpi", "/etc/cron.hourly/dietpi", "/boot/dietpi/dietpi-login"
)
)
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.executable | wildcard |
| field:"Image" kind:wildcard value:"/boot/*" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.executable | in | /boot/dietpi/dietpi-login, /boot/loader/entries | excludes:process.executable field:"process.executable" value:"/boot/dietpi/dietpi-login" field:"process.executable" value:"/boot/loader/entries" |
process.parent.executable | in | /boot/dietpi/dietpi-login, /boot/dietpi/dietpi-update, /etc/cron.daily/dietpi, /etc/cron.hourly/dietpi | excludes:process.parent.executable |
Process Injection by the Microsoft Build Engine
#An instance of MSBuild, the Microsoft Build Engine, created a thread in another process. This technique is sometimes used to evade detection or elevate privileges.
Known False Positives
- The Build Engine is commonly used by Windows developers but use by non-engineers is unusual.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 8: CreateRemoteThread |
Rule Body
[metadata]
creation_date = "2020/03/25"
integration = ["windows"]
maturity = "production"
updated_date = "2026/05/04"
[rule]
author = ["Elastic"]
description = """
An instance of MSBuild, the Microsoft Build Engine, created a thread in another process. This technique is sometimes
used to evade detection or elevate privileges.
"""
false_positives = ["The Build Engine is commonly used by Windows developers but use by non-engineers is unusual."]
index = ["winlogbeat-*", "logs-windows.sysmon_operational-*"]
language = "eql"
license = "Elastic License v2"
name = "Process Injection by the Microsoft Build Engine"
note = """## Triage and analysis
> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
### Investigating Process Injection by the Microsoft Build Engine
The Microsoft Build Engine (MSBuild) is a platform for building applications, often used in software development environments. Adversaries exploit MSBuild to perform process injection, a technique to execute malicious code within the address space of another process, thereby evading detection and potentially escalating privileges. The detection rule identifies suspicious MSBuild activity by monitoring for thread creation in other processes, leveraging Sysmon data to flag potential abuse.
### Possible investigation steps
- Review the alert details to confirm that the process name is "MSBuild.exe" and the event action is "CreateRemoteThread detected (rule: CreateRemoteThread)".
- Examine the parent process of MSBuild.exe to determine if it was launched by a legitimate application or user, which could indicate whether the activity is expected or suspicious.
- Check the timeline of events to see if there are any other related alerts or activities around the same time, such as unusual network connections or file modifications, which could provide additional context.
- Investigate the target process where the thread was created to assess its normal behavior and determine if it is a common target for injection or if it has been compromised.
- Analyze the command line arguments used to launch MSBuild.exe to identify any unusual or suspicious parameters that could indicate malicious intent.
- Review the user account associated with the MSBuild.exe process to verify if it has the necessary permissions and if the activity aligns with the user's typical behavior.
- Consult threat intelligence sources to check if there are any known campaigns or malware that utilize MSBuild for process injection, which could help in understanding the potential threat actor or objective.
### False positive analysis
- Development environments often use MSBuild for legitimate purposes, which can trigger false positives. Users should monitor and establish a baseline of normal MSBuild activity to differentiate between benign and suspicious behavior.
- Automated build systems may frequently invoke MSBuild, leading to false positives. Consider excluding known build server IP addresses or specific user accounts associated with these systems from the detection rule.
- Some legitimate software may use MSBuild for plugin or extension loading, which could appear as process injection. Identify and whitelist these applications by their process hashes or paths to reduce noise.
- Regular updates or installations of software development tools might cause MSBuild to create threads in other processes. Temporarily disable the rule during scheduled maintenance windows to prevent unnecessary alerts.
- Collaborate with development teams to understand their use of MSBuild and adjust the detection rule to exclude known safe operations, ensuring that only unexpected or unauthorized uses are flagged.
### Response and remediation
- Immediately isolate the affected system from the network to prevent further malicious activity and lateral movement.
- Terminate the MSBuild.exe process if it is confirmed to be involved in unauthorized thread creation, using task management tools or scripts.
- Conduct a memory analysis on the affected system to identify and extract any injected code or payloads for further investigation.
- Review and restore any altered or compromised system files and configurations to their original state using known good backups.
- Escalate the incident to the security operations center (SOC) or incident response team for a comprehensive investigation and to determine the scope of the intrusion.
- Implement application whitelisting to prevent unauthorized execution of MSBuild.exe or similar tools in non-development environments.
- Enhance monitoring and detection capabilities by ensuring Sysmon is configured to log detailed process creation and thread injection events across the network."""
risk_score = 21
rule_id = "9d110cb3-5f4b-4c9a-b9f5-53f0a1707ae9"
severity = "low"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Defense Evasion",
"Tactic: Privilege Escalation",
"Data Source: Sysmon",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "windows" and
event.provider == "Microsoft-Windows-Sysmon" and
/* CreateRemoteThread */
event.code == "8" and process.name: "MSBuild.exe"
'''
setup = """## Setup
This rule requires Sysmon telemetry to be enabled and ingested.
Setup instructions: https://ela.st/sysmon-event-8-setup
"""
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"
[[rule.threat.technique]]
id = "T1127"
name = "Trusted Developer Utilities Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1127/"
[[rule.threat.technique.subtechnique]]
id = "T1127.001"
name = "MSBuild"
reference = "https://attack.mitre.org/techniques/T1127/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 = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"
[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.provider == "Microsoft-Windows-Sysmon" and
event.code == "8" and process.name: "MSBuild.exe"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.code | eq |
| field:"EventID" kind:eq value:"8" |
event.provider | eq |
| field:"Provider_Name" kind:eq value:"Microsoft-Windows-Sysmon" |
process.name | wildcard |
| field:"process_basename" kind:wildcard value:"MSBuild.exe" |
Quick Assist Full Control Sharing Mode Enabled
#Identifies when Microsoft Quick Assist sharing mode is set to FullControl on a Windows host. This grants the remote helper full interactive control of the target device and may indicate IT help desk fraud, unauthorized remote access, or lateral movement preparation.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement | |
| Command & Control |
Rule Body
[metadata]
creation_date = "2026/06/21"
integration = ["system", "windows"]
maturity = "production"
updated_date = "2026/06/21"
[rule]
author = ["Elastic"]
description = """
Identifies when Microsoft Quick Assist sharing mode is set to FullControl on a Windows host. This grants the remote
helper full interactive control of the target device and may indicate IT help desk fraud, unauthorized remote access,
or lateral movement preparation.
"""
from = "now-9m"
index = ["logs-system.application*", "logs-windows.forwarded*", "winlogbeat-*"]
language = "kuery"
license = "Elastic License v2"
name = "Quick Assist Full Control Sharing Mode Enabled"
references = [
"https://www.microsoft.com/en-us/security/blog/2024/05/15/threat-actors-misusing-quick-assist-in-social-engineering-attacks-leading-to-ransomware/",
"https://attack.mitre.org/software/S1209/"
]
risk_score = 47
rule_id = "1b1b4236-175f-4863-89f7-7f0d2da0f0e8"
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Command and Control",
"Tactic: Lateral Movement",
"Data Source: Windows Application Event Logs",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "query"
query = '''
host.os.type:windows and winlog.channel:"Application" and event.provider:"Quick Assist" and event.code:"0" and
winlog.event_data.param1:(*FullControl* and *setsharingmode*)
'''
note = """## Triage and analysis
### Investigating Quick Assist Full Control Sharing Mode Enabled
Microsoft Quick Assist is a built-in remote support tool. When a sharer grants FullControl, the helper can interact with
the desktop as if physically present. Adversaries abuse Quick Assist in help desk fraud and social engineering to gain
interactive access without deploying separate remote access software.
Quick Assist logs these transitions in the Windows Application log under the Quick Assist provider. A `setsharingmode`
command with sharing mode `FullControl` is written to `winlog.event_data.param1`, often alongside a JSON payload that
includes `"result":"true"` when consent is granted.
#### Possible investigation steps
- Review `winlog.event_data.param1` and any related Quick Assist Application log events around `@timestamp` for
`beginsharing`, `setsharingmode`, and `endsharing` commands to reconstruct the session timeline.
- Identify the local user on `host.id` who initiated or approved the session and determine whether Quick Assist use is
expected for that user, host role, or business unit.
- Correlate with process telemetry for `QuickAssist.exe` on the same host and timeframe, including parent process,
command line, and code signature details when available.
- Check for related alerts on the same `host.id` or `user.id`, such as credential access, defense evasion, or
additional remote access activity during or shortly after the session.
- If the host is a server or privileged workstation, determine whether any follow-on actions occurred during the
FullControl window, such as new logons, service creation, or lateral movement.
### False positive analysis
- IT help desk, managed service providers, and internal support teams legitimately use Quick Assist with FullControl
during approved troubleshooting. Confirm the session aligns with an open ticket, known support staff, and expected
host and user pairings before closing as benign.
- Before creating an exception, anchor it on the minimum confirmed workflow: `host.id`, `user.id`, and recurring
support patterns. Avoid broad exceptions on the Quick Assist provider alone.
### Response and remediation
- If confirmed malicious, terminate the Quick Assist session, isolate the affected host when feasible, and reset
credentials for accounts used or exposed during the session.
- Preserve Application log events containing `winlog.event_data.param1` and related Quick Assist telemetry before
remediation.
- Review whether Quick Assist should remain enabled organization-wide or be restricted via policy for high-value hosts.
- Hunt for additional hosts where the same remote helper pattern or concurrent Quick Assist FullControl sessions
occurred."""
setup = """## Setup
Windows Application event log collection must be enabled via the Elastic Agent System integration to ingest Application log events.
"""
[rule.investigation_fields]
field_names = [
"@timestamp",
"host.id",
"host.name",
"user.id",
"user.name",
"event.provider",
"event.code",
"winlog.event_id",
"winlog.event_data.param1",
]
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1219"
name = "Remote Access Tools"
reference = "https://attack.mitre.org/techniques/T1219/"
[rule.threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "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/"
Stages and Predicates
Stage 1: query
host.os.type:windows and winlog.channel:"Application" and event.provider:"Quick Assist" and event.code:"0" and
winlog.event_data.param1:(*FullControl* and *setsharingmode*)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.provider | eq |
| field:"Provider_Name" kind:eq value:"Quick Assist" |
winlog.event_data.param1 | wildcard |
| field:"param1" kind:wildcard |
React2Shell (CVE-2025-55182) Exploitation Attempt
#This rule detects exploitation attempts targeting CVE-2025-55182, a critical remote code execution vulnerability in React Server Components (RSC) Flight protocol. The vulnerability allows attackers to execute arbitrary code on the server by sending specially crafted deserialization payloads that exploit prototype chain traversal to access the Function constructor. This rule focuses on high-fidelity indicators of active exploitation including successful command execution responses and prototype pollution attack patterns.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Execution |
Rule Body
[metadata]
creation_date = "2025/12/04"
integration = ["network_traffic"]
maturity = "production"
updated_date = "2025/12/05"
[rule]
author = ["Elastic"]
description = """
This rule detects exploitation attempts targeting CVE-2025-55182, a critical remote code execution vulnerability in
React Server Components (RSC) Flight protocol. The vulnerability allows attackers to execute arbitrary code on the
server by sending specially crafted deserialization payloads that exploit prototype chain traversal to access the
Function constructor. This rule focuses on high-fidelity indicators of active exploitation including successful command
execution responses and prototype pollution attack patterns.
"""
from = "now-9m"
index = ["logs-network_traffic.http*"]
language = "eql"
license = "Elastic License v2"
name = "React2Shell (CVE-2025-55182) Exploitation Attempt"
note = """## Triage and analysis
### Investigating React2Shell (CVE-2025-55182) Exploitation Attempt
This rule detects exploitation attempts targeting CVE-2025-55182, a critical remote code execution vulnerability in React's Flight protocol used by Next.js and other RSC implementations. The vulnerability stems from insecure prototype chain traversal in the Flight deserializer, allowing attackers to access `__proto__`, `constructor`, and ultimately the `Function` constructor to execute arbitrary code.
### Possible investigation steps
- Examine the full HTTP request body to identify the specific attack payload and command being executed.
- Check the response body for `E{"digest":"..."}` patterns which contain command output from successful exploitation.
- Identify the target application and verify if it runs vulnerable React (< 19.1.0) or Next.js (< 15.3.2) versions.
- Review the source IP for other reconnaissance or exploitation attempts against web applications.
- Check for the `Next-Action` header which is required for the exploit to work.
- Correlate with process execution logs to identify if child processes (e.g., shell commands) were spawned by the Node.js process.
### False positive analysis
- Legitimate React Server Components traffic will NOT contain `__proto__`, `constructor:constructor`, or code execution patterns.
- Security scanning tools like react2shell-scanner may trigger this rule during authorized penetration testing.
- The combination of prototype pollution patterns with RSC-specific syntax is highly indicative of malicious activity.
### Response and remediation
- Immediately update affected applications: React >= 19.1.0, Next.js >= 15.3.2.
- Block the source IP at the WAF/reverse proxy if exploitation is confirmed.
- If HTTP 500 or 303 responses with `digest` output were observed, assume successful code execution and investigate for compromise.
- Review server logs for evidence of command execution (file creation, network connections, process spawning).
- Implement WAF rules to block requests containing `__proto__` or `constructor:constructor` in POST bodies.
"""
references = [
"https://www.wiz.io/blog/critical-vulnerability-in-react-cve-2025-55182",
"https://github.com/assetnote/react2shell-scanner",
"https://slcyber.io/research-center/high-fidelity-detection-mechanism-for-rsc-next-js-rce-cve-2025-55182-cve-2025-66478/",
"https://github.com/msanft/CVE-2025-55182",
]
risk_score = 73
rule_id = "a8f7e9d4-3b2c-4d5e-8f1a-6c9b0e2d4a7f"
severity = "high"
tags = [
"Domain: Network",
"Domain: Application",
"Domain: Web",
"Use Case: Threat Detection",
"Use Case: Vulnerability",
"Tactic: Initial Access",
"Tactic: Execution",
"Data Source: Network Packet Capture",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
network where http.request.method == "POST" and
(
// Successful CVE-2025-55182 RCE - command output in digest
(
http.response.status_code in (500, 303) and
http.response.body.content like~ "*E{\"digest\"*" and
http.request.body.content regex~ """.*\$[0-9]+:[a-zA-Z_0-9]+:[a-zA-Z_0-9]+.*"""
) or
// Prototype pollution attempts in RSC Flight data (never legitimate)
(
http.request.body.content regex~ """.*\$[0-9]+:[a-zA-Z_0-9]+:[a-zA-Z_0-9]+.*""" and
(
http.request.body.content like~ "*__proto__*" or
http.request.body.content like~ "*prototype*"
)
)
)
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1190"
name = "Exploit Public-Facing Application"
reference = "https://attack.mitre.org/techniques/T1190/"
[rule.threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[rule.threat.technique.subtechnique]]
id = "T1059.007"
name = "JavaScript"
reference = "https://attack.mitre.org/techniques/T1059/007/"
[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
Stages and Predicates
Stage 1: network
network where http.request.method == "POST" and
(
(
http.response.status_code in (500, 303) and
http.response.body.content like~ "*E{\"digest\"*" and
http.request.body.content regex~ """.*\$[0-9]+:[a-zA-Z_0-9]+:[a-zA-Z_0-9]+.*"""
) or
(
http.request.body.content regex~ """.*\$[0-9]+:[a-zA-Z_0-9]+:[a-zA-Z_0-9]+.*""" and
(
http.request.body.content like~ "*__proto__*" or
http.request.body.content like~ "*prototype*"
)
)
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
http.request.body.content | regex_match |
| field:"http.request.body.content" kind:regex_match value:".*$[0-9]+:[a-zA-Z_0-9]+:[a-zA-Z_0-9]+.*" |
http.request.body.content | wildcard |
| field:"http.request.body.content" kind:wildcard |
http.request.method | eq |
| field:"http.request.method" kind:eq value:"POST" |
http.response.body.content | wildcard |
| field:"http.response.body.content" kind:wildcard |
http.response.status_code | in |
| field:"http.response.status_code" kind:in |
Remote SSH Login Enabled via systemsetup Command
#Detects use of the systemsetup command to enable remote SSH Login.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Lateral Movement |
Rule Body
[metadata]
creation_date = "2020/08/18"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/08/25"
[rule]
author = ["Elastic", "Massimo Bertocchi"]
description = "Detects use of the systemsetup command to enable remote SSH Login."
from = "now-9m"
index = ["logs-endpoint.events.*"]
language = "eql"
license = "Elastic License v2"
name = "Remote SSH Login Enabled via systemsetup Command"
references = [
"https://documents.trendmicro.com/assets/pdf/XCSSET_Technical_Brief.pdf",
"https://ss64.com/osx/systemsetup.html",
"https://support.apple.com/guide/remote-desktop/about-systemsetup-apd95406b8d/mac",
]
risk_score = 47
rule_id = "5ae4e6f8-d1bf-40fa-96ba-e29645e1e4dc"
setup = """## Setup
This rule requires data coming in from Elastic Defend.
### Elastic Defend Integration Setup
Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
#### Prerequisite Requirements:
- Fleet is required for Elastic Defend.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
#### The following steps should be executed in order to add the Elastic Defend integration on a macOS System:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
- Click "Add Elastic Defend".
- Configure the integration name and optionally add a description.
- Select the type of environment you want to protect, for MacOS it is recommended to select "Traditional Endpoints".
- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
- Click "Save and Continue".
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
"""
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: macOS",
"Use Case: Threat Detection",
"Tactic: Lateral Movement",
"Data Source: Elastic Defend",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "macos" and event.type in ("start", "process_started") and
(
(
process.name == "systemsetup" and
process.args like~ "-setremotelogin" and
process.args like~ "on"
) or
(
process.name == "launchctl" and
process.args in ("load", "bootstrap") and
(
process.command_line like~ "*/System/Library/LaunchDaemons/ssh.plist*" or
process.command_line like~ "*com.openssh.sshd*"
)
)
) and
process.parent.executable != null and
not process.parent.executable like ("/usr/local/jamf/bin/jamf", "/usr/libexec/xpcproxy", "/usr/bin/sudo")
'''
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 Remote SSH Login Enabled via systemsetup Command
The `systemsetup` command in macOS is a utility that allows administrators to configure system settings, including enabling remote SSH login, which facilitates remote management and access. Adversaries may exploit this to gain unauthorized access and move laterally within a network. The detection rule identifies suspicious use of `systemsetup` to enable SSH, excluding legitimate administrative tools, by monitoring process execution patterns and arguments.
### Possible investigation steps
- Review the process execution details to confirm the use of the systemsetup command with the arguments "-setremotelogin" and "on" to ensure the alert is not a false positive.
- Check the parent process of the systemsetup command to identify if it was executed by a known administrative tool or script, excluding /usr/local/jamf/bin/jamf as per the rule.
- Investigate the user account associated with the process execution to determine if it is a legitimate administrator or a potentially compromised account.
- Examine recent login events and SSH access logs on the host to identify any unauthorized access attempts or successful logins following the enabling of remote SSH login.
- Correlate this event with other security alerts or logs from the same host or network segment to identify potential lateral movement or further malicious activity.
### False positive analysis
- Legitimate administrative tools like Jamf may trigger this rule when enabling SSH for authorized management purposes. To handle this, ensure that the process parent executable path for Jamf is correctly excluded in the detection rule.
- Automated scripts used for system configuration and maintenance might enable SSH as part of their routine operations. Review these scripts and, if verified as safe, add their parent process paths to the exclusion list.
- IT support activities that require temporary SSH access for troubleshooting can also cause false positives. Document these activities and consider scheduling them during known maintenance windows to reduce alerts.
- Security software or management tools that periodically check or modify system settings could inadvertently trigger this rule. Identify these tools and exclude their specific process paths if they are confirmed to be non-threatening.
### Response and remediation
- Immediately isolate the affected macOS system from the network to prevent further unauthorized access or lateral movement.
- Terminate any suspicious or unauthorized SSH sessions that are currently active on the affected system.
- Review and revoke any unauthorized SSH keys or credentials that may have been added to the system.
- Conduct a thorough examination of the system logs to identify any additional unauthorized activities or changes made by the adversary.
- Restore the system to a known good state from a backup taken before the unauthorized SSH access was enabled, if possible.
- Implement network segmentation to limit SSH access to only trusted administrative systems and users.
- Escalate the incident to the security operations team for further investigation and to determine if additional systems have been compromised."""
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1021"
name = "Remote Services"
reference = "https://attack.mitre.org/techniques/T1021/"
[[rule.threat.technique.subtechnique]]
id = "T1021.004"
name = "SSH"
reference = "https://attack.mitre.org/techniques/T1021/004/"
[rule.threat.tactic]
id = "TA0008"
name = "Lateral Movement"
reference = "https://attack.mitre.org/tactics/TA0008/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1133"
name = "External Remote Services"
reference = "https://attack.mitre.org/techniques/T1133/"
[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
Stages and Predicates
Stage 1: process
process where host.os.type == "macos" and event.type in ("start", "process_started") and
(
(
process.name == "systemsetup" and
process.args like~ "-setremotelogin" and
process.args like~ "on"
) or
(
process.name == "launchctl" and
process.args in ("load", "bootstrap") and
(
process.command_line like~ "*/System/Library/LaunchDaemons/ssh.plist*" or
process.command_line like~ "*com.openssh.sshd*"
)
)
) and
process.parent.executable != null and
not process.parent.executable like ("/usr/local/jamf/bin/jamf", "/usr/libexec/xpcproxy", "/usr/bin/sudo")
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | in |
| field:"event.type" kind:in |
process.args | in |
| field:"process.args" kind:in |
process.args | wildcard |
| field:"process.args" kind:wildcard |
process.command_line | wildcard |
| field:"CommandLine" kind:wildcard |
process.name | eq |
| field:"process_basename" kind:eq |
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.executable | eq | /usr/local/jamf/bin/jamf, /usr/libexec/xpcproxy, /usr/bin/sudo | excludes:process.parent.executable field:"process.parent.executable" value:"/usr/local/jamf/bin/jamf" field:"process.parent.executable" value:"/usr/libexec/xpcproxy" field:"process.parent.executable" value:"/usr/bin/sudo" |
Scheduled Task Created by a Windows Script
#A scheduled task was created by a Windows script via cscript.exe, wscript.exe or powershell.exe. This can be abused by an adversary to establish persistence.
Known False Positives
- Legitimate scheduled tasks may be created during installation of new software.
MITRE ATT&CK Coverage
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2020/11/29"
integration = ["endpoint", "windows"]
maturity = "production"
updated_date = "2026/05/04"
[rule]
author = ["Elastic"]
description = """
A scheduled task was created by a Windows script via cscript.exe, wscript.exe or powershell.exe. This can be abused by
an adversary to establish persistence.
"""
false_positives = ["Legitimate scheduled tasks may be created during installation of new software."]
from = "now-9m"
index = [
"winlogbeat-*",
"logs-endpoint.events.registry-*",
"logs-endpoint.events.library-*",
"logs-windows.sysmon_operational-*",
"endgame-*",
]
language = "eql"
license = "Elastic License v2"
name = "Scheduled Task Created by a Windows Script"
note = """## Triage and analysis
Decode the base64 encoded Tasks Actions registry value to investigate the task's configured action."""
risk_score = 47
rule_id = "689b9d57-e4d5-4357-ad17-9c334609d79a"
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Persistence",
"Tactic: Execution",
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Sysmon",
"Resources: Investigation Guide",
]
type = "eql"
query = '''
sequence by host.id with maxspan = 30s
[any where host.os.type == "windows" and
(event.category : ("library", "driver") or (event.category == "process" and event.action : "Image loaded*")) and
(?dll.name : "taskschd.dll" or file.name : "taskschd.dll") and
process.name : ("cscript.exe", "wscript.exe", "powershell.exe", "pwsh.exe", "powershell_ise.exe")]
[registry where host.os.type == "windows" and event.type == "change" and registry.value : "Actions" and
registry.path : (
"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Schedule\\TaskCache\\Tasks\\*\\Actions",
"\\REGISTRY\\MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Schedule\\TaskCache\\Tasks\\*\\Actions"
)]
'''
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 7 - Image Loaded](https://ela.st/sysmon-event-7-setup)
- [Sysmon Registry Events](https://ela.st/sysmon-event-reg-setup)
"""
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1053"
name = "Scheduled Task/Job"
reference = "https://attack.mitre.org/techniques/T1053/"
[[rule.threat.technique.subtechnique]]
id = "T1053.005"
name = "Scheduled Task"
reference = "https://attack.mitre.org/techniques/T1053/005/"
[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.technique.subtechnique]]
id = "T1059.005"
name = "Visual Basic"
reference = "https://attack.mitre.org/techniques/T1059/005/"
[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 30s, correlated by host.id.
Stage 1: any
[any where host.os.type == "windows" and
(event.category : ("library", "driver") or (event.category == "process" and event.action : "Image loaded*")) and
(?dll.name : "taskschd.dll" or file.name : "taskschd.dll") and
process.name : ("cscript.exe", "wscript.exe", "powershell.exe", "pwsh.exe", "powershell_ise.exe")]
Stage 2: registry
[registry where host.os.type == "windows" and event.type == "change" and registry.value : "Actions" and
registry.path : (
"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Schedule\\TaskCache\\Tasks\\*\\Actions",
"\\REGISTRY\\MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Schedule\\TaskCache\\Tasks\\*\\Actions"
)]
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
dll.name | wildcard |
| field:"dll.name" kind:wildcard value:"taskschd.dll" |
event.action | wildcard |
| field:"EventType" kind:wildcard value:"Image loaded*" |
event.category | eq |
| field:"event.category" kind:eq value:"process" |
event.category | wildcard |
| field:"event.category" kind:wildcard |
event.type | eq |
| field:"event.type" kind:eq value:"change" |
file.name | wildcard |
| field:"file.name" kind:wildcard value:"taskschd.dll" |
process.name | wildcard |
| field:"process_basename" kind:wildcard |
registry.path | wildcard |
| field:"TargetObject" kind:wildcard |
registry.value | wildcard |
| field:"registry_value_name" kind:wildcard value:"Actions" |
SolarWinds Process Disabling Services via Registry
#Identifies a SolarWinds binary modifying the start type of a service to be disabled. An adversary may abuse this technique to manipulate relevant security services.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Persistence | |
| Defense Impairment |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2020/12/14"
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
maturity = "production"
updated_date = "2026/05/04"
[rule]
author = ["Elastic"]
description = """
Identifies a SolarWinds binary modifying the start type of a service to be disabled. An adversary may abuse this
technique to manipulate relevant security services.
"""
from = "now-9m"
index = [
"winlogbeat-*",
"logs-endpoint.events.registry-*",
"logs-windows.sysmon_operational-*",
"endgame-*",
"logs-m365_defender.event-*",
"logs-sentinel_one_cloud_funnel.*",
"logs-crowdstrike.fdr*",
]
language = "eql"
license = "Elastic License v2"
name = "SolarWinds Process Disabling Services via Registry"
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 SolarWinds Process Disabling Services via Registry
SolarWinds software is integral for network management, often requiring deep system access. Adversaries may exploit this by altering registry settings to disable critical services, evading detection. The detection rule identifies changes to service start types by specific SolarWinds processes, flagging potential misuse aimed at disabling security defenses. This proactive monitoring helps mitigate risks associated with unauthorized registry modifications.
### Possible investigation steps
- Review the process name involved in the alert to confirm it matches one of the specified SolarWinds processes, such as "SolarWinds.BusinessLayerHost*.exe" or "NetFlowService*.exe".
- Examine the registry path in the alert to ensure it corresponds to the critical service start type locations, such as "HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Services\\\\*\\\\Start".
- Check the registry data value to verify if it has been set to "4" (disabled), indicating a potential attempt to disable a service.
- Investigate the timeline of the registry change event to identify any preceding or subsequent suspicious activities on the host.
- Correlate the alert with other security logs or alerts from data sources like Sysmon or Microsoft Defender XDR to identify any related malicious activities or patterns.
- Assess the impacted service to determine its role in security operations and evaluate the potential impact of it being disabled.
- Contact the system owner or administrator to verify if the registry change was authorized or part of a legitimate maintenance activity.
### False positive analysis
- Routine updates or maintenance by SolarWinds software may trigger registry changes. Verify if the process corresponds to a scheduled update or maintenance task and consider excluding these specific processes during known maintenance windows.
- Legitimate configuration changes by IT administrators using SolarWinds tools can appear as registry modifications. Confirm with the IT team if the changes align with authorized configuration activities and create exceptions for these known activities.
- Automated scripts or tools that utilize SolarWinds processes for legitimate network management tasks might cause false positives. Review the scripts or tools in use and whitelist them if they are verified as safe and necessary for operations.
- Temporary service modifications for troubleshooting purposes by SolarWinds processes can be mistaken for malicious activity. Ensure that any troubleshooting activities are documented and create temporary exceptions during these periods.
### Response and remediation
- Immediately isolate the affected system from the network to prevent further unauthorized registry modifications and potential lateral movement by the adversary.
- Terminate any suspicious SolarWinds processes identified in the alert, such as "SolarWinds.BusinessLayerHost*.exe" or "NetFlowService*.exe", to halt any ongoing malicious activity.
- Restore the registry settings for the affected services to their original state, ensuring that critical security services are re-enabled and configured to start automatically.
- Conduct a thorough review of the affected system for additional signs of compromise, including unauthorized user accounts, scheduled tasks, or other persistence mechanisms.
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine the scope of the breach.
- Implement enhanced monitoring on the affected system and similar environments to detect any future unauthorized registry changes, leveraging data sources like Sysmon and Microsoft Defender XDR.
- Review and update access controls and permissions for SolarWinds processes to limit their ability to modify critical system settings, reducing the risk of future exploitation."""
references = [
"https://www.fireeye.com/blog/threat-research/2020/12/evasive-attacker-leverages-solarwinds-supply-chain-compromises-with-sunburst-backdoor.html",
]
risk_score = 47
rule_id = "b9960fef-82c6-4816-befa-44745030e917"
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Defense Evasion",
"Tactic: Initial Access",
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Sysmon",
"Data Source: Microsoft Defender XDR",
"Data Source: SentinelOne",
"Data Source: Crowdstrike",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
registry where host.os.type == "windows" and event.type == "change" and registry.value : "Start" and
process.name : (
"SolarWinds.BusinessLayerHost*.exe",
"ConfigurationWizard*.exe",
"NetflowDatabaseMaintenance*.exe",
"NetFlowService*.exe",
"SolarWinds.Administration*.exe",
"SolarWinds.Collector.Service*.exe",
"SolarwindsDiagnostics*.exe"
) and
registry.path : "*\\SYSTEM\\*ControlSet*\\Services\\*\\Start" and
registry.data.strings : ("4", "0x00000004")
'''
setup = """## Setup
This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
Setup instructions: https://ela.st/install-elastic-defend
### Additional data sources
This rule also supports the following third-party data sources. For setup instructions, refer to the links below:
- [CrowdStrike](https://ela.st/crowdstrike-integration)
- [Microsoft Defender XDR](https://ela.st/m365-defender)
- [SentinelOne Cloud Funnel](https://ela.st/sentinel-one-cloud-funnel)
- [Sysmon Registry Events](https://ela.st/sysmon-event-reg-setup)
"""
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1112"
name = "Modify Registry"
reference = "https://attack.mitre.org/techniques/T1112/"
[[rule.threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"
[[rule.threat.technique.subtechnique]]
id = "T1562.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 = "T1195"
name = "Supply Chain Compromise"
reference = "https://attack.mitre.org/techniques/T1195/"
[[rule.threat.technique.subtechnique]]
id = "T1195.002"
name = "Compromise Software Supply Chain"
reference = "https://attack.mitre.org/techniques/T1195/002/"
[rule.threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
Stages and Predicates
Stage 1: registry
registry where host.os.type == "windows" and event.type == "change" and registry.value : "Start" and
process.name : (
"SolarWinds.BusinessLayerHost*.exe",
"ConfigurationWizard*.exe",
"NetflowDatabaseMaintenance*.exe",
"NetFlowService*.exe",
"SolarWinds.Administration*.exe",
"SolarWinds.Collector.Service*.exe",
"SolarwindsDiagnostics*.exe"
) and
registry.path : "*\\SYSTEM\\*ControlSet*\\Services\\*\\Start" and
registry.data.strings : ("4", "0x00000004")
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"change" |
process.name | wildcard |
| field:"process_basename" kind:wildcard |
registry.data.strings | wildcard |
| field:"Details" kind:wildcard |
registry.path | wildcard |
| field:"TargetObject" kind:wildcard value:"*\SYSTEM\*ControlSet*\Services\*\Start" |
registry.value | wildcard |
| field:"registry_value_name" kind:wildcard value:"Start" |
Spike in AWS Error Messages
#A machine learning job detected a significant spike in the rate of a particular error in the CloudTrail messages. Spikes in error messages may accompany attempts at privilege escalation, lateral movement, or discovery.
Known False Positives
- Spikes in error message activity can also be due to bugs in cloud automation scripts or workflows; changes to cloud automation scripts or workflows; adoption of new services; changes in the way services are used; or changes to IAM privileges.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery |
Rule Body
[metadata]
creation_date = "2020/07/13"
integration = ["aws"]
maturity = "production"
updated_date = "2025/11/18"
[rule]
anomaly_threshold = 50
author = ["Elastic"]
description = """
A machine learning job detected a significant spike in the rate of a particular error in the CloudTrail messages. Spikes
in error messages may accompany attempts at privilege escalation, lateral movement, or discovery.
"""
false_positives = [
"""
Spikes in error message activity can also be due to bugs in cloud automation scripts or workflows; changes to cloud
automation scripts or workflows; adoption of new services; changes in the way services are used; or changes to IAM
privileges.
""",
]
from = "now-60m"
interval = "15m"
license = "Elastic License v2"
machine_learning_job_id = "high_distinct_count_error_message"
name = "Spike in AWS Error Messages"
setup = """## Setup
This rule requires the installation of associated Machine Learning jobs, as well as data coming in from AWS.
### Anomaly Detection Setup
Once the rule is enabled, the associated Machine Learning job will start automatically. You can view the Machine Learning job linked under the "Definition" panel of the detection rule. If the job does not start due to an error, the issue must be resolved for the job to commence successfully. For more details on setting up anomaly detection jobs, refer to the [helper guide](https://www.elastic.co/guide/en/kibana/current/xpack-ml-anomalies.html).
### AWS Integration Setup
The AWS integration allows you to collect logs and metrics from Amazon Web Services (AWS) with Elastic Agent.
#### The following steps should be executed in order to add the Elastic Agent System integration "aws" to your system:
- Go to the Kibana home page and click “Add integrations”.
- In the query bar, search for “AWS” and select the integration to see more details about it.
- Click “Add AWS”.
- Configure the integration name and optionally add a description.
- Review optional and advanced settings accordingly.
- Add the newly installed “aws” to an existing or a new agent policy, and deploy the agent on your system from which aws log files are desirable.
- Click “Save and Continue”.
- For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/current/integrations/aws).
"""
note = """## Triage and analysis
### Investigating Spike in AWS Error Messages
CloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity when deviations occur.
This rule uses a machine learning job to detect a significant spike in the rate of a particular error in the CloudTrail messages. Spikes in error messages may accompany attempts at privilege escalation, lateral movement, or discovery.
#### Possible investigation steps
- Examine the history of the error. If the error only manifested recently, it might be related to recent changes in an automation module or script. You can find the error in the `aws.cloudtrail.error_code field` field.
- Investigate other alerts associated with the user account during the past 48 hours.
- Validate the activity is not related to planned patches, updates, or network administrator activity.
- Examine the request parameters. These may indicate the source of the program or the nature of the task being performed when the error occurred.
- Check whether the error is related to unsuccessful attempts to enumerate or access objects, data, or secrets.
- Considering the source IP address and geolocation of the user who issued the command:
- Do they look normal for the calling user?
- If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?
- If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?
- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal time of day?
- Contact the account owner and confirm whether they are aware of this activity if suspicious.
- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.
### False positive analysis
- Examine the history of the command. If the command only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.
- The adoption of new services or the addition of new functionality to scripts may generate false positives.
### Related Rules
- Unusual City For an AWS Command - 809b70d3-e2c3-455e-af1b-2626a5a1a276
- Unusual Country For an AWS Command - dca28dee-c999-400f-b640-50a081cc0fd1
- Unusual AWS Command for a User - ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1
- Rare AWS Error Code - 19de8096-e2b0-4bd8-80c9-34a820813fff
### Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Disable or limit the account during the investigation and response.
- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
- Identify the account role in the cloud environment.
- Assess the criticality of affected services and servers.
- Work with your IT team to identify and minimize the impact on users.
- Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
- Identify any regulatory or legal ramifications related to this activity.
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.
- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.
- Consider enabling multi-factor authentication for users.
- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
"""
references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
risk_score = 21
rule_id = "78d3d8d9-b476-451d-a9e0-7a5addd70670"
severity = "low"
tags = [
"Domain: Cloud",
"Data Source: AWS",
"Data Source: Amazon Web Services",
"Rule Type: ML",
"Rule Type: Machine Learning",
"Resources: Investigation Guide",
]
type = "machine_learning"
[[rule.threat]]
framework = "MITRE ATT&CK"
[rule.threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"
[[rule.threat.technique]]
id = "T1526"
name = "Cloud Service Discovery"
reference = "https://attack.mitre.org/techniques/T1526/"
[[rule.threat.technique]]
id = "T1580"
name = "Cloud Infrastructure Discovery"
reference = "https://attack.mitre.org/techniques/T1580/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[rule.threat.tactic]
id = "TA0008"
name = "Lateral Movement"
reference = "https://attack.mitre.org/tactics/TA0008/"
Suspicious APT Package Manager Execution
#Detects suspicious process events executed by the APT package manager, potentially indicating persistence through an APT backdoor. In Linux, APT (Advanced Package Tool) is a command-line utility used for handling packages on Debian-based systems, providing functions for installing, updating, upgrading, and removing software along with managing package repositories. Attackers can backdoor APT to gain persistence by injecting malicious code into scripts that APT runs, thereby ensuring continued unauthorized access or control each time APT is used for package management.
MITRE ATT&CK Coverage
Rule Body
[metadata]
creation_date = "2024/02/01"
integration = ["endpoint", "sentinel_one_cloud_funnel", "crowdstrike"]
maturity = "production"
updated_date = "2026/03/24"
[rule]
author = ["Elastic"]
description = """
Detects suspicious process events executed by the APT package manager, potentially indicating persistence through an APT
backdoor. In Linux, APT (Advanced Package Tool) is a command-line utility used for handling packages on Debian-based
systems, providing functions for installing, updating, upgrading, and removing software along with managing package
repositories. Attackers can backdoor APT to gain persistence by injecting malicious code into scripts that APT runs,
thereby ensuring continued unauthorized access or control each time APT is used for package management.
"""
from = "now-9m"
index = ["logs-endpoint.events.process*", "logs-sentinel_one_cloud_funnel.*", "logs-crowdstrike.fdr*"]
language = "eql"
license = "Elastic License v2"
name = "Suspicious APT Package Manager Execution"
note = """## Triage and analysis
> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
### Investigating Suspicious APT Package Manager Execution
The APT package manager is a vital tool for managing software on Debian-based Linux systems, handling tasks like installation and updates. Adversaries may exploit APT by embedding malicious scripts to maintain persistence and control. The detection rule identifies unusual shell or script executions initiated by APT, signaling potential backdoor activities, thus aiding in early threat detection and response.
### Possible investigation steps
- Review the process execution details to identify the specific shell or script that was executed with APT as the parent process. Pay attention to the process names and arguments, such as "bash", "dash", "sh", etc., and the presence of the "-c" argument.
- Examine the command-line arguments and scripts executed by the suspicious process to determine if they contain any malicious or unexpected commands.
- Check the parent process details, specifically the APT process, to understand the context in which the shell or script was executed. This includes reviewing any recent package installations or updates that might have triggered the execution.
- Investigate the user account under which the suspicious process was executed to assess if it has been compromised or if it has elevated privileges that could be exploited.
- Correlate the event with other security logs or alerts from the same host to identify any additional indicators of compromise or related suspicious activities.
- Review the system's package management logs to identify any recent changes or anomalies in package installations or updates that could be linked to the suspicious execution.
### False positive analysis
- Legitimate administrative scripts executed by system administrators using APT may trigger the rule. To handle this, identify and document routine administrative tasks and create exceptions for these specific scripts or commands.
- Automated system maintenance scripts that use APT for updates or installations can be mistaken for suspicious activity. Review and whitelist these scripts by their specific command patterns or script names.
- Custom software deployment processes that involve APT and shell scripts might be flagged. Analyze these processes and exclude them by defining clear criteria for legitimate deployment activities.
- Security tools or monitoring solutions that interact with APT for scanning or auditing purposes may cause false positives. Verify these tools' operations and exclude their known benign processes from triggering the rule.
- Development environments where developers frequently use APT and shell scripts for testing and building software can lead to alerts. Establish a baseline of normal development activities and exclude these from the detection rule.
### Response and remediation
- Isolate the affected host immediately to prevent further unauthorized access or lateral movement within the network.
- Terminate any suspicious processes identified in the alert, particularly those initiated by the APT package manager that match the query criteria.
- Conduct a thorough review of the APT configuration files and scripts to identify and remove any injected malicious code or unauthorized modifications.
- Restore the affected system from a known good backup if malicious modifications are extensive or if the integrity of the system cannot be assured.
- Update all system packages and apply security patches to mitigate vulnerabilities that may have been exploited by the adversary.
- Monitor the affected host and network for any signs of re-infection or further suspicious activity, focusing on the execution of shell scripts and unauthorized network connections.
- Escalate the incident to the security operations team for further investigation and to determine if additional systems have been compromised."""
references = ["https://www.elastic.co/security-labs/sequel-on-persistence-mechanisms"]
risk_score = 21
rule_id = "ad959eeb-2b7b-4722-ba08-a45f6622f005"
setup = """## Setup
This rule requires data coming in from Elastic Defend.
### Elastic Defend Integration Setup
Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
#### Prerequisite Requirements:
- Fleet is required for Elastic Defend.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
- Click "Add Elastic Defend".
- Configure the integration name and optionally add a description.
- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
- Click "Save and Continue".
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
"""
severity = "low"
tags = [
"Domain: Endpoint",
"OS: Linux",
"Use Case: Threat Detection",
"Tactic: Persistence",
"Tactic: Execution",
"Tactic: Defense Evasion",
"Data Source: Elastic Defend",
"Data Source: SentinelOne",
"Resources: Investigation Guide",
"Data Source: Crowdstrike",
]
type = "eql"
query = '''
sequence by host.id with maxspan=5s
[process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "start", "ProcessRollup2") and
process.parent.name == "apt" and process.args == "-c" and process.name in (
"bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish"
) and not process.executable == "/usr/lib/venv-salt-minion/bin/python.original"
] by process.entity_id
[process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "start", "ProcessRollup2") and process.name like (
"bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish", "python*", "php*",
"perl", "ruby", "lua*", "openssl", "nc", "netcat", "ncat", "telnet", "awk"
) and not (
?process.parent.executable like (
"/run/k3s/containerd*", "/tmp/newroot/*", "/usr/share/debconf/frontend", "/var/tmp/buildah*", "./merged/*",
"./*/vz/root/*", "/usr/bin/adequate"
) or
process.executable like ("/usr/lib/venv-salt-minion/bin/python.original", "./merged/var/lib/containers/*") or
process.command_line in (
"python3 /usr/sbin/omv-mkaptidx", "python3 /usr/local/bin/abr-upgrade --upgrade",
"sh -c apt-get indextargets -o Dir::State::lists=/var/lib/apt/lists/ --format='$(FILENAME)' 'Created-By: Packages'",
"/usr/bin/perl /usr/sbin/dpkg-preconfigure --apt", "/bin/sh -e /usr/lib/update-notifier/update-motd-updates-available",
"/usr/bin/python3 /usr/lib/cnf-update-db", "/usr/bin/python3 /usr/bin/apt-listchanges --apt",
"/usr/bin/perl -w /usr/sbin/dpkg-preconfigure --apt", "/bin/sh /usr/lib/needrestart/apt-pinvoke",
"/bin/sh /usr/bin/kali-check-apt-sources", "/bin/sh /usr/lib/needrestart/apt-pinvoke -m u",
"/usr/bin/perl /usr/sbin/needrestart", "/usr/bin/perl -w /usr/bin/apt-show-versions -i",
"/usr/bin/perl -w /usr/bin/apt-show-versions -i", "/usr/bin/perl -w /bin/apt-show-versions -i",
"/usr/bin/perl /bin/adequate --help", "/usr/bin/perl /usr/sbin/needrestart -m u",
"/usr/bin/perl -w /usr/share/debconf/frontend /usr/sbin/needrestart",
"/usr/bin/python3 /sbin/katello-tracer-upload",
"/usr/bin/python3 /usr/bin/package-profile-upload"
) or
?process.parent.command_line like ("sh -c if [ -x*", "sh -c -- if [ -x*") or
process.args in ("/usr/sbin/needrestart", "/usr/lib/needrestart/apt-pinvoke", "/usr/share/proxmox-ve/pve-apt-hook", "/usr/bin/dpkg-source") or
?process.parent.args == "/usr/share/debconf/frontend"
)
] by process.parent.entity_id
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1543"
name = "Create or Modify System Process"
reference = "https://attack.mitre.org/techniques/T1543/"
[[rule.threat.technique]]
id = "T1546"
name = "Event Triggered Execution"
reference = "https://attack.mitre.org/techniques/T1546/"
[[rule.threat.technique.subtechnique]]
id = "T1546.016"
name = "Installer Packages"
reference = "https://attack.mitre.org/techniques/T1546/016/"
[[rule.threat.technique]]
id = "T1574"
name = "Hijack Execution Flow"
reference = "https://attack.mitre.org/techniques/T1574/"
[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[rule.threat.technique.subtechnique]]
id = "T1059.004"
name = "Unix Shell"
reference = "https://attack.mitre.org/techniques/T1059/004/"
[[rule.threat.technique.subtechnique]]
id = "T1059.006"
name = "Python"
reference = "https://attack.mitre.org/techniques/T1059/006/"
[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
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: process
[process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "start", "ProcessRollup2") and
process.parent.name == "apt" and process.args == "-c" and process.name in (
"bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish"
) and not process.executable == "/usr/lib/venv-salt-minion/bin/python.original"
] by process.entity_id
Stage 2: process
[process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "start", "ProcessRollup2") and process.name like (
"bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish", "python*", "php*",
"perl", "ruby", "lua*", "openssl", "nc", "netcat", "ncat", "telnet", "awk"
) and not (
?process.parent.executable like (
"/run/k3s/containerd*", "/tmp/newroot/*", "/usr/share/debconf/frontend", "/var/tmp/buildah*", "./merged/*",
"./*/vz/root/*", "/usr/bin/adequate"
) or
process.executable like ("/usr/lib/venv-salt-minion/bin/python.original", "./merged/var/lib/containers/*") or
process.command_line in (
"python3 /usr/sbin/omv-mkaptidx", "python3 /usr/local/bin/abr-upgrade --upgrade",
"sh -c apt-get indextargets -o Dir::State::lists=/var/lib/apt/lists/ --format='$(FILENAME)' 'Created-By: Packages'",
"/usr/bin/perl /usr/sbin/dpkg-preconfigure --apt", "/bin/sh -e /usr/lib/update-notifier/update-motd-updates-available",
"/usr/bin/python3 /usr/lib/cnf-update-db", "/usr/bin/python3 /usr/bin/apt-listchanges --apt",
"/usr/bin/perl -w /usr/sbin/dpkg-preconfigure --apt", "/bin/sh /usr/lib/needrestart/apt-pinvoke",
"/bin/sh /usr/bin/kali-check-apt-sources", "/bin/sh /usr/lib/needrestart/apt-pinvoke -m u",
"/usr/bin/perl /usr/sbin/needrestart", "/usr/bin/perl -w /usr/bin/apt-show-versions -i",
"/usr/bin/perl -w /usr/bin/apt-show-versions -i", "/usr/bin/perl -w /bin/apt-show-versions -i",
"/usr/bin/perl /bin/adequate --help", "/usr/bin/perl /usr/sbin/needrestart -m u",
"/usr/bin/perl -w /usr/share/debconf/frontend /usr/sbin/needrestart",
"/usr/bin/python3 /sbin/katello-tracer-upload",
"/usr/bin/python3 /usr/bin/package-profile-upload"
) or
?process.parent.command_line like ("sh -c if [ -x*", "sh -c -- if [ -x*") or
process.args in ("/usr/sbin/needrestart", "/usr/lib/needrestart/apt-pinvoke", "/usr/share/proxmox-ve/pve-apt-hook", "/usr/bin/dpkg-source") or
?process.parent.args == "/usr/share/debconf/frontend"
)
] by process.parent.entity_id
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.name | in |
| field:"process_basename" kind:in |
process.name | wildcard |
| field:"process_basename" kind:wildcard |
process.parent.name | eq |
| field:"parent_process_basename" kind:eq value:"apt" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.executable | eq | /usr/lib/venv-salt-minion/bin/python.original | excludes:process.executable field:"process.executable" value:"/usr/lib/venv-salt-minion/bin/python.original" |
process.args | in | /usr/bin/dpkg-source, /usr/lib/needrestart/apt-pinvoke, /usr/sbin/needrestart, /usr/share/proxmox-ve/pve-apt-hook | excludes:process.args |
process.command_line | in | /bin/sh -e /usr/lib/update-notifier/update-motd-updates-available, /bin/sh /usr/bin/kali-check-apt-sources, /bin/sh /usr/lib/needrestart/apt-pinvoke, /bin/sh /usr/lib/needrestart/apt-pinvoke -m u, /usr/bin/perl -w /bin/apt-show-versions -i, /usr/bin/perl -w /usr/bin/apt-show-versions -i, /usr/bin/perl -w /usr/sbin/dpkg-preconfigure --apt, /usr/bin/perl -w /usr/share/debconf/frontend /usr/sbin/needrestart, /usr/bin/perl /bin/adequate --help, /usr/bin/perl /usr/sbin/dpkg-preconfigure --apt, /usr/bin/perl /usr/sbin/needrestart, /usr/bin/perl /usr/sbin/needrestart -m u, /usr/bin/python3 /sbin/katello-tracer-upload, /usr/bin/python3 /usr/bin/apt-listchanges --apt, /usr/bin/python3 /usr/bin/package-profile-upload, /usr/bin/python3 /usr/lib/cnf-update-db, python3 /usr/local/bin/abr-upgrade --upgrade, python3 /usr/sbin/omv-mkaptidx, sh -c apt-get indextargets -o Dir::State::lists=/var/lib/apt/lists/ --format='$(FILENAME)' 'Created-By: Packages' | excludes:process.command_line |
process.executable | wildcard | /usr/lib/venv-salt-minion/bin/python.original, ./merged/var/lib/containers/* | excludes:process.executable field:"process.executable" value:"/usr/lib/venv-salt-minion/bin/python.original" field:"process.executable" value:"./merged/var/lib/containers/*" |
process.parent.args | eq | /usr/share/debconf/frontend | excludes:process.parent.args field:"process.parent.args" value:"/usr/share/debconf/frontend" |
process.parent.command_line | starts_with | sh -c if [ -x, sh -c -- if [ -x | excludes:process.parent.command_line field:"process.parent.command_line" value:"sh -c if [ -x" field:"process.parent.command_line" value:"sh -c -- if [ -x" |
process.parent.executable | wildcard | /run/k3s/containerd*, /tmp/newroot/*, /usr/share/debconf/frontend, /var/tmp/buildah*, ./merged/*, ./*/vz/root/*, /usr/bin/adequate | excludes:process.parent.executable |
Suspicious Memory Protection Change via VirtualProtect
#Identifies when a process attempts to allocate shellcode memory region using VirtualProtect API changing memory protections from RW to RX.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Rule Body
[rule]
description = """
Identifies when a process attempts to allocate shellcode memory region using VirtualProtect API changing memory
protections from RW to RX.
"""
id = "8fcf2b81-8322-423b-a1b4-6bba722f599a"
license = "Elastic License v2"
name = "Suspicious Memory Protection Change via VirtualProtect"
os_list = ["windows"]
version = "1.0.13"
query = '''
api where process.Ext.api.name in ("VirtualProtect", "VirtualProtectEx") and
process.Ext.api.behaviors == "allocate_shellcode" and
process.Ext.api.parameters.protection == "R-X" and process.Ext.api.parameters.protection_old == "RW-" and
process.Ext.api.metadata.target_address_name == "Unbacked" and process.Ext.token.integrity_level_name != "low" and process.Ext.api.parameters.size > 6 and
process.thread.Ext.call_stack_final_user_module.hash.sha256 != null and
_arraysearch(process.thread.Ext.call_stack_final_user_module.code_signature, $entry, $entry.trusted == false or $entry.exists == false) and
not (process.thread.Ext.call_stack_final_user_module.name == "Unbacked" and
process.thread.Ext.call_stack_final_user_module.protection_provenance like ("Unknown*", "Undetermined*", "system.core.ni.dll")) and
not _arraysearch(process.thread.Ext.call_stack, $entry, $entry.protection_provenance like ("Kernel", "Kernel|*")) and
not process.thread.Ext.call_stack_final_user_module.protection_provenance == "Kernel" and
not _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info:
("c:\\windows\\sys?????\\kernelbase.dll!LoadLibrary*",
"c:\\windows\\sys?????\\ntdll.dll!LdrLoadDll*",
"c:\\windows\\sys?????\\ntdll.dll!RtlpCreateProcessRegistryInfo*",
"c:\\windows\\syswow64\\ntdll.dll!RtlInitializeExceptionChain*")) and
not process.thread.Ext.call_stack_final_user_module.protection_provenance_path like
("?:\\program files\\*", "?:\\program files (x86)\\*",
"?:\\windows\\microsoft.net\\framework\\v*\\temporary asp.net files\\*.dll",
"c:\\windows\\assembly\\nativeimages*.ni.dll") and
not process.thread.Ext.call_stack_final_user_module.hash.sha256 in
("da9f98de697f863e5351b86289b21de70e61a74d7533ee97bc08dd42c6972a91",
"bbff088a88a0a754dc9d312e52ef7e60dd93537d78d73f79c89aa5b5091457fc",
"6db01eb9b17b85c5b4de9f888060c0ea96d03bd6da195b0ba1b990700c9d23f7",
"34e6d971c034222a417995d8e1e8fdd9f8781795c9c289bd86c499a439f34c88",
"0696e0617a028101d85db50a4f109fac15be3e1ebe122b94f805763d8008ddfc",
"fee37bdeecc597ad9e0f13264e9ac12df3ad41f8d76a41da6e38349ed66ab35e",
"c434208894f07f604b852f29b8edc3a58c4de63de783373733e72b2b73f33be9",
"3cd00f456f51829eda119e0e133acc1e45a5930d61fc335a2e9aa688a836a24d",
"9ac13f9bc5564fd8a1eab5f7c945dce1c27940dd63a913108eac64481ddde6af",
"5438c19007ad96da0a969c0c0caaf00aa06375f1a6e85073f91a1392af94d059",
"dfee8783677d5661c873d1dd3b0fabb5ad6cc7c9638cb9390f728b0a4ac14574",
"704bc9a084989871a567abc638aec57b3c6514ef1e31ceacd0fb347551a7aaf4",
"a844247b7cdcac1a5f61c604e4db111b274616c0eb19a70cdfb073c8c2f3b375",
"1d2ccc2e25e1b645f63dfe93d191aa9fe1b14fa0296f922ae467766c1c64d633",
"93f53280052d0f700259b42a62f8658d9b2a741b54063f277e9b83264448fb21",
"de38e935cf249af5669d57ef9670ba4b9f324774fae9fd9cceb37b238305a155",
"a8448fdad13341552eddecdbef4225015aa9940abe47d52d358a36f7bae57cc1",
"33eaea61f37f63d950de5a3ab6708d832e6d2fa9375d9e721d8278237702d5b7",
"67766e574baa86eb8317623acc2957e8e28944bb801a8c10a0fa9d29fdb4cfd3",
"518c87f58a6c4d9826e9ef8fbb7f4213882fa70822675610d45aea2464502a57",
"cbbc5dab18edc344d05c01d4d08819fbc0a68a78741956831752986009b69e16",
"a0d9f666f5e253031b5364c955c120b6b917749645b9e97bd8cc324597d450d4",
"b0968a364408aad11a33343cb9fdf66b994dbd251cc64237f8894d66efe96f19",
"3b03f447beade5d3c5ef56b2fc3d43215466f8757ce0d3ce7dd3c2afa8a73541",
"929cbeec5ba36a2e42080d31dfe7297fb1a0f4239060004283639182a8e62c74",
"fa0b17d4c411a5011e094154e7f1bbd2e9237448df8a2b27e321bd1b2a3ab3f1",
"5231df995d71991ee4108937bb12e4d3f344a96fb0c4cd82c14e18061d6c4730",
"4ad4ff7561647775372cafe7c52ba85d610dbc901a45f1a576764dfa11a9fa7a",
"b3012d6bb5dd8e91932d92808ea86363709148173096fe49181718c1890814cf",
"79dafa6bf1054b901448a76f7f441d4c458f5eb2b6e9ab87e39632fb313c0d84",
"891113b49c9876f9e46d445ff0534e48573e0e518d53b7161a381664df32ba77",
"e2818bd313264a3086cdc2b8719d101bca6fc7de60058a12add40597cbb86691",
"e9900d7fe38d9dc0a8438ac9ca79aba24403136c6c415028c223f13d97fb844d",
"ffb16922d5db2b348ec146cf7b737c63ea22aa74604017d8cd5c53a1cb1e4f8f",
"d5d17575f4bec6ab674a9cac56fba5fd696576f23fc1b22e32629bcafba92ad3",
"667e71f17a13ac8140fcfad2cc1e3485ef9ea9fb2c9d9bda305347d4c92df7b2",
"6d72df875440edd9216e2e3f0fb500776064a6f2e412f8d118e410760dff3685",
"02f9581f9b917ac8535bce97462ad587608fd42227eae4d8ee54ab7a4bf742fd",
"852c5f7920c409c8736d6deaab4df397d5d3ff121764a9d8cf125b12dd5b08db",
"7e22ce3aff89b105e5d3cbb793ea2aa9daeb45dfb888ec2bea3f9571b1b90c2b",
"5181e6b10dd813812eb827884b62221a96f065ede5f2a6ac2bca251f3557f204",
"fe204b15ca9d02b89e4fbb5adc308e59005c2f998864e92ec68ba3982af241f6",
"6a31d5d8358cd60014233b39f33f2dda2cf6cc5c4883ba1501dc37644d2b51b4",
"778bdf088806162198b71dde1c0009b051c8433127c12fab3f8d9ac86c6f14ac",
"2be574f0197236b43260253d5c805097817d563b18ec08aa832d3d0d79bab4eb",
"2437b4361fade61d1c8ae7c9faa6a8b22223e65a58480227d0ec55a383dc486d",
"e1eb85821ebc1cdb879fbaa564c9d0a416aa7d4cb27fe8f4831c3956775c754c",
"b3d665fa5452b58a2238f57188aa9310a01a1e3c2b884269c2bccb0bdadabd41",
"4b0e2b9fb85295f5f587c2f96d697918e2a9cbd95813be9c764f8d8c19270c65",
"0738dc614d751b3b08125c03a920fc243a3e5eea4f16d3374d8d94a6e2454477",
"e3868e9daf4d9e34bf5b2f48bf5cab45e9b88e39cea578edb01cd96607eecf09",
"67445d47d7e70e7b0f94b752f027e04a5453b5b14ea56c433660b27d016a734d",
"3ec7799d1f23fc6c0beea6f237f801dbdd59aac6faa7a22ecf88ba54c8fc9a80",
"98472d7cc481f1676c44d37ba5c5db1fbb146c68ae1b63e4d2ea32dd3c5dff90",
"b18aa0c98922563f5996fb0497446873f7030d0511ffb77388ea882b4f98a924",
"86699ebbcdbee712a4b798391b178a19ec18e0631bbc74875eda70af21b1da7e",
"a1f5b87881b64b7d097cd3744bbbfa24f8de5234bd043e95f5db28eadbf6ad60",
"fdf036edcd2fc6997a6eeaac4b58e4b533cd6abdf15d18a53621832bff038be0",
"b75574da0d5e59643b8ac7f1ea9116e66bc0f49c6b212be000e0c65af9716911",
"925a5cd982933bae1b271e1aaaa887ab469397701cd299f4397ddd8af5a351f9",
"2f3b9ba5b769c89297c10c77f50223e9e88737dd3fe56e8c00adeeaa198480f9",
"f8be5cbbef29cfb2661604038bbf723208c1165f17dcde9aa593625d3458ad7d",
"e8113d5be9eb19792f01d626575d16c37a28269ce9f8fb98d0afe7ea39675ed1",
"83fecf04fc83a08c78e4f5faad39c4b4ecb806c2b777c58998bfc9ea560f17ca",
"1f06d8866101bed3e5af595fabc9ed41e93d12f9c02209c4619003ece1430768",
"2ab8f2956117b2acad644c8107156121e4d53cbe98e726a658a1d01aa36b6630",
"f56ef8b0727c54961b669c99649f67c7f13233869be9df0f9adb2cb95aabbe87",
"3dbfd72f65c6e84dc177d45fdff3b9d3ea37f769862dcb80fdd148d44d849396",
"c547ad0c67524371f40db48c998db222f3b75cef21109c62aea28227df8a6f2c",
"a543689f34083f810e0184ec77d8ee9e57d44ebd6212af444853a3a89a3c82c0",
"d606d6c6bd562e78e9581b6bf7c01966a753f24fe0583c48fb121cd36a6a6288",
"98615f765e8337555c77db1bf920adbbdf2313e6a190fa21c9d98f78533a5386",
"608da95c6dae5de21b2135701365e18d3de173d3f0fd9753812afe6a5b13fa05",
"10f3e16e8428f3d411f099fc4ff6e5b6f3ece29a0fc8fc606e7148e2f9bfc84b",
"5387f214041b5e4bc532ed04136fabd010ae3dc9de0ca0a16356be791560e2c4",
"69da0c7b1b9d54ace4a84b500a1610e761e55f155969442d6d036c86e9dda8a7",
"9d50bbe6c3d2c074d58f00070225c31407b915676e1ce3e0444bb91f28d22da5",
"97e75ffef474b8ab8c76a1e1bc45e7109b0e6e7490855038962a31201ab90ea9",
"337990bab316ba6e9734da46297105bb264d8438e78911cca15df1e3908f7fe8",
"9c5cb8e8bf35de705bab1f2329e2cc653a7a37145d9c1b1288eae88cd58935b6",
"115c56bf662a21341271f3b77c329371fec640dcec1362d91311e4ac1f11c3b5",
"7d0e3138abd6b510e74fd2cec5ff61ddb6b77ad5c3b0346fcc55b49adf8fa34f",
"efb350839cbe0074f799a28ec76513c32e2cb1adc85ceba527859ec36b1b5fb5",
"8e619459168a1edc8de86d29cb557388d89cdebefae1d001ba394079a7622511",
"520ef84a66bd87e460debab9b53c2412e993815a775e34856b8309fd7348fbf7",
"175184977cf02e59af9674a24a2f2b0d8278bf886f9f7e05ef8878b5364dc3bb",
"56b6376f16c77f9726d63a3d6c2ffcb75d9fe2eddc4bfd21b2b212cbd6832b8c",
"3f497e9b62365781f1b9e16e678580528449feef82022d74d0c33af8da963aec",
"b5459c7e5f6e665cdb35b629c683acbf62bcc713dda63f21de5b8fa226d55e75",
"e08569d34baf5c546c9a19c5e6d0b5993f196f41e5eaebb10e54c71b591092bc",
"39985fd1f06f7d4f0aba0c7d524fd4d53de03794a3bc916fd229d7a979027406",
"834b0fce44e8db2367967f8d5262a0dafe45e7c5bd69c98f1a9eeec2136dcbc1",
"9bd1df47bf2036f85677bb974709e939fdb7f8c832c73c01a965fcc7b69288ba",
"81b2de53b31f5848410a94ca09fee9729b2ccbb852c6546edf52606efc523823") and
not _arraysearch(process.thread.Ext.call_stack_final_user_module.code_signature, $entry,
$entry.trusted == true and $entry.subject_name in ("Carbon Black, Inc.", "MUSARUBRA US LLC", "Microsoft Windows Hardware Compatibility Publisher", "Kaspersky Lab JSC"))
'''
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 ("VirtualProtect", "VirtualProtectEx") and
process.Ext.api.behaviors == "allocate_shellcode" and
process.Ext.api.parameters.protection == "R-X" and process.Ext.api.parameters.protection_old == "RW-" and
process.Ext.api.metadata.target_address_name == "Unbacked" and process.Ext.token.integrity_level_name != "low" and process.Ext.api.parameters.size > 6 and
process.thread.Ext.call_stack_final_user_module.hash.sha256 != null and
_arraysearch(process.thread.Ext.call_stack_final_user_module.code_signature, $entry, $entry.trusted == false or $entry.exists == false) and
not (process.thread.Ext.call_stack_final_user_module.name == "Unbacked" and
process.thread.Ext.call_stack_final_user_module.protection_provenance like ("Unknown*", "Undetermined*", "system.core.ni.dll")) and
not _arraysearch(process.thread.Ext.call_stack, $entry, $entry.protection_provenance like ("Kernel", "Kernel|*")) and
not process.thread.Ext.call_stack_final_user_module.protection_provenance == "Kernel" and
not _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info:
("c:\\windows\\sys?????\\kernelbase.dll!LoadLibrary*",
"c:\\windows\\sys?????\\ntdll.dll!LdrLoadDll*",
"c:\\windows\\sys?????\\ntdll.dll!RtlpCreateProcessRegistryInfo*",
"c:\\windows\\syswow64\\ntdll.dll!RtlInitializeExceptionChain*")) and
not process.thread.Ext.call_stack_final_user_module.protection_provenance_path like
("?:\\program files\\*", "?:\\program files (x86)\\*",
"?:\\windows\\microsoft.net\\framework\\v*\\temporary asp.net files\\*.dll",
"c:\\windows\\assembly\\nativeimages*.ni.dll") and
not process.thread.Ext.call_stack_final_user_module.hash.sha256 in
("da9f98de697f863e5351b86289b21de70e61a74d7533ee97bc08dd42c6972a91",
"bbff088a88a0a754dc9d312e52ef7e60dd93537d78d73f79c89aa5b5091457fc",
"6db01eb9b17b85c5b4de9f888060c0ea96d03bd6da195b0ba1b990700c9d23f7",
"34e6d971c034222a417995d8e1e8fdd9f8781795c9c289bd86c499a439f34c88",
"0696e0617a028101d85db50a4f109fac15be3e1ebe122b94f805763d8008ddfc",
"fee37bdeecc597ad9e0f13264e9ac12df3ad41f8d76a41da6e38349ed66ab35e",
"c434208894f07f604b852f29b8edc3a58c4de63de783373733e72b2b73f33be9",
"3cd00f456f51829eda119e0e133acc1e45a5930d61fc335a2e9aa688a836a24d",
"9ac13f9bc5564fd8a1eab5f7c945dce1c27940dd63a913108eac64481ddde6af",
"5438c19007ad96da0a969c0c0caaf00aa06375f1a6e85073f91a1392af94d059",
"dfee8783677d5661c873d1dd3b0fabb5ad6cc7c9638cb9390f728b0a4ac14574",
"704bc9a084989871a567abc638aec57b3c6514ef1e31ceacd0fb347551a7aaf4",
"a844247b7cdcac1a5f61c604e4db111b274616c0eb19a70cdfb073c8c2f3b375",
"1d2ccc2e25e1b645f63dfe93d191aa9fe1b14fa0296f922ae467766c1c64d633",
"93f53280052d0f700259b42a62f8658d9b2a741b54063f277e9b83264448fb21",
"de38e935cf249af5669d57ef9670ba4b9f324774fae9fd9cceb37b238305a155",
"a8448fdad13341552eddecdbef4225015aa9940abe47d52d358a36f7bae57cc1",
"33eaea61f37f63d950de5a3ab6708d832e6d2fa9375d9e721d8278237702d5b7",
"67766e574baa86eb8317623acc2957e8e28944bb801a8c10a0fa9d29fdb4cfd3",
"518c87f58a6c4d9826e9ef8fbb7f4213882fa70822675610d45aea2464502a57",
"cbbc5dab18edc344d05c01d4d08819fbc0a68a78741956831752986009b69e16",
"a0d9f666f5e253031b5364c955c120b6b917749645b9e97bd8cc324597d450d4",
"b0968a364408aad11a33343cb9fdf66b994dbd251cc64237f8894d66efe96f19",
"3b03f447beade5d3c5ef56b2fc3d43215466f8757ce0d3ce7dd3c2afa8a73541",
"929cbeec5ba36a2e42080d31dfe7297fb1a0f4239060004283639182a8e62c74",
"fa0b17d4c411a5011e094154e7f1bbd2e9237448df8a2b27e321bd1b2a3ab3f1",
"5231df995d71991ee4108937bb12e4d3f344a96fb0c4cd82c14e18061d6c4730",
"4ad4ff7561647775372cafe7c52ba85d610dbc901a45f1a576764dfa11a9fa7a",
"b3012d6bb5dd8e91932d92808ea86363709148173096fe49181718c1890814cf",
"79dafa6bf1054b901448a76f7f441d4c458f5eb2b6e9ab87e39632fb313c0d84",
"891113b49c9876f9e46d445ff0534e48573e0e518d53b7161a381664df32ba77",
"e2818bd313264a3086cdc2b8719d101bca6fc7de60058a12add40597cbb86691",
"e9900d7fe38d9dc0a8438ac9ca79aba24403136c6c415028c223f13d97fb844d",
"ffb16922d5db2b348ec146cf7b737c63ea22aa74604017d8cd5c53a1cb1e4f8f",
"d5d17575f4bec6ab674a9cac56fba5fd696576f23fc1b22e32629bcafba92ad3",
"667e71f17a13ac8140fcfad2cc1e3485ef9ea9fb2c9d9bda305347d4c92df7b2",
"6d72df875440edd9216e2e3f0fb500776064a6f2e412f8d118e410760dff3685",
"02f9581f9b917ac8535bce97462ad587608fd42227eae4d8ee54ab7a4bf742fd",
"852c5f7920c409c8736d6deaab4df397d5d3ff121764a9d8cf125b12dd5b08db",
"7e22ce3aff89b105e5d3cbb793ea2aa9daeb45dfb888ec2bea3f9571b1b90c2b",
"5181e6b10dd813812eb827884b62221a96f065ede5f2a6ac2bca251f3557f204",
"fe204b15ca9d02b89e4fbb5adc308e59005c2f998864e92ec68ba3982af241f6",
"6a31d5d8358cd60014233b39f33f2dda2cf6cc5c4883ba1501dc37644d2b51b4",
"778bdf088806162198b71dde1c0009b051c8433127c12fab3f8d9ac86c6f14ac",
"2be574f0197236b43260253d5c805097817d563b18ec08aa832d3d0d79bab4eb",
"2437b4361fade61d1c8ae7c9faa6a8b22223e65a58480227d0ec55a383dc486d",
"e1eb85821ebc1cdb879fbaa564c9d0a416aa7d4cb27fe8f4831c3956775c754c",
"b3d665fa5452b58a2238f57188aa9310a01a1e3c2b884269c2bccb0bdadabd41",
"4b0e2b9fb85295f5f587c2f96d697918e2a9cbd95813be9c764f8d8c19270c65",
"0738dc614d751b3b08125c03a920fc243a3e5eea4f16d3374d8d94a6e2454477",
"e3868e9daf4d9e34bf5b2f48bf5cab45e9b88e39cea578edb01cd96607eecf09",
"67445d47d7e70e7b0f94b752f027e04a5453b5b14ea56c433660b27d016a734d",
"3ec7799d1f23fc6c0beea6f237f801dbdd59aac6faa7a22ecf88ba54c8fc9a80",
"98472d7cc481f1676c44d37ba5c5db1fbb146c68ae1b63e4d2ea32dd3c5dff90",
"b18aa0c98922563f5996fb0497446873f7030d0511ffb77388ea882b4f98a924",
"86699ebbcdbee712a4b798391b178a19ec18e0631bbc74875eda70af21b1da7e",
"a1f5b87881b64b7d097cd3744bbbfa24f8de5234bd043e95f5db28eadbf6ad60",
"fdf036edcd2fc6997a6eeaac4b58e4b533cd6abdf15d18a53621832bff038be0",
"b75574da0d5e59643b8ac7f1ea9116e66bc0f49c6b212be000e0c65af9716911",
"925a5cd982933bae1b271e1aaaa887ab469397701cd299f4397ddd8af5a351f9",
"2f3b9ba5b769c89297c10c77f50223e9e88737dd3fe56e8c00adeeaa198480f9",
"f8be5cbbef29cfb2661604038bbf723208c1165f17dcde9aa593625d3458ad7d",
"e8113d5be9eb19792f01d626575d16c37a28269ce9f8fb98d0afe7ea39675ed1",
"83fecf04fc83a08c78e4f5faad39c4b4ecb806c2b777c58998bfc9ea560f17ca",
"1f06d8866101bed3e5af595fabc9ed41e93d12f9c02209c4619003ece1430768",
"2ab8f2956117b2acad644c8107156121e4d53cbe98e726a658a1d01aa36b6630",
"f56ef8b0727c54961b669c99649f67c7f13233869be9df0f9adb2cb95aabbe87",
"3dbfd72f65c6e84dc177d45fdff3b9d3ea37f769862dcb80fdd148d44d849396",
"c547ad0c67524371f40db48c998db222f3b75cef21109c62aea28227df8a6f2c",
"a543689f34083f810e0184ec77d8ee9e57d44ebd6212af444853a3a89a3c82c0",
"d606d6c6bd562e78e9581b6bf7c01966a753f24fe0583c48fb121cd36a6a6288",
"98615f765e8337555c77db1bf920adbbdf2313e6a190fa21c9d98f78533a5386",
"608da95c6dae5de21b2135701365e18d3de173d3f0fd9753812afe6a5b13fa05",
"10f3e16e8428f3d411f099fc4ff6e5b6f3ece29a0fc8fc606e7148e2f9bfc84b",
"5387f214041b5e4bc532ed04136fabd010ae3dc9de0ca0a16356be791560e2c4",
"69da0c7b1b9d54ace4a84b500a1610e761e55f155969442d6d036c86e9dda8a7",
"9d50bbe6c3d2c074d58f00070225c31407b915676e1ce3e0444bb91f28d22da5",
"97e75ffef474b8ab8c76a1e1bc45e7109b0e6e7490855038962a31201ab90ea9",
"337990bab316ba6e9734da46297105bb264d8438e78911cca15df1e3908f7fe8",
"9c5cb8e8bf35de705bab1f2329e2cc653a7a37145d9c1b1288eae88cd58935b6",
"115c56bf662a21341271f3b77c329371fec640dcec1362d91311e4ac1f11c3b5",
"7d0e3138abd6b510e74fd2cec5ff61ddb6b77ad5c3b0346fcc55b49adf8fa34f",
"efb350839cbe0074f799a28ec76513c32e2cb1adc85ceba527859ec36b1b5fb5",
"8e619459168a1edc8de86d29cb557388d89cdebefae1d001ba394079a7622511",
"520ef84a66bd87e460debab9b53c2412e993815a775e34856b8309fd7348fbf7",
"175184977cf02e59af9674a24a2f2b0d8278bf886f9f7e05ef8878b5364dc3bb",
"56b6376f16c77f9726d63a3d6c2ffcb75d9fe2eddc4bfd21b2b212cbd6832b8c",
"3f497e9b62365781f1b9e16e678580528449feef82022d74d0c33af8da963aec",
"b5459c7e5f6e665cdb35b629c683acbf62bcc713dda63f21de5b8fa226d55e75",
"e08569d34baf5c546c9a19c5e6d0b5993f196f41e5eaebb10e54c71b591092bc",
"39985fd1f06f7d4f0aba0c7d524fd4d53de03794a3bc916fd229d7a979027406",
"834b0fce44e8db2367967f8d5262a0dafe45e7c5bd69c98f1a9eeec2136dcbc1",
"9bd1df47bf2036f85677bb974709e939fdb7f8c832c73c01a965fcc7b69288ba",
"81b2de53b31f5848410a94ca09fee9729b2ccbb852c6546edf52606efc523823") and
not _arraysearch(process.thread.Ext.call_stack_final_user_module.code_signature, $entry,
$entry.trusted == true and $entry.subject_name in ("Carbon Black, Inc.", "MUSARUBRA US LLC", "Microsoft Windows Hardware Compatibility Publisher", "Kaspersky Lab JSC"))
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_final_user_module.code_signature | array_any | excludes:process.thread.Ext.call_stack_final_user_module.code_signature | |
process.thread.Ext.call_stack | array_any | excludes:process.thread.Ext.call_stack | |
process.thread.Ext.call_stack_final_user_module.name | eq | Unbacked | excludes:process.thread.Ext.call_stack_final_user_module.name field:"process.thread.Ext.call_stack_final_user_module.name" value:"Unbacked" |
process.thread.Ext.call_stack_final_user_module.protection_provenance | wildcard | Unknown*, Undetermined*, system.core.ni.dll | excludes:process.thread.Ext.call_stack_final_user_module.protection_provenance field:"process.thread.Ext.call_stack_final_user_module.protection_provenance" value:"Unknown*" field:"process.thread.Ext.call_stack_final_user_module.protection_provenance" value:"Undetermined*" field:"process.thread.Ext.call_stack_final_user_module.protection_provenance" value:"system.core.ni.dll" |
process.thread.Ext.call_stack_final_user_module.hash.sha256 | in | 02f9581f9b917ac8535bce97462ad587608fd42227eae4d8ee54ab7a4bf742fd, 0696e0617a028101d85db50a4f109fac15be3e1ebe122b94f805763d8008ddfc, 0738dc614d751b3b08125c03a920fc243a3e5eea4f16d3374d8d94a6e2454477, 10f3e16e8428f3d411f099fc4ff6e5b6f3ece29a0fc8fc606e7148e2f9bfc84b, 115c56bf662a21341271f3b77c329371fec640dcec1362d91311e4ac1f11c3b5, 175184977cf02e59af9674a24a2f2b0d8278bf886f9f7e05ef8878b5364dc3bb, 1d2ccc2e25e1b645f63dfe93d191aa9fe1b14fa0296f922ae467766c1c64d633, 1f06d8866101bed3e5af595fabc9ed41e93d12f9c02209c4619003ece1430768, 2437b4361fade61d1c8ae7c9faa6a8b22223e65a58480227d0ec55a383dc486d, 2ab8f2956117b2acad644c8107156121e4d53cbe98e726a658a1d01aa36b6630, 2be574f0197236b43260253d5c805097817d563b18ec08aa832d3d0d79bab4eb, 2f3b9ba5b769c89297c10c77f50223e9e88737dd3fe56e8c00adeeaa198480f9, 337990bab316ba6e9734da46297105bb264d8438e78911cca15df1e3908f7fe8, 33eaea61f37f63d950de5a3ab6708d832e6d2fa9375d9e721d8278237702d5b7, 34e6d971c034222a417995d8e1e8fdd9f8781795c9c289bd86c499a439f34c88, 39985fd1f06f7d4f0aba0c7d524fd4d53de03794a3bc916fd229d7a979027406, 3b03f447beade5d3c5ef56b2fc3d43215466f8757ce0d3ce7dd3c2afa8a73541, 3cd00f456f51829eda119e0e133acc1e45a5930d61fc335a2e9aa688a836a24d, 3dbfd72f65c6e84dc177d45fdff3b9d3ea37f769862dcb80fdd148d44d849396, 3ec7799d1f23fc6c0beea6f237f801dbdd59aac6faa7a22ecf88ba54c8fc9a80, 3f497e9b62365781f1b9e16e678580528449feef82022d74d0c33af8da963aec, 4ad4ff7561647775372cafe7c52ba85d610dbc901a45f1a576764dfa11a9fa7a, 4b0e2b9fb85295f5f587c2f96d697918e2a9cbd95813be9c764f8d8c19270c65, 5181e6b10dd813812eb827884b62221a96f065ede5f2a6ac2bca251f3557f204, 518c87f58a6c4d9826e9ef8fbb7f4213882fa70822675610d45aea2464502a57, 520ef84a66bd87e460debab9b53c2412e993815a775e34856b8309fd7348fbf7, 5231df995d71991ee4108937bb12e4d3f344a96fb0c4cd82c14e18061d6c4730, 5387f214041b5e4bc532ed04136fabd010ae3dc9de0ca0a16356be791560e2c4, 5438c19007ad96da0a969c0c0caaf00aa06375f1a6e85073f91a1392af94d059, 56b6376f16c77f9726d63a3d6c2ffcb75d9fe2eddc4bfd21b2b212cbd6832b8c, 608da95c6dae5de21b2135701365e18d3de173d3f0fd9753812afe6a5b13fa05, 667e71f17a13ac8140fcfad2cc1e3485ef9ea9fb2c9d9bda305347d4c92df7b2, 67445d47d7e70e7b0f94b752f027e04a5453b5b14ea56c433660b27d016a734d, 67766e574baa86eb8317623acc2957e8e28944bb801a8c10a0fa9d29fdb4cfd3, 69da0c7b1b9d54ace4a84b500a1610e761e55f155969442d6d036c86e9dda8a7, 6a31d5d8358cd60014233b39f33f2dda2cf6cc5c4883ba1501dc37644d2b51b4, 6d72df875440edd9216e2e3f0fb500776064a6f2e412f8d118e410760dff3685, 6db01eb9b17b85c5b4de9f888060c0ea96d03bd6da195b0ba1b990700c9d23f7, 704bc9a084989871a567abc638aec57b3c6514ef1e31ceacd0fb347551a7aaf4, 778bdf088806162198b71dde1c0009b051c8433127c12fab3f8d9ac86c6f14ac, 79dafa6bf1054b901448a76f7f441d4c458f5eb2b6e9ab87e39632fb313c0d84, 7d0e3138abd6b510e74fd2cec5ff61ddb6b77ad5c3b0346fcc55b49adf8fa34f, 7e22ce3aff89b105e5d3cbb793ea2aa9daeb45dfb888ec2bea3f9571b1b90c2b, 81b2de53b31f5848410a94ca09fee9729b2ccbb852c6546edf52606efc523823, 834b0fce44e8db2367967f8d5262a0dafe45e7c5bd69c98f1a9eeec2136dcbc1, 83fecf04fc83a08c78e4f5faad39c4b4ecb806c2b777c58998bfc9ea560f17ca, 852c5f7920c409c8736d6deaab4df397d5d3ff121764a9d8cf125b12dd5b08db, 86699ebbcdbee712a4b798391b178a19ec18e0631bbc74875eda70af21b1da7e, 891113b49c9876f9e46d445ff0534e48573e0e518d53b7161a381664df32ba77, 8e619459168a1edc8de86d29cb557388d89cdebefae1d001ba394079a7622511, 925a5cd982933bae1b271e1aaaa887ab469397701cd299f4397ddd8af5a351f9, 929cbeec5ba36a2e42080d31dfe7297fb1a0f4239060004283639182a8e62c74, 93f53280052d0f700259b42a62f8658d9b2a741b54063f277e9b83264448fb21, 97e75ffef474b8ab8c76a1e1bc45e7109b0e6e7490855038962a31201ab90ea9, 98472d7cc481f1676c44d37ba5c5db1fbb146c68ae1b63e4d2ea32dd3c5dff90, 98615f765e8337555c77db1bf920adbbdf2313e6a190fa21c9d98f78533a5386, 9ac13f9bc5564fd8a1eab5f7c945dce1c27940dd63a913108eac64481ddde6af, 9bd1df47bf2036f85677bb974709e939fdb7f8c832c73c01a965fcc7b69288ba, 9c5cb8e8bf35de705bab1f2329e2cc653a7a37145d9c1b1288eae88cd58935b6, 9d50bbe6c3d2c074d58f00070225c31407b915676e1ce3e0444bb91f28d22da5, a0d9f666f5e253031b5364c955c120b6b917749645b9e97bd8cc324597d450d4, a1f5b87881b64b7d097cd3744bbbfa24f8de5234bd043e95f5db28eadbf6ad60, a543689f34083f810e0184ec77d8ee9e57d44ebd6212af444853a3a89a3c82c0, a844247b7cdcac1a5f61c604e4db111b274616c0eb19a70cdfb073c8c2f3b375, a8448fdad13341552eddecdbef4225015aa9940abe47d52d358a36f7bae57cc1, b0968a364408aad11a33343cb9fdf66b994dbd251cc64237f8894d66efe96f19, b18aa0c98922563f5996fb0497446873f7030d0511ffb77388ea882b4f98a924, b3012d6bb5dd8e91932d92808ea86363709148173096fe49181718c1890814cf, b3d665fa5452b58a2238f57188aa9310a01a1e3c2b884269c2bccb0bdadabd41, b5459c7e5f6e665cdb35b629c683acbf62bcc713dda63f21de5b8fa226d55e75, b75574da0d5e59643b8ac7f1ea9116e66bc0f49c6b212be000e0c65af9716911, bbff088a88a0a754dc9d312e52ef7e60dd93537d78d73f79c89aa5b5091457fc, c434208894f07f604b852f29b8edc3a58c4de63de783373733e72b2b73f33be9, c547ad0c67524371f40db48c998db222f3b75cef21109c62aea28227df8a6f2c, cbbc5dab18edc344d05c01d4d08819fbc0a68a78741956831752986009b69e16, d5d17575f4bec6ab674a9cac56fba5fd696576f23fc1b22e32629bcafba92ad3, d606d6c6bd562e78e9581b6bf7c01966a753f24fe0583c48fb121cd36a6a6288, da9f98de697f863e5351b86289b21de70e61a74d7533ee97bc08dd42c6972a91, de38e935cf249af5669d57ef9670ba4b9f324774fae9fd9cceb37b238305a155, dfee8783677d5661c873d1dd3b0fabb5ad6cc7c9638cb9390f728b0a4ac14574, e08569d34baf5c546c9a19c5e6d0b5993f196f41e5eaebb10e54c71b591092bc, e1eb85821ebc1cdb879fbaa564c9d0a416aa7d4cb27fe8f4831c3956775c754c, e2818bd313264a3086cdc2b8719d101bca6fc7de60058a12add40597cbb86691, e3868e9daf4d9e34bf5b2f48bf5cab45e9b88e39cea578edb01cd96607eecf09, e8113d5be9eb19792f01d626575d16c37a28269ce9f8fb98d0afe7ea39675ed1, e9900d7fe38d9dc0a8438ac9ca79aba24403136c6c415028c223f13d97fb844d, efb350839cbe0074f799a28ec76513c32e2cb1adc85ceba527859ec36b1b5fb5, f56ef8b0727c54961b669c99649f67c7f13233869be9df0f9adb2cb95aabbe87, f8be5cbbef29cfb2661604038bbf723208c1165f17dcde9aa593625d3458ad7d, fa0b17d4c411a5011e094154e7f1bbd2e9237448df8a2b27e321bd1b2a3ab3f1, fdf036edcd2fc6997a6eeaac4b58e4b533cd6abdf15d18a53621832bff038be0, fe204b15ca9d02b89e4fbb5adc308e59005c2f998864e92ec68ba3982af241f6, fee37bdeecc597ad9e0f13264e9ac12df3ad41f8d76a41da6e38349ed66ab35e, ffb16922d5db2b348ec146cf7b737c63ea22aa74604017d8cd5c53a1cb1e4f8f | excludes:process.thread.Ext.call_stack_final_user_module.hash.sha256 |
process.thread.Ext.call_stack_final_user_module.protection_provenance | eq | Kernel | excludes:process.thread.Ext.call_stack_final_user_module.protection_provenance field:"process.thread.Ext.call_stack_final_user_module.protection_provenance" value:"Kernel" |
process.thread.Ext.call_stack_final_user_module.protection_provenance_path | wildcard | ?:\program files\*, ?:\program files (x86)\*, ?:\windows\microsoft.net\framework\v*\temporary asp.net files\*.dll, c:\windows\assembly\nativeimages*.ni.dll | excludes:process.thread.Ext.call_stack_final_user_module.protection_provenance_path |
Suspicious Microsoft HTML Application Child Process
#Identifies Mshta.exe spawning a suspicious child process. This may indicate adversarial activity, as Mshta is often leveraged by adversaries to execute malicious scripts and evade detection.
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 = "2025/08/19"
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
maturity = "production"
updated_date = "2026/04/29"
[rule]
author = ["Elastic"]
description = """
Identifies Mshta.exe spawning a suspicious child process. This may indicate adversarial activity, as Mshta is often
leveraged by adversaries to execute malicious scripts and evade detection.
"""
from = "now-9m"
index = [
"endgame-*",
"logs-crowdstrike.fdr*",
"logs-endpoint.events.process-*",
"logs-m365_defender.event-*",
"logs-sentinel_one_cloud_funnel.*",
"logs-system.security*",
"logs-windows.forwarded*",
"logs-windows.sysmon_operational-*",
"winlogbeat-*",
]
language = "eql"
license = "Elastic License v2"
name = "Suspicious Microsoft HTML Application Child Process"
references = [
"https://lolbas-project.github.io/lolbas/Binaries/Mshta/",
]
risk_score = 73
rule_id = "48e60a73-08e8-42aa-8f51-4ed92c64dbea"
severity = "high"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Defense Evasion",
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Windows Security Event Logs",
"Data Source: Microsoft Defender XDR",
"Data Source: Sysmon",
"Data Source: SentinelOne",
"Data Source: Crowdstrike",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "windows" and event.type == "start" and
process.parent.name : "mshta.exe" and process.command_line != null and
(
process.name : (
"cmd.exe", "powershell.exe", "certutil.exe", "bitsadmin.exe", "curl.exe", "msiexec.exe",
"schtasks.exe", "reg.exe", "wscript.exe", "rundll32.exe"
) or
process.executable : ("C:\\Users\\*\\*.exe", "\\Device\\HarddiskVolume*\\Users\\*\\*.exe")
) and
not (process.name : "cmd.exe" and process.command_line : "*\\HP\\HP*HPUDC*") and
not ?process.parent.command_line : "*\\HP\\*\\HPSolutionsPortal.hta*"
'''
note = """## Triage and analysis
### Investigating Suspicious Microsoft HTML Application Child Process
#### Possible investigation steps
- What did mshta broker into the child process?
- Focus: `process.name`, `process.executable`, `process.command_line`, and `process.parent.command_line`, separating interpreters, script engines, transfer tools, installers, persistence utilities, DLL proxy loaders, and user-profile binaries; for transfer, installer, or user-profile children, recover same-child file and network/DNS events. $investigate_0 $investigate_1
- Implication: treat download, staging, persistence, scripting, or arbitrary user-space execution as high-risk proxy execution; narrow only when child arguments and mshta command line identify one recognized HTA-driven deployment, enrollment, support, or internal-portal flow. Missing file, network, or DNS telemetry is unresolved, not benign.
- Is the child binary identity consistent with its claimed role?
- Focus: `process.executable`, `process.hash.sha256`, `process.pe.original_file_name`, `process.code_signature.subject_name`, and `process.code_signature.trusted`.
- Implication: renamed, unsigned/untrusted, user-writable, newly seen, or PE-mismatched children strengthen proxy-execution; a trusted signer identifies the binary but does not clear the mshta chain.
- What source did mshta execute?
- Focus: `process.parent.executable`, `process.parent.command_line`, `process.parent.code_signature.subject_name`, and `process.parent.code_signature.trusted`, checking expected System32/SysWOW64 mshta plus inline "vbscript:"/"javascript:", "script:" monikers, remote URLs, ADS syntax, UNC paths, temp/downloads, or "INetCache" sources.
- Implication: inline scriptlets, remote/ADS-backed content, user-writable sources, obfuscation, or unexpected signer/path make mshta the likely delivery mechanism; internal HTAs, vendor packages, or deployment sources must still match the child workflow.
- What process launched mshta?
- Why: recovering the mshta start event shows whether a browser, document, archive tool, installer, or management process initiated the chain.
- Focus: process-start events on `host.id` where recovered `process.entity_id` equals alert `process.parent.entity_id`; if absent, use `host.id`, `process.parent.pid`, and a tight alert window, then inspect recovered `process.parent.executable` and `process.parent.command_line`. $investigate_2
- Implication: Office, browser, archive, chat, script-host, or unexpected-service launchers indicate delivery or user-execution risk; software-distribution, support, enrollment, or portal launchers explain the chain only when they start the same flow on the same host cohort.
- Did the same mshta instance launch more suspicious children?
- Focus: process-start events on `host.id` where `process.parent.entity_id` matches alert `process.parent.entity_id`; fall back to `host.id`, `process.parent.pid`, and a tight alert window; inspect child `process.name`, `process.executable`, and `process.command_line`. $investigate_3
- Implication: same-instance fan-out into shells, transfer tools, schedulers, configuration changes, script hosts, or multiple user-space binaries widens response beyond one child; a single child stays narrow only if it matches the recovered benign workflow.
- Does the user, session, and host cohort fit that workflow?
- Focus: `user.id`, `host.name`, `process.Ext.session_info.logon_type`, and recovered launcher `process.parent.executable`, using `host.id` as the stable host anchor.
- Implication: standard-user, shared-workstation, unusual remote/service-session, or non-management-host context raises priority without matching workflow history; cohort fit is reassuring only when session type and launcher match the deployment, support, enrollment, or portal pattern.
- If local evidence is suspicious or unresolved, does alert history show broader proxy execution?
- Focus: related alerts for `user.id` in 48 hours where the same child `process.executable` or mshta command pattern (`process.command_line`, `process.parent.command_line`) recurs in proxy-execution alerts. $investigate_4
- Hint: if the user view is quiet or ambiguous, compare related alerts for `host.id` in 48 hours; quiet history does not clear unresolved local evidence. $investigate_5
- Implication: escalate scope when the same delivery path or child-command pattern recurs across proxy-execution alerts; stay local only when the chain is resolved and related history fits the same recognized workflow.
- Escalate on suspicious child intent, identity mismatch, inline/remote/ADS mshta source, abnormal launcher, same-mshta fan-out, or broader proxy-execution history; close only when process evidence binds one exact recognized workflow on this host and no contradictions remain; preserve the process tree and escalate mixed or incomplete evidence.
### False positive analysis
- HP printer software (HPSolutionsPortal.hta) uses mshta to run a vendor portal that spawns cmd.exe for UDC telemetry cleanup and rundll32.exe for printui operations. The rule excludes the UDC cmd.exe pattern cross-source and the parent HTA path when `process.parent.command_line` is available. On sources without parent command_line (CrowdStrike, SecurityLog), these alerts still fire; confirm by matching `process.command_line` to HP ProgramData paths or printui.dll printer-name arguments before closing.
- Treat software distribution, device enrollment, remote support, or internal HTA portals as benign candidates only after process telemetry proves the same chain. Confirm child `process.executable`, `process.command_line`, `process.hash.sha256`, signer, mshta `process.parent.command_line`, recovered launcher executable/command line, and `user.id` plus `host.id` cohort. Use change records, support tickets, asset-role inventories, or prior alerts only as corroboration; never close unresolved local process evidence on recurrence or workflow labels alone.
- Do not close on partial matches. Inline scriptlets, remote URLs, ADS syntax, user-profile child executables, unexpected launchers, or same-mshta fan-out contradict a benign HTA workflow unless process telemetry and outside confirmation verify that exact activity.
- Build exceptions from the minimum confirmed pattern: recovered launcher `process.parent.executable`, mshta `process.parent.command_line`, child `process.executable` plus `process.command_line`, and stable `user.id` or `host.id` cohort. Avoid exceptions on mshta alone, `process.name` alone, or `user.name` alone.
### Response and remediation
- If confirmed benign, record the child `process.command_line`, mshta `process.parent.command_line`, recovered launcher `process.parent.executable`, `user.id`, and `host.id` evidence that validated the workflow, then reverse temporary containment. Create an exception only for that narrow process pattern, using prior alerts as stability evidence when available.
- If suspicious but unconfirmed, preserve the alert record, process tree, child `process.entity_id`, alert `process.parent.entity_id`, child and mshta command lines, child `process.hash.sha256`, signer evidence, recovered launcher, `process.Ext.session_info.logon_type`, and related-alert results before containment. Apply reversible controls first, such as blocking the exact HTA URL or share visible in `process.parent.command_line`, restricting the child hash or path, or increasing monitoring on the affected `host.id` and `user.id`.
- If confirmed malicious, isolate the host or terminate the mshta/child process only after recording the child and mshta entity IDs, command lines, launcher, hash, signer, user, and host evidence. If endpoint response is unavailable, hand off that preserved evidence to the team that can contain the endpoint or affected account.
- After containment, block confirmed malicious child hashes, child executable paths, and exact mshta command-line sources, then remove only scripts, binaries, scheduled tasks, or persistence changes proven to belong to this chain. Remediate the delivery vector that started mshta, such as browser download, attachment, archive extraction, remote share, software package, or compromised management workflow.
- Post-incident hardening: restrict mshta use for users and hosts that do not need HTA execution, package legitimate HTA workflows through signed deployment tooling, and record adjacent variants such as inline "vbscript:" / "javascript:", remote "script:" monikers, ADS-backed HTAs, and INetCache retrievals for future triage.
"""
setup = """## Setup
This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
Setup instructions: https://ela.st/install-elastic-defend
### Additional data sources
This rule also supports the following third-party data sources. For setup instructions, refer to the links below:
- [CrowdStrike](https://ela.st/crowdstrike-integration)
- [Microsoft Defender XDR](https://ela.st/m365-defender)
- [SentinelOne Cloud Funnel](https://ela.st/sentinel-one-cloud-funnel)
- [Sysmon Event ID 1 - Process Creation](https://ela.st/sysmon-event-1-setup)
- [Windows Process Creation Logs](https://ela.st/audit-process-creation)
"""
[rule.investigation_fields]
field_names = [
"@timestamp",
"host.name",
"host.id",
"user.name",
"user.id",
"process.entity_id",
"process.pid",
"process.executable",
"process.command_line",
"process.Ext.session_info.logon_type",
"process.pe.original_file_name",
"process.hash.sha256",
"process.code_signature.trusted",
"process.parent.entity_id",
"process.parent.command_line",
]
[transform]
[[transform.investigate]]
label = "File events for the child process"
description = ""
providers = [
[
{ excluded = false, field = "event.category", queryType = "phrase", value = "file", valueType = "string" },
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.entity_id}}", valueType = "string" }
]
]
relativeFrom = "now-1h"
relativeTo = "now"
[[transform.investigate]]
label = "Network and DNS events for the child process"
description = ""
providers = [
[
{ excluded = false, field = "event.category", queryType = "phrase", value = "network", valueType = "string" },
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.entity_id}}", valueType = "string" }
],
[
{ excluded = false, field = "event.category", queryType = "phrase", value = "dns", valueType = "string" },
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.entity_id}}", valueType = "string" }
]
]
relativeFrom = "now-1h"
relativeTo = "now"
[[transform.investigate]]
label = "Mshta parent process event"
description = ""
providers = [
[
{ excluded = false, field = "event.category", queryType = "phrase", value = "process", valueType = "string" },
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.parent.entity_id}}", valueType = "string" }
]
]
relativeFrom = "now-1h"
relativeTo = "now"
[[transform.investigate]]
label = "Process events launched by the same mshta instance"
description = ""
providers = [
[
{ excluded = false, field = "event.category", queryType = "phrase", value = "process", valueType = "string" },
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "process.parent.entity_id", queryType = "phrase", value = "{{process.parent.entity_id}}", valueType = "string" }
]
]
relativeFrom = "now-1h"
relativeTo = "now"
[[transform.investigate]]
label = "Alerts associated with the user"
description = ""
providers = [
[
{ excluded = false, field = "event.kind", queryType = "phrase", value = "signal", valueType = "string" },
{ excluded = false, field = "user.id", queryType = "phrase", value = "{{user.id}}", valueType = "string" }
]
]
relativeFrom = "now-48h/h"
relativeTo = "now"
[[transform.investigate]]
label = "Alerts associated with the host"
description = ""
providers = [
[
{ excluded = false, field = "event.kind", queryType = "phrase", value = "signal", valueType = "string" },
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" }
]
]
relativeFrom = "now-48h/h"
relativeTo = "now"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[[rule.threat.technique.subtechnique]]
id = "T1218.005"
name = "Mshta"
reference = "https://attack.mitre.org/techniques/T1218/005/"
[[rule.threat.technique.subtechnique]]
id = "T1218.007"
name = "Msiexec"
reference = "https://attack.mitre.org/techniques/T1218/007/"
[[rule.threat.technique.subtechnique]]
id = "T1218.011"
name = "Rundll32"
reference = "https://attack.mitre.org/techniques/T1218/011/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[rule.threat.technique.subtechnique]]
id = "T1059.001"
name = "PowerShell"
reference = "https://attack.mitre.org/techniques/T1059/001/"
[[rule.threat.technique.subtechnique]]
id = "T1059.003"
name = "Windows Command Shell"
reference = "https://attack.mitre.org/techniques/T1059/003/"
[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
Stages and Predicates
Stage 1: process
process where host.os.type == "windows" and event.type == "start" and
process.parent.name : "mshta.exe" and process.command_line != null and
(
process.name : (
"cmd.exe", "powershell.exe", "certutil.exe", "bitsadmin.exe", "curl.exe", "msiexec.exe",
"schtasks.exe", "reg.exe", "wscript.exe", "rundll32.exe"
) or
process.executable : ("C:\\Users\\*\\*.exe", "\\Device\\HarddiskVolume*\\Users\\*\\*.exe")
) and
not (process.name : "cmd.exe" and process.command_line : "*\\HP\\HP*HPUDC*") and
not ?process.parent.command_line : "*\\HP\\*\\HPSolutionsPortal.hta*"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.command_line | is_not_null | field:"CommandLine" kind:is_not_null | |
process.executable | wildcard |
| field:"Image" kind:wildcard |
process.name | wildcard |
| field:"process_basename" kind:wildcard |
process.parent.name | wildcard |
| field:"parent_process_basename" kind:wildcard value:"mshta.exe" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.command_line | wildcard | *\HP\HP*HPUDC* | excludes:process.command_line field:"process.command_line" value:"*\HP\HP*HPUDC*" |
process.name | eq | cmd.exe | excludes:process.name field:"process.name" value:"cmd.exe" |
process.parent.command_line | wildcard | *\HP\*\HPSolutionsPortal.hta* | excludes:process.parent.command_line field:"process.parent.command_line" value:"*\HP\*\HPSolutionsPortal.hta*" |
Suspicious Okta Agent Cross Process Activity
#Identifies attempt to perform code injection targeting OKTA related agent and service processes.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Rule Body
[rule]
description = "Identifies attempt to perform code injection targeting OKTA related agent and service processes."
id = "137c9bcd-6be7-4a60-9a06-4e22eb70eded"
license = "Elastic License v2"
name = "Suspicious Okta Agent Cross Process Activity"
os_list = ["windows"]
reference = [
"https://www.elastic.co/security-labs/monitoring-okta-threats-with-elastic-security",
"https://www.elastic.co/security-labs/okta-and-lapsus-what-you-need-to-know",
]
version = "1.0.5"
query = '''
api where
process.Ext.api.behaviors : "cross-process" and process.Ext.api.name : ("WriteProcessMemory", "VirtualProtectEx", "ReadProcessMemory") and
process.Ext.api.summary : ("*OktaVerify.exe*", "*OktaAgentService.exe*") and not process.Ext.api.behaviors : "parent-child" and
process.Ext.api.metadata.target_address_name : "?*" and
not process.Ext.api.metadata.target_address_name in ("PEB", "PEB32", "ProcessStartupInfo") and
not process.thread.Ext.call_stack_final_user_module.name : ("Kernel", "Unknown", "Undetermined") and
not (process.code_signature.status : "trusted" and startswith~(process.thread.Ext.call_stack_final_user_module.name, process.name)) and
not _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info: "?:\\windows\\sys*\\kernelbase.dll!CreateProcess*") and
not process.thread.Ext.call_stack_final_user_module.path :
("?:\\Program Files\\*.dll",
"?:\\Program Files (x86)\\*.dll",
"\\Program Files\\*.dll",
"\\Program Files (x86)\\*.dll",
"\\windows\\system32\\*.dll",
"\\windows\\syswow64\\*.dll",
"?:\\windows\\system32\\*.dll",
"?:\\Windows\\SysWOW64\\*.dll",
"?:\\Windows\\FireEye\\AppMonitorDll*.dll*",
"?:\\Windows\\apppatch\\AppPatch*\\exploitblocker.dll*")
'''
min_endpoint_version = "8.10.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "8.10.0"
Stages and Predicates
Stage 1: api
api where
process.Ext.api.behaviors : "cross-process" and process.Ext.api.name : ("WriteProcessMemory", "VirtualProtectEx", "ReadProcessMemory") and
process.Ext.api.summary : ("*OktaVerify.exe*", "*OktaAgentService.exe*") and not process.Ext.api.behaviors : "parent-child" and
process.Ext.api.metadata.target_address_name : "?*" and
not process.Ext.api.metadata.target_address_name in ("PEB", "PEB32", "ProcessStartupInfo") and
not process.thread.Ext.call_stack_final_user_module.name : ("Kernel", "Unknown", "Undetermined") and
not (process.code_signature.status : "trusted" and startswith~(process.thread.Ext.call_stack_final_user_module.name, process.name)) and
not _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info: "?:\\windows\\sys*\\kernelbase.dll!CreateProcess*") and
not process.thread.Ext.call_stack_final_user_module.path :
("?:\\Program Files\\*.dll",
"?:\\Program Files (x86)\\*.dll",
"\\Program Files\\*.dll",
"\\Program Files (x86)\\*.dll",
"\\windows\\system32\\*.dll",
"\\windows\\syswow64\\*.dll",
"?:\\windows\\system32\\*.dll",
"?:\\Windows\\SysWOW64\\*.dll",
"?:\\Windows\\FireEye\\AppMonitorDll*.dll*",
"?:\\Windows\\apppatch\\AppPatch*\\exploitblocker.dll*")
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
process.Ext.api.behaviors | wildcard |
| field:"process.Ext.api.behaviors" kind:wildcard value:"cross-process" |
process.Ext.api.metadata.target_address_name | wildcard |
| field:"process.Ext.api.metadata.target_address_name" kind:wildcard value:"?*" |
process.Ext.api.name | wildcard |
| field:"process.Ext.api.name" kind:wildcard |
process.Ext.api.summary | wildcard |
| field:"process.Ext.api.summary" kind:wildcard |
Exclusions
The rule actively suppresses these predicates.
Suspicious Process Spawned from MOTD Detected
#Message of the day (MOTD) is the message that is presented to the user when a user connects to a Linux server via SSH or a serial connection. Linux systems contain several default MOTD files located in the "/etc/update-motd.d/" and "/usr/lib/update-notifier/" directories. These scripts run as the root user every time a user connects over SSH or a serial connection. Adversaries may create malicious MOTD files that grant them persistence onto the target every time a user connects to the system by executing a backdoor script or command. This rule detects the execution of potentially malicious processes through the MOTD utility.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Rule Body
[rule]
description = """
Message of the day (MOTD) is the message that is presented to the user when a user connects to a Linux server via SSH or
a serial connection. Linux systems contain several default MOTD files located in the "/etc/update-motd.d/" and
"/usr/lib/update-notifier/" directories. These scripts run as the root user every time a user connects over SSH or a
serial connection. Adversaries may create malicious MOTD files that grant them persistence onto the target every time a
user connects to the system by executing a backdoor script or command. This rule detects the execution of potentially
malicious processes through the MOTD utility.
"""
id = "b9b3922a-59ee-407c-8773-31b98bf9b18d"
license = "Elastic License v2"
name = "Suspicious Process Spawned from MOTD Detected"
os_list = ["linux"]
reference = [
"https://pberba.github.io/security/2022/02/06/linux-threat-hunting-for-persistence-initialization-scripts-and-shell-configuration/#10-boot-or-logon-initialization-scripts-motd",
"https://www.elastic.co/security-labs/sequel-on-persistence-mechanisms",
]
version = "1.0.12"
query = '''
process where event.type == "start" and event.action == "exec" and process.parent.executable like "/etc/update-motd.d/*"
and (
(process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and (
(process.args in ("-i", "-l", "-il", "-li")) or (process.parent.name == "socat" and process.parent.args like~ "*exec*"))) or
(process.name in ("nc", "ncat", "netcat", "netcat.openbsd", "netcat.traditional", "nc.openbsd", "nc.traditional") and process.args_count >= 3 and
not process.args like~ ("-*z*", "-*l*")) or
(process.name like "python*" and process.args == "-c" and process.args like~ (
"*import*pty*spawn*", "*import*subprocess*call*"
)) or
(process.name like "perl*" and process.args == "-e" and process.args like~ "*socket*" and process.args like~ (
"*exec*", "*system*"
)) or
(process.name like "ruby*" and process.args in ("-e", "-rsocket") and process.args like~ (
"*TCPSocket.new*", "*TCPSocket.open*"
)) or
(process.name like "lua*" and process.args == "-e" and process.args like~ "*socket.tcp*" and process.args like~ (
"*io.popen*", "*os.execute*"
)) or
(process.name like "php*" and process.args == "-r" and process.args like~ "*fsockopen*" and process.args like~ "*/bin/*sh*") or
(process.name in ("awk", "gawk", "mawk", "nawk") and process.args like~ "*/inet/tcp/*") or
(process.name == "openssl" and process.args like~ ("*s_server*", "*s_client*") and process.args like~ (
"*-connect*", "*:*", "*-port*"
)) or
(process.name == "telnet")
) and
not (process.parent.args : "--force" or process.args : ("/usr/games/lolcat", "/usr/bin/screenfetch"))
'''
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 = "T1037"
name = "Boot or Logon Initialization Scripts"
reference = "https://attack.mitre.org/techniques/T1037/"
[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.type == "start" and event.action == "exec" and process.parent.executable like "/etc/update-motd.d/*"
and (
(process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and (
(process.args in ("-i", "-l", "-il", "-li")) or (process.parent.name == "socat" and process.parent.args like~ "*exec*"))) or
(process.name in ("nc", "ncat", "netcat", "netcat.openbsd", "netcat.traditional", "nc.openbsd", "nc.traditional") and process.args_count >= 3 and
not process.args like~ ("-*z*", "-*l*")) or
(process.name like "python*" and process.args == "-c" and process.args like~ (
"*import*pty*spawn*", "*import*subprocess*call*"
)) or
(process.name like "perl*" and process.args == "-e" and process.args like~ "*socket*" and process.args like~ (
"*exec*", "*system*"
)) or
(process.name like "ruby*" and process.args in ("-e", "-rsocket") and process.args like~ (
"*TCPSocket.new*", "*TCPSocket.open*"
)) or
(process.name like "lua*" and process.args == "-e" and process.args like~ "*socket.tcp*" and process.args like~ (
"*io.popen*", "*os.execute*"
)) or
(process.name like "php*" and process.args == "-r" and process.args like~ "*fsockopen*" and process.args like~ "*/bin/*sh*") or
(process.name in ("awk", "gawk", "mawk", "nawk") and process.args like~ "*/inet/tcp/*") or
(process.name == "openssl" and process.args like~ ("*s_server*", "*s_client*") and process.args like~ (
"*-connect*", "*:*", "*-port*"
)) or
(process.name == "telnet")
) and
not (process.parent.args : "--force" or process.args : ("/usr/games/lolcat", "/usr/bin/screenfetch"))
Indicators
These rows show field, operator, and value matches.
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.args | eq | /usr/games/lolcat, /usr/bin/screenfetch | excludes:process.args field:"process.args" value:"/usr/games/lolcat" field:"process.args" value:"/usr/bin/screenfetch" |
process.parent.args | eq | --force | excludes:process.parent.args field:"process.parent.args" value:"--force" |
Suspicious Utility Launched via ProxyChains
#This rule monitors for the execution of suspicious linux tools through ProxyChains. ProxyChains is a command-line tool that enables the routing of network connections through intermediary proxies, enhancing anonymity and enabling access to restricted resources. Attackers can exploit the ProxyChains utility to hide their true source IP address, evade detection, and perform malicious activities through a chain of proxy servers, potentially masking their identity and intentions.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Rule Body
[metadata]
creation_date = "2023/08/23"
integration = ["endpoint", "auditd_manager", "crowdstrike", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2026/03/24"
[transform]
[[transform.osquery]]
label = "Osquery - Retrieve Listening Ports"
query = "SELECT pid, address, port, socket, protocol, path FROM listening_ports"
[[transform.osquery]]
label = "Osquery - Retrieve Open Sockets"
query = "SELECT pid, family, remote_address, remote_port, socket, state FROM process_open_sockets"
[[transform.osquery]]
label = "Osquery - Retrieve Information for a Specific User"
query = "SELECT * FROM users WHERE username = {{user.name}}"
[[transform.osquery]]
label = "Osquery - Investigate the Account Authentication Status"
query = "SELECT * FROM logged_in_users WHERE user = {{user.name}}"
[[transform.osquery]]
label = "Osquery - Retrieve Running Processes by User"
query = "SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username"
[[transform.osquery]]
label = "Osquery - Retrieve Process Info"
query = "SELECT name, cmdline, parent, path, uid FROM processes"
[rule]
author = ["Elastic"]
description = """
This rule monitors for the execution of suspicious linux tools through ProxyChains. ProxyChains is a command-line tool
that enables the routing of network connections through intermediary proxies, enhancing anonymity and enabling access to
restricted resources. Attackers can exploit the ProxyChains utility to hide their true source IP address, evade
detection, and perform malicious activities through a chain of proxy servers, potentially masking their identity and
intentions.
"""
from = "now-9m"
index = [
"auditbeat-*",
"endgame-*",
"logs-auditd_manager.auditd-*",
"logs-crowdstrike.fdr*",
"logs-endpoint.events.process*",
"logs-sentinel_one_cloud_funnel.*",
]
language = "eql"
license = "Elastic License v2"
name = "Suspicious Utility Launched via ProxyChains"
note = """## Triage and analysis
### Investigating Suspicious Utility Launched via ProxyChains
Attackers can leverage `proxychains` to obfuscate their origin and bypass network defenses by routing their malicious traffic through multiple intermediary servers.
This rule looks for a list of suspicious processes spawned through `proxychains` by analyzing process command line arguments.
> **Note**:
> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/current/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.
> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.
#### Possible investigation steps
- Identify any signs of suspicious network activity or anomalies that may indicate network obfuscation. This could include unexpected traffic patterns or unusual network behavior.
- Investigate listening ports and open sockets to look for potential protocol tunneling, reverse shells, or data exfiltration.
- $osquery_0
- $osquery_1
- Identify the user account that performed the action, analyze it, and check whether it should perform this kind of action.
- $osquery_2
- Investigate whether the user is currently logged in and active.
- $osquery_3
- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.
- $osquery_4
- $osquery_5
- Investigate other alerts associated with the user/host during the past 48 hours.
- If scripts or executables were dropped, retrieve the files and determine if they are malicious:
- Use a private sandboxed malware analysis system to perform analysis.
- Observe and collect information about the following activities:
- Attempts to contact external domains and addresses.
- Check if the domain is newly registered or unexpected.
- Check the reputation of the domain or IP address.
- File access, modification, and creation activities.
### Related rules
- ProxyChains Activity - 4b868f1f-15ff-4ba3-8c11-d5a7a6356d37
- Potential Protocol Tunneling via Chisel Client - 3f12325a-4cc6-410b-8d4c-9fbbeb744cfd
- Potential Protocol Tunneling via Chisel Server - ac8805f6-1e08-406c-962e-3937057fa86f
- Potential Linux Tunneling and/or Port Forwarding - 6ee947e9-de7e-4281-a55d-09289bdf947e
- Potential Protocol Tunneling via EarthWorm - 9f1c4ca3-44b5-481d-ba42-32dc215a2769
### False positive analysis
- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.
- If this activity is related to a system administrator or developer who uses this utility for benign purposes, consider adding exceptions for specific user accounts or hosts.
- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.
### Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Isolate the involved host to prevent further post-compromise behavior.
- If the triage identified malware, search the environment for additional compromised hosts.
- Implement temporary network rules, procedures, and segmentation to contain the malware.
- Stop suspicious processes.
- Immediately block the identified indicators of compromise (IoCs).
- Inspect the affected systems for additional malware backdoors, such as 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.
- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
"""
references = ["https://blog.bitsadmin.com/living-off-the-foreign-land-windows-as-offensive-platform"]
risk_score = 47
rule_id = "6ace94ba-f02c-4d55-9f53-87d99b6f9af4"
setup = """## Setup
This rule requires data coming in from Elastic Defend.
### Elastic Defend Integration Setup
Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
#### Prerequisite Requirements:
- Fleet is required for Elastic Defend.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
- Click "Add Elastic Defend".
- Configure the integration name and optionally add a description.
- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
- Click "Save and Continue".
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
"""
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Linux",
"Use Case: Threat Detection",
"Tactic: Command and Control",
"Data Source: Elastic Defend",
"Data Source: Elastic Endgame",
"Data Source: Auditd Manager",
"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", "executed", "process_started") and
process.name == "proxychains" and process.args : (
"ssh", "sshd", "sshuttle", "socat", "iodine", "iodined", "dnscat", "hans", "hans-ubuntu", "ptunnel-ng",
"ssf", "3proxy", "ngrok", "gost", "pivotnacci", "chisel*", "nmap", "ping", "python*", "php*", "perl", "ruby",
"lua*", "openssl", "nc", "netcat", "ncat", "telnet", "awk", "java", "telnet", "ftp", "curl", "wget"
)
'''
[[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.003"
name = "Multi-hop Proxy"
reference = "https://attack.mitre.org/techniques/T1090/003/"
[[rule.threat.technique]]
id = "T1572"
name = "Protocol Tunneling"
reference = "https://attack.mitre.org/techniques/T1572/"
[rule.threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"
Stages and Predicates
Stage 1: process
process where host.os.type == "linux" and event.type == "start" and
event.action in ("exec", "exec_event", "start", "ProcessRollup2", "executed", "process_started") and
process.name == "proxychains" and process.args : (
"ssh", "sshd", "sshuttle", "socat", "iodine", "iodined", "dnscat", "hans", "hans-ubuntu", "ptunnel-ng",
"ssf", "3proxy", "ngrok", "gost", "pivotnacci", "chisel*", "nmap", "ping", "python*", "php*", "perl", "ruby",
"lua*", "openssl", "nc", "netcat", "ncat", "telnet", "awk", "java", "telnet", "ftp", "curl", "wget"
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | in |
| field:"EventType" kind:in |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args | wildcard |
| field:"process.args" kind:wildcard |
process.name | eq |
| field:"process_basename" kind:eq value:"proxychains" |
Unusual Country For an AWS Command
#A machine learning job detected AWS command activity that, while not inherently suspicious or abnormal, is sourcing from a geolocation (country) that is unusual for the command. This can be the result of compromised credentials or keys being used by a threat actor in a different geography than the authorized user(s).
Known False Positives
- New or unusual command and user geolocation activity can be due to manual troubleshooting or reconfiguration; changes in cloud automation scripts or workflows; adoption of new services; expansion into new regions; increased adoption of work from home policies; or users who travel frequently.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access |
Rule Body
[metadata]
creation_date = "2020/07/13"
integration = ["aws"]
maturity = "production"
updated_date = "2025/11/18"
[rule]
anomaly_threshold = 50
author = ["Elastic"]
description = """
A machine learning job detected AWS command activity that, while not inherently suspicious or abnormal, is sourcing from
a geolocation (country) that is unusual for the command. This can be the result of compromised credentials or keys being
used by a threat actor in a different geography than the authorized user(s).
"""
false_positives = [
"""
New or unusual command and user geolocation activity can be due to manual troubleshooting or reconfiguration;
changes in cloud automation scripts or workflows; adoption of new services; expansion into new regions; increased
adoption of work from home policies; or users who travel frequently.
""",
]
from = "now-2h"
interval = "15m"
license = "Elastic License v2"
machine_learning_job_id = "rare_method_for_a_country"
name = "Unusual Country For an AWS Command"
setup = """## Setup
This rule requires the installation of associated Machine Learning jobs, as well as data coming in from AWS.
### Anomaly Detection Setup
Once the rule is enabled, the associated Machine Learning job will start automatically. You can view the Machine Learning job linked under the "Definition" panel of the detection rule. If the job does not start due to an error, the issue must be resolved for the job to commence successfully. For more details on setting up anomaly detection jobs, refer to the [helper guide](https://www.elastic.co/guide/en/kibana/current/xpack-ml-anomalies.html).
### AWS Integration Setup
The AWS integration allows you to collect logs and metrics from Amazon Web Services (AWS) with Elastic Agent.
#### The following steps should be executed in order to add the Elastic Agent System integration "aws" to your system:
- Go to the Kibana home page and click “Add integrations”.
- In the query bar, search for “AWS” and select the integration to see more details about it.
- Click “Add AWS”.
- Configure the integration name and optionally add a description.
- Review optional and advanced settings accordingly.
- Add the newly installed “aws” to an existing or a new agent policy, and deploy the agent on your system from which aws log files are desirable.
- Click “Save and Continue”.
- For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/current/integrations/aws).
"""
note = """## Triage and analysis
### Investigating Unusual Country For an AWS Command
CloudTrail logging provides visibility on actions taken within an AWS environment. By monitoring these events and understanding what is considered normal behavior within an organization, you can spot suspicious or malicious activity when deviations occur.
This rule uses a machine learning job to detect an AWS API command that while not inherently suspicious or abnormal, is sourcing from a geolocation (country) that is unusual for the command. This can be the result of compromised credentials or keys used by a threat actor in a different geography than the authorized user(s).
Detection alerts from this rule indicate an AWS API command or method call that is rare and unusual for the geolocation of the source IP address.
#### Possible investigation steps
- Identify the user account involved and the action performed. Verify whether it should perform this kind of action.
- Examine the user identity in the `aws.cloudtrail.user_identity.arn` field and the access key ID in the `aws.cloudtrail.user_identity.access_key_id` field, which can help identify the precise user context.
- The user agent details in the `user_agent.original` field may also indicate what kind of a client made the request.
- Investigate other alerts associated with the user account during the past 48 hours.
- Validate the activity is not related to planned patches, updates, or network administrator activity.
- Examine the request parameters. These might indicate the source of the program or the nature of its tasks.
- Considering the source IP address and geolocation of the user who issued the command:
- Do they look normal for the calling user?
- If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?
- If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?
- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal time of day?
- Contact the account owner and confirm whether they are aware of this activity if suspicious.
- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.
### False Positive Analysis
- False positives can occur if activity is coming from new employees based in a country with no previous history in AWS.
- Examine the history of the command. If the command only manifested recently, it might be part of a new automation module or script. If it has a consistent cadence (for example, it appears in small numbers on a weekly or monthly cadence), it might be part of a housekeeping or maintenance process. You can find the command in the `event.action field` field.
### Related Rules
- Unusual City For an AWS Command - 809b70d3-e2c3-455e-af1b-2626a5a1a276
- Unusual AWS Command for a User - ac706eae-d5ec-4b14-b4fd-e8ba8086f0e1
- Rare AWS Error Code - 19de8096-e2b0-4bd8-80c9-34a820813fff
- Spike in AWS Error Messages - 78d3d8d9-b476-451d-a9e0-7a5addd70670
### Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Disable or limit the account during the investigation and response.
- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
- Identify the account role in the cloud environment.
- Assess the criticality of affected services and servers.
- Work with your IT team to identify and minimize the impact on users.
- Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
- Identify any regulatory or legal ramifications related to this activity.
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.
- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.
- Consider enabling multi-factor authentication for users.
- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
"""
references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
risk_score = 21
rule_id = "dca28dee-c999-400f-b640-50a081cc0fd1"
severity = "low"
tags = [
"Domain: Cloud",
"Data Source: AWS",
"Data Source: Amazon Web Services",
"Rule Type: ML",
"Rule Type: Machine Learning",
"Resources: Investigation Guide",
]
type = "machine_learning"
[[rule.threat]]
framework = "MITRE ATT&CK"
[rule.threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[[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/"
Unusual Source IP for Okta Privileged Operations Detected
#A machine learning job has identified a user performing privileged operations in Okta from an uncommon source IP, indicating potential privileged access activity. This could suggest an account compromise, misuse of administrative privileges, or an attacker leveraging a new network location to escalate privileges.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Privilege Escalation |
Rule Body
[metadata]
creation_date = "2025/02/18"
integration = ["pad", "okta"]
maturity = "production"
updated_date = "2026/07/27"
min_stack_version = "9.4.0"
min_stack_comments = "Use EA (Entity Analytics) fields"
[rule]
anomaly_threshold = 75
author = ["Elastic"]
description = """
A machine learning job has identified a user performing privileged operations in Okta from an uncommon source IP,
indicating potential privileged access activity. This could suggest an account compromise, misuse of administrative
privileges, or an attacker leveraging a new network location to escalate privileges.
"""
from = "now-1h"
interval = "15m"
license = "Elastic License v2"
machine_learning_job_id = "pad_okta_rare_source_ip_by_user_ea"
name = "Unusual Source IP for Okta Privileged Operations Detected"
note = """## Triage and analysis
> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
### Investigating Unusual Source IP for Okta Privileged Operations Detected
Okta is a widely used identity management service that controls access to applications and data. Adversaries may exploit Okta by using stolen credentials to perform privileged operations from unfamiliar IP addresses, indicating potential misuse or compromise. The detection rule leverages machine learning to identify deviations in IP usage patterns, flagging unusual access attempts that could signify privilege escalation or account compromise.
### Possible investigation steps
- Review the source IP address flagged by the alert to determine its geolocation and assess if it aligns with the user's typical access patterns or known locations.
- Check the Okta logs for the specific user account to identify any other recent activities from the same IP address or any other unusual IP addresses.
- Investigate the timing and nature of the privileged operations performed to determine if they align with the user's normal behavior or job responsibilities.
- Correlate the flagged IP address with any known threat intelligence feeds to check for any history of malicious activity associated with it.
- Contact the user to verify if they were aware of the access attempt and if they have recently used a new network location or VPN service.
- Examine any recent changes to the user's account settings or permissions that could indicate unauthorized modifications.
### False positive analysis
- Employees traveling or working remotely may trigger alerts due to accessing Okta from new IP addresses. To manage this, maintain a list of known IP ranges for remote work and travel, and configure exceptions for these ranges.
- Use of VPNs or proxy services can result in access from unfamiliar IPs. Regularly update the list of approved VPN or proxy IP addresses and exclude them from triggering alerts.
- Changes in corporate network infrastructure, such as new IP allocations, can cause false positives. Ensure that any changes in network configurations are communicated to the security team to update the detection rule's exceptions.
- Scheduled maintenance or testing activities by IT staff might appear as unusual access. Document and whitelist IP addresses used during these activities to prevent unnecessary alerts.
- Third-party integrations or services that access Okta on behalf of users can be mistaken for suspicious activity. Identify and whitelist these services' IP addresses to avoid false positives.
### Response and remediation
- Immediately isolate the affected user account by temporarily disabling it to prevent further unauthorized access.
- Conduct a thorough review of recent privileged operations performed by the affected account to identify any unauthorized changes or data access.
- Reset the password for the compromised account and enforce multi-factor authentication (MFA) to enhance security.
- Notify the security team and relevant stakeholders about the potential compromise for further investigation and monitoring.
- Review and update access logs to ensure all unusual IP addresses are flagged and monitored for any future access attempts.
- Implement network-based restrictions to block the identified unusual IP address from accessing the Okta environment.
- Conduct a post-incident analysis to identify the root cause and update security policies and procedures to prevent similar incidents in the future."""
references = [
"https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html",
"https://docs.elastic.co/en/integrations/pad",
]
risk_score = 21
rule_id = "fbb10f1e-77cb-42f9-994e-5da17fc3fc15"
setup = """## Setup
The rule requires the Privileged Access Detection integration assets to be installed, as well as Okta logs collected by integrations such as Okta.
### Privileged Access Detection Setup
The Privileged Access Detection integration detects privileged access activity by identifying abnormalities in Windows, Linux and Okta events. Anomalies are detected using Elastic's Anomaly Detection feature.
#### Prerequisite Requirements:
- Fleet is required for Privileged Access Detection.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
- Okta events collected by [Okta](https://docs.elastic.co/en/integrations/okta) integration.
- To add the Okta integration to an Elastic Agent policy, refer to [this](https://www.elastic.co/guide/en/fleet/current/add-integration-to-policy.html) guide.
#### The following steps should be executed to install assets associated with the Privileged Access Detection integration:
- Go to the Kibana homepage. Under Management, click Integrations.
- In the query bar, search for Privileged Access Detection and select the integration to see more details about it.
- Follow the instructions under the **Installation** section.
- For this rule to work, complete the instructions through **Add preconfigured anomaly detection jobs**.
"""
severity = "low"
tags = [
"Data Source: Okta",
"Use Case: Privileged Access Detection",
"Rule Type: ML",
"Rule Type: Machine Learning",
"Tactic: Privilege Escalation",
"Resources: Investigation Guide",
]
type = "machine_learning"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1078"
name = "Valid Accounts"
reference = "https://attack.mitre.org/techniques/T1078/"
[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 = "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/"