Detection rules › Elastic
Elastic rules: 1j
Attempt to Revoke Okta API Token
#Identifies attempts to revoke an Okta API token. An adversary may attempt to revoke or delete an Okta API token to disrupt an organization's business operations.
Known False Positives
- If the behavior of revoking Okta API tokens is expected, consider adding exceptions to this rule to filter false positives.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Impact |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Okta | System Log event type system.api_token.revoke: API token revoked |
Rules Detecting the Same Action
These rules filter on the same operation.
- New Device/Location sign-in along with critical operation (Kusto)
- Okta API Key Revoked (Panther)
- Okta API Token Revoked (Sigma)
Rule Body
[metadata]
creation_date = "2020/05/21"
integration = ["okta"]
maturity = "production"
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = """
Identifies attempts to revoke an Okta API token. An adversary may attempt to revoke or delete an Okta API token to
disrupt an organization's business operations.
"""
false_positives = [
"""
If the behavior of revoking Okta API tokens is expected, consider adding exceptions to this rule to filter false
positives.
""",
]
index = ["filebeat-*", "logs-okta*"]
language = "kuery"
license = "Elastic License v2"
name = "Attempt to Revoke Okta API Token"
note = """## Triage and analysis
### Investigating Attempt to Revoke Okta API Token
The rule alerts when attempts are made to revoke an Okta API token. The API tokens are critical for integration services, and revoking them may lead to disruption in services. Therefore, it's important to validate these activities.
#### Possible investigation steps:
- Identify the actor associated with the API token revocation attempt. You can use the `okta.actor.alternate_id` field for this purpose.
- Determine the client used by the actor. Review the `okta.client.device`, `okta.client.ip`, `okta.client.user_agent.raw_user_agent`, `okta.client.ip_chain.ip`, and `okta.client.geographical_context` fields.
- Verify if the API token revocation was authorized or part of some planned activity.
- Check the `okta.outcome.result` and `okta.outcome.reason` fields to see if the attempt was successful or failed.
- Analyze the past activities of the actor involved in this action. An actor who usually performs such activities may indicate a legitimate reason.
- Evaluate the actions that happened just before and after this event. It can help understand the full context of the activity.
### False positive analysis:
- It might be a false positive if the action was part of a planned activity or was performed by an authorized person.
### Response and remediation:
- If unauthorized revocation attempts are confirmed, initiate the incident response process.
- Block the IP address or device used in the attempts, if they appear suspicious.
- Reset the user's password and enforce MFA re-enrollment, if applicable.
- Conduct a review of Okta policies and ensure they are in accordance with security best practices.
- If the revoked token was used for critical integrations, coordinate with the relevant team to minimize the impact.
## Setup
The Okta Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
"""
references = [
"https://developer.okta.com/docs/reference/api/system-log/",
"https://developer.okta.com/docs/reference/api/event-types/",
"https://www.elastic.co/security-labs/testing-okta-visibility-and-detection-dorothy",
"https://www.elastic.co/security-labs/monitoring-okta-threats-with-elastic-security",
"https://www.elastic.co/security-labs/starter-guide-to-understanding-okta",
]
risk_score = 21
rule_id = "676cff2b-450b-4cf1-8ed2-c0c58a4a2dd7"
severity = "low"
tags = [
"Use Case: Identity and Access Audit",
"Data Source: Okta",
"Tactic: Impact",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "query"
query = '''
data_stream.dataset:okta.system and event.action:system.api_token.revoke
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1531"
name = "Account Access Removal"
reference = "https://attack.mitre.org/techniques/T1531/"
[rule.threat.tactic]
id = "TA0040"
name = "Impact"
reference = "https://attack.mitre.org/tactics/TA0040/"
Stages and Predicates
Stage 1: query
data_stream.dataset:okta.system and event.action:system.api_token.revoke
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
data_stream.dataset | eq |
| field:"data_stream.dataset" kind:eq value:"okta.system" |
event.action | eq |
| field:"EventType" kind:eq value:"system.api_token.revoke" |
AutoLogons Access Attempt via Registry
#Identifies attempts to access AutoLogons credentials via registry value query. Adversaries may search local file systems and remote file shares for files containing insecurely stored credentials.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Rule Body
[rule]
description = """
Identifies attempts to access AutoLogons credentials via registry value query. Adversaries may search local file systems
and remote file shares for files containing insecurely stored credentials.
"""
id = "c0a977b4-1342-4794-9cd2-5d726c26c1b9"
license = "Elastic License v2"
name = "AutoLogons Access Attempt via Registry"
os_list = ["windows"]
reference = ["https://github.com/GhostPack/SharpUp/blob/master/SharpUp/Checks/RegistryAutoLogons.cs#L26"]
version = "1.0.17"
query = '''
registry where event.action == "query" and process.executable != null and
registry.path : "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\DefaultPassword" and
not process.executable :
("?:\\Windows\\System32\\LogonUI.exe",
"?:\\$WINDOWS.~BT\\Sources\\SetupHost.exe",
"?:\\$WINDOWS.~BT\\Sources\\SetupPlatform.exe",
"?:\\$WINDOWS.~BT\\Sources\\WindowsUpdateBox.exe",
"?:\\Windows\\System32\\svchost.exe",
"?:\\Windows\\System32\\wbem\\WmiPrvSE.exe",
"?:\\Windows\\SysWOW64\\wbem\\WmiPrvSE.exe",
"?:\\Windows\\System32\\MusNotification.exe",
"?:\\Windows\\SysWOW64\\MusNotification.exe",
"?:\\Windows\\System32\\wsmprovhost.exe",
"?:\\Windows\\System32\\conhost.exe",
"?:\\Windows\\System32\\SecurityHealthSystray.exe",
"?:\\Windows\\System32\\reg.exe",
"?:\\Windows\\regedit.exe",
"?:\\Program Files\\*.exe",
"?:\\Program Files (x86)\\*.exe",
"?:\\Windows\\System32\\cmd.exe",
"C:\\ProgramData\\Guardicore\\utils\\gc-insight.exe",
"?:\\Windows\\System32\\WindowsPowerShell\\v*\\powershell.exe",
"?:\\Windows\\System32\\WindowsPowerShell\\v*\\powershell_ise.exe",
"?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MpCmdRun.exe",
"?:\\Users\\*\\AppData\\Local\\Microsoft\\OneDrive\\OneDrive.exe",
"?:\\Windows\\SystemApps\\MicrosoftWindows.Client.*\\SearchHost.exe",
"?:\\Windows\\Temp\\MSS\\IRTKDeploy\\fennec-windows-x64.exe",
"\\Device\\Mup\\*\\Autologon.exe",
"?:\\Windows\\ServiceProfiles\\LocalService\\AppData\\Local\\ServicePortalAgent\\current\\emulator\\MmrAgent.NetFxEmulator.exe") and
not (process.code_signature.trusted == true and not process.code_signature.subject_name : "Microsoft*") and
not (process.name : "Autologon.exe" and process.code_signature.subject_name : "Microsoft*")
'''
min_endpoint_version = "8.6.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1552"
name = "Unsecured Credentials"
reference = "https://attack.mitre.org/techniques/T1552/"
[[threat.technique.subtechnique]]
id = "T1552.001"
name = "Credentials In Files"
reference = "https://attack.mitre.org/techniques/T1552/001/"
[threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
[internal]
min_endpoint_version = "8.6.0"
Stages and Predicates
Stage 1: registry
registry where event.action == "query" and process.executable != null and
registry.path : "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\DefaultPassword" and
not process.executable :
("?:\\Windows\\System32\\LogonUI.exe",
"?:\\$WINDOWS.~BT\\Sources\\SetupHost.exe",
"?:\\$WINDOWS.~BT\\Sources\\SetupPlatform.exe",
"?:\\$WINDOWS.~BT\\Sources\\WindowsUpdateBox.exe",
"?:\\Windows\\System32\\svchost.exe",
"?:\\Windows\\System32\\wbem\\WmiPrvSE.exe",
"?:\\Windows\\SysWOW64\\wbem\\WmiPrvSE.exe",
"?:\\Windows\\System32\\MusNotification.exe",
"?:\\Windows\\SysWOW64\\MusNotification.exe",
"?:\\Windows\\System32\\wsmprovhost.exe",
"?:\\Windows\\System32\\conhost.exe",
"?:\\Windows\\System32\\SecurityHealthSystray.exe",
"?:\\Windows\\System32\\reg.exe",
"?:\\Windows\\regedit.exe",
"?:\\Program Files\\*.exe",
"?:\\Program Files (x86)\\*.exe",
"?:\\Windows\\System32\\cmd.exe",
"C:\\ProgramData\\Guardicore\\utils\\gc-insight.exe",
"?:\\Windows\\System32\\WindowsPowerShell\\v*\\powershell.exe",
"?:\\Windows\\System32\\WindowsPowerShell\\v*\\powershell_ise.exe",
"?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MpCmdRun.exe",
"?:\\Users\\*\\AppData\\Local\\Microsoft\\OneDrive\\OneDrive.exe",
"?:\\Windows\\SystemApps\\MicrosoftWindows.Client.*\\SearchHost.exe",
"?:\\Windows\\Temp\\MSS\\IRTKDeploy\\fennec-windows-x64.exe",
"\\Device\\Mup\\*\\Autologon.exe",
"?:\\Windows\\ServiceProfiles\\LocalService\\AppData\\Local\\ServicePortalAgent\\current\\emulator\\MmrAgent.NetFxEmulator.exe") and
not (process.code_signature.trusted == true and not process.code_signature.subject_name : "Microsoft*") and
not (process.name : "Autologon.exe" and process.code_signature.subject_name : "Microsoft*")
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"query" |
process.code_signature.subject_name | wildcard |
| field:"Signature" kind:wildcard value:"Microsoft*" |
process.executable | is_not_null | field:"Image" kind:is_not_null | |
registry.path | wildcard |
| field:"TargetObject" kind:wildcard value:"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultPassword" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.code_signature.subject_name | starts_with | Microsoft | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Microsoft" |
process.code_signature.trusted | eq | true | excludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true" |
process.name | eq | Autologon.exe | excludes:process.name field:"process.name" value:"Autologon.exe" |
process.executable | wildcard | ?:\Windows\System32\LogonUI.exe, ?:\$WINDOWS.~BT\Sources\SetupHost.exe, ?:\$WINDOWS.~BT\Sources\SetupPlatform.exe, ?:\$WINDOWS.~BT\Sources\WindowsUpdateBox.exe, ?:\Windows\System32\svchost.exe, ?:\Windows\System32\wbem\WmiPrvSE.exe, ?:\Windows\SysWOW64\wbem\WmiPrvSE.exe, ?:\Windows\System32\MusNotification.exe, ?:\Windows\SysWOW64\MusNotification.exe, ?:\Windows\System32\wsmprovhost.exe, ?:\Windows\System32\conhost.exe, ?:\Windows\System32\SecurityHealthSystray.exe, ?:\Windows\System32\reg.exe, ?:\Windows\regedit.exe, ?:\Program Files\*.exe, ?:\Program Files (x86)\*.exe, ?:\Windows\System32\cmd.exe, C:\ProgramData\Guardicore\utils\gc-insight.exe, ?:\Windows\System32\WindowsPowerShell\v*\powershell.exe, ?:\Windows\System32\WindowsPowerShell\v*\powershell_ise.exe, ?:\ProgramData\Microsoft\Windows Defender\Platform\*\MpCmdRun.exe, ?:\Users\*\AppData\Local\Microsoft\OneDrive\OneDrive.exe, ?:\Windows\SystemApps\MicrosoftWindows.Client.*\SearchHost.exe, ?:\Windows\Temp\MSS\IRTKDeploy\fennec-windows-x64.exe, \Device\Mup\*\Autologon.exe, ?:\Windows\ServiceProfiles\LocalService\AppData\Local\ServicePortalAgent\current\emulator\MmrAgent.NetFxEmulator.exe | excludes:process.executable |
AWS IAM User Console Login from Multiple Geolocations
#Identifies an IAM user that successfully signs in to the AWS Management Console from two or more distinct countries within a short window. A single user authenticating from multiple geographic locations in a brief period is physically implausible and indicates that the account's credentials or console session are being used from more than one place at once. This is a hallmark of adversary-in-the-middle (AiTM) phishing and session theft, where the legitimate user signs in from their location while the attacker replays the captured session or credentials from their own infrastructure. Because the attacker logs in from a different network, the divergent sign-in geolocations are the detectable signal even when MFA appears satisfied (AiTM relays the live MFA challenge). This is the CloudTrail-native analog of identity-provider impossible-travel sign-in detections.
Known False Positives
- Legitimate users may appear in multiple countries within the window when using VPNs or proxies with exit nodes in different countries, when traveling near borders, or when mobile networks geolocate to different countries. Verify the source IPs and ASNs in "Esql.source_ip_values", confirm whether the locations are consistent with the user's expected activity, and exclude known VPN egress patterns after validation. Shared IAM users (an anti-pattern) used by multiple people will also match.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Credential Access |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
- AWS Authentication From CrowdStrike Unmanaged Device (Panther)
- AWS Authentication from CrowdStrike Unmanaged Device (Panther)
- AWS Authentication from CrowdStrike Unmanaged Device (crowdstrike_fdrevent table) (Panther)
- AWS EC2 Instance Console Login via Assumed Role (Elastic)
- AWS GetFederationToken Followed by Console Login via Federation Exchange (Elastic)
- AWS IAM User Console Login Without MFA (Elastic)
- AWS Management Console Brute Force of Root User Identity (Elastic)
- AWS Management Console Root Login (Elastic)
Rule Body
[metadata]
creation_date = "2026/06/29"
integration = ["aws"]
maturity = "production"
updated_date = "2026/06/29"
[rule]
author = ["Elastic"]
description = """
Identifies an IAM user that successfully signs in to the AWS Management Console from two or more distinct countries
within a short window. A single user authenticating from multiple geographic locations in a brief period is physically
implausible and indicates that the account's credentials or console session are being used from more than one place at
once. This is a hallmark of adversary-in-the-middle (AiTM) phishing and session theft, where the legitimate user signs
in from their location while the attacker replays the captured session or credentials from their own infrastructure.
Because the attacker logs in from a different network, the divergent sign-in geolocations are the detectable signal even
when MFA appears satisfied (AiTM relays the live MFA challenge). This is the CloudTrail-native analog of
identity-provider impossible-travel sign-in detections.
"""
false_positives = [
"""
Legitimate users may appear in multiple countries within the window when using VPNs or proxies with exit nodes in
different countries, when traveling near borders, or when mobile networks geolocate to different countries. Verify
the source IPs and ASNs in "Esql.source_ip_values", confirm whether the locations are consistent with the user's
expected activity, and exclude known VPN egress patterns after validation. Shared IAM users (an anti-pattern) used
by multiple people will also match.
""",
]
from = "now-65m"
interval = "10m"
language = "esql"
license = "Elastic License v2"
name = "AWS IAM User Console Login from Multiple Geolocations"
note = """## Triage and analysis
### Investigating AWS IAM User Console Login from Multiple Geolocations
This rule aggregates successful "ConsoleLogin" events for each IAM user over the lookback window and alerts when the logins originate from two or more distinct countries. Concurrent sign-ins from different geographies indicate the credentials or console session are in use from more than one location, a strong signal of adversary-in-the-middle (AiTM) phishing or session theft. AiTM relays the victim's live MFA, so the console login records MFA as used; the divergent geolocations, not the MFA field, are the indicator.
### Possible investigation steps
- Review "Esql.source_geo_country_iso_code_values" and "Esql.source_ip_values" to identify the locations and networks, and determine which (if any) is the user's expected origin.
- Compare "Esql.timestamp_min" and "Esql.timestamp_max" to assess how implausible the travel is.
- Identify the user in "aws.cloudtrail.user_identity.arn" and check for hands-on-keyboard activity immediately after the logins (CreateAccessKey, login profile or MFA changes, IAM policy changes, data access).
- Determine whether any of the source networks are VPNs, proxies, or hosting providers inconsistent with the user.
### False positive analysis
- VPN/proxy exit nodes, border travel, and mobile roaming can place a legitimate user in multiple countries. Confirm the activity is expected and exclude known networks after validation. Shared IAM users will also trigger this and should be remediated.
### Response and remediation
- If unauthorized, revoke the user's console sessions, reset the password and MFA, and rotate access keys.
- Review and revert changes made during the sessions, and migrate console access to IAM Identity Center with phishing-resistant MFA (FIDO2/passkeys), which defeats AiTM relay.
### Additional information
- [AWS sign-in CloudTrail events](https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html)
"""
references = ["https://securitylabs.datadoghq.com/articles/behind-the-console-aws-aitm-phishing-kit-and-beyond/"]
risk_score = 47
rule_id = "5301ac83-7a43-4c92-95e7-c372afea807d"
severity = "medium"
tags = [
"Domain: Cloud",
"Domain: Identity",
"Data Source: AWS",
"Data Source: Amazon Web Services",
"Data Source: AWS Sign-In",
"Use Case: Identity and Access Audit",
"Tactic: Initial Access",
"Tactic: Credential Access",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "esql"
query = '''
FROM logs-aws.cloudtrail-*
| WHERE event.provider == "signin.amazonaws.com"
AND event.action == "ConsoleLogin"
AND event.outcome == "success"
AND aws.cloudtrail.user_identity.type == "IAMUser"
AND source.geo.country_iso_code IS NOT NULL
| STATS
Esql.source_geo_country_iso_code_count_distinct = COUNT_DISTINCT(source.geo.country_iso_code),
Esql.source_as_organization_name_count_distinct = COUNT_DISTINCT(source.as.organization.name),
Esql.source_ip_values = VALUES(source.ip),
Esql.source_geo_country_iso_code_values = VALUES(source.geo.country_iso_code),
Esql.timestamp_min = MIN(@timestamp),
Esql.timestamp_max = MAX(@timestamp)
BY aws.cloudtrail.user_identity.arn, cloud.account.id
| WHERE Esql.source_geo_country_iso_code_count_distinct >= 2
| KEEP aws.cloudtrail.user_identity.arn, cloud.account.id, Esql.source_geo_country_iso_code_count_distinct, Esql.source_as_organization_name_count_distinct, Esql.source_ip_values, Esql.source_geo_country_iso_code_values, Esql.timestamp_min, Esql.timestamp_max
'''
[[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 = "T1539"
name = "Steal Web Session Cookie"
reference = "https://attack.mitre.org/techniques/T1539/"
[rule.threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
Stages and Predicates
Stage 1: from
FROM logs-aws.cloudtrail-*
Stage 2: where
| WHERE event.provider == "signin.amazonaws.com"
AND event.action == "ConsoleLogin"
AND event.outcome == "success"
AND aws.cloudtrail.user_identity.type == "IAMUser"
AND source.geo.country_iso_code IS NOT NULL
Stage 3: stats
| STATS
Esql.source_geo_country_iso_code_count_distinct = COUNT_DISTINCT(source.geo.country_iso_code),
Esql.source_as_organization_name_count_distinct = COUNT_DISTINCT(source.as.organization.name),
Esql.source_ip_values = VALUES(source.ip),
Esql.source_geo_country_iso_code_values = VALUES(source.geo.country_iso_code),
Esql.timestamp_min = MIN(@timestamp),
Esql.timestamp_max = MAX(@timestamp)
BY aws.cloudtrail.user_identity.arn, cloud.account.id
Stage 4: where
| WHERE Esql.source_geo_country_iso_code_count_distinct >= 2
Stage 5: keep
| KEEP aws.cloudtrail.user_identity.arn, cloud.account.id, Esql.source_geo_country_iso_code_count_distinct, Esql.source_as_organization_name_count_distinct, Esql.source_ip_values, Esql.source_geo_country_iso_code_values, Esql.timestamp_min, Esql.timestamp_max
Indicators
These rows show field, operator, and value matches.
Output Fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
aws.cloudtrail.user_identity.arn | KEEP aws.cloudtrail.user_identity.arn |
cloud.account.id | KEEP cloud.account.id |
Esql.source_geo_country_iso_code_count_distinct | KEEP Esql.source_geo_country_iso_code_count_distinct |
Esql.source_as_organization_name_count_distinct | KEEP Esql.source_as_organization_name_count_distinct |
Esql.source_ip_values | KEEP Esql.source_ip_values |
Esql.source_geo_country_iso_code_values | KEEP Esql.source_geo_country_iso_code_values |
Esql.timestamp_min | KEEP Esql.timestamp_min |
Esql.timestamp_max | KEEP Esql.timestamp_max |
AWS Lambda Function Invoked from an Unusual Source ASN
#Identifies an AWS Lambda function invoked directly by a principal from a source network (ASN) not seen for that principal in the prior 10 days, excluding common cloud provider networks. Direct invocation from an unfamiliar external network can indicate use of stolen execution-role or user credentials from attacker-controlled infrastructure to execute functions or retrieve the data they return. This rule relies on AWS Lambda data event logging, which is not enabled by default.
Known False Positives
- Operators and automation may legitimately invoke functions from new networks (new offices, VPNs, home IPs, or new egress infrastructure). Verify the principal in `aws.cloudtrail.user_identity.arn`, the source network, and the function, and exclude known operator networks or identities after validation.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry Coverage
Rules Detecting the Same Action
These rules filter on the same operation.
- AWS Discovery API Calls via CLI from a Single Resource (Elastic)
- AWS Lambda Event Source Mapping Creation (Elastic)
- AWS Lambda Function Created or Updated (Elastic)
- AWS Lambda Function High-Frequency Invocation by a Single Principal (Elastic)
- AWS Lambda Function Invoked by an Unusual Principal (Elastic)
- AWS Lambda Function Invoked Cross-Account (Elastic)
- AWS Lambda Function Policy Updated to Allow Cross-Account Invocation (Elastic)
- AWS Lambda Function Policy Updated to Allow Public Invocation (Elastic)
Rule Body
[metadata]
creation_date = "2026/06/18"
integration = ["aws"]
maturity = "production"
updated_date = "2026/06/18"
[rule]
author = ["Elastic"]
description = """
Identifies an AWS Lambda function invoked directly by a principal from a source network (ASN) not seen for that
principal in the prior 10 days, excluding common cloud provider networks. Direct invocation from an unfamiliar external
network can indicate use of stolen execution-role or user credentials from attacker-controlled infrastructure to execute
functions or retrieve the data they return. This rule relies on AWS Lambda data event logging, which is not enabled by
default.
"""
false_positives = [
"""
Operators and automation may legitimately invoke functions from new networks (new offices, VPNs, home IPs, or new
egress infrastructure). Verify the principal in `aws.cloudtrail.user_identity.arn`, the source network, and the
function, and exclude known operator networks or identities after validation.
""",
]
from = "now-6m"
index = ["logs-aws.cloudtrail-*"]
interval = "5m"
language = "kuery"
license = "Elastic License v2"
name = "AWS Lambda Function Invoked from an Unusual Source ASN"
note = """## Triage and analysis
### Investigating AWS Lambda Function Invoked from an Unusual Source ASN
Lambda execution-role credentials and user credentials are frequently abused after theft (for example via SSRF or RCE against a function, or leaked access keys). When such credentials are replayed from attacker infrastructure, the resulting direct `Invoke` calls originate from a network the legitimate principal has not used. This rule uses a new terms approach over the source ASN organization and the principal, excluding common cloud provider networks, to surface invocation from unfamiliar external networks.
### Possible investigation steps
- Review `source.ip`, `source.as.organization.name`, and `source.geo` for the invoking network and determine whether it is expected for the principal in `aws.cloudtrail.user_identity.arn`.
- Inspect `aws.cloudtrail.request_parameters` for the `functionName` and `user_agent.original` for the client used.
- Determine whether the credential (`aws.cloudtrail.user_identity.access_key_id`) was recently seen used elsewhere or outside the Lambda runtime, which would corroborate credential theft.
- Correlate with other activity by the same principal from the same network, including data-plane access, IAM, or STS calls.
### False positive analysis
- New legitimate networks (offices, VPNs, home IPs, new egress) will generate this alert. Confirm the principal and network are expected and exclude known operator networks or identities after validation.
- If source ASN is legitimate and expected, add as an exclusion to reduce false-positives.
### Response and remediation
- If credential abuse is confirmed, rotate or revoke the affected credentials and execution-role permissions, and review what the invoked function accessed or returned.
- Constrain `lambda:InvokeFunction` to expected identities and, where possible, restrict invocation to known networks using IAM conditions.
### Additional information
- [Invoke API](https://docs.aws.amazon.com/lambda/latest/api/API_Invoke.html)
- [Logging Lambda data events with CloudTrail](https://docs.aws.amazon.com/lambda/latest/dg/logging-using-cloudtrail.html)
"""
references = [
"https://docs.aws.amazon.com/lambda/latest/api/API_Invoke.html",
"https://docs.aws.amazon.com/lambda/latest/dg/logging-using-cloudtrail.html",
]
risk_score = 47
rule_id = "c8cc8192-f4f5-4ed3-8368-544ca738d506"
setup = """## Setup
This rule requires AWS Lambda data events to be logged in CloudTrail and ingested via the AWS integration
(`aws.cloudtrail` data stream). Lambda invocation (`Invoke`) is a data-plane event and is NOT logged by default; enable
data event logging for Lambda functions in the trail (optionally scoped to sensitive functions to manage volume). Source
ASN enrichment (`source.as.organization.name`) must be available on the ingested events.
"""
severity = "medium"
tags = [
"Domain: Cloud",
"Data Source: AWS",
"Data Source: Amazon Web Services",
"Data Source: AWS Lambda",
"Use Case: Threat Detection",
"Tactic: Execution",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
data_stream.dataset: "aws.cloudtrail"
and event.provider: "lambda.amazonaws.com"
and event.action: Invoke*
and event.outcome: "success"
and not aws.cloudtrail.user_identity.invoked_by: *
and source.as.organization.name:(* and not (Amazon* or AMAZON* or Google* or GOOGLE* or Microsoft* or MICROSOFT*))
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1648"
name = "Serverless Execution"
reference = "https://attack.mitre.org/techniques/T1648/"
[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[rule.investigation_fields]
field_names = [
"@timestamp",
"user.name",
"user_agent.original",
"source.ip",
"source.as.organization.name",
"source.geo.country_name",
"aws.cloudtrail.user_identity.arn",
"aws.cloudtrail.user_identity.type",
"aws.cloudtrail.user_identity.access_key_id",
"aws.cloudtrail.user_identity.session_context.session_issuer.arn",
"aws.cloudtrail.request_parameters",
"event.action",
"cloud.account.id",
]
[rule.new_terms]
field = "new_terms_fields"
value = ["source.as.organization.name", "cloud.account.id", "user.name"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-10d"
Stages and Predicates
Stage 1: new_terms
data_stream.dataset: "aws.cloudtrail"
and event.provider: "lambda.amazonaws.com"
and event.action: Invoke*
and event.outcome: "success"
and not aws.cloudtrail.user_identity.invoked_by: *
and source.as.organization.name:(* and not (Amazon* or AMAZON* or Google* or GOOGLE* or Microsoft* or MICROSOFT*))
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 | wildcard |
| field:"EventType" kind:wildcard value:"Invoke*" |
event.outcome | eq |
| field:"event.outcome" kind:eq value:"success" |
event.provider | eq |
| field:"Provider_Name" kind:eq value:"lambda.amazonaws.com" |
source.as.organization.name | is_not_null | field:"source.as.organization.name" kind:is_not_null |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
source.as.organization.name | starts_with | AMAZON | excludes:source.as.organization.name field:"source.as.organization.name" value:"AMAZON" |
source.as.organization.name | starts_with | Amazon | excludes:source.as.organization.name field:"source.as.organization.name" value:"Amazon" |
source.as.organization.name | starts_with | GOOGLE | excludes:source.as.organization.name field:"source.as.organization.name" value:"GOOGLE" |
source.as.organization.name | starts_with | Google | excludes:source.as.organization.name field:"source.as.organization.name" value:"Google" |
source.as.organization.name | starts_with | MICROSOFT | excludes:source.as.organization.name field:"source.as.organization.name" value:"MICROSOFT" |
source.as.organization.name | starts_with | Microsoft | excludes:source.as.organization.name field:"source.as.organization.name" value:"Microsoft" |
aws.cloudtrail.user_identity.invoked_by | is_not_null | excludes:aws.cloudtrail.user_identity.invoked_by |
AWS Route 53 Domain Transferred to Another Account
#Identifies when an AWS Route 53 domain is transferred to another AWS account. Transferring a domain changes administrative control of the DNS namespace, enabling the receiving account to modify DNS records, route traffic, request certificates, and potentially hijack operational workloads. Adversaries who gain access to privileged IAM users or long-lived credentials may leverage domain transfers to establish persistence, redirect traffic, conduct phishing, or stage infrastructure for broader attacks. This rule detects successful domain transfer requests.
Known False Positives
- Internal account restructuring, mergers and acquisitions, or legitimate ownership transfers between business units may involve transferring DNS domains to other AWS accounts. Confirm the transfer is approved and documented in change management processes before taking action. Transfers performed by unfamiliar identities, originating from atypical locations, or outside expected maintenance windows should be investigated.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Resource Development | |
| Persistence |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2021/05/10"
integration = ["aws"]
maturity = "production"
updated_date = "2026/04/10"
[rule]
author = ["Elastic", "Austin Songer"]
description = """
Identifies when an AWS Route 53 domain is transferred to another AWS account. Transferring a domain changes
administrative control of the DNS namespace, enabling the receiving account to modify DNS records, route traffic,
request certificates, and potentially hijack operational workloads. Adversaries who gain access to privileged IAM users
or long-lived credentials may leverage domain transfers to establish persistence, redirect traffic, conduct phishing, or
stage infrastructure for broader attacks. This rule detects successful domain transfer requests.
"""
false_positives = [
"""
Internal account restructuring, mergers and acquisitions, or legitimate ownership transfers between business units
may involve transferring DNS domains to other AWS accounts. Confirm the transfer is approved and documented in
change management processes before taking action. Transfers performed by unfamiliar identities, originating from
atypical locations, or outside expected maintenance windows should be investigated.
""",
]
from = "now-6m"
index = ["filebeat-*", "logs-aws.cloudtrail-*"]
language = "kuery"
license = "Elastic License v2"
name = "AWS Route 53 Domain Transferred to Another Account"
note = """## Triage and analysis
### Investigating AWS Route 53 Domain Transferred to Another Account
Transferring a Route 53 domain to another AWS account is a high-impact administrative action. A successful transfer enables the
recipient account to fully manage the domain and all associated DNS resources. Unauthorized transfers can result in loss of
visibility and control, traffic redirection, service outages, or domain hijacking for phishing, credential harvesting, or command-and-control.
This rule detects successful calls to `TransferDomainToAnotherAwsAccount`. These events are rare and should be considered
high-risk unless explicitly documented and approved.
### Possible investigation steps
- **Identify the actor and authentication context**
- Review `aws.cloudtrail.user_identity.arn` and `aws.cloudtrail.user_identity.access_key_id` to determine who initiated the transfer. Determine whether the actor typically performs Route 53 administrative actions or if this represents anomalous behavior.
- **Review request details and target account**
- Inspect `aws.cloudtrail.request_parameters` for: `DomainName`, `AccountId` receiving the transfer, Request tokens or validation parameters. Validate whether the destination AWS account is recognized, trusted, or documented in ownership transfer procedures.
- **Assess environment and timing**
- Compare `@timestamp` against maintenance windows, deployment pipelines, or approved domain operations. Review the region and endpoint used; domain transfers occurring from unexpected regions may indicate unauthorized access.
- **Analyze source and execution context**
- Review `source.ip`, `source.geo.country_iso_code`, and `user_agent.original` to determine:
- If the request originated from known networks, Whether it matches typical administrator access patterns or if suspicious automation tools, outdated SDK versions, or unknown agents were used.
- **Correlate with broader activity**
- Pivot on the same IAM principal or access key ID to identify:
- Recent IAM policy changes or privilege escalation
- `DisableDomainTransferLock`, which normally precedes domain transfers
- AWS console sign-ins from new geolocations or ASNs
- API calls involving certificate requests, hosted zone changes, or DNS record edits
- Look for evidence of lateral movement or credential theft preceding the transfer.
- **Validate with business owners**
- Confirm with domain owners, development teams, or asset managers whether The transfer was intentional.
### False positive analysis
- **Expected domain migrations**
- Organizations with multi-account strategies may transfer domains between operational, security, or sandbox accounts.
- **Business events**
- Mergers, acquisitions, or contractual transitions between managed service providers often involve bulk domain transfers.
- **Automated administrative tooling**
- Domain lifecycle automation or infrastructure-as-code pipelines may trigger transfers if misconfigured.
### Response and remediation
- **Contain and revoke access**
- If unauthorized, immediately invalidate the IAM session or access keys used in the transfer.
- Rotate credentials for the implicated IAM user or role and require MFA for privileged operations.
- **Reverse or halt the transfer**
- Contact AWS Support as soon as possible to request assistance reversing or blocking the transfer if it was not approved.
- Re-enable transfer lock (`DisableDomainTransferLock=false`) to prevent further modifications.
- **Investigate the extent of compromise**
- Review CloudTrail to identify all actions performed by the actor before and after the transfer.
- Check for additional changes to hosted zones, DNS records, certificates, or registrar contact details.
- **Restore operational integrity**
- Validate DNS routing, certificate issuance, and application endpoints for signs of redirection or tampering.
- Communicate with impacted teams and external stakeholders if customer-facing domains were affected.
- **Hardening and long-term improvements**
- Restrict domain transfer permissions to a minimal set of roles using IAM Conditions such as `aws:PrincipalArn` and `aws:MultiFactorAuthPresent`
- Consider SCPs to block domain-transfer APIs in production accounts.
- Add change-management tracking for domain ownership modifications.
### Additional information
- **[AWS IR Playbooks](https://github.com/aws-samples/aws-incident-response-playbooks/blob/c151b0dc091755fffd4d662a8f29e2f6794da52c/playbooks/)**
- **[AWS Customer Playbook Framework](https://github.com/aws-samples/aws-customer-playbook-framework/tree/a8c7b313636b406a375952ac00b2d68e89a991f2/docs)**
- **[AWS Knowledge Center – Security Best Practices](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/)**
"""
references = ["https://docs.aws.amazon.com/Route53/latest/APIReference/API_Operations_Amazon_Route_53.html"]
risk_score = 73
rule_id = "2045567e-b0af-444a-8c0b-0b6e2dae9e13"
severity = "high"
tags = [
"Domain: Cloud",
"Data Source: AWS",
"Data Source: Amazon Web Services",
"Data Source: AWS Route 53",
"Use Case: Asset Visibility",
"Tactic: Persistence",
"Tactic: Resource Development",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "query"
query = '''
data_stream.dataset: aws.cloudtrail
and event.provider: route53domains.amazonaws.com
and event.action: TransferDomainToAnotherAwsAccount
and event.outcome: success
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1098"
name = "Account Manipulation"
reference = "https://attack.mitre.org/techniques/T1098/"
[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1584"
name = "Compromise Infrastructure"
reference = "https://attack.mitre.org/techniques/T1584/"
[[rule.threat.technique.subtechnique]]
id = "T1584.001"
name = "Domains"
reference = "https://attack.mitre.org/techniques/T1584/001/"
[rule.threat.tactic]
id = "TA0042"
name = "Resource Development"
reference = "https://attack.mitre.org/tactics/TA0042/"
[rule.investigation_fields]
field_names = [
"@timestamp",
"user.name",
"user_agent.original",
"source.ip",
"aws.cloudtrail.user_identity.arn",
"aws.cloudtrail.user_identity.type",
"aws.cloudtrail.user_identity.access_key_id",
"event.action",
"event.outcome",
"cloud.account.id",
"cloud.region",
"aws.cloudtrail.request_parameters",
"aws.cloudtrail.response_elements",
]
Stages and Predicates
Stage 1: query
data_stream.dataset: aws.cloudtrail
and event.provider: route53domains.amazonaws.com
and event.action: TransferDomainToAnotherAwsAccount
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:"TransferDomainToAnotherAwsAccount" |
event.outcome | eq |
| field:"event.outcome" kind:eq value:"success" |
event.provider | eq |
| field:"Provider_Name" kind:eq value:"route53domains.amazonaws.com" |
Endpoint Security (Elastic Defend)
#This is a third-party alert feed, not a detection over modeled telemetry. Another security product raised the finding; this rule forwards or reshapes it into the SIEM. It is searchable for reference but is excluded from the detection-rule browse and the ATT&CK coverage matrix.
Generates a detection alert each time an Elastic Defend alert is received. Enabling this rule allows you to immediately begin investigating your Endpoint alerts.
Rule Body
[metadata]
creation_date = "2020/07/08"
integration = ["endpoint"]
maturity = "production"
promotion = true
updated_date = "2025/03/21"
[rule]
author = ["Elastic"]
description = """
Generates a detection alert each time an Elastic Defend alert is received. Enabling this rule allows you to immediately
begin investigating your Endpoint alerts.
"""
enabled = true
from = "now-2m"
index = ["logs-endpoint.alerts-*"]
interval = "1m"
language = "kuery"
license = "Elastic License v2"
max_signals = 1000
name = "Endpoint Security (Elastic Defend)"
note = """## Triage and analysis
> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
### Investigating Endpoint Security (Elastic Defend)
Elastic Defend is a robust endpoint security solution that monitors and protects systems by analyzing events and generating alerts for suspicious activities. Adversaries may exploit endpoints by executing unauthorized code or manipulating system processes. The detection rule leverages event data to identify alerts from Elastic Defend, focusing on potential threats while excluding non-relevant modules, thus enabling timely investigation of endpoint anomalies.
### Possible investigation steps
- Review the alert details to understand the specific event.kind:alert and event.module: endpoint that triggered the alert, ensuring it is not related to the excluded endgame module.
- Examine the timeline of events leading up to the alert to identify any unusual or unauthorized activities, such as unexpected process executions or system changes.
- Correlate the alert with other security events or logs from the same endpoint to gather additional context and determine if there is a pattern of suspicious behavior.
- Investigate the source and destination of any network connections associated with the alert to identify potential command and control activity or data exfiltration attempts.
- Check for any recent changes or updates to the endpoint's software or configuration that could explain the alert, ensuring they are legitimate and authorized.
- Assess the risk score and severity of the alert in conjunction with other alerts from the same endpoint to prioritize the investigation and response efforts.
### False positive analysis
- Alerts triggered by routine software updates can be false positives. Users can create exceptions for known update processes to prevent unnecessary alerts.
- System maintenance activities, such as scheduled scans or backups, may generate alerts. Exclude these activities by identifying their specific event signatures and adding them to the exception list.
- Legitimate administrative actions, like remote desktop sessions or script executions by IT staff, might be flagged. Define exceptions for these actions by correlating them with authorized user accounts or IP addresses.
- Frequent alerts from non-malicious applications that interact with system processes can be excluded by whitelisting these applications based on their hash or path.
- Network monitoring tools that simulate attack patterns for testing purposes may trigger alerts. Exclude these tools by specifying their known behaviors and IP ranges in the exception settings.
### Response and remediation
- Isolate the affected endpoint immediately to prevent further unauthorized access or lateral movement within the network.
- Analyze the alert details to identify the specific unauthorized code or process manipulation involved, and terminate any malicious processes identified.
- Remove any unauthorized code or files from the affected endpoint, ensuring that all traces of the threat are eradicated.
- Conduct a thorough review of system logs and event data to identify any additional indicators of compromise or related suspicious activities.
- Update endpoint security configurations and signatures to prevent similar threats from exploiting the same vulnerabilities in the future.
- Restore the affected endpoint from a known good backup if necessary, ensuring that the system is free from any residual threats.
- Escalate the incident to the security operations center (SOC) or relevant team for further analysis and to determine if additional systems may be affected."""
risk_score = 47
rule_id = "9a1a2dae-0b5f-4c3d-8305-a268d404c306"
rule_name_override = "message"
setup = """## Setup
### Elastic Defend Alerts
If this rule is disabled, you will not receive alerts for Elastic Defend alerts. This rule is designed to capture all alerts generated by Elastic Defend. For more granular alerting, consider using additional prebuilt-rules that capture specific Elastic Defend alerts.
If this rule is enabled, along with the related rules listed below, you will receive duplicate alerts for the same events. To avoid this, it is recommended to disable this generic rule and enable the more specific rules that capture these alerts separately.
Related rules:
- Behavior - Detected - Elastic Defend (UUID: 0f615fe4-eaa2-11ee-ae33-f661ea17fbce)
- Behavior - Prevented - Elastic Defend (UUID: eb804972-ea34-11ee-a417-f661ea17fbce)
- Malicious File - Detected - Elastic Defend (UUID: f2c3caa6-ea34-11ee-a417-f661ea17fbce)
- Malicious File - Prevented - Elastic Defend (UUID: f87e6122-ea34-11ee-a417-f661ea17fbce)
- Memory Threat - Detected - Elastic Defend (UUID: 017de1e4-ea35-11ee-a417-f661ea17fbce)
- Memory Threat - Prevented - Elastic Defend (UUID: 06f3a26c-ea35-11ee-a417-f661ea17fbce)
- Ransomware - Detected - Elastic Defend (UUID: 0c74cd7e-ea35-11ee-a417-f661ea17fbce)
- Ransomware - Prevented - Elastic Defend (UUID: 10f3d520-ea35-11ee-a417-f661ea17fbce)
### Additional notes
For information on troubleshooting the maximum alerts warning please refer to this [guide](https://www.elastic.co/guide/en/security/current/alerts-ui-monitor.html#troubleshoot-max-alerts).
"""
severity = "medium"
tags = ["Data Source: Elastic Defend", "Resources: Investigation Guide"]
timestamp_override = "event.ingested"
type = "query"
query = '''
event.kind:alert and event.module:(endpoint and not endgame)
'''
[[rule.exceptions_list]]
id = "endpoint_list"
list_id = "endpoint_list"
namespace_type = "agnostic"
type = "endpoint"
[[rule.risk_score_mapping]]
field = "event.risk_score"
operator = "equals"
value = ""
[[rule.severity_mapping]]
field = "event.severity"
operator = "equals"
severity = "low"
value = "21"
[[rule.severity_mapping]]
field = "event.severity"
operator = "equals"
severity = "medium"
value = "47"
[[rule.severity_mapping]]
field = "event.severity"
operator = "equals"
severity = "high"
value = "73"
[[rule.severity_mapping]]
field = "event.severity"
operator = "equals"
severity = "critical"
value = "99"
Stages and Predicates
Stage 1: query
event.kind:alert and event.module:(endpoint and not endgame)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.kind | eq |
| field:"event.kind" kind:eq value:"alert" |
event.module | eq |
| field:"event.module" kind:eq value:"endpoint" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
event.module | eq | endgame | excludes:event.module field:"event.module" value:"endgame" |
Execution of a File Dropped from SMB via Services
#Identifies the execution of a file that was created by the virtual system process and subsequently executed as a child of services.exe. This may indicate lateral movement via remote services.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement |
Rule Body
[rule]
description = """
Identifies the execution of a file that was created by the virtual system process and subsequently executed as a child
of services.exe. This may indicate lateral movement via remote services.
"""
id = "713501c8-d1fa-49be-bf91-0ae916a088f6"
license = "Elastic License v2"
name = "Execution of a File Dropped from SMB via Services"
os_list = ["windows"]
version = "1.0.20"
query = '''
sequence with maxspan=3m
[file where event.action != "deletion" and
/* library dropped via SMB */
process.pid == 4 and user.id : ("S-1-5-21*", "S-1-12-*") and
(file.extension : "exe" or file.Ext.header_bytes : "4d5a*")] by file.path
[process where event.action == "start" and
process.parent.name : "services.exe" and
(
process.executable : ("?:\\ProgramData\\*", "?:\\Users\\*", "?:\\Windows\\Tasks\\*") or
(process.executable regex~ """[A-Za-z]:\\Windows\\[a-zA-Z0-9\-\_\.]+""" and process.code_signature.exists == false)
) and
/* Signed False Positives */
not (process.code_signature.subject_name :
("RAPIDFIRE TOOLS INC.",
"Arcserve (USA) LLC",
"PDQ.COM CORPORATION",
"Veeam Software Group GmbH",
"Veeam Software AG",
"LANDesk Software, Inc.",
"Cynet Security LTD",
"CyberArk Software Ltd.",
"Barracuda Networks, Inc.",
"AVG Technologies Canada, Inc.",
"ConnectWise, Inc.",
"Ivanti, Inc.",
"FUJITSU LIMITED",
"Shavlik Technologies",
"Kaspersky Lab JSC",
"Netalytics Security Inc",
"Elasticsearch, Inc.",
"Netwrix Corporation",
"Power Admin LLC",
"Notepad++",
"The Apache Software Foundation",
"HashInclude Computech Pvt. Ltd.",
"DIGITAL DEFENSE, INC",
"Snow Software AB",
"GOVERLAN, LLC",
"Veritas Technologies LLC",
"Bitdefender SRL",
"Kaseya Corporation",
"Insecure.Com LLC",
"ZOHO Corporation Private Limited",
"VMware, Inc.",
"Medical Information Technology, Inc.",
"baramundi software AG",
"ServiceNow, Inc.",
"Panda Security, S.L.",
"CoSoSys SRL",
"N-ABLE TECHNOLOGIES LTD",
"CISCO SYSTEMS, INC.",
"TeamViewer Germany GmbH",
"SysAid Technologies LTD",
"Sophos Ltd",
"Ericsson",
"Tenable Network Security Inc.",
"NETSUPPORT LTD.",
"Lansweeper",
"Helge Klein GmbH",
"Netwrix Corporation",
"highsystem ag",
"Beyondtrust Software Inc",
"Oracle America, Inc.",
"KnowBe4 Inc.",
"GoTo Technologies USA, LLC",
"Icona S.R.L.",
"LogMeIn, Inc.",
"Dell Inc.") and process.code_signature.trusted == true) and
not (process.code_signature.subject_name in ("Medical Information Technology, Inc.", "CyberArk Software Ltd.", "VMware, Inc.") and
process.code_signature.status in ("errorTimeStamp", "errorChaining")) and
/* unsigned FP - PowerAdmin LLC 8a203d0dd4821b42ca399140e093919348b60ac43140e92f88d047263e2c57b4 */
not (process.pe.original_file_name == "PAExec.exe" and
process.executable : "?:\\Windows\\PAExec-*.exe" and process.parent.name : "services.exe") and
not (process.pe.original_file_name : "psexesvc.exe" and
process.code_signature.subject_name in ("Sysinternals", "Microsoft Corporation") and
process.code_signature.trusted == true and process.name : "PSEXESVC.EXE") and
not (process.pe.original_file_name == "psloglist.exe" and
process.code_signature.subject_name in ("Sysinternals", "Microsoft Corporation") and
process.code_signature.trusted == true and not process.args : "-c") and
not (process.code_signature.subject_name == "Microsoft Corporation" and
process.code_signature.trusted == true and
process.pe.original_file_name : ("MOMAgentInstaller.exe", "dotnet-hosting-*-win.exe", "dpmac.exe",
"migrate.exe", "Ms.Dsp.Do.Inc.Installer.exe", "OpenHandleCollector.exe")) and
/* unsigned FPs */
/* Alignia Remote Command Execution Manager */
not (process.pe.original_file_name == "T4RCEM.exe" and process.args : "10000" and
process.parent.name : "services.exe" and process.args_count >= 4) and
/* unsigned McAfee Remote Installer */
not (process.pe.original_file_name == "wstub32.exe" and
process.args : "/InstDir=<PROGRAM_FILES_DIR>\\McAfee\\Agent" and
process.args : "/Install=Agent" and process.parent.name : "services.exe") and
/* FortiClientSetup - unsigned */
not (process.pe.original_file_name == "FortiClientSetup.exe" and
process.args : "/schid" and process.args : "/deviceid" and process.parent.name : "services.exe") and
/* fart-it.sourceforge.net, IseExecSvc, OCS Inventory Agent,Tenable MW Scanner and HPCmdSvc */
not process.hash.sha256 in
("c9ef35bed70ffa0981bafd0071185b56fdad8f9c97f3582a4dae9b420959fb97",
"18dc098895ccc8246d417445a36d933c5f8487419b848ebe651fd0e11cb22afa",
"ea98309a35f92443b9c50736ce208656ec72af114ec8aceeb02dfa041ec2d6bc",
"bcf07679ea026f1dfba6f9ab63251e4834dc007bd2c5b9039deb9d900fe1c5e6",
"1c6af94b26f369e2c10819eefb869f873e5540e2c1b7bf4c7c632fc03d67368a",
"6dfc3a0733f427779b250913811baa429002042cb8e7732ea7d334bf725b8bd0",
"ae0fb4bf4a6faa4b808794b6e6ccbdf9f10c1ce01a86ccece002ac63cf09ff29",
"cd5ff596b7bacb117f90893f94fd8c542b659cc58f90ed1fbd0471fe85148bff",
"5e7785fede192d69e408c8c41ba14aead2f4b297c9faecc991e061b093b91f70",
"08d019e46a8755c33ad9ff9b96b5409a9005d87ba4e3cc58bdd8cf10eb0cd987",
"81e6e6feaac8b3267608af98667d3ccf78a15e540e6a5d18858d9147aacd1e16",
"a07b0b72bb00d9e9debd38c2b4bd770beb7d6cf6148d2f7fba50d7a7078deb04",
"bc10fdc46d17765c619db70ef19cd3755a3270692481d8417bfff3fceb4eba10",
"bb53243baeb4e4cc204e5b9981cc0c671e0855f56293df5106b9b3beac30cc15",
"c5593f5d965994a50985b529e77b97c348c7af084dbbaba270d83b1b06302d2c",
"7f8e465edd27cdcd1d28292c35440d745b8bd528e21d6f56eb683b65d922eaed",
"ef7dbfe3a3910ddb93989f0d5d8f1fb4d39e0df7e53f55d042f4ccd80699c81f",
"bb53243baeb4e4cc204e5b9981cc0c671e0855f56293df5106b9b3beac30cc15",
"bc10fdc46d17765c619db70ef19cd3755a3270692481d8417bfff3fceb4eba10",
"ef7dbfe3a3910ddb93989f0d5d8f1fb4d39e0df7e53f55d042f4ccd80699c81f",
"39b3ae96186b7e62b9176e6d2ae27db3e164a7c8c52c094c811dd19d651577f2",
"5e7785fede192d69e408c8c41ba14aead2f4b297c9faecc991e061b093b91f70",
"b9fc7dea50ce1e0637a3628abc89f96d8cfaad1b7c6ad33dd8bb17028ed3eaee",
"5e81eaedc6bba9c9b475f990cdc31ee3c48962fffb63d65afc1447ea6b95f910",
"ec7d2582c06d28191b2efaf6780cdfa5c1319f3081bd001d4572cbeea0068b48",
"4208e349ff97a2dc6100ee9e5e61e23ab650b316e62dd4a25d1119a08a59f298",
"c4c6b0db707020364cd398d2a7a3eb2516cfeb0a011557dce3393e25eaa90be4",
"4feacc0b469215c816865909aedcb52834acab86d9677a74ec559529290373e9",
"141b2190f51397dbd0dfde0e3904b264c91b6f81febc823ff0c33da980b69944",
"ae43b51f5c5795eba6fffbcf901ced7215b86342451aa4ef39b4f2d8f649fa81",
"11a4758eaaf7bd88ff826860441658905ee2d5198efbdc61259136a3f968c8f5",
"47dbc1fda7e540f996a6ef035b476cd50987c5bf163c04334752a051c05ae37d",
"c71ddd9aeaed18b6a3e6c80119504ececdfa329328e4a814913be6113c8efb1d",
"dbc16e5afe0c0922df779952350d7fb5103a54ae7767b97d192e2d90a76ed88a",
"5e1e2c6a88711a716805695996d2e9906de713ec3abd9eb5376b087438f33a40",
"79db4d8a9a8e87214d20eef964bc9bfc3a7f5abf162d98fa7eae2dd7e96ef272",
"7f8e465edd27cdcd1d28292c35440d745b8bd528e21d6f56eb683b65d922eaed",
"3b47eeb28734ced42682be0806786ae4ac460bf7545934bae5fc367df23fa6e9",
"2b25e0331289460dbaed2d851b92f43e6999f694bf17964a8786f3a4cce602a6",
"67201716f8126a0445cda79f55336140066071acb4d72d9a489e19125d3aa8f6",
"87952d419caf8fe11dad35f63ac1d09ba58fb9347567557750e24d1ff271fbb7",
"9c2ffb59617d1e0710f04aa0b3541a089c2b5e0e81072511a16b78922fe204a9") and
not (process.pe.original_file_name == "PortalService.exe" and
process.executable : "E:\\EZ\\EZAccess\\Service\\*\\PortalService.exe" and process.parent.name : "services.exe") and
not (process.code_signature.subject_name == "CyberArk Software Ltd." and
process.executable : "?:\\Windows\\CAInvokerService.exe" and process.pe.original_file_name == "PSMWinAgentInvoker.exe")
] by process.executable
'''
min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1
tree = true
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 1
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1021"
name = "Remote Services"
reference = "https://attack.mitre.org/techniques/T1021/"
[[threat.technique.subtechnique]]
id = "T1021.002"
name = "SMB/Windows Admin Shares"
reference = "https://attack.mitre.org/techniques/T1021/002/"
[threat.tactic]
id = "TA0008"
name = "Lateral Movement"
reference = "https://attack.mitre.org/tactics/TA0008/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Ordered sequence: each step below must occur in order within 3m, correlated by file.path, process.executable.
Stage 1: file
[file where event.action != "deletion" and
process.pid == 4 and user.id : ("S-1-5-21*", "S-1-12-*") and
(file.extension : "exe" or file.Ext.header_bytes : "4d5a*")] by file.path
Stage 2: process
[process where event.action == "start" and
process.parent.name : "services.exe" and
(
process.executable : ("?:\\ProgramData\\*", "?:\\Users\\*", "?:\\Windows\\Tasks\\*") or
(process.executable regex~ """[A-Za-z]:\\Windows\\[a-zA-Z0-9\-\_\.]+""" and process.code_signature.exists == false)
) and
not (process.code_signature.subject_name :
("RAPIDFIRE TOOLS INC.",
"Arcserve (USA) LLC",
"PDQ.COM CORPORATION",
"Veeam Software Group GmbH",
"Veeam Software AG",
"LANDesk Software, Inc.",
"Cynet Security LTD",
"CyberArk Software Ltd.",
"Barracuda Networks, Inc.",
"AVG Technologies Canada, Inc.",
"ConnectWise, Inc.",
"Ivanti, Inc.",
"FUJITSU LIMITED",
"Shavlik Technologies",
"Kaspersky Lab JSC",
"Netalytics Security Inc",
"Elasticsearch, Inc.",
"Netwrix Corporation",
"Power Admin LLC",
"Notepad++",
"The Apache Software Foundation",
"HashInclude Computech Pvt. Ltd.",
"DIGITAL DEFENSE, INC",
"Snow Software AB",
"GOVERLAN, LLC",
"Veritas Technologies LLC",
"Bitdefender SRL",
"Kaseya Corporation",
"Insecure.Com LLC",
"ZOHO Corporation Private Limited",
"VMware, Inc.",
"Medical Information Technology, Inc.",
"baramundi software AG",
"ServiceNow, Inc.",
"Panda Security, S.L.",
"CoSoSys SRL",
"N-ABLE TECHNOLOGIES LTD",
"CISCO SYSTEMS, INC.",
"TeamViewer Germany GmbH",
"SysAid Technologies LTD",
"Sophos Ltd",
"Ericsson",
"Tenable Network Security Inc.",
"NETSUPPORT LTD.",
"Lansweeper",
"Helge Klein GmbH",
"Netwrix Corporation",
"highsystem ag",
"Beyondtrust Software Inc",
"Oracle America, Inc.",
"KnowBe4 Inc.",
"GoTo Technologies USA, LLC",
"Icona S.R.L.",
"LogMeIn, Inc.",
"Dell Inc.") and process.code_signature.trusted == true) and
not (process.code_signature.subject_name in ("Medical Information Technology, Inc.", "CyberArk Software Ltd.", "VMware, Inc.") and
process.code_signature.status in ("errorTimeStamp", "errorChaining")) and
not (process.pe.original_file_name == "PAExec.exe" and
process.executable : "?:\\Windows\\PAExec-*.exe" and process.parent.name : "services.exe") and
not (process.pe.original_file_name : "psexesvc.exe" and
process.code_signature.subject_name in ("Sysinternals", "Microsoft Corporation") and
process.code_signature.trusted == true and process.name : "PSEXESVC.EXE") and
not (process.pe.original_file_name == "psloglist.exe" and
process.code_signature.subject_name in ("Sysinternals", "Microsoft Corporation") and
process.code_signature.trusted == true and not process.args : "-c") and
not (process.code_signature.subject_name == "Microsoft Corporation" and
process.code_signature.trusted == true and
process.pe.original_file_name : ("MOMAgentInstaller.exe", "dotnet-hosting-*-win.exe", "dpmac.exe",
"migrate.exe", "Ms.Dsp.Do.Inc.Installer.exe", "OpenHandleCollector.exe")) and
not (process.pe.original_file_name == "T4RCEM.exe" and process.args : "10000" and
process.parent.name : "services.exe" and process.args_count >= 4) and
not (process.pe.original_file_name == "wstub32.exe" and
process.args : "/InstDir=<PROGRAM_FILES_DIR>\\McAfee\\Agent" and
process.args : "/Install=Agent" and process.parent.name : "services.exe") and
not (process.pe.original_file_name == "FortiClientSetup.exe" and
process.args : "/schid" and process.args : "/deviceid" and process.parent.name : "services.exe") and
not process.hash.sha256 in
("c9ef35bed70ffa0981bafd0071185b56fdad8f9c97f3582a4dae9b420959fb97",
"18dc098895ccc8246d417445a36d933c5f8487419b848ebe651fd0e11cb22afa",
"ea98309a35f92443b9c50736ce208656ec72af114ec8aceeb02dfa041ec2d6bc",
"bcf07679ea026f1dfba6f9ab63251e4834dc007bd2c5b9039deb9d900fe1c5e6",
"1c6af94b26f369e2c10819eefb869f873e5540e2c1b7bf4c7c632fc03d67368a",
"6dfc3a0733f427779b250913811baa429002042cb8e7732ea7d334bf725b8bd0",
"ae0fb4bf4a6faa4b808794b6e6ccbdf9f10c1ce01a86ccece002ac63cf09ff29",
"cd5ff596b7bacb117f90893f94fd8c542b659cc58f90ed1fbd0471fe85148bff",
"5e7785fede192d69e408c8c41ba14aead2f4b297c9faecc991e061b093b91f70",
"08d019e46a8755c33ad9ff9b96b5409a9005d87ba4e3cc58bdd8cf10eb0cd987",
"81e6e6feaac8b3267608af98667d3ccf78a15e540e6a5d18858d9147aacd1e16",
"a07b0b72bb00d9e9debd38c2b4bd770beb7d6cf6148d2f7fba50d7a7078deb04",
"bc10fdc46d17765c619db70ef19cd3755a3270692481d8417bfff3fceb4eba10",
"bb53243baeb4e4cc204e5b9981cc0c671e0855f56293df5106b9b3beac30cc15",
"c5593f5d965994a50985b529e77b97c348c7af084dbbaba270d83b1b06302d2c",
"7f8e465edd27cdcd1d28292c35440d745b8bd528e21d6f56eb683b65d922eaed",
"ef7dbfe3a3910ddb93989f0d5d8f1fb4d39e0df7e53f55d042f4ccd80699c81f",
"bb53243baeb4e4cc204e5b9981cc0c671e0855f56293df5106b9b3beac30cc15",
"bc10fdc46d17765c619db70ef19cd3755a3270692481d8417bfff3fceb4eba10",
"ef7dbfe3a3910ddb93989f0d5d8f1fb4d39e0df7e53f55d042f4ccd80699c81f",
"39b3ae96186b7e62b9176e6d2ae27db3e164a7c8c52c094c811dd19d651577f2",
"5e7785fede192d69e408c8c41ba14aead2f4b297c9faecc991e061b093b91f70",
"b9fc7dea50ce1e0637a3628abc89f96d8cfaad1b7c6ad33dd8bb17028ed3eaee",
"5e81eaedc6bba9c9b475f990cdc31ee3c48962fffb63d65afc1447ea6b95f910",
"ec7d2582c06d28191b2efaf6780cdfa5c1319f3081bd001d4572cbeea0068b48",
"4208e349ff97a2dc6100ee9e5e61e23ab650b316e62dd4a25d1119a08a59f298",
"c4c6b0db707020364cd398d2a7a3eb2516cfeb0a011557dce3393e25eaa90be4",
"4feacc0b469215c816865909aedcb52834acab86d9677a74ec559529290373e9",
"141b2190f51397dbd0dfde0e3904b264c91b6f81febc823ff0c33da980b69944",
"ae43b51f5c5795eba6fffbcf901ced7215b86342451aa4ef39b4f2d8f649fa81",
"11a4758eaaf7bd88ff826860441658905ee2d5198efbdc61259136a3f968c8f5",
"47dbc1fda7e540f996a6ef035b476cd50987c5bf163c04334752a051c05ae37d",
"c71ddd9aeaed18b6a3e6c80119504ececdfa329328e4a814913be6113c8efb1d",
"dbc16e5afe0c0922df779952350d7fb5103a54ae7767b97d192e2d90a76ed88a",
"5e1e2c6a88711a716805695996d2e9906de713ec3abd9eb5376b087438f33a40",
"79db4d8a9a8e87214d20eef964bc9bfc3a7f5abf162d98fa7eae2dd7e96ef272",
"7f8e465edd27cdcd1d28292c35440d745b8bd528e21d6f56eb683b65d922eaed",
"3b47eeb28734ced42682be0806786ae4ac460bf7545934bae5fc367df23fa6e9",
"2b25e0331289460dbaed2d851b92f43e6999f694bf17964a8786f3a4cce602a6",
"67201716f8126a0445cda79f55336140066071acb4d72d9a489e19125d3aa8f6",
"87952d419caf8fe11dad35f63ac1d09ba58fb9347567557750e24d1ff271fbb7",
"9c2ffb59617d1e0710f04aa0b3541a089c2b5e0e81072511a16b78922fe204a9") and
not (process.pe.original_file_name == "PortalService.exe" and
process.executable : "E:\\EZ\\EZAccess\\Service\\*\\PortalService.exe" and process.parent.name : "services.exe") and
not (process.code_signature.subject_name == "CyberArk Software Ltd." and
process.executable : "?:\\Windows\\CAInvokerService.exe" and process.pe.original_file_name == "PSMWinAgentInvoker.exe")
] by process.executable
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"start" |
event.action | ne |
| field:"EventType" kind:ne value:"deletion" |
file.Ext.header_bytes | wildcard |
| field:"file.Ext.header_bytes" kind:wildcard value:"4d5a*" |
file.extension | wildcard |
| field:"file.extension" kind:wildcard value:"exe" |
process.args | wildcard |
| field:"process.args" kind:wildcard value:"-c" |
process.code_signature.exists | eq |
| field:"process.code_signature.exists" kind:eq value:"false" |
process.executable | regex_match |
| field:"Image" kind:regex_match value:"[A-Za-z]:\Windows\[a-zA-Z0-9\-\_.]+" |
process.executable | wildcard |
| field:"Image" kind:wildcard |
process.parent.name | wildcard |
| field:"parent_process_basename" kind:wildcard value:"services.exe" |
process.pid | eq |
| field:"process_id" kind:eq value:"4" |
user.id | wildcard |
| field:"user.id" kind:wildcard |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.args | eq | -c | excludes:process.args field:"process.args" value:"-c" |
process.code_signature.subject_name | in | Microsoft Corporation, Sysinternals | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Microsoft Corporation" field:"process.code_signature.subject_name" value:"Sysinternals" |
process.code_signature.trusted | eq | true | excludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true" |
process.pe.original_file_name | eq | psloglist.exe | excludes:process.pe.original_file_name field:"process.pe.original_file_name" value:"psloglist.exe" |
process.args | eq | /InstDir=<PROGRAM_FILES_DIR>\McAfee\Agent | excludes:process.args field:"process.args" value:"/InstDir=<PROGRAM_FILES_DIR>\McAfee\Agent" |
process.args | eq | /Install=Agent | excludes:process.args field:"process.args" value:"/Install=Agent" |
process.parent.name | eq | services.exe | excludes:process.parent.name field:"process.parent.name" value:"services.exe" |
process.pe.original_file_name | eq | wstub32.exe | excludes:process.pe.original_file_name field:"process.pe.original_file_name" value:"wstub32.exe" |
process.args | eq | /deviceid | excludes:process.args field:"process.args" value:"/deviceid" |
process.args | eq | /schid | excludes:process.args field:"process.args" value:"/schid" |
process.pe.original_file_name | eq | FortiClientSetup.exe | excludes:process.pe.original_file_name field:"process.pe.original_file_name" value:"FortiClientSetup.exe" |
process.args | eq | 10000 | excludes:process.args field:"process.args" value:"10000" |
process.args_count | ge | 4 | excludes:process.args_count field:"process.args_count" value:"4" |
process.pe.original_file_name | eq | T4RCEM.exe | excludes:process.pe.original_file_name field:"process.pe.original_file_name" value:"T4RCEM.exe" |
process.code_signature.status | in | errorChaining, errorTimeStamp | excludes:process.code_signature.status field:"process.code_signature.status" value:"errorChaining" field:"process.code_signature.status" value:"errorTimeStamp" |
process.code_signature.subject_name | in | CyberArk Software Ltd., Medical Information Technology, Inc., VMware, Inc. | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"CyberArk Software Ltd." field:"process.code_signature.subject_name" value:"Medical Information Technology, Inc." field:"process.code_signature.subject_name" value:"VMware, Inc." |
process.code_signature.subject_name | eq | CyberArk Software Ltd. | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"CyberArk Software Ltd." |
process.executable | eq | ?:\Windows\CAInvokerService.exe | excludes:process.executable field:"process.executable" value:"?:\Windows\CAInvokerService.exe" |
process.pe.original_file_name | eq | PSMWinAgentInvoker.exe | excludes:process.pe.original_file_name field:"process.pe.original_file_name" value:"PSMWinAgentInvoker.exe" |
process.code_signature.subject_name | eq | Microsoft Corporation | excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Microsoft Corporation" |
process.pe.original_file_name | wildcard | MOMAgentInstaller.exe, dotnet-hosting-*-win.exe, dpmac.exe, migrate.exe, Ms.Dsp.Do.Inc.Installer.exe, OpenHandleCollector.exe | excludes:process.pe.original_file_name |
process.code_signature.subject_name | eq | RAPIDFIRE TOOLS INC., Arcserve (USA) LLC, PDQ.COM CORPORATION, Veeam Software Group GmbH, Veeam Software AG, LANDesk Software, Inc., Cynet Security LTD, CyberArk Software Ltd., Barracuda Networks, Inc., AVG Technologies Canada, Inc., ConnectWise, Inc., Ivanti, Inc., FUJITSU LIMITED, Shavlik Technologies, Kaspersky Lab JSC, Netalytics Security Inc, Elasticsearch, Inc., Netwrix Corporation, Power Admin LLC, Notepad++, The Apache Software Foundation, HashInclude Computech Pvt. Ltd., DIGITAL DEFENSE, INC, Snow Software AB, GOVERLAN, LLC, Veritas Technologies LLC, Bitdefender SRL, Kaseya Corporation, Insecure.Com LLC, ZOHO Corporation Private Limited, VMware, Inc., Medical Information Technology, Inc., baramundi software AG, ServiceNow, Inc., Panda Security, S.L., CoSoSys SRL, N-ABLE TECHNOLOGIES LTD, CISCO SYSTEMS, INC., TeamViewer Germany GmbH, SysAid Technologies LTD, Sophos Ltd, Ericsson, Tenable Network Security Inc., NETSUPPORT LTD., Lansweeper, Helge Klein GmbH, Netwrix Corporation, highsystem ag, Beyondtrust Software Inc, Oracle America, Inc., KnowBe4 Inc., GoTo Technologies USA, LLC, Icona S.R.L., LogMeIn, Inc., Dell Inc. | excludes:process.code_signature.subject_name |
process.name | eq | PSEXESVC.EXE | excludes:process.name field:"process.name" value:"PSEXESVC.EXE" |
process.pe.original_file_name | eq | psexesvc.exe | excludes:process.pe.original_file_name field:"process.pe.original_file_name" value:"psexesvc.exe" |
process.executable | wildcard | ?:\Windows\PAExec-*.exe | excludes:process.executable field:"process.executable" value:"?:\Windows\PAExec-*.exe" |
process.pe.original_file_name | eq | PAExec.exe | excludes:process.pe.original_file_name field:"process.pe.original_file_name" value:"PAExec.exe" |
process.executable | wildcard | E:\EZ\EZAccess\Service\*\PortalService.exe | excludes:process.executable field:"process.executable" value:"E:\EZ\EZAccess\Service\*\PortalService.exe" |
process.pe.original_file_name | eq | PortalService.exe | excludes:process.pe.original_file_name field:"process.pe.original_file_name" value:"PortalService.exe" |
process.hash.sha256 | in | 08d019e46a8755c33ad9ff9b96b5409a9005d87ba4e3cc58bdd8cf10eb0cd987, 11a4758eaaf7bd88ff826860441658905ee2d5198efbdc61259136a3f968c8f5, 141b2190f51397dbd0dfde0e3904b264c91b6f81febc823ff0c33da980b69944, 18dc098895ccc8246d417445a36d933c5f8487419b848ebe651fd0e11cb22afa, 1c6af94b26f369e2c10819eefb869f873e5540e2c1b7bf4c7c632fc03d67368a, 2b25e0331289460dbaed2d851b92f43e6999f694bf17964a8786f3a4cce602a6, 39b3ae96186b7e62b9176e6d2ae27db3e164a7c8c52c094c811dd19d651577f2, 3b47eeb28734ced42682be0806786ae4ac460bf7545934bae5fc367df23fa6e9, 4208e349ff97a2dc6100ee9e5e61e23ab650b316e62dd4a25d1119a08a59f298, 47dbc1fda7e540f996a6ef035b476cd50987c5bf163c04334752a051c05ae37d, 4feacc0b469215c816865909aedcb52834acab86d9677a74ec559529290373e9, 5e1e2c6a88711a716805695996d2e9906de713ec3abd9eb5376b087438f33a40, 5e7785fede192d69e408c8c41ba14aead2f4b297c9faecc991e061b093b91f70, 5e81eaedc6bba9c9b475f990cdc31ee3c48962fffb63d65afc1447ea6b95f910, 67201716f8126a0445cda79f55336140066071acb4d72d9a489e19125d3aa8f6, 6dfc3a0733f427779b250913811baa429002042cb8e7732ea7d334bf725b8bd0, 79db4d8a9a8e87214d20eef964bc9bfc3a7f5abf162d98fa7eae2dd7e96ef272, 7f8e465edd27cdcd1d28292c35440d745b8bd528e21d6f56eb683b65d922eaed, 81e6e6feaac8b3267608af98667d3ccf78a15e540e6a5d18858d9147aacd1e16, 87952d419caf8fe11dad35f63ac1d09ba58fb9347567557750e24d1ff271fbb7, 9c2ffb59617d1e0710f04aa0b3541a089c2b5e0e81072511a16b78922fe204a9, a07b0b72bb00d9e9debd38c2b4bd770beb7d6cf6148d2f7fba50d7a7078deb04, ae0fb4bf4a6faa4b808794b6e6ccbdf9f10c1ce01a86ccece002ac63cf09ff29, ae43b51f5c5795eba6fffbcf901ced7215b86342451aa4ef39b4f2d8f649fa81, b9fc7dea50ce1e0637a3628abc89f96d8cfaad1b7c6ad33dd8bb17028ed3eaee, bb53243baeb4e4cc204e5b9981cc0c671e0855f56293df5106b9b3beac30cc15, bc10fdc46d17765c619db70ef19cd3755a3270692481d8417bfff3fceb4eba10, bcf07679ea026f1dfba6f9ab63251e4834dc007bd2c5b9039deb9d900fe1c5e6, c4c6b0db707020364cd398d2a7a3eb2516cfeb0a011557dce3393e25eaa90be4, c5593f5d965994a50985b529e77b97c348c7af084dbbaba270d83b1b06302d2c, c71ddd9aeaed18b6a3e6c80119504ececdfa329328e4a814913be6113c8efb1d, c9ef35bed70ffa0981bafd0071185b56fdad8f9c97f3582a4dae9b420959fb97, cd5ff596b7bacb117f90893f94fd8c542b659cc58f90ed1fbd0471fe85148bff, dbc16e5afe0c0922df779952350d7fb5103a54ae7767b97d192e2d90a76ed88a, ea98309a35f92443b9c50736ce208656ec72af114ec8aceeb02dfa041ec2d6bc, ec7d2582c06d28191b2efaf6780cdfa5c1319f3081bd001d4572cbeea0068b48, ef7dbfe3a3910ddb93989f0d5d8f1fb4d39e0df7e53f55d042f4ccd80699c81f | excludes:process.hash.sha256 |
First Time Seen NFS AUTH_SYS Root UID Access
#Identifies the first source and destination IP pair observed in a five-day history window where an NFS client asserts AUTH_SYS (RPC UNIX) credentials with UID 0 (root). NFSv3 and NFSv4 clients can claim arbitrary UIDs through AUTH_SYS, and weak export controls may honor root-equivalent access from unexpected hosts. This is a common precursor to unauthorized mounts, sensitive file reads, and remote encryption of exported shares.
Known False Positives
- Legitimate NFS root squashing misconfiguration, administrative automation, or backup appliances may present UID 0 from known infrastructure. Confirm the source IP against approved NFS client inventories before closing.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Collection |
Rule Body
[metadata]
creation_date = "2026/06/25"
integration = ["network_traffic"]
maturity = "production"
updated_date = "2026/06/25"
[rule]
author = ["Elastic"]
description = """
Identifies the first source and destination IP pair observed in a five-day history window where an NFS client asserts
AUTH_SYS (RPC UNIX) credentials with UID 0 (root). NFSv3 and NFSv4 clients can claim arbitrary UIDs through AUTH_SYS,
and weak export controls may honor root-equivalent access from unexpected hosts. This is a common precursor to
unauthorized mounts, sensitive file reads, and remote encryption of exported shares.
"""
false_positives = [
"""
Legitimate NFS root squashing misconfiguration, administrative automation, or backup appliances may present UID 0
from known infrastructure. Confirm the source IP against approved NFS client inventories before closing.
""",
]
from = "now-9m"
index = ["logs-network_traffic.nfs*"]
language = "kuery"
license = "Elastic License v2"
name = "First Time Seen NFS AUTH_SYS Root UID Access"
note = """## Triage and analysis
### Investigating First Time Seen NFS AUTH_SYS Root UID Access
NFS AUTH_SYS allows the client to assert UID/GID values on the wire. UID 0 maps to superuser access on many exports unless root squashing or Kerberos (RPCSEC_GSS) is enforced. Attackers abuse this to read secrets, traverse exports, or stage ransomware writes without a local root shell on the NFS server. This rule uses a five-day history window to identify the first observed source and destination IP pair presenting root credentials.
### Possible investigation steps
- Identify `source.ip` and confirm whether it is an approved NFS client for the targeted `destination.ip` export server.
- Review adjacent NFS operations from the same source for `READDIR`, `READ`, `WRITE`, or `REMOVE` activity that suggests enumeration, collection, or impact.
- Validate export policy on the server (`/etc/exports`, `exportfs -v`) for `no_root_squash`, overly broad client lists, or missing `sec=krb5`.
- Check endpoint telemetry on the source host for tooling such as `showmount`, `mount.nfs`, or Impacket-style NFS abuse.
### False positive analysis
- Known backup, imaging, or virtualization platforms sometimes mount exports as root from fixed infrastructure IPs. Create exceptions for those sources only after confirming stable client identity and expected operation mix.
- Migration or DR runbooks may temporarily mount with root to preserve ownership. Correlate with change tickets and bounded maintenance windows.
### Response and remediation
- Block unauthorized `source.ip` at the host firewall or export ACL and rotate any credentials read from the export.
- Enforce `root_squash`, narrow client allowlists, and RPCSEC_GSS on sensitive exports.
- Hunt for follow-on `WRITE`/`RENAME` bursts from the same client that may indicate ransomware activity.
"""
references = ["https://attack.mitre.org/techniques/T1213/", "https://attack.mitre.org/techniques/T1039/"]
risk_score = 47
rule_id = "35ef761a-7136-4cb9-a32d-4e7abddb3bac"
setup = """## Setup
This rule requires the Elastic **network_traffic** integration (Packetbeat via Elastic Agent) with the **NFS** protocol
module enabled on a sensor that observes NFS traffic to or from monitored exports (host agent, SPAN/mirror, or gateway).
"""
severity = "medium"
tags = [
"Domain: Network",
"Use Case: Threat Detection",
"Use Case: Network Security Monitoring",
"Tactic: Collection",
"Data Source: Network Packet Capture",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
data_stream.dataset:network_traffic.nfs and
network_traffic.nfs.rpc.cred.uid:0 and
network_traffic.nfs.rpc.auth_flavor:unix and
source.ip:* and destination.ip:*
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1039"
name = "Data from Network Shared Drive"
reference = "https://attack.mitre.org/techniques/T1039/"
[[rule.threat.technique]]
id = "T1213"
name = "Data from Information Repositories"
reference = "https://attack.mitre.org/techniques/T1213/"
[rule.threat.tactic]
id = "TA0009"
name = "Collection"
reference = "https://attack.mitre.org/tactics/TA0009/"
[rule.new_terms]
field = "new_terms_fields"
value = ["source.ip", "destination.ip"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-5d"
Stages and Predicates
Stage 1: new_terms
data_stream.dataset:network_traffic.nfs and
network_traffic.nfs.rpc.cred.uid:0 and
network_traffic.nfs.rpc.auth_flavor:unix and
source.ip:* and destination.ip:*
Indicators
These rows show field, operator, and value matches.
GenAI Process Accessing Sensitive Files
#Detects when GenAI tools access sensitive files such as cloud credentials, SSH keys, browser password databases, or shell configurations. Attackers leverage GenAI agents to systematically locate and exfiltrate credentials, API keys, and tokens. Access to credential stores (.aws/credentials, .ssh/id_*) suggests harvesting, while writes to shell configs (.bashrc, .zshrc) indicate persistence attempts. Note: On linux only creation events are available. Access events are not yet implemented.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Credential Access | |
| Collection |
MITRE ATLAS Coverage
Adversarial-ML threat framework (not MITRE ATT&CK).
| Tactic | Techniques |
|---|---|
| Credential Access | |
| Collection |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2025/12/04"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/07/06"
[rule]
author = ["Elastic"]
description = """
Detects when GenAI tools access sensitive files such as cloud credentials, SSH keys, browser password databases, or
shell configurations. Attackers leverage GenAI agents to systematically locate and exfiltrate credentials, API keys, and
tokens. Access to credential stores (.aws/credentials, .ssh/id_*) suggests harvesting, while writes to shell configs
(.bashrc, .zshrc) indicate persistence attempts. Note: On linux only creation events are available. Access events are
not yet implemented.
"""
from = "now-9m"
index = ["logs-endpoint.events.file*"]
language = "eql"
license = "Elastic License v2"
name = "GenAI Process Accessing Sensitive Files"
note = """## Triage and analysis
### Investigating GenAI Process Accessing Sensitive Files
This rule detects GenAI tools accessing credential files, SSH keys, browser data, or shell configurations. While GenAI tools legitimately access project files, access to sensitive credential stores is unusual and warrants investigation.
### Possible investigation steps
- Review the GenAI process that triggered the alert to identify which tool is being used and verify if it's an expected/authorized tool.
- Investigate the user account associated with the GenAI process to determine if this activity is expected for that user.
- Review the types of sensitive files being accessed (credentials, keys, browser data, etc.) to assess the potential impact of credential harvesting or data exfiltration.
- Check for other alerts or suspicious activity on the same host around the same time, particularly network exfiltration events.
- Verify if the GenAI tool or extension is from a trusted source and if it's authorized for use in your environment.
- Determine if the GenAI process accessed multiple sensitive directories in sequence, an indication of credential harvesting.
- Check if the GenAI tool recently created or accessed AI agent config files, which may contain instructions enabling autonomous file scanning.
- Review whether the access was preceded by an MCP server, LangChain agent, or background automation.
### False positive analysis
- Automated security scanning or auditing tools that leverage GenAI may access sensitive files as part of their normal operation.
- Development workflows that use GenAI tools for code analysis may occasionally access credential files.
### Response and remediation
- Immediately review the GenAI process that accessed the documents to determine if it's compromised or malicious.
- Review, rotate, and revoke any API keys, tokens, or credentials that may have been exposed or used by the GenAI tool.
- Investigate the document access patterns to determine the scope of potential data exfiltration.
- Update security policies to restrict or monitor GenAI tool usage in the environment, especially for access to sensitive files.
"""
references = [
"https://atlas.mitre.org/techniques/AML.T0085",
"https://atlas.mitre.org/techniques/AML.T0085.001",
"https://atlas.mitre.org/techniques/AML.T0055",
"https://glama.ai/blog/2025-11-11-the-lethal-trifecta-securing-model-context-protocol-against-data-flow-attacks",
"https://www.elastic.co/security-labs/elastic-advances-llm-security",
"https://specterops.io/blog/2025/11/21/an-evening-with-claude-code",
]
risk_score = 73
rule_id = "c0136397-f82a-45e5-9b9f-a3651d77e21a"
severity = "high"
tags = [
"Domain: Endpoint",
"OS: Linux",
"OS: macOS",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Collection",
"Tactic: Credential Access",
"Data Source: Elastic Defend",
"Resources: Investigation Guide",
"Domain: LLM",
"Mitre Atlas: T0085",
"Mitre Atlas: T0085.001",
"Mitre Atlas: T0055",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
file where event.action in ("open", "creation", "modification") and event.outcome == "success" and
// GenAI process
(
process.name in~ (
"ollama.exe", "ollama",
"textgen.exe", "textgen", "text-generation-webui.exe", "oobabooga.exe",
"lmstudio.exe", "lmstudio", "LM Studio",
"claude.exe", "claude",
"cursor.exe", "cursor",
"copilot.exe", "copilot",
"codex.exe", "codex",
"jan.exe", "jan",
"gpt4all.exe", "gpt4all",
"gemini-cli.exe", "gemini-cli", "gemini.exe",
"genaiscript.exe", "genaiscript",
"grok.exe", "grok",
"qwen.exe", "qwen",
"koboldcpp.exe", "koboldcpp",
"llama-server", "llama-cli",
"windsurf.exe", "windsurf",
"zed.exe", "zed",
"opencode.exe", "opencode",
"goose.exe", "goose"
)
) and
// Sensitive file paths
(
// Persistence via Shell configs
file.name in (".bashrc", ".bash_profile", ".zshrc", ".zshenv", ".zprofile", ".profile", ".bash_logout") or
// Credentials In Files
file.name like~
("key?.db",
"logins.json",
"Login Data",
"Local State",
"signons.sqlite",
"Cookies",
"cookies.sqlite",
"Cookies.binarycookies",
"login.keychain-db",
"System.keychain",
"credentials.db",
"credentials",
"access_tokens.db",
"accessTokens.json",
"azureProfile.json",
"RDCMan.settings",
"known_hosts",
"KeePass.config.xml",
"Unattended.xml")
) and not (
host.os.type == "windows" and
file.name like~ "Local State" and
file.path : (
"?:\\Users\\*\\AppData\\Roaming\\*\\Local State",
"?:\\Users\\*\\AppData\\Local\\Packages\\*\\LocalCache\\Roaming\\*\\Local State"
)
)
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1552"
name = "Unsecured Credentials"
reference = "https://attack.mitre.org/techniques/T1552/"
[[rule.threat.technique.subtechnique]]
id = "T1552.001"
name = "Credentials In Files"
reference = "https://attack.mitre.org/techniques/T1552/001/"
[[rule.threat.technique]]
id = "T1555"
name = "Credentials from Password Stores"
reference = "https://attack.mitre.org/techniques/T1555/"
[rule.threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1005"
name = "Data from Local System"
reference = "https://attack.mitre.org/techniques/T1005/"
[rule.threat.tactic]
id = "TA0009"
name = "Collection"
reference = "https://attack.mitre.org/tactics/TA0009/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1037"
name = "Boot or Logon Initialization Scripts"
reference = "https://attack.mitre.org/techniques/T1037/"
[[rule.threat.technique.subtechnique]]
id = "T1037.004"
name = "RC Scripts"
reference = "https://attack.mitre.org/techniques/T1037/004/"
[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
Stages and Predicates
Stage 1: file
file where event.action in ("open", "creation", "modification") and event.outcome == "success" and
(
process.name in~ (
"ollama.exe", "ollama",
"textgen.exe", "textgen", "text-generation-webui.exe", "oobabooga.exe",
"lmstudio.exe", "lmstudio", "LM Studio",
"claude.exe", "claude",
"cursor.exe", "cursor",
"copilot.exe", "copilot",
"codex.exe", "codex",
"jan.exe", "jan",
"gpt4all.exe", "gpt4all",
"gemini-cli.exe", "gemini-cli", "gemini.exe",
"genaiscript.exe", "genaiscript",
"grok.exe", "grok",
"qwen.exe", "qwen",
"koboldcpp.exe", "koboldcpp",
"llama-server", "llama-cli",
"windsurf.exe", "windsurf",
"zed.exe", "zed",
"opencode.exe", "opencode",
"goose.exe", "goose"
)
) and
(
file.name in (".bashrc", ".bash_profile", ".zshrc", ".zshenv", ".zprofile", ".profile", ".bash_logout") or
file.name like~
("key?.db",
"logins.json",
"Login Data",
"Local State",
"signons.sqlite",
"Cookies",
"cookies.sqlite",
"Cookies.binarycookies",
"login.keychain-db",
"System.keychain",
"credentials.db",
"credentials",
"access_tokens.db",
"accessTokens.json",
"azureProfile.json",
"RDCMan.settings",
"known_hosts",
"KeePass.config.xml",
"Unattended.xml")
) and not (
host.os.type == "windows" and
file.name like~ "Local State" and
file.path : (
"?:\\Users\\*\\AppData\\Roaming\\*\\Local State",
"?:\\Users\\*\\AppData\\Local\\Packages\\*\\LocalCache\\Roaming\\*\\Local State"
)
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | in |
| field:"EventType" kind:in |
event.outcome | eq |
| field:"event.outcome" kind:eq value:"success" |
file.name | in |
| field:"file.name" kind:in |
file.name | wildcard |
| field:"file.name" kind:wildcard |
process.name | in |
| field:"process_basename" kind:in |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
file.name | eq | Local State | excludes:file.name field:"file.name" value:"Local State" |
file.path | wildcard | ?:\Users\*\AppData\Roaming\*\Local State, ?:\Users\*\AppData\Local\Packages\*\LocalCache\Roaming\*\Local State | excludes:file.path field:"file.path" value:"?:\Users\*\AppData\Roaming\*\Local State" field:"file.path" value:"?:\Users\*\AppData\Local\Packages\*\LocalCache\Roaming\*\Local State" |
Kubernetes Forbidden Request from Unusual User Agent
#This rule detects when a forbidden request is made from an unusual user agent in a Kubernetes environment. Adversary tooling may use non-standard or unexpected user agents to interact with the Kubernetes API, which can indicate an attempt to evade detection or blend in with legitimate traffic. In combination with a forbidden request, this behavior can suggest an adversary is attempting to exploit vulnerabilities or misconfigurations in the Kubernetes cluster.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Kubernetes | Audit event ResponseComplete: API request response completed |
Rule Body
[metadata]
creation_date = "2025/06/17"
integration = ["kubernetes"]
maturity = "production"
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = """
This rule detects when a forbidden request is made from an unusual user agent in a Kubernetes environment.
Adversary tooling may use non-standard or unexpected user agents to interact with the Kubernetes API, which
can indicate an attempt to evade detection or blend in with legitimate traffic. In combination with a forbidden
request, this behavior can suggest an adversary is attempting to exploit vulnerabilities or misconfigurations
in the Kubernetes cluster.
"""
index = ["logs-kubernetes.audit_logs-*"]
language = "kuery"
license = "Elastic License v2"
name = "Kubernetes Forbidden Request from Unusual User Agent"
note = """ ## Triage and analysis
> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
### Investigating Kubernetes Forbidden Request from Unusual User Agent
Kubernetes, a container orchestration platform, manages applications across clusters. It uses APIs for communication, which can be targeted by adversaries using atypical user agents to mask malicious activities. These agents may attempt unauthorized actions, exploiting vulnerabilities. The detection rule identifies such anomalies by flagging forbidden requests from non-standard user agents, indicating potential threats.
### Possible investigation steps
- Review the Kubernetes audit logs to identify the source IP address and user associated with the forbidden request. This can help determine if the request originated from a known or unknown entity.
- Analyze the user agent string in the audit logs to understand its origin and purpose. Cross-reference it with known legitimate user agents to assess its legitimacy.
- Check for any recent changes or deployments in the Kubernetes environment that might have introduced new user agents or configurations, potentially leading to the forbidden request.
- Investigate the specific resource or API endpoint that was targeted by the forbidden request to understand what the adversary might have been attempting to access or exploit.
- Correlate the event with other security logs and alerts to identify any patterns or additional suspicious activities that might indicate a broader attack or reconnaissance effort.
- Assess the current security posture and configurations of the Kubernetes cluster to identify any vulnerabilities or misconfigurations that could be exploited by adversaries using unusual user agents.
### False positive analysis
- Legitimate internal tools or scripts may use non-standard user agents that are not included in the exclusion list. Review and identify these tools, then update the exclusion list to prevent them from being flagged.
- Automated processes or third-party integrations might use unique user agents that trigger the rule. Verify these processes and consider adding their user agents to the exclusion list if they are deemed safe.
- Development or testing environments often use custom user agents for API interactions. Ensure these environments are accounted for by excluding their user agents to avoid unnecessary alerts.
- Regularly review and update the exclusion list to reflect changes in legitimate user agents used within your organization, ensuring that only truly unusual and potentially malicious agents are flagged.
### Response and remediation
- Immediately isolate the affected Kubernetes node or cluster to prevent further unauthorized access or potential lateral movement by the adversary.
- Revoke any suspicious or unauthorized credentials or tokens that may have been used in the forbidden request to ensure they cannot be reused.
- Conduct a thorough review of the Kubernetes audit logs to identify any additional unauthorized or suspicious activities that may have occurred around the time of the alert.
- Patch any identified vulnerabilities or misconfigurations in the Kubernetes environment that may have been exploited, ensuring all components are up to date with the latest security patches.
- Implement stricter access controls and user agent validation to prevent non-standard user agents from interacting with the Kubernetes API unless explicitly allowed.
- Escalate the incident to the security operations team for further investigation and to determine if additional containment or remediation actions are necessary.
- Enhance monitoring and alerting for similar activities by tuning detection systems to recognize patterns associated with this type of threat, ensuring rapid response to future incidents.
"""
risk_score = 47
rule_id = "4b77d382-b78e-4aae-85a0-8841b80e4fc4"
severity = "medium"
tags = [
"Data Source: Kubernetes",
"Domain: Kubernetes",
"Use Case: Threat Detection",
"Tactic: Execution",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
data_stream.dataset:"kubernetes.audit_logs" and
kubernetes.audit.stage:"ResponseComplete" and
kubernetes.audit.annotations.authorization_k8s_io/decision:"forbid" and
user_agent.original:(* and not (*kubernetes/$Format))
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1613"
name = "Container and Resource Discovery"
reference = "https://attack.mitre.org/techniques/T1613/"
[rule.threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"
[rule.new_terms]
field = "new_terms_fields"
value = ["user_agent.original"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-7d"
Stages and Predicates
Stage 1: new_terms
data_stream.dataset:"kubernetes.audit_logs" and
kubernetes.audit.stage:"ResponseComplete" and
kubernetes.audit.annotations.authorization_k8s_io/decision:"forbid" and
user_agent.original:(* and not (*kubernetes/$Format))
Indicators
These rows show field, operator, and value matches.
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
user_agent.original | ends_with | kubernetes/$Format | excludes:user_agent.original field:"user_agent.original" value:"kubernetes/$Format" |
Mark-of-the-Web Removal by an Unusual Process
#Identifies an unusual process deleting the Zone.Identifier alternate data stream from an executable or Windows Installer package. Attackers can remove this stream to bypass Mark-of-the-Web protections.
Known False Positives
- Browsers, download utilities, and security tools may remove Mark-of-the-Web during legitimate file handling.
- Administrative scripts and software deployment tools may intentionally unblock trusted executables or installers.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2026/07/30"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/07/30"
[rule]
author = ["Elastic"]
description = """
Identifies an unusual process deleting the Zone.Identifier alternate data stream from an executable or Windows Installer
package. Attackers can remove this stream to bypass Mark-of-the-Web protections.
"""
false_positives = [
"Browsers, download utilities, and security tools may remove Mark-of-the-Web during legitimate file handling.",
"Administrative scripts and software deployment tools may intentionally unblock trusted executables or installers.",
]
from = "now-9m"
index = ["logs-endpoint.events.file-*"]
language = "eql"
license = "Elastic License v2"
name = "Mark-of-the-Web Removal by an Unusual Process"
references = [
"https://www.forcepoint.com/blog/x-labs/screenconnect-attack",
"https://www.sonicwall.com/blog/living-off-legit-tools-stealthy-installation-of-remote-monitoring-agents-using-smartscreen-bypass",
"https://any.run/cybersecurity-blog/rmm-blind-spot-for-cisos/",
"https://www.cyfirma.com/research/apt36-multi-vector-execution-malware-campaign-targeting-indian-government-entities/"
]
risk_score = 21
rule_id = "757371cd-5e9e-4adb-bc4e-d81f0ad0ec4d"
setup = """## Setup
This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
Setup instructions: https://ela.st/install-elastic-defend
"""
severity = "low"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Defense Evasion",
"Resources: Investigation Guide",
"Data Source: Elastic Defend",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
file where host.os.type == "windows" and event.type == "deletion" and
file.path : (
"*.exe:Zone.Identifier",
"*.exe:Zone.Identifier:$DATA",
"*.msi:Zone.Identifier",
"*.msi:Zone.Identifier:$DATA"
) and
/* Explorer may remove MOTW after SmartScreen */
not (
process.executable : "?:\\Windows\\explorer.exe" and
process.code_signature.trusted == true and
process.code_signature.subject_name : "Microsoft Windows"
)
'''
note = """## Triage and analysis
### Investigating Mark-of-the-Web Removal by an Unusual Process
#### Possible investigation steps
- Which process and account removed Mark-of-the-Web from which artifact?
- Focus: Review `file.path`, `process.executable`, `process.name`, `user.name`, and `host.name`.
- Implication: The alert establishes an attributed ADS deletion, not execution or intent. Treat a download, security, or deployment workflow as a benign candidate only when the exact remover, account, artifact, and an independent workflow record align.
- Does the deleting-process context fit an expected unblocking workflow?
- Focus: From related process events, review `process.command_line`, `process.parent.executable`, `process.code_signature.subject_name`, and `process.code_signature.trusted`.
- Hint: When `process.entity_id` is populated, review events for the same process entity on the alert host $investigate_0
- Implication: PowerShell unblocking or deployment activity needs an expected parent, operator or task, command, and target artifact; a trusted signer alone is insufficient. If `process.entity_id` is absent, use `host.id`, `process.pid`, and a tight alert-time window; missing related process telemetry remains unresolved.
- What provenance does the base executable or MSI have?
- Focus: Strip the terminal `:Zone.Identifier` or `:Zone.Identifier:$DATA` suffix, then search same-host file events for the base path and inspect `file.Ext.original.path`, `file.origin_url`, `file.origin_referrer_url`, `file.Ext.windows.zone_identifier`, and `file.hash.sha256` when populated.
- Hint: Start with the 24 hours before the deletion and widen to available retention when necessary.
- Implication: Missing download or file-origin telemetry is unresolved. Consistent source, hash, target directory, and a matching download or deployment record support the claimed workflow.
- Was the base artifact executed or used in an installation attempt after deletion?
- Focus: For an EXE, match the base path to `process.executable`; for an MSI, find `msiexec.exe` with the exact base path in `process.args`.
- Hint: Search the same host for five minutes after the deletion, then widen when evidence warrants; review lineage and follow-on file or process activity.
- Implication: A match establishes observed execution or an installation attempt, not maliciousness or installation success. Inconsistent provenance, lineage, or follow-on behavior supports escalation; no match only limits observed impact.
- Is the removal isolated or repeated on the host?
- Focus: Review deletions for the same ADS path $investigate_1
- Hint: When `user.id` is populated, review file deletions by the same user and process name, then retain only EXE or MSI `Zone.Identifier` paths $investigate_2
- Implication: If `user.id` is absent, use the exact-path results and a manual same-host search around the alert time. The broader transform returns all file deletions, not only MOTW removal; multiple unrelated matching artifacts support escalation, while a stable release set with the same expected workflow can support benign disposition.
- Escalate when remover context, provenance, follow-on behavior, or repeated unrelated targets conflict with an expected workflow. Close only when alert telemetry and an independent download, deployment, or security-tool record align for the exact actor and artifact. Preserve evidence and escalate mixed or incomplete cases.
### False positive analysis
- Browser, download-handler, security-product, administrative, and deployment workflows can remove Mark-of-the-Web legitimately. Confirm that the process identity and lineage, account and host, exact artifact, provenance, and an independent product or deployment record describe the same workflow before closing the alert.
- Add an exception only after recurring benign examples establish stable fields. Constrain it to alert fields such as the exact remover executable and signer, target path or package family, and expected account or host class; do not exclude PowerShell or all trusted processes globally.
### Response and remediation
- For unresolved activity, preserve the alert and source events, then recover the deleting-process and artifact context. Do not isolate a host solely on this low-severity signal.
- If malicious activity or suspicious follow-on behavior is confirmed, contain affected hosts or accounts with reversible controls. Preserve volatile evidence when active or memory-resident behavior warrants it, then terminate malicious processes and quarantine artifacts or persistence after evidence review.
- For confirmed benign activity, close the alert and consider a narrow exception only after recurring examples establish stable fields. Document affected paths, scope, observed workflow evidence, and telemetry gaps.
"""
[rule.investigation_fields]
field_names = [
"@timestamp",
"event.type",
"file.extension",
"file.name",
"file.path",
"host.id",
"host.name",
"process.code_signature.subject_name",
"process.code_signature.trusted",
"process.entity_id",
"process.executable",
"process.name",
"process.pid",
"user.domain",
"user.id",
"user.name",
]
[[transform.investigate]]
label = "Events for the deleting process on this host"
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" }
]
]
relativeFrom = "now-24h"
relativeTo = "now"
[[transform.investigate]]
label = "File deletions for the same ADS path"
description = ""
providers = [
[
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "event.category", queryType = "phrase", value = "file", valueType = "string" },
{ excluded = false, field = "file.path", queryType = "phrase", value = "{{file.path}}", valueType = "string" },
{ excluded = false, field = "event.type", queryType = "phrase", value = "deletion", valueType = "string" }
]
]
relativeFrom = "now-24h"
relativeTo = "now"
[[transform.investigate]]
label = "File deletions by the same user and process name"
description = ""
providers = [
[
{ excluded = false, field = "host.id", queryType = "phrase", value = "{{host.id}}", valueType = "string" },
{ excluded = false, field = "event.category", queryType = "phrase", value = "file", valueType = "string" },
{ excluded = false, field = "user.id", queryType = "phrase", value = "{{user.id}}", valueType = "string" },
{ excluded = false, field = "process.name", queryType = "phrase", value = "{{process.name}}", valueType = "string" },
{ excluded = false, field = "event.type", queryType = "phrase", value = "deletion", valueType = "string" }
]
]
relativeFrom = "now-24h"
relativeTo = "now"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1553"
name = "Subvert Trust Controls"
reference = "https://attack.mitre.org/techniques/T1553/"
[[rule.threat.technique.subtechnique]]
id = "T1553.005"
name = "Mark-of-the-Web Bypass"
reference = "https://attack.mitre.org/techniques/T1553/005/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
Stages and Predicates
Stage 1: file
file where host.os.type == "windows" and event.type == "deletion" and
file.path : (
"*.exe:Zone.Identifier",
"*.exe:Zone.Identifier:$DATA",
"*.msi:Zone.Identifier",
"*.msi:Zone.Identifier:$DATA"
) and
not (
process.executable : "?:\\Windows\\explorer.exe" and
process.code_signature.trusted == true and
process.code_signature.subject_name : "Microsoft Windows"
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"deletion" |
file.path | wildcard |
| field:"TargetFilename" kind:wildcard |
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 | ?:\Windows\explorer.exe | excludes:process.executable field:"process.executable" value:"?:\Windows\explorer.exe" |
Netsh Helper DLL
#Identifies the addition of a Netsh Helper DLL, netsh.exe supports the addition of these DLLs to extend its functionality. Attackers may abuse this mechanism to execute malicious payloads every time the utility is executed, which can be done by administrators or a scheduled task.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2023/08/29"
integration = ["endpoint", "m365_defender", "sentinel_one_cloud_funnel", "windows", "crowdstrike"]
maturity = "production"
updated_date = "2026/05/04"
[rule]
author = ["Elastic"]
description = """
Identifies the addition of a Netsh Helper DLL, netsh.exe supports the addition of these DLLs to extend its
functionality. Attackers may abuse this mechanism to execute malicious payloads every time the utility is executed,
which can be done by administrators or a scheduled task.
"""
from = "now-9m"
index = [
"logs-endpoint.events.registry-*",
"endgame-*",
"logs-m365_defender.event-*",
"logs-sentinel_one_cloud_funnel.*",
"logs-windows.sysmon_operational-*",
"logs-crowdstrike.fdr*",
]
language = "eql"
license = "Elastic License v2"
name = "Netsh Helper DLL"
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 Netsh Helper DLL
Netsh, a command-line utility in Windows, allows for network configuration and diagnostics. It supports extensibility through Helper DLLs, which can be added to enhance its capabilities. However, attackers can exploit this by adding malicious DLLs, ensuring their code runs whenever netsh is executed. The detection rule monitors registry changes related to netsh DLLs, flagging unauthorized modifications that may indicate persistence tactics.
### Possible investigation steps
- Review the registry path specified in the alert to confirm the presence of any unauthorized or suspicious DLLs under "HKLM\\Software\\Microsoft\\netsh\\".
- Check the timestamp of the registry change event to determine when the modification occurred and correlate it with any other suspicious activities or events on the system.
- Investigate the origin of the DLL file by examining its properties, such as the file path, creation date, and digital signature, to assess its legitimacy.
- Analyze recent user activity and scheduled tasks to identify any potential execution of netsh.exe that could have triggered the malicious DLL.
- Cross-reference the alert with other security logs and alerts from data sources like Microsoft Defender XDR or Sysmon to gather additional context and identify any related threats or indicators of compromise.
### False positive analysis
- Legitimate software installations or updates may add or modify Netsh Helper DLLs, triggering the detection rule. Users should verify if recent installations or updates coincide with the registry changes.
- Network management tools or scripts used by IT departments might legitimately extend netsh functionality. Identify and document these tools to create exceptions in the detection rule.
- Scheduled tasks or administrative scripts that configure network settings could cause expected changes. Review scheduled tasks and scripts to ensure they are authorized and adjust the rule to exclude these known activities.
- Security software or network monitoring solutions may interact with netsh for legitimate purposes. Confirm with the software vendor if their product modifies netsh settings and consider excluding these changes from the rule.
### Response and remediation
- Immediately isolate the affected system from the network to prevent further execution of the malicious DLL and potential lateral movement.
- Terminate any suspicious processes associated with netsh.exe to halt the execution of the malicious payload.
- Remove the unauthorized Netsh Helper DLL entry from the registry path identified in the alert to eliminate the persistence mechanism.
- Conduct a thorough scan of the affected system using an updated antivirus or endpoint detection and response (EDR) tool to identify and remove any additional malicious files or artifacts.
- Review and restore any altered system configurations to their original state to ensure system integrity.
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if additional systems are affected.
- Implement enhanced monitoring and logging for registry changes related to Netsh Helper DLLs to detect similar threats in the future."""
risk_score = 21
rule_id = "b0638186-4f12-48ac-83d2-47e686d08e82"
severity = "low"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Persistence",
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Microsoft Defender XDR",
"Data Source: SentinelOne",
"Data Source: Sysmon",
"Data Source: Crowdstrike",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
registry where host.os.type == "windows" and event.type == "change" and
registry.path : (
"HKLM\\Software\\Microsoft\\netsh\\*",
"\\REGISTRY\\MACHINE\\Software\\Microsoft\\netsh\\*",
"MACHINE\\Software\\Microsoft\\netsh\\*"
)
'''
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 = "T1546"
name = "Event Triggered Execution"
reference = "https://attack.mitre.org/techniques/T1546/"
[[rule.threat.technique.subtechnique]]
id = "T1546.007"
name = "Netsh Helper DLL"
reference = "https://attack.mitre.org/techniques/T1546/007/"
[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1112"
name = "Modify Registry"
reference = "https://attack.mitre.org/techniques/T1112/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
Stages and Predicates
Stage 1: registry
registry where host.os.type == "windows" and event.type == "change" and
registry.path : (
"HKLM\\Software\\Microsoft\\netsh\\*",
"\\REGISTRY\\MACHINE\\Software\\Microsoft\\netsh\\*",
"MACHINE\\Software\\Microsoft\\netsh\\*"
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"change" |
registry.path | wildcard |
| field:"TargetObject" kind:wildcard |
Outbound Scheduled Task Activity via PowerShell
#Identifies the PowerShell process loading the Task Scheduler COM DLL followed by an outbound RPC network connection within a short time period. This may indicate lateral movement or remote discovery via scheduled tasks.
Known False Positives
- Legitimate scheduled tasks may be created during installation of new software.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Lateral Movement |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 3: Network connection |
Rule Body
[metadata]
creation_date = "2020/12/15"
integration = ["endpoint", "windows"]
maturity = "production"
updated_date = "2026/05/04"
[rule]
author = ["Elastic"]
description = """
Identifies the PowerShell process loading the Task Scheduler COM DLL followed by an outbound RPC network connection
within a short time period. This may indicate lateral movement or remote discovery via scheduled tasks.
"""
false_positives = ["Legitimate scheduled tasks may be created during installation of new software."]
from = "now-9m"
index = [
"winlogbeat-*",
"logs-endpoint.events.library-*",
"logs-endpoint.events.network-*",
"logs-windows.sysmon_operational-*",
]
language = "eql"
license = "Elastic License v2"
name = "Outbound Scheduled Task Activity via PowerShell"
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 Outbound Scheduled Task Activity via PowerShell
PowerShell, a powerful scripting language in Windows, can automate tasks via the Task Scheduler. Adversaries exploit this by creating scheduled tasks to execute malicious scripts, facilitating lateral movement or remote discovery. The detection rule identifies suspicious PowerShell activity by monitoring for the Task Scheduler DLL load and subsequent outbound RPC connections, signaling potential misuse.
### Possible investigation steps
- Review the alert details to identify the specific host.id and process.entity_id associated with the suspicious activity.
- Examine the process execution history on the affected host to determine if the PowerShell process (powershell.exe, pwsh.exe, or powershell_ise.exe) has executed any unexpected or unauthorized scripts.
- Check the network logs for the host to identify any unusual or unauthorized outbound RPC connections, particularly those targeting port 135, and verify if the destination addresses are legitimate and expected.
- Investigate the context of the taskschd.dll library load by reviewing recent scheduled tasks on the host to identify any newly created or modified tasks that could be linked to the alert.
- Correlate the alert with other security events or logs from the same host or network segment to identify any patterns or additional indicators of compromise that may suggest lateral movement or remote discovery attempts.
### False positive analysis
- Legitimate administrative tasks using PowerShell may trigger the rule if they involve loading the Task Scheduler DLL and making RPC connections. To manage this, identify and whitelist specific scripts or processes that are known to perform these actions regularly.
- Automated system maintenance or monitoring tools might also load the Task Scheduler DLL and establish RPC connections. Review these tools and exclude their process IDs or hashes from the detection rule to prevent false alerts.
- Software updates or installations that use PowerShell scripts could mimic the behavior detected by the rule. Monitor update schedules and temporarily disable the rule during these periods if necessary, or create exceptions for known update processes.
- Developers or IT staff using PowerShell for legitimate remote management tasks may inadvertently trigger the rule. Implement user-based exceptions for trusted personnel or restrict the rule to non-administrative accounts to reduce false positives.
### Response and remediation
- Isolate the affected host immediately from the network to prevent further lateral movement or data exfiltration.
- Terminate the suspicious PowerShell process identified in the alert to stop any ongoing malicious activity.
- Conduct a forensic analysis of the affected system to identify any additional malicious scheduled tasks or scripts and remove them.
- Review and clean up any unauthorized scheduled tasks created on the system to ensure no persistence mechanisms remain.
- Reset credentials for any accounts that were used or potentially compromised during the incident to prevent unauthorized access.
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine the scope of the attack.
- Implement enhanced monitoring for similar PowerShell and scheduled task activities across the network to detect and respond to future threats promptly."""
references = [
"https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/",
"https://www.elastic.co/security-labs/hunting-for-lateral-movement-using-event-query-language",
]
risk_score = 47
rule_id = "5cd55388-a19c-47c7-8ec4-f41656c2fded"
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Execution",
"Data Source: Elastic Defend",
"Data Source: Sysmon",
"Resources: Investigation Guide",
]
type = "eql"
query = '''
sequence by host.id, process.entity_id with maxspan = 5s
[any where host.os.type == "windows" and (event.category == "library" or (event.category == "process" and event.action : "Image loaded*")) and
(?dll.name : "taskschd.dll" or file.name : "taskschd.dll") and process.name : ("powershell.exe", "pwsh.exe", "powershell_ise.exe")]
[network where host.os.type == "windows" and process.name : ("powershell.exe", "pwsh.exe", "powershell_ise.exe") and destination.port == 135 and not cidrmatch(destination.ip, "127.0.0.0/8", "::1/128")]
'''
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 3 - Network Connection](https://ela.st/sysmon-event-3-setup)
- [Sysmon Event ID 7 - Image Loaded](https://ela.st/sysmon-event-7-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.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[rule.threat.technique.subtechnique]]
id = "T1059.001"
name = "PowerShell"
reference = "https://attack.mitre.org/techniques/T1059/001/"
[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1021"
name = "Remote Services"
reference = "https://attack.mitre.org/techniques/T1021/"
[[rule.threat.technique.subtechnique]]
id = "T1021.003"
name = "Distributed Component Object Model"
reference = "https://attack.mitre.org/techniques/T1021/003/"
[rule.threat.tactic]
id = "TA0008"
name = "Lateral Movement"
reference = "https://attack.mitre.org/tactics/TA0008/"
Stages and Predicates
Ordered sequence: each step below must occur in order within 5s, correlated by host.id, process.entity_id.
Stage 1: any
[any where host.os.type == "windows" and (event.category == "library" or (event.category == "process" and event.action : "Image loaded*")) and
(?dll.name : "taskschd.dll" or file.name : "taskschd.dll") and process.name : ("powershell.exe", "pwsh.exe", "powershell_ise.exe")]
Stage 2: network
[network where host.os.type == "windows" and process.name : ("powershell.exe", "pwsh.exe", "powershell_ise.exe") and destination.port == 135 and not cidrmatch(destination.ip, "127.0.0.0/8", "::1/128")]
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
destination.port | eq |
| field:"DestinationPort" kind:eq value:"135" |
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 |
file.name | wildcard |
| field:"file.name" kind:wildcard value:"taskschd.dll" |
process.name | wildcard |
| field:"process_basename" kind:wildcard |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
destination.ip | cidr_match | 127.0.0.0/8, ::1/128 | excludes:destination.ip field:"destination.ip" value:"127.0.0.0/8" field:"destination.ip" value:"::1/128" |
Potential Credential Access via DCSync
#This rule identifies when a User Account starts the Active Directory Replication Process. Attackers can use the DCSync technique to get credential information of individual accounts or the entire domain, thus compromising the entire domain.
Known False Positives
- Service accounts that perform replication may trigger this alert on the first run per AD object, but they'll be suppressed in subsequent runs since this rule uses the new_terms rule type.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | |
| Credential Access |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4662: An operation was performed on an object. |
Rule Body
[metadata]
creation_date = "2022/02/08"
integration = ["system", "windows"]
maturity = "production"
updated_date = "2026/07/10"
[rule]
author = ["Elastic"]
description = """
This rule identifies when a User Account starts the Active Directory Replication Process. Attackers can use the DCSync
technique to get credential information of individual accounts or the entire domain, thus compromising the entire
domain.
"""
false_positives = [
"""
Service accounts that perform replication may trigger this alert on the first run per AD object, but they'll be
suppressed in subsequent runs since this rule uses the new_terms rule type.
"""
]
from = "now-9m"
index = ["logs-system.security*", "logs-windows.forwarded*", "winlogbeat-*"]
language = "kuery"
license = "Elastic License v2"
name = "Potential Credential Access via DCSync"
note = """## Triage and analysis
### Investigating Potential Credential Access via DCSync
Active Directory replication is the process by which the changes that originate on one domain controller are automatically transferred to other domain controllers that store the same data.
Active Directory data consists of objects that have properties, or attributes. Each object is an instance of an object class, and object classes and their respective attributes are defined in the Active Directory schema. Objects are defined by the values of their attributes, and changes to attribute values must be transferred from the domain controller on which they occur to every other domain controller that stores a replica of an affected object.
Adversaries can use the DCSync technique that uses Windows Domain Controller's API to simulate the replication process from a remote domain controller, compromising major credential material such as the Kerberos krbtgt keys used legitimately for tickets creation, but also tickets forging by attackers. This attack requires some extended privileges to succeed (DS-Replication-Get-Changes and DS-Replication-Get-Changes-All), which are granted by default to members of the Administrators, Domain Admins, Enterprise Admins, and Domain Controllers groups. Privileged accounts can be abused to grant controlled objects the right to DCsync/Replicate.
More details can be found on [Threat Hunter Playbook](https://threathunterplaybook.com/library/windows/active_directory_replication.html?highlight=dcsync#directory-replication-services-auditing) and [The Hacker Recipes](https://www.thehacker.recipes/ad/movement/credentials/dumping/dcsync).
This rule monitors for Event ID 4662 (Operation was performed on an Active Directory object) and identifies events that use the access mask 0x100 (Control Access) and properties that contain at least one of the following or their equivalent Schema-Id-GUID (DS-Replication-Get-Changes, DS-Replication-Get-Changes-All, DS-Replication-Get-Changes-In-Filtered-Set). It also filters out events that use computer accounts and also Azure AD Connect MSOL accounts (more details [here](https://techcommunity.microsoft.com/t5/microsoft-defender-for-identity/ad-connect-msol-user-suspected-dcsync-attack/m-p/788028)).
#### Possible investigation steps
- Identify the user account that performed the action and whether it should perform this kind of action.
- Contact the account and system owners and confirm whether they are aware of this activity.
- Investigate other alerts associated with the user/host during the past 48 hours.
- Correlate security events 4662 and 4624 (Logon Type 3) by their Logon ID (`winlog.logon.id`) on the Domain Controller (DC) that received the replication request. This will tell you where the AD replication request came from, and if it came from another DC or not.
- Scope which credentials were compromised (for example, whether all accounts were replicated or specific ones).
### False positive analysis
- Administrators may use custom accounts on Azure AD Connect, investigate if it is the case, and if it is properly secured. If noisy in your environment due to expected activity, consider adding the corresponding account as a exception.
- Although replicating Active Directory (AD) data to non-Domain Controllers is not a common practice and is generally not recommended from a security perspective, some software vendors may require it for their products to function correctly. If this rule is noisy in your environment due to expected activity, consider adding the corresponding account as a exception.
### Response and remediation
- Initiate the incident response process based on the outcome of the 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.
- If the entire domain or the `krbtgt` user was compromised:
- Activate your incident response plan for total Active Directory compromise which should include, but not be limited to, a password reset (twice) of the `krbtgt` user.
- Investigate how the attacker escalated privileges and identify systems they used to conduct lateral movement. Use this information to determine ways the attacker could regain access to the environment.
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
"""
references = [
"https://threathunterplaybook.com/notebooks/windows/06_credential_access/WIN-180815210510.html",
"https://threathunterplaybook.com/library/windows/active_directory_replication.html?highlight=dcsync#directory-replication-services-auditing",
"https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/security/win_ad_replication_non_machine_account.yml",
"https://github.com/atc-project/atomic-threat-coverage/blob/master/Atomic_Threat_Coverage/Logging_Policies/LP_0027_windows_audit_directory_service_access.md",
"https://attack.stealthbits.com/privilege-escalation-using-mimikatz-dcsync",
"https://www.thehacker.recipes/ad/movement/credentials/dumping/dcsync",
"https://www.elastic.co/security-labs/siestagraph-new-implant-uncovered-in-asean-member-foreign-ministry",
]
risk_score = 47
rule_id = "9f962927-1a4f-45f3-a57b-287f2c7029c1"
setup = """## Setup
Audit Directory Service Access must be enabled to generate the events used by this rule.
Setup instructions: https://ela.st/audit-directory-service-access
"""
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Credential Access",
"Tactic: Privilege Escalation",
"Data Source: Active Directory",
"Resources: Investigation Guide",
"Use Case: Active Directory Monitoring",
"Data Source: Windows Security Event Logs",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
host.os.type:"windows" and event.code:"4662" and
winlog.event_data.Properties:(
*DS-Replication-Get-Changes* or *DS-Replication-Get-Changes-All* or
*DS-Replication-Get-Changes-In-Filtered-Set* or *1131f6ad-9c07-11d1-f79f-00c04fc2dcd2* or
*1131f6aa-9c07-11d1-f79f-00c04fc2dcd2* or *89e95b76-444d-4c62-991a-0facbeda640c*
) and winlog.event_data.AccessMask : "0x100" and
not winlog.event_data.SubjectUserName:(*$ or MSOL_*) and
not winlog.event_data.SubjectUserSid:"S-1-0-0"
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1003"
name = "OS Credential Dumping"
reference = "https://attack.mitre.org/techniques/T1003/"
[[rule.threat.technique.subtechnique]]
id = "T1003.006"
name = "DCSync"
reference = "https://attack.mitre.org/techniques/T1003/006/"
[rule.threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1078"
name = "Valid Accounts"
reference = "https://attack.mitre.org/techniques/T1078/"
[[rule.threat.technique.subtechnique]]
id = "T1078.002"
name = "Domain Accounts"
reference = "https://attack.mitre.org/techniques/T1078/002/"
[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
[rule.new_terms]
field = "new_terms_fields"
value = ["winlog.event_data.SubjectUserSid", "winlog.event_data.ObjectName"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-12h"
Stages and Predicates
Stage 1: new_terms
host.os.type:"windows" and event.code:"4662" and
winlog.event_data.Properties:(
*DS-Replication-Get-Changes* or *DS-Replication-Get-Changes-All* or
*DS-Replication-Get-Changes-In-Filtered-Set* or *1131f6ad-9c07-11d1-f79f-00c04fc2dcd2* or
*1131f6aa-9c07-11d1-f79f-00c04fc2dcd2* or *89e95b76-444d-4c62-991a-0facbeda640c*
) and winlog.event_data.AccessMask : "0x100" and
not winlog.event_data.SubjectUserName:(*$ or MSOL_*) and
not winlog.event_data.SubjectUserSid:"S-1-0-0"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
winlog.event_data.AccessMask | eq |
| field:"AccessMask" kind:eq value:"0x100" |
winlog.event_data.Properties | wildcard |
| field:"Properties" kind:wildcard |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
winlog.event_data.SubjectUserName | ends_with | $ | excludes:winlog.event_data.SubjectUserName field:"winlog.event_data.SubjectUserName" value:"$" |
winlog.event_data.SubjectUserName | starts_with | MSOL_ | excludes:winlog.event_data.SubjectUserName field:"winlog.event_data.SubjectUserName" value:"MSOL_" |
winlog.event_data.SubjectUserSid | eq | S-1-0-0 | excludes:winlog.event_data.SubjectUserSid field:"winlog.event_data.SubjectUserSid" value:"S-1-0-0" |
Potential Denial of Azure OpenAI ML Service
#Detects patterns indicative of Denial-of-Service (DoS) attacks on machine learning (ML) models, focusing on unusually high volume and frequency of requests or patterns of requests that are known to cause performance degradation or service disruption, such as large input sizes or rapid API calls.
Known False Positives
- Unexpected system errors
- Legitimate spikes in usage due to business processes
MITRE ATLAS Coverage
Adversarial-ML threat framework (not MITRE ATT&CK).
| Tactic | Techniques |
|---|---|
| Impact |
Rule Body
[metadata]
creation_date = "2025/02/25"
integration = ["azure_openai"]
maturity = "production"
updated_date = "2025/09/25"
[rule]
author = ["Elastic"]
description = """
Detects patterns indicative of Denial-of-Service (DoS) attacks on machine learning (ML) models, focusing on unusually
high volume and frequency of requests or patterns of requests that are known to cause performance degradation or service
disruption, such as large input sizes or rapid API calls.
"""
false_positives = ["Unexpected system errors", "Legitimate spikes in usage due to business processes"]
from = "now-60m"
interval = "10m"
language = "esql"
license = "Elastic License v2"
name = "Potential Denial of Azure OpenAI ML Service"
note = """## Triage and analysis
> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
### Investigating Potential Denial of Azure OpenAI ML Service
Azure OpenAI ML services enable scalable deployment of machine learning models, crucial for AI-driven applications. Adversaries may exploit these services by overwhelming them with excessive or malformed requests, leading to service degradation or outages. The detection rule identifies such threats by monitoring for high-frequency, large-size requests, which are indicative of potential denial-of-service attacks.
### Possible investigation steps
- Review the logs for the specific time window identified by the target_time_window field to understand the context and volume of requests.
- Identify the specific Azure resource involved using the azure.resource.name field to determine if the service is critical or sensitive.
- Examine the cloud.account.id field to ascertain if the requests are originating from a known or trusted account, or if they are potentially malicious.
- Analyze the request patterns, focusing on the avg_request_size and count fields, to determine if the requests are consistent with normal usage or indicative of a potential attack.
- Check for any recent changes or updates to the Azure OpenAI ML service configuration or deployment that might have affected its performance or security posture.
- Correlate the findings with other security logs or alerts to identify any related suspicious activities or broader attack patterns.
### False positive analysis
- High-volume legitimate usage patterns can trigger false positives, such as during scheduled batch processing or data analysis tasks. Users can mitigate this by setting exceptions for known time windows or specific resource names associated with these activities.
- Large input sizes from legitimate applications, like those processing extensive datasets or complex queries, may be misidentified as threats. Users should identify and whitelist these applications by their resource names or account IDs.
- Testing and development environments often generate high-frequency requests as part of load testing or performance tuning. Users can exclude these environments by filtering out specific resource names or account IDs associated with non-production activities.
- Automated scripts or integrations that interact with the Azure OpenAI ML service at high frequencies for valid business processes might be flagged. Users should document and exclude these scripts by identifying their unique request patterns or resource identifiers.
### Response and remediation
- Immediately throttle or block the IP addresses or accounts responsible for the high-frequency, large-size requests to prevent further service degradation.
- Notify the Azure OpenAI service administrators and relevant stakeholders about the detected potential denial-of-service attack for awareness and further action.
- Review and adjust rate limiting and request size policies on the Azure OpenAI ML service to mitigate the impact of similar attacks in the future.
- Conduct a post-incident analysis to identify any vulnerabilities or misconfigurations that allowed the attack to occur and address them promptly.
- Escalate the incident to the security operations team for further investigation and to determine if the attack is part of a larger threat campaign.
- Implement additional monitoring and alerting for unusual patterns of requests, focusing on high volume and frequency, to enhance early detection of similar threats.
- Coordinate with the cloud provider's support team to ensure any necessary infrastructure adjustments or protections are in place to prevent recurrence.
"""
references = [
"https://genai.owasp.org/llmrisk/llm04-model-denial-of-service",
"https://atlas.mitre.org/techniques/AML.T0029",
]
risk_score = 47
rule_id = "b0450411-46e5-46d2-9b35-8b5dd9ba763e"
setup = """## Setup
For more information on streaming events, see the Azure OpenAI documentation:
https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/stream-monitoring-data-event-hubs
"""
severity = "medium"
tags = [
"Domain: LLM",
"Data Source: Azure OpenAI",
"Data Source: Azure Event Hubs",
"Use Case: Denial of Service",
"Mitre Atlas: T0029",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "esql"
query = '''
from logs-azure_openai.logs-*
| eval
Esql.time_window_date_trunc = date_trunc(1 minutes, @timestamp)
| where azure.open_ai.operation_name == "ChatCompletions_Create"
| keep
azure.open_ai.properties.request_length,
azure.resource.name,
cloud.account.id,
Esql.time_window_date_trunc
| stats
Esql.event_count = count(*),
Esql.azure_open_ai_properties_request_length_avg = avg(azure.open_ai.properties.request_length)
by
Esql.time_window_date_trunc,
azure.resource.name
| where
Esql.event_count >= 10 and
Esql.azure_open_ai_properties_request_length_avg >= 5000
| sort Esql.event_count desc
'''
Stages and Predicates
Stage 1: from
from logs-azure_openai.logs-*
Stage 2: eval
| eval
Esql.time_window_date_trunc = date_trunc(1 minutes, @timestamp)
Stage 3: where
| where azure.open_ai.operation_name == "ChatCompletions_Create"
Stage 4: keep
| keep
azure.open_ai.properties.request_length,
azure.resource.name,
cloud.account.id,
Esql.time_window_date_trunc
Stage 5: stats
| stats
Esql.event_count = count(*),
Esql.azure_open_ai_properties_request_length_avg = avg(azure.open_ai.properties.request_length)
by
Esql.time_window_date_trunc,
azure.resource.name
Stage 6: where
| where
Esql.event_count >= 10 and
Esql.azure_open_ai_properties_request_length_avg >= 5000
Stage 7: sort
| sort Esql.event_count desc
Indicators
These rows show field, operator, and value matches.
Output Fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
Esql.event_count | STATS Esql.event_count = count(*) |
Esql.azure_open_ai_properties_request_length_avg | STATS Esql.azure_open_ai_properties_request_length_avg = avg(azure.open_ai.properties.request_length) |
Esql.time_window_date_trunc | STATS BY |
azure.resource.name | STATS BY |
Process Explorer Device Access by Unusual Process
#Identifies unsigned code calling a 3rd party kernel driver function. Adversaries may bring a vulnerable or abusable driver onto a compromised machine to execute code with the highest privileges.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | |
| Defense Impairment |
Rule Body
[rule]
description = """
Identifies unsigned code calling a 3rd party kernel driver function. Adversaries may bring a vulnerable or abusable
driver onto a compromised machine to execute code with the highest privileges.
"""
id = "9c4bd6d6-9e2f-4ce2-8266-923e1799726c"
license = "Elastic License v2"
name = "Process Explorer Device Access by Unusual Process"
os_list = ["windows"]
version = "1.0.9"
query = '''
api where
process.Ext.api.name == "DeviceIoControl" and process.executable != null and
process.Ext.api.parameters.device : "\\Device\\PROCEXP*" and
not (process.thread.Ext.call_stack_final_user_module.name : ("procexp64.exe", "procexp.exe", "handle64.exe", "handle.exe", "procexp64a.exe") and
_arraysearch(process.thread.Ext.call_stack_final_user_module.code_signature, $caller, $caller.trusted == true and
$caller.subject_name : "Microsoft Corporation")) and
not (process.name : ("procexp64.exe", "procexp.exe", "Handle64.exe", "Handle.exe", "procexp64a.exe") and process.code_signature.subject_name : "Microsoft Corporation" and
process.thread.Ext.call_stack_final_user_module.name in ("Unknown", "Undetermined") and process.code_signature.trusted == true) and
not (process.thread.Ext.call_stack_final_user_module.name : ("procexp64.exe", "procexp.exe", "handle64.exe") and
process.code_signature.subject_name : "Microsoft Corporation" and process.code_signature.trusted == true) and
not (process.name : ("handle64.exe", "handle.exe") and process.command_line : "* -accepteula *" and process.thread.Ext.call_stack_final_user_module.name == "Unknown") and
not process.thread.Ext.call_stack_final_user_module.path : "c:\\windows\\system32\\apphelp.dll" and
not (process.executable : "C:\\Windows\\Temp\\Handle64.exe" and process.parent.executable : "C:\\Windows\\_ScriptingFramework\\Tools\\handle.exe") and
not (process.Ext.api.parameters.device == "\\Device\\PROCEXP152" and process.thread.Ext.call_stack_final_user_module.name == "handle64.exe") and
not (process.executable : "C:\\Windows\\System32\\svchost.exe" and process.thread.Ext.call_stack_final_user_module.path == "c:\\windows\\system32\\iphlpsvc.dll")
'''
min_endpoint_version = "8.14.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 = "T1068"
name = "Exploitation for Privilege Escalation"
reference = "https://attack.mitre.org/techniques/T1068/"
[threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "8.14.0"
Stages and Predicates
Stage 1: api
api where
process.Ext.api.name == "DeviceIoControl" and process.executable != null and
process.Ext.api.parameters.device : "\\Device\\PROCEXP*" and
not (process.thread.Ext.call_stack_final_user_module.name : ("procexp64.exe", "procexp.exe", "handle64.exe", "handle.exe", "procexp64a.exe") and
_arraysearch(process.thread.Ext.call_stack_final_user_module.code_signature, $caller, $caller.trusted == true and
$caller.subject_name : "Microsoft Corporation")) and
not (process.name : ("procexp64.exe", "procexp.exe", "Handle64.exe", "Handle.exe", "procexp64a.exe") and process.code_signature.subject_name : "Microsoft Corporation" and
process.thread.Ext.call_stack_final_user_module.name in ("Unknown", "Undetermined") and process.code_signature.trusted == true) and
not (process.thread.Ext.call_stack_final_user_module.name : ("procexp64.exe", "procexp.exe", "handle64.exe") and
process.code_signature.subject_name : "Microsoft Corporation" and process.code_signature.trusted == true) and
not (process.name : ("handle64.exe", "handle.exe") and process.command_line : "* -accepteula *" and process.thread.Ext.call_stack_final_user_module.name == "Unknown") and
not process.thread.Ext.call_stack_final_user_module.path : "c:\\windows\\system32\\apphelp.dll" and
not (process.executable : "C:\\Windows\\Temp\\Handle64.exe" and process.parent.executable : "C:\\Windows\\_ScriptingFramework\\Tools\\handle.exe") and
not (process.Ext.api.parameters.device == "\\Device\\PROCEXP152" and process.thread.Ext.call_stack_final_user_module.name == "handle64.exe") and
not (process.executable : "C:\\Windows\\System32\\svchost.exe" and process.thread.Ext.call_stack_final_user_module.path == "c:\\windows\\system32\\iphlpsvc.dll")
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:"DeviceIoControl" |
process.Ext.api.parameters.device | wildcard |
| field:"process.Ext.api.parameters.device" kind:wildcard value:"\Device\PROCEXP*" |
process.executable | is_not_null | field:"Image" kind:is_not_null |
Exclusions
The rule actively suppresses these predicates.
Registry Persistence via AppCert DLL
#Detects attempts to maintain persistence by creating registry keys using AppCert DLLs. AppCert DLLs are loaded by every process using the common API functions to create processes.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2020/11/18"
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender", "crowdstrike"]
maturity = "production"
updated_date = "2026/05/04"
[rule]
author = ["Elastic"]
description = """
Detects attempts to maintain persistence by creating registry keys using AppCert DLLs. AppCert DLLs are loaded by every
process using the common API functions to create processes.
"""
from = "now-9m"
index = [
"winlogbeat-*",
"logs-endpoint.events.registry-*",
"logs-windows.sysmon_operational-*",
"endgame-*",
"logs-sentinel_one_cloud_funnel.*",
"logs-m365_defender.event-*",
"logs-crowdstrike.fdr*",
]
language = "eql"
license = "Elastic License v2"
name = "Registry Persistence via AppCert DLL"
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 Registry Persistence via AppCert DLL
AppCert DLLs are dynamic link libraries that can be configured to load with every process that uses common API functions to create processes on Windows systems. This feature is intended for legitimate use, such as application compatibility. However, adversaries can exploit this by inserting malicious DLLs into the registry path, ensuring their code executes persistently across system reboots. The detection rule identifies changes to specific registry paths associated with AppCert DLLs, flagging potential unauthorized modifications indicative of persistence or privilege escalation attempts. By monitoring these registry changes, security analysts can detect and respond to such threats effectively.
### Possible investigation steps
- Review the specific registry path changes identified in the alert to confirm if they match the paths specified in the query: "HKLM\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Session Manager\\\\AppCertDLLs\\\\*", "\\\\REGISTRY\\\\MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Session Manager\\\\AppCertDLLs\\\\*", or "MACHINE\\\\SYSTEM\\\\*ControlSet*\\\\Control\\\\Session Manager\\\\AppCertDLLs\\\\*".
- Check the timestamp of the registry change event to determine when the modification occurred and correlate it with other system activities or logs around the same time.
- Identify the user account or process responsible for the registry modification by examining the event logs or security logs to determine if it was an authorized change or potentially malicious activity.
- Investigate the DLL file specified in the registry change for any known malicious signatures or behaviors using threat intelligence sources or antivirus tools.
- Analyze the system for any additional indicators of compromise or persistence mechanisms, such as unusual scheduled tasks, startup items, or other registry modifications.
- Review historical data to determine if similar registry changes have occurred in the past, which might indicate a recurring threat or persistent adversary activity.
### False positive analysis
- Legitimate software installations or updates may modify the AppCert DLL registry paths as part of their setup process. Users can handle these by creating exceptions for known and trusted software vendors.
- System administrators might intentionally configure AppCert DLLs for application compatibility purposes. To manage this, maintain a list of approved configurations and exclude these from alerts.
- Security tools or endpoint protection software might interact with these registry paths during routine scans or updates. Identify and whitelist these tools to prevent unnecessary alerts.
- Custom enterprise applications may use AppCert DLLs for legitimate process monitoring or enhancement. Collaborate with application developers to document these cases and exclude them from detection.
- Regular system maintenance scripts or group policies might inadvertently trigger changes in these registry paths. Review and adjust these scripts or policies to minimize false positives, or document and exclude them if they are necessary.
### Response and remediation
- Immediately isolate the affected system from the network to prevent further spread or communication with potential command and control servers.
- Use endpoint detection and response (EDR) tools to terminate any suspicious processes associated with the malicious AppCert DLLs identified in the registry paths.
- Remove the unauthorized AppCert DLL entries from the registry paths: HKLM\\SYSTEM\\*ControlSet*\\Control\\Session Manager\\AppCertDLLs\\* to eliminate persistence mechanisms.
- Conduct a thorough scan of the system using updated antivirus and anti-malware tools to identify and remove any additional malicious files or remnants.
- Review and restore any system files or configurations that may have been altered by the malicious DLLs to ensure system integrity.
- Escalate the incident to the security operations center (SOC) or incident response team for further analysis and to determine if additional systems are affected.
- Implement enhanced monitoring and logging for the specific registry paths and related process creation activities to detect any future unauthorized changes promptly."""
risk_score = 47
rule_id = "513f0ffd-b317-4b9c-9494-92ce861f22c7"
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Persistence",
"Tactic: Privilege Escalation",
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Sysmon",
"Data Source: SentinelOne",
"Data Source: Microsoft Defender XDR",
"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.path : "*\\SYSTEM\\*ControlSet*\\Control\\Session Manager\\AppCertDLLs\\*"
'''
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 = "T1546"
name = "Event Triggered Execution"
reference = "https://attack.mitre.org/techniques/T1546/"
[[rule.threat.technique.subtechnique]]
id = "T1546.009"
name = "AppCert DLLs"
reference = "https://attack.mitre.org/techniques/T1546/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 = "T1546"
name = "Event Triggered Execution"
reference = "https://attack.mitre.org/techniques/T1546/"
[[rule.threat.technique.subtechnique]]
id = "T1546.009"
name = "AppCert DLLs"
reference = "https://attack.mitre.org/techniques/T1546/009/"
[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
Stages and Predicates
Stage 1: registry
registry where host.os.type == "windows" and event.type == "change" and
registry.path : "*\\SYSTEM\\*ControlSet*\\Control\\Session Manager\\AppCertDLLs\\*"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"change" |
registry.path | wildcard |
| field:"TargetObject" kind:wildcard value:"*\SYSTEM\*ControlSet*\Control\Session Manager\AppCertDLLs\*" |
Registry Persistence via AppInit DLL
#AppInit DLLs are dynamic-link libraries (DLLs) that are loaded into every process that creates a user interface (loads user32.dll) on Microsoft Windows operating systems. The AppInit DLL mechanism is used to load custom code into user-mode processes, allowing for the customization of the user interface and the behavior of Windows-based applications. Attackers who add those DLLs to the registry locations can execute code with elevated privileges, similar to process injection, and provide a solid and constant persistence on the machine.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2020/11/18"
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
maturity = "production"
updated_date = "2026/05/04"
[transform]
[[transform.osquery]]
label = "Osquery - Retrieve AppInit Registry Value"
query = """
SELECT * FROM registry r where (r.key == 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Windows'
or r.key == 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\Windows') and r.name ==
'AppInit_DLLs'
"""
[[transform.osquery]]
label = "Osquery - Retrieve DNS Cache"
query = "SELECT * FROM dns_cache"
[[transform.osquery]]
label = "Osquery - Retrieve All Services"
query = "SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services"
[[transform.osquery]]
label = "Osquery - Retrieve Services Running on User Accounts"
query = """
SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE
NOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR
user_account == null)
"""
[[transform.osquery]]
label = "Osquery - Retrieve Service Unsigned Executables with Virustotal Link"
query = """
SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,
services.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =
authenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'
"""
[rule]
author = ["Elastic"]
description = """
AppInit DLLs are dynamic-link libraries (DLLs) that are loaded into every process that creates a user interface (loads
user32.dll) on Microsoft Windows operating systems. The AppInit DLL mechanism is used to load custom code into user-mode
processes, allowing for the customization of the user interface and the behavior of Windows-based applications.
Attackers who add those DLLs to the registry locations can execute code with elevated privileges, similar to process
injection, and provide a solid and constant persistence on the machine.
"""
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 = "Registry Persistence via AppInit DLL"
note = """## Triage and analysis
### Investigating Registry Persistence via AppInit DLL
AppInit DLLs are dynamic-link libraries (DLLs) that are loaded into every process that creates a user interface (loads `user32.dll`) on Microsoft Windows operating systems. The AppInit DLL mechanism is used to load custom code into user-mode processes, allowing for the customization of the user interface and the behavior of Windows-based applications.
Attackers who add those DLLs to the registry locations can execute code with elevated privileges, similar to process injection, and provide a solid and constant persistence on the machine.
This rule identifies modifications on the AppInit registry keys.
> **Note**:
> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/current/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.
#### Possible investigation steps
- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
- Review the source process and related DLL file tied to the Windows Registry entry.
- Check whether the DLL is signed, and tied to a authorized program used on your environment.
- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.
- Retrieve all DLLs under the AppInit registry keys:
- $osquery_0
- Examine the host for derived artifacts that indicate suspicious activities:
- Analyze the process executable and the DLLs using a private sandboxed analysis system.
- Observe and collect information about the following activities in both the sandbox and the alert subject host:
- Attempts to contact external domains and addresses.
- Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.
- Examine the DNS cache for suspicious or anomalous entries.
- $osquery_1
- Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.
- Examine the host services for suspicious or anomalous entries.
- $osquery_2
- $osquery_3
- $osquery_4
- Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.
### False positive analysis
- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.
### Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Isolate the involved host to prevent further post-compromise behavior.
- If the triage identified malware, search the environment for additional compromised hosts.
- Implement temporary network rules, procedures, and segmentation to contain the malware.
- Stop suspicious processes.
- Immediately block the identified indicators of compromise (IoCs).
- Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
- Remove and block malicious artifacts identified during triage.
- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
"""
setup = """## Setup
This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
Setup instructions: https://ela.st/install-elastic-defend
### Additional data sources
This rule also supports the following third-party data sources. For setup instructions, refer to the links below:
- [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)
"""
risk_score = 47
rule_id = "d0e159cf-73e9-40d1-a9ed-077e3158a855"
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Persistence",
"Tactic: Defense Evasion",
"Resources: Investigation Guide",
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Sysmon",
"Data Source: Microsoft Defender XDR",
"Data Source: SentinelOne",
"Data Source: Crowdstrike",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
registry where host.os.type == "windows" and event.type == "change" and
registry.value : "AppInit_Dlls" and
not process.executable : (
"?:\\Windows\\System32\\DriverStore\\FileRepository\\*\\Display.NvContainer\\NVDisplay.Container.exe",
"?:\\Windows\\System32\\msiexec.exe",
"?:\\Windows\\SysWOW64\\msiexec.exe",
"?:\\Program Files\\Commvault\\Base\\cvd.exe",
"?:\\Program Files\\Commvault\\ContentStore*\\Base\\cvd.exe",
"?:\\Program Files (x86)\\Commvault\\Base\\cvd.exe",
"?:\\Program Files (x86)\\Commvault\\ContentStore*\\Base\\cvd.exe",
"?:\\Program Files\\NVIDIA Corporation\\Display.NvContainer\\NVDisplay.Container.exe",
/* Crowdstrike specific condition as it uses NT Object paths */
"\\Device\\HarddiskVolume*\\Windows\\System32\\DriverStore\\FileRepository\\*\\Display.NvContainer\\NVDisplay.Container.exe",
"\\Device\\HarddiskVolume*\\Windows\\System32\\msiexec.exe",
"\\Device\\HarddiskVolume*\\Windows\\SysWOW64\\msiexec.exe",
"\\Device\\HarddiskVolume*\\Program Files\\Commvault\\Base\\cvd.exe",
"\\Device\\HarddiskVolume*\\Program Files\\Commvault\\ContentStore*\\Base\\cvd.exe",
"\\Device\\HarddiskVolume*\\Program Files (x86)\\Commvault\\Base\\cvd.exe",
"\\Device\\HarddiskVolume*\\Program Files (x86)\\Commvault\\ContentStore*\\Base\\cvd.exe",
"\\Device\\HarddiskVolume*\\Program Files\\NVIDIA Corporation\\Display.NvContainer\\NVDisplay.Container.exe"
)
/*
Full registry key path omitted due to data source variations:
"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Windows\\AppInit_Dlls"
"HKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\Windows\\AppInit_Dlls"
*/
'''
[[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.010"
name = "AppInit DLLs"
reference = "https://attack.mitre.org/techniques/T1546/010/"
[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1112"
name = "Modify Registry"
reference = "https://attack.mitre.org/techniques/T1112/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
Stages and Predicates
Stage 1: registry
registry where host.os.type == "windows" and event.type == "change" and
registry.value : "AppInit_Dlls" and
not process.executable : (
"?:\\Windows\\System32\\DriverStore\\FileRepository\\*\\Display.NvContainer\\NVDisplay.Container.exe",
"?:\\Windows\\System32\\msiexec.exe",
"?:\\Windows\\SysWOW64\\msiexec.exe",
"?:\\Program Files\\Commvault\\Base\\cvd.exe",
"?:\\Program Files\\Commvault\\ContentStore*\\Base\\cvd.exe",
"?:\\Program Files (x86)\\Commvault\\Base\\cvd.exe",
"?:\\Program Files (x86)\\Commvault\\ContentStore*\\Base\\cvd.exe",
"?:\\Program Files\\NVIDIA Corporation\\Display.NvContainer\\NVDisplay.Container.exe",
"\\Device\\HarddiskVolume*\\Windows\\System32\\DriverStore\\FileRepository\\*\\Display.NvContainer\\NVDisplay.Container.exe",
"\\Device\\HarddiskVolume*\\Windows\\System32\\msiexec.exe",
"\\Device\\HarddiskVolume*\\Windows\\SysWOW64\\msiexec.exe",
"\\Device\\HarddiskVolume*\\Program Files\\Commvault\\Base\\cvd.exe",
"\\Device\\HarddiskVolume*\\Program Files\\Commvault\\ContentStore*\\Base\\cvd.exe",
"\\Device\\HarddiskVolume*\\Program Files (x86)\\Commvault\\Base\\cvd.exe",
"\\Device\\HarddiskVolume*\\Program Files (x86)\\Commvault\\ContentStore*\\Base\\cvd.exe",
"\\Device\\HarddiskVolume*\\Program Files\\NVIDIA Corporation\\Display.NvContainer\\NVDisplay.Container.exe"
)
/*
Full registry key path omitted due to data source variations:
"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Windows\\AppInit_Dlls"
"HKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\Windows\\AppInit_Dlls"
*/
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"change" |
registry.value | wildcard |
| field:"registry_value_name" kind:wildcard value:"AppInit_Dlls" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.executable | wildcard | ?:\Windows\System32\DriverStore\FileRepository\*\Display.NvContainer\NVDisplay.Container.exe, ?:\Windows\System32\msiexec.exe, ?:\Windows\SysWOW64\msiexec.exe, ?:\Program Files\Commvault\Base\cvd.exe, ?:\Program Files\Commvault\ContentStore*\Base\cvd.exe, ?:\Program Files (x86)\Commvault\Base\cvd.exe, ?:\Program Files (x86)\Commvault\ContentStore*\Base\cvd.exe, ?:\Program Files\NVIDIA Corporation\Display.NvContainer\NVDisplay.Container.exe, \Device\HarddiskVolume*\Windows\System32\DriverStore\FileRepository\*\Display.NvContainer\NVDisplay.Container.exe, \Device\HarddiskVolume*\Windows\System32\msiexec.exe, \Device\HarddiskVolume*\Windows\SysWOW64\msiexec.exe, \Device\HarddiskVolume*\Program Files\Commvault\Base\cvd.exe, \Device\HarddiskVolume*\Program Files\Commvault\ContentStore*\Base\cvd.exe, \Device\HarddiskVolume*\Program Files (x86)\Commvault\Base\cvd.exe, \Device\HarddiskVolume*\Program Files (x86)\Commvault\ContentStore*\Base\cvd.exe, \Device\HarddiskVolume*\Program Files\NVIDIA Corporation\Display.NvContainer\NVDisplay.Container.exe | excludes:process.executable |
Script Execution from WebDav
#Identifies attempt to execute Windows scripts from a remote WebDav Share. Adversaries may abuse this method to evade dropping malicious files to victim file system.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Lateral Movement |
Rule Body
[rule]
description = """
Identifies attempt to execute Windows scripts from a remote WebDav Share. Adversaries may abuse this method to evade
dropping malicious files to victim file system.
"""
id = "4bdd5646-f7b2-4e1d-962d-fd0f591f8f87"
license = "Elastic License v2"
name = "Script Execution from WebDav"
os_list = ["windows"]
version = "1.0.4"
query = '''
process where event.action == "start" and
process.name : ("cmd.exe", "powershell.exe", "conhost.exe", "replace.exe", "wscript.exe", "cscript.exe", "mshta.exe", "regsvr32.exe") and
(process.command_line : ("*@SSL\\*", "*\\webdav\\*", "*\\DavWWWRoot\\*") or process.args : ("\\\\*.*@8080\\*", "\\\\*.*@80\\*", "\\\\*.*@8443\\*", "\\\\*.*@443\\*")) and
not (process.name : "cmd.exe" and process.args : "\\\\?\\UNC\\*.sharepoint.com@SSL\\DavWWWRoot\\*")
'''
min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
tree = true
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1204"
name = "User Execution"
reference = "https://attack.mitre.org/techniques/T1204/"
[[threat.technique.subtechnique]]
id = "T1204.002"
name = "Malicious File"
reference = "https://attack.mitre.org/techniques/T1204/002/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1021"
name = "Remote Services"
reference = "https://attack.mitre.org/techniques/T1021/"
[[threat.technique.subtechnique]]
id = "T1021.002"
name = "SMB/Windows Admin Shares"
reference = "https://attack.mitre.org/techniques/T1021/002/"
[threat.tactic]
id = "TA0008"
name = "Lateral Movement"
reference = "https://attack.mitre.org/tactics/TA0008/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Stage 1: process
process where event.action == "start" and
process.name : ("cmd.exe", "powershell.exe", "conhost.exe", "replace.exe", "wscript.exe", "cscript.exe", "mshta.exe", "regsvr32.exe") and
(process.command_line : ("*@SSL\\*", "*\\webdav\\*", "*\\DavWWWRoot\\*") or process.args : ("\\\\*.*@8080\\*", "\\\\*.*@80\\*", "\\\\*.*@8443\\*", "\\\\*.*@443\\*")) and
not (process.name : "cmd.exe" and process.args : "\\\\?\\UNC\\*.sharepoint.com@SSL\\DavWWWRoot\\*")
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" 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 |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.args | wildcard | \\?\UNC\*.sharepoint.com@SSL\DavWWWRoot\* | excludes:process.args field:"process.args" value:"\\?\UNC\*.sharepoint.com@SSL\DavWWWRoot\*" |
process.name | eq | cmd.exe | excludes:process.name field:"process.name" value:"cmd.exe" |
Spike in User Lifecycle Management Change Events
#A machine learning job has identified an unusual spike in Okta user lifecycle management change events, indicating potential privileged access activity. Threat actors may manipulate user accounts to gain higher access rights or persist within the environment.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| 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 an unusual spike in Okta user lifecycle management change events, indicating
potential privileged access activity. Threat actors may manipulate user accounts to gain higher access rights or persist
within the environment.
"""
from = "now-3h"
interval = "15m"
license = "Elastic License v2"
machine_learning_job_id = "pad_okta_spike_in_user_lifecycle_management_changes_ea"
name = "Spike in User Lifecycle Management Change Events"
note = """## Triage and analysis
> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
### Investigating Spike in User Lifecycle Management Change Events
User lifecycle management in environments like Okta involves creating, modifying, and deleting user accounts. Adversaries may exploit this by manipulating accounts to escalate privileges or maintain access. The detection rule leverages machine learning to identify unusual spikes in these events, signaling potential misuse. By focusing on anomalies, it aids in early detection of privilege escalation tactics.
### Possible investigation steps
- Review the specific user accounts involved in the lifecycle management change events to identify any patterns or anomalies, such as multiple changes in a short period or changes made by unusual sources.
- Check the timestamps of the change events to determine if they align with normal business hours or if they occurred during unusual times, which might indicate suspicious activity.
- Investigate the source IP addresses and locations associated with the change events to identify any unusual or unauthorized access points.
- Examine the types of changes made to the user accounts, such as privilege escalations or role modifications, to assess if they align with legitimate business needs.
- Cross-reference the user accounts involved with recent security alerts or incidents to determine if they have been previously flagged for suspicious activity.
- Consult with the account owners or relevant department heads to verify if the changes were authorized and necessary for business operations.
### False positive analysis
- Routine administrative tasks such as bulk user account updates or scheduled maintenance can trigger spikes in user lifecycle management events. To manage this, create exceptions for known maintenance windows or bulk operations.
- Automated processes or scripts that regularly modify user accounts may cause false positives. Identify these processes and exclude them from the detection rule to prevent unnecessary alerts.
- Onboarding or offboarding periods with high user account activity can lead to spikes. Adjust the detection thresholds temporarily during these periods or exclude specific user groups involved in these activities.
- Integration with third-party applications that frequently update user attributes might result in false positives. Review and whitelist these applications to reduce noise in the detection system.
### Response and remediation
- Immediately isolate the affected user accounts to prevent further unauthorized access or privilege escalation. This can be done by disabling the accounts or changing their passwords.
- Review and revoke any unauthorized permissions or roles that were assigned during the spike in user lifecycle management change events. Ensure that only legitimate access rights are restored.
- Conduct a thorough audit of recent user account changes to identify any additional accounts that may have been manipulated. Pay special attention to accounts with elevated privileges.
- Notify the security team and relevant stakeholders about the incident to ensure awareness and coordination for further investigation and response.
- Implement additional monitoring on the affected accounts and related systems to detect any further suspicious activity or attempts to regain unauthorized access.
- Escalate the incident to higher-level security management if the scope of the breach is extensive or if sensitive data may have been compromised.
- Review and update access management policies and procedures to prevent similar incidents in the future, ensuring that changes to user accounts are logged and regularly reviewed."""
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 = "178770e0-5c20-4246-b430-e216a2888b23"
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.technique]]
id = "T1098"
name = "Account Manipulation"
reference = "https://attack.mitre.org/techniques/T1098/"
[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1078"
name = "Valid Accounts"
reference = "https://attack.mitre.org/techniques/T1078/"
[[rule.threat.technique]]
id = "T1098"
name = "Account Manipulation"
reference = "https://attack.mitre.org/techniques/T1098/"
[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
Suspicious Command and Control via Internet Explorer
#Identifies instances of Internet Explorer being started via the Component Object Model (COM) from an unusual caller such as scripting interpreters or RunDLL32. Adversaries could abuse Internet Explorer via COM to avoid suspicious processes making network connections and bypass host-based firewall restrictions.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth | |
| Command & Control |
Rule Body
[rule]
description = """
Identifies instances of Internet Explorer being started via the Component Object Model (COM) from an unusual caller such
as scripting interpreters or RunDLL32. Adversaries could abuse Internet Explorer via COM to avoid suspicious processes
making network connections and bypass host-based firewall restrictions.
"""
id = "5e9fdd8b-5412-483c-a2e6-58de59990ae6"
license = "Elastic License v2"
name = "Suspicious Command and Control via Internet Explorer"
os_list = ["windows"]
reference = ["https://www.fortinet.com/blog/threat-research/new-variant-of-ursnif-continuously-targeting-italy"]
version = "1.0.31"
query = '''
sequence with maxspan=5m
[process where event.action == "start" and
(
process.name : ("regsvr32.exe", "rundll32.exe", "wscript.exe", "cscript.exe", "powershell.exe", "mshta.exe",
"msbuild.exe", "installutil.exe") or
process.pe.original_file_name : ("regsvr32.exe", "rundll32.exe", "wscript.exe", "cscript.exe", "powershell.exe",
"mshta.exe", "msbuild.exe", "installutil.exe")
) and
not (process.name : "wscript.exe" and process.args : ("\\\\*", "?:\\Program Files\\*", "?:\\Program Files (x86)\\*")) and
not (process.name : "rundll32.exe" and
process.args : ("?:\\Windows\\System32\\inetcpl.cpl",
"?:\\Windows\\System32\\LogiLDA.dll,LogiFetch",
"inetcpl.cpl,,?")) and
not (process.name : "wscript.exe" and process.working_directory : "\\\\*") and
not (process.name : "wscript.exe" and process.parent.name : "explorer.exe" and
process.command_line : ("*\\Users\\*\\Desktop\\*", "*\\Users\\*\\OneDrive*")) and
not (process.name : "wscript.exe" and process.args : "C:\\inetpub\\wwwroot\\wtsp\\systemtasks\\*.vbs" and process.parent.name : "svchost.exe") and
not (process.name : "mshta.exe" and process.args : ("?:\\Program Files\\*.hta", "?:\\Program Files (x86)\\*.hta", "?:\\PROGRA~?\\*")) and
not (process.name : "cscript.exe" and process.parent.executable : "C:\\Program Files\\AppSense\\Environment Manager\\Agent\\EmUser.exe")
] by process.entity_id
[process where event.action == "start" and process.name : "ielowutil.exe" and
/* ProgId - InternetExplorer.Application.1 */
process.args : "-CLSID:{0002DF01-0000-0000-C000-000000000046}"] by process.Ext.effective_parent.entity_id
'''
min_endpoint_version = "8.4.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.technique.subtechnique]]
id = "T1059.001"
name = "PowerShell"
reference = "https://attack.mitre.org/techniques/T1059/001/"
[[threat.technique.subtechnique]]
id = "T1059.005"
name = "Visual Basic"
reference = "https://attack.mitre.org/techniques/T1059/005/"
[[threat.technique.subtechnique]]
id = "T1059.007"
name = "JavaScript"
reference = "https://attack.mitre.org/techniques/T1059/007/"
[[threat.technique]]
id = "T1559"
name = "Inter-Process Communication"
reference = "https://attack.mitre.org/techniques/T1559/"
[[threat.technique.subtechnique]]
id = "T1559.001"
name = "Component Object Model"
reference = "https://attack.mitre.org/techniques/T1559/001/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[[threat.technique.subtechnique]]
id = "T1218.005"
name = "Mshta"
reference = "https://attack.mitre.org/techniques/T1218/005/"
[[threat.technique.subtechnique]]
id = "T1218.010"
name = "Regsvr32"
reference = "https://attack.mitre.org/techniques/T1218/010/"
[[threat.technique.subtechnique]]
id = "T1218.011"
name = "Rundll32"
reference = "https://attack.mitre.org/techniques/T1218/011/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"
[[threat.technique]]
id = "T1102"
name = "Web Service"
reference = "https://attack.mitre.org/techniques/T1102/"
[threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"
[internal]
min_endpoint_version = "8.4.0"
Stages and Predicates
Ordered sequence: each step below must occur in order within 5m, correlated by process.Ext.effective_parent.entity_id, process.entity_id.
Stage 1: process
[process where event.action == "start" and
(
process.name : ("regsvr32.exe", "rundll32.exe", "wscript.exe", "cscript.exe", "powershell.exe", "mshta.exe",
"msbuild.exe", "installutil.exe") or
process.pe.original_file_name : ("regsvr32.exe", "rundll32.exe", "wscript.exe", "cscript.exe", "powershell.exe",
"mshta.exe", "msbuild.exe", "installutil.exe")
) and
not (process.name : "wscript.exe" and process.args : ("\\\\*", "?:\\Program Files\\*", "?:\\Program Files (x86)\\*")) and
not (process.name : "rundll32.exe" and
process.args : ("?:\\Windows\\System32\\inetcpl.cpl",
"?:\\Windows\\System32\\LogiLDA.dll,LogiFetch",
"inetcpl.cpl,,?")) and
not (process.name : "wscript.exe" and process.working_directory : "\\\\*") and
not (process.name : "wscript.exe" and process.parent.name : "explorer.exe" and
process.command_line : ("*\\Users\\*\\Desktop\\*", "*\\Users\\*\\OneDrive*")) and
not (process.name : "wscript.exe" and process.args : "C:\\inetpub\\wwwroot\\wtsp\\systemtasks\\*.vbs" and process.parent.name : "svchost.exe") and
not (process.name : "mshta.exe" and process.args : ("?:\\Program Files\\*.hta", "?:\\Program Files (x86)\\*.hta", "?:\\PROGRA~?\\*")) and
not (process.name : "cscript.exe" and process.parent.executable : "C:\\Program Files\\AppSense\\Environment Manager\\Agent\\EmUser.exe")
] by process.entity_id
Stage 2: process
[process where event.action == "start" and process.name : "ielowutil.exe" and
process.args : "-CLSID:{0002DF01-0000-0000-C000-000000000046}"] by process.Ext.effective_parent.entity_id
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"start" |
process.args | wildcard |
| field:"process.args" kind:wildcard value:"-CLSID:{0002DF01-0000-0000-C000-000000000046}" |
process.name | wildcard |
| field:"process_basename" kind:wildcard |
process.pe.original_file_name | wildcard |
| field:"OriginalFileName" kind:wildcard |
Exclusions
The rule actively suppresses these predicates.
Unusual Network Connection via RunDLL32
#Identifies unusual instances of rundll32.exe making outbound network connections. This may indicate adversarial Command and Control activity.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth | |
| Command & Control |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2020/02/18"
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2026/05/04"
[rule]
author = ["Elastic"]
description = """
Identifies unusual instances of rundll32.exe making outbound network connections. This may indicate adversarial Command
and Control activity.
"""
from = "now-9m"
index = [
"winlogbeat-*",
"logs-endpoint.events.process-*",
"logs-endpoint.events.network-*",
"logs-windows.sysmon_operational-*",
"logs-sentinel_one_cloud_funnel.*",
]
language = "eql"
license = "Elastic License v2"
name = "Unusual Network Connection via RunDLL32"
note = """## Triage and analysis
### Investigating Unusual Network Connection via RunDLL32
RunDLL32 is a built-in Windows utility and also a vital component used by the operating system itself. The functionality provided by RunDLL32 to execute Dynamic Link Libraries (DLLs) is widely abused by attackers, because it makes it hard to differentiate malicious activity from normal operations.
This rule looks for external network connections established using RunDLL32 when the utility is being executed with no arguments, which can potentially indicate command and control activity.
#### Possible investigation steps
- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
- Investigate other alerts associated with the user/host during the past 48 hours.
- Investigate the target host that RunDLL32 is communicating with.
- Check if the domain is newly registered or unexpected.
- Check the reputation of the domain or IP address.
- Identify the target computer and its role in the IT environment.
- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.
### False positive analysis
- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.
### Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Isolate the involved hosts to prevent further post-compromise behavior.
- 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.
- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
"""
setup = """## Setup
This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
Setup instructions: https://ela.st/install-elastic-defend
### Additional data sources
This rule also supports the following third-party data sources. For setup instructions, refer to the links below:
- [SentinelOne Cloud Funnel](https://ela.st/sentinel-one-cloud-funnel)
- [Sysmon Event ID 1 - Process Creation](https://ela.st/sysmon-event-1-setup)
- [Sysmon Event ID 3 - Network Connection](https://ela.st/sysmon-event-3-setup)
"""
references = [
"https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml",
"https://redcanary.com/threat-detection-report/techniques/rundll32/",
]
risk_score = 47
rule_id = "52aaab7b-b51c-441a-89ce-4387b3aea886"
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Defense Evasion",
"Tactic: Command and Control",
"Resources: Investigation Guide",
"Data Source: Elastic Defend",
"Data Source: Sysmon",
"Data Source: SentinelOne",
]
type = "eql"
query = '''
sequence by host.id, process.entity_id with maxspan=1m
[process where host.os.type == "windows" and event.type == "start" and process.name : "rundll32.exe" and
(
process.args_count == 1 and
/* Excludes bug where a missing closing quote sets args_count to 1 despite extra args */
not process.command_line regex~ """\".*\.exe[^\"].*"""
)]
[network where host.os.type == "windows" and process.name : "rundll32.exe" and
not cidrmatch(destination.ip, "10.0.0.0/8", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24",
"192.0.0.0/29", "192.0.0.8/32", "192.0.0.9/32", "192.0.0.10/32", "192.0.0.170/32", "192.0.0.171/32",
"192.0.2.0/24", "192.31.196.0/24", "192.52.193.0/24", "192.168.0.0/16", "192.88.99.0/24", "224.0.0.0/4",
"100.64.0.0/10", "192.175.48.0/24","198.18.0.0/15", "198.51.100.0/24", "203.0.113.0/24", "240.0.0.0/4", "::1",
"FE80::/10", "FF00::/8")]
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[[rule.threat.technique.subtechnique]]
id = "T1218.011"
name = "Rundll32"
reference = "https://attack.mitre.org/techniques/T1218/011/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"
[[rule.threat.technique.subtechnique]]
id = "T1071.001"
name = "Web Protocols"
reference = "https://attack.mitre.org/techniques/T1071/001/"
[rule.threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"
Stages and Predicates
Ordered sequence: each step below must occur in order within 1m, correlated by host.id, process.entity_id.
Stage 1: process
[process where host.os.type == "windows" and event.type == "start" and process.name : "rundll32.exe" and
(
process.args_count == 1 and
not process.command_line regex~ """\".*\.exe[^\"].*"""
)]
Stage 2: network
[network where host.os.type == "windows" and process.name : "rundll32.exe" and
not cidrmatch(destination.ip, "10.0.0.0/8", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24",
"192.0.0.0/29", "192.0.0.8/32", "192.0.0.9/32", "192.0.0.10/32", "192.0.0.170/32", "192.0.0.171/32",
"192.0.2.0/24", "192.31.196.0/24", "192.52.193.0/24", "192.168.0.0/16", "192.88.99.0/24", "224.0.0.0/4",
"100.64.0.0/10", "192.175.48.0/24","198.18.0.0/15", "198.51.100.0/24", "203.0.113.0/24", "240.0.0.0/4", "::1",
"FE80::/10", "FF00::/8")]
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_count | eq |
| field:"process.args_count" kind:eq value:"1" |
process.name | wildcard |
| field:"process_basename" kind:wildcard value:"rundll32.exe" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.command_line | regex_match | \".*.exe[^\"].* | excludes:process.command_line |
destination.ip | cidr_match | 10.0.0.0/8, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.0.0/29, 192.0.0.8/32, 192.0.0.9/32, 192.0.0.10/32, 192.0.0.170/32, 192.0.0.171/32, 192.0.2.0/24, 192.31.196.0/24, 192.52.193.0/24, 192.168.0.0/16, 192.88.99.0/24, 224.0.0.0/4, 100.64.0.0/10, 192.175.48.0/24, 198.18.0.0/15, 198.51.100.0/24, 203.0.113.0/24, 240.0.0.0/4, ::1, FE80::/10, FF00::/8 | excludes:destination.ip |
Unusual Process Detected for Privileged Commands by a User
#A machine learning job has detected an unusual process run for privileged commands by a user, indicating potential privileged access activity.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Rule Body
[metadata]
creation_date = "2025/02/18"
integration = ["pad", "endpoint", "sysmon_linux"]
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 detected an unusual process run for privileged commands by a user, indicating potential
privileged access activity.
"""
from = "now-1h"
interval = "15m"
license = "Elastic License v2"
machine_learning_job_id = "pad_linux_rare_process_executed_by_user_ea"
name = "Unusual Process Detected for Privileged Commands by a User"
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 Process Detected for Privileged Commands by a User
Machine learning models are employed to identify anomalies in process execution, particularly those involving privileged commands. Adversaries may exploit legitimate user accounts to execute unauthorized privileged actions, aiming for privilege escalation. This detection rule leverages ML to flag atypical processes, indicating potential misuse of elevated access, thus aiding in early threat identification.
### Possible investigation steps
- Review the specific user account associated with the alert to determine if the account has a history of executing privileged commands or if this is an anomaly.
- Examine the process details, including the command line arguments and the parent process, to identify if the process is legitimate or potentially malicious.
- Check the timestamp of the process execution to correlate with any other suspicious activities or alerts that occurred around the same time.
- Investigate the source IP address or host from which the command was executed to verify if it is a known and trusted location for the user.
- Look into recent authentication logs for the user account to identify any unusual login patterns or access from unfamiliar devices.
- Assess the user's role and permissions to determine if the execution of such privileged commands aligns with their job responsibilities.
### False positive analysis
- Routine administrative tasks by IT staff may trigger alerts. Review and whitelist known administrative processes that are regularly executed by trusted personnel.
- Automated scripts or scheduled tasks that perform privileged operations can be flagged. Identify and exclude these scripts if they are verified as part of normal operations.
- Software updates or installations that require elevated privileges might be detected. Ensure that these processes are documented and excluded if they are part of standard maintenance procedures.
- Development or testing environments where privileged commands are frequently used for legitimate purposes can cause false positives. Consider creating exceptions for these environments after thorough validation.
- Temporary elevated access granted for specific projects or tasks can lead to alerts. Monitor and document these instances, and adjust the detection rule to accommodate such temporary changes.
### Response and remediation
- Immediately isolate the affected user account to prevent further unauthorized privileged actions. This can be done by disabling the account or changing its password.
- Review and terminate any suspicious processes or sessions initiated by the user account to contain potential malicious activity.
- Conduct a thorough audit of recent privileged commands executed by the user to identify any unauthorized changes or actions that need to be reversed.
- Escalate the incident to the security operations team for further investigation and to determine if additional systems or accounts have been compromised.
- Implement additional monitoring on the affected system and user account to detect any further anomalous behavior or attempts at privilege escalation.
- Review and update access controls and permissions for the affected user account to ensure they align with the principle of least privilege.
- Document the incident, including actions taken and lessons learned, to improve response strategies and prevent recurrence."""
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 = "5eac16ab-6d4f-427b-9715-f33e1b745fc7"
setup = """## Setup
The rule requires the Privileged Access Detection integration assets to be installed, as well as Linux logs collected by integrations such as Elastic Defend and Sysmon Linux.
### 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).
- Linux events collected by [Elastic Defend](https://docs.elastic.co/en/integrations/endpoint) or [Sysmon Linux](https://docs.elastic.co/en/integrations/sysmon_linux) integration.
- To install Elastic Defend, refer to the [documentation](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
- To add Sysmon Linux 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: Elastic Defend",
"Data Source: Linux Sysmon Logs",
"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.technique]]
id = "T1548"
name = "Abuse Elevation Control Mechanism"
reference = "https://attack.mitre.org/techniques/T1548/"
[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"