Detection rules › Elastic
Elastic rules: 1r
Account Configured with Never-Expiring Password
#Detects the creation and modification of an account with the "Don't Expire Password" option Enabled. Attackers can abuse this misconfiguration to persist in the domain and maintain long-term access using compromised accounts with this property.
Known False Positives
- User accounts can be used as service accounts and have their password set never to expire. This is a bad security practice that exposes the account to Credential Access attacks. For cases in which user accounts cannot be avoided, Microsoft provides the Group Managed Service Accounts (gMSA) feature, which ensures that the account password is robust and changed regularly and automatically.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2022/02/22"
integration = ["system", "windows"]
maturity = "production"
updated_date = "2026/05/04"
[rule]
author = ["Elastic"]
description = """
Detects the creation and modification of an account with the "Don't Expire Password" option Enabled. Attackers can abuse
this misconfiguration to persist in the domain and maintain long-term access using compromised accounts with this
property.
"""
false_positives = [
"""
User accounts can be used as service accounts and have their password set never to expire. This is a bad security
practice that exposes the account to Credential Access attacks. For cases in which user accounts cannot be avoided,
Microsoft provides the Group Managed Service Accounts (gMSA) feature, which ensures that the account password is
robust and changed regularly and automatically.
""",
]
from = "now-9m"
index = ["logs-system.security*", "logs-windows.forwarded*", "winlogbeat-*"]
language = "eql"
license = "Elastic License v2"
name = "Account Configured with Never-Expiring Password"
note = """## Triage and analysis
### Investigating Account Configured with Never-Expiring Password
Active Directory provides a setting that prevents users' passwords from expiring. Enabling this setting is bad practice and can expose environments to vulnerabilities that weaken security posture, especially when these accounts are privileged.
The setting is usually configured so a user account can act as a service account. Attackers can abuse these accounts to persist in the domain and maintain long-term access using compromised accounts with a never-expiring password set.
#### Possible investigation steps
- Identify the user account that performed the action and whether it should perform this kind of action.
- Contact the account owner and confirm whether they are aware of this activity.
- Investigate other alerts associated with the user/source host during the past 48 hours.
- Inspect the account for suspicious or abnormal behaviors in the alert timeframe.
### False positive analysis
- This activity should not happen legitimately. The security team should address any potential benign true positive (B-TP), as this configuration can put the user and the domain at risk.
- Using user accounts as service accounts is a bad security practice and should not be allowed in the domain. The security team should map and monitor potential benign true positives (B-TPs), especially if the account is privileged. For cases in which user accounts cannot be avoided, Microsoft provides the Group Managed Service Accounts (gMSA) feature, which ensures that the account password is robust and changed regularly and automatically.
### Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.
- Reset the password of the account and update its password settings.
- Search for other occurrences on the domain.
- Using the [Active Directory PowerShell module](https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-aduser):
- `get-aduser -filter { passwordNeverExpires -eq $true -and enabled -eq $true } | ft`
- 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.
- 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
The following Windows audit policies must be enabled to generate the events used by this rule:
- [Audit User Account Management](https://ela.st/audit-user-account-management)
- [Audit Directory Service Changes](https://ela.st/audit-directory-service-changes)
"""
references = [
"https://www.cert.ssi.gouv.fr/uploads/guide-ad.html#dont_expire",
"http://web.archive.org/web/20230329171952/https://blog.menasec.net/2019/02/threat-hunting-26-persistent-password.html",
]
risk_score = 47
rule_id = "62a70f6f-3c37-43df-a556-f64fa475fba2"
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Persistence",
"Data Source: Active Directory",
"Resources: Investigation Guide",
"Use Case: Active Directory Monitoring",
"Data Source: Windows Security Event Logs",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
any where host.os.type == "windows" and
(
(
event.code == "4738" and winlog.event_data.NewUACList == "USER_DONT_EXPIRE_PASSWORD" and not user.id == "S-1-5-18"
) or
(
event.code == "5136" and winlog.event_data.AttributeLDAPDisplayName == "userAccountControl" and
winlog.event_data.AttributeValue in ("66048", "66080") and winlog.event_data.OperationType == "%%14674" and
not (
winlog.event_data.SubjectUserName : "*svc*" or
winlog.event_data.ObjectDN : "*Service*"
)
)
)
'''
[[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/"
Stages and Predicates
Stage 1: any
any where host.os.type == "windows" and
(
(
event.code == "4738" and winlog.event_data.NewUACList == "USER_DONT_EXPIRE_PASSWORD" and not user.id == "S-1-5-18"
) or
(
event.code == "5136" and winlog.event_data.AttributeLDAPDisplayName == "userAccountControl" and
winlog.event_data.AttributeValue in ("66048", "66080") and winlog.event_data.OperationType == "%%14674" and
not (
winlog.event_data.SubjectUserName : "*svc*" or
winlog.event_data.ObjectDN : "*Service*"
)
)
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.code | eq |
| field:"EventID" kind:eq |
winlog.event_data.AttributeLDAPDisplayName | eq |
| field:"AttributeLDAPDisplayName" kind:eq value:"userAccountControl" |
winlog.event_data.AttributeValue | in |
| field:"AttributeValue" kind:in |
winlog.event_data.NewUACList | eq |
| field:"NewUACList" kind:eq value:"USER_DONT_EXPIRE_PASSWORD" |
winlog.event_data.OperationType | eq |
| field:"OperationType" kind:eq value:"%%14674" |
AWS Bedrock Detected Multiple Validation Exception Errors by a Single User
#Identifies multiple validation exeception errors within AWS Bedrock. Validation errors occur when you run the InvokeModel or InvokeModelWithResponseStream APIs on a foundation model that uses an incorrect inference parameter or corresponding value. These errors also occur when you use an inference parameter for one model with a model that doesn't have the same API parameter. This could indicate attempts to bypass limitations of other approved models, or to force an impact on the environment by incurring exhorbitant costs.
Known False Positives
- Legitimate misunderstanding by users on accessing the bedrock models.
MITRE ATLAS Coverage
Adversarial-ML threat framework (not MITRE ATT&CK).
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Defense Evasion | |
| Impact |
Rule Body
[metadata]
creation_date = "2024/09/11"
integration = ["aws_bedrock"]
maturity = "production"
updated_date = "2025/07/16"
[rule]
author = ["Elastic"]
description = """
Identifies multiple validation exeception errors within AWS Bedrock. Validation errors occur when you run the
InvokeModel or InvokeModelWithResponseStream APIs on a foundation model that uses an incorrect inference parameter or
corresponding value. These errors also occur when you use an inference parameter for one model with a model that doesn't
have the same API parameter. This could indicate attempts to bypass limitations of other approved models, or to force an
impact on the environment by incurring exhorbitant costs.
"""
false_positives = ["Legitimate misunderstanding by users on accessing the bedrock models."]
from = "now-60m"
interval = "10m"
language = "esql"
license = "Elastic License v2"
name = "AWS Bedrock Detected Multiple Validation Exception Errors by a Single User"
note = """## Triage and analysis
### Investigating AWS Bedrock Detected Multiple Validation Exception Errors by a Single User
Amazon Bedrock is AWS’s managed service that enables developers to build and scale generative AI applications using large foundation models (FMs) from top providers.
Bedrock offers a variety of pretrained models from Amazon (such as the Titan series), as well as models from providers like Anthropic, Meta, Cohere, and AI21 Labs.
#### Possible investigation steps
- Identify the user account that caused validation errors in accessing the Amazon Bedrock models.
- Investigate other alerts associated with the user account during the past 48 hours.
- Consider the time of day. If the user is a human (not a program or script), did the activity take place during a normal time of day?
- Examine the account's attempts to access Amazon Bedrock models in the last 24 hours.
- If you suspect the account has been compromised, scope potentially compromised assets by tracking Amazon Bedrock model access, prompts generated, and responses to the prompts by the account in the last 24 hours.
### False positive analysis
- Verify the user account that that caused validation errors is a legitimate misunderstanding by users on accessing the bedrock models.
### Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Disable or limit the account during the investigation and response.
- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
- Identify the account role in the cloud environment.
- Identify if the attacker is moving laterally and compromising other Amazon Bedrock Services.
- Identify any regulatory or legal ramifications related to this activity.
- Identify if any implication to resource billing.
- Review the permissions assigned to the implicated user group or role behind these requests to ensure they are authorized and expected to access bedrock and ensure that the least privilege principle is being followed.
- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
"""
references = [
"https://atlas.mitre.org/techniques/AML.T0015",
"https://atlas.mitre.org/techniques/AML.T0034",
"https://atlas.mitre.org/techniques/AML.T0046",
"https://www.elastic.co/security-labs/elastic-advances-llm-security",
]
risk_score = 73
rule_id = "725a048a-88c5-4fc7-8677-a44fc0031822"
setup = """## Setup
This rule requires that AWS Bedrock Integration be configured. For more information, see the AWS Bedrock integration documentation:
https://www.elastic.co/docs/current/integrations/aws_bedrock
"""
severity = "high"
tags = [
"Domain: LLM",
"Data Source: AWS",
"Data Source: AWS Bedrock",
"Data Source: AWS S3",
"Use Case: Policy Violation",
"Mitre Atlas: T0015",
"Mitre Atlas: T0034",
"Mitre Atlas: T0046",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "esql"
query = '''
from logs-aws_bedrock.invocation-*
// Truncate timestamp to 1-minute window
| eval Esql.time_window_date_trunc = date_trunc(1 minutes, @timestamp)
// Filter for validation exceptions in responses
| where gen_ai.response.error_code == "ValidationException"
// keep relevant ECS and derived fields
| keep
user.id,
gen_ai.request.model.id,
cloud.account.id,
gen_ai.response.error_code,
Esql.time_window_date_trunc
// count number of denials by user/account/time window
| stats
Esql.ml_response_validation_error_count = count(*)
by
Esql.time_window_date_trunc,
user.id,
cloud.account.id
// Filter for excessive errors
| where Esql.ml_response_validation_error_count > 3
'''
[rule.investigation_fields]
field_names = ["target_time_window", "user.id", "cloud.account.id", "total_denials"]
Stages and Predicates
Stage 1: from
from logs-aws_bedrock.invocation-*
Stage 2: eval
| eval Esql.time_window_date_trunc = date_trunc(1 minutes, @timestamp)
Stage 3: where
| where gen_ai.response.error_code == "ValidationException"
Stage 4: keep
| keep
user.id,
gen_ai.request.model.id,
cloud.account.id,
gen_ai.response.error_code,
Esql.time_window_date_trunc
Stage 5: stats
| stats
Esql.ml_response_validation_error_count = count(*)
by
Esql.time_window_date_trunc,
user.id,
cloud.account.id
Stage 6: where
| where Esql.ml_response_validation_error_count > 3
Indicators
These rows show field, operator, and value matches.
Output Fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
Esql.ml_response_validation_error_count | STATS Esql.ml_response_validation_error_count = count(*) |
Esql.time_window_date_trunc | STATS BY |
user.id | STATS BY |
cloud.account.id | STATS BY |
AWS Cognito Unauthenticated Identity Pool Credentials Issued
#Identifies AWS CloudTrail data events where an unauthenticated identity successfully retrieves temporary AWS credentials from a Cognito Identity Pool via GetCredentialsForIdentity. Cognito Identity Pools can be configured to allow unauthenticated (guest) access, intended for scenarios like anonymous app analytics, but a pool that grants those anonymous identities meaningful IAM permissions becomes a public, unauthenticated path to real AWS credentials. Adversaries who discover an identity pool ID (often embedded in mobile app binaries, web app JavaScript, or public source repositories) can call GetId followed by GetCredentialsForIdentity with no login token at all to obtain temporary credentials, then use them to access whatever the pool's unauthenticated role permits. This is a New Terms rule that limits alerting to identity pools that have not been observed issuing credentials to an unauthenticated caller before, since some applications intentionally and continuously use guest access as part of normal operation.
Known False Positives
- Applications that intentionally allow unauthenticated Identity Pool access for legitimate purposes (for example, anonymous usage analytics or unauthenticated content delivery) will trigger this rule the first time that pattern is observed for a given identity pool. Confirm whether the pool's unauthenticated role grants only the minimal permissions the application actually needs, and treat repeated alerts for the same pool as expected once validated.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Credential Access |
Telemetry Coverage
Rule Body
[metadata]
creation_date = "2026/07/13"
integration = ["aws"]
maturity = "production"
updated_date = "2026/07/13"
[rule]
author = ["Elastic"]
description = """
Identifies AWS CloudTrail data events where an unauthenticated identity successfully retrieves temporary AWS credentials
from a Cognito Identity Pool via GetCredentialsForIdentity. Cognito Identity Pools can be configured to allow
unauthenticated (guest) access, intended for scenarios like anonymous app analytics, but a pool that grants those
anonymous identities meaningful IAM permissions becomes a public, unauthenticated path to real AWS credentials.
Adversaries who discover an identity pool ID (often embedded in mobile app binaries, web app JavaScript, or public
source repositories) can call GetId followed by GetCredentialsForIdentity with no login token at all to obtain
temporary credentials, then use them to access whatever the pool's unauthenticated role permits. This is a New Terms
rule that limits alerting to identity pools that have not been observed issuing credentials to an unauthenticated caller
before, since some applications intentionally and continuously use guest access as part of normal operation.
"""
false_positives = [
"""
Applications that intentionally allow unauthenticated Identity Pool access for legitimate purposes (for example,
anonymous usage analytics or unauthenticated content delivery) will trigger this rule the first time that pattern is
observed for a given identity pool. Confirm whether the pool's unauthenticated role grants only the minimal
permissions the application actually needs, and treat repeated alerts for the same pool as expected once validated.
""",
]
from = "now-6m"
index = ["logs-aws.cloudtrail-*"]
language = "kuery"
license = "Elastic License v2"
name = "AWS Cognito Unauthenticated Identity Pool Credentials Issued"
note = """## Triage and analysis
### Investigating AWS Cognito Unauthenticated Identity Pool Credentials Issued
Amazon Cognito Identity Pools can be configured with `AllowUnauthenticatedIdentities`, letting a caller obtain a
guest identity via `GetId` and then temporary AWS credentials via `GetCredentialsForIdentity`, with no login token or
authentication of any kind. This is by design for use cases like anonymous app analytics, but if the pool's
unauthenticated IAM role is overpermissioned, anyone who discovers the identity pool ID gets a free, unauthenticated
path to real AWS credentials.
This rule fires the first time a given identity pool is observed issuing credentials to an unauthenticated caller
(`aws.cloudtrail.user_identity.type: "Unknown"`).
#### Possible investigation steps
- **Identify the pool**: review `aws.cloudtrail.resources.arn` to determine which identity pool issued the
credentials, and `aws.cloudtrail.request_parameters.identityId` for the specific guest identity.
- **Confirm this is intentional guest access**: check whether the application this pool belongs to is designed for
anonymous/unauthenticated use (for example, a public mobile app or website with anonymous analytics).
- **Review the unauthenticated role's permissions**: run
`aws cognito-identity get-identity-pool-roles --identity-pool-id <pool id>` and inspect the attached policy for the
unauthenticated role. Broad permissions (data store read/write, `iam:*`, cross-service access) on a role reachable
without authentication is a critical misconfiguration regardless of whether this specific call was malicious.
- **Review source context**: check `source.ip`, `user_agent.original`, and `source.geo` for the calling identity. A
source unrelated to the application's expected client base (for example, a generic AWS SDK/CLI user agent instead
of a mobile/browser client) is a stronger indicator of discovery/abuse rather than normal app traffic.
- **Look for follow-on activity**: search for subsequent API calls made using credentials tied to the same
`identityId` or the unauthenticated role's ARN, to determine what the caller actually did with the credentials.
- **Look for pool enumeration**: check for `ListIdentityPools` or repeated `GetId`/`GetCredentialsForIdentity` calls
against multiple different identity pools from the same source in a short window, which suggests systematic
discovery rather than a single legitimate app session.
### False positive analysis
- Many applications intentionally use unauthenticated Identity Pool access for anonymous analytics or public content
delivery. This rule fires once per identity pool the first time this pattern is observed; if confirmed as
intentional and properly scoped (minimal unauthenticated role permissions), no further action is needed for that
pool.
### Response and remediation
- If the unauthenticated role is overpermissioned, scope it down immediately to the minimum required for legitimate
anonymous use, or disable `AllowUnauthenticatedIdentities` entirely if guest access is not required.
- If credentials were abused, review all activity performed under the unauthenticated role's ARN during the
credential's validity window and revoke/rotate as appropriate (temporary credentials cannot be revoked directly,
but the role's trust policy or permissions can be tightened immediately).
- Treat any identity pool ID found in client-side code (mobile app binaries, web JavaScript) as public information,
and ensure the unauthenticated role attached to it is scoped accordingly.
"""
references = [
"https://docs.aws.amazon.com/cognito/latest/developerguide/identity-pool-roles.html",
"https://docs.aws.amazon.com/cognito/latest/developerguide/logging-using-cloudtrail.html",
"https://hackingthe.cloud/aws/exploitation/cognito_identity_pool_excessive_privileges/",
"https://github.com/RhinoSecurityLabs/pacu/tree/master/pacu/modules/cognito__attack",
]
risk_score = 47
rule_id = "c61fee20-4d00-4b39-a6e6-acddcc4433e2"
setup = "Cognito Identity Pool data events must be enabled in CloudTrail to capture GetCredentialsForIdentity, GetId, GetOpenIdToken, GetOpenIdTokenForDeveloperIdentity, and UnlinkIdentity. Add an advanced event selector for eventCategory Data and resources.type AWS::Cognito::IdentityPool to the trail."
severity = "medium"
tags = [
"Domain: Cloud",
"Data Source: AWS",
"Data Source: Amazon Web Services",
"Data Source: AWS Cognito",
"Use Case: Asset Visibility",
"Resources: Investigation Guide",
"Tactic: Credential Access",
"Tactic: Initial Access",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
data_stream.dataset: "aws.cloudtrail"
and event.provider: "cognito-identity.amazonaws.com"
and event.action: "GetCredentialsForIdentity"
and event.outcome: "success"
and aws.cloudtrail.user_identity.type: "Unknown"
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1552"
name = "Unsecured Credentials"
reference = "https://attack.mitre.org/techniques/T1552/"
[rule.threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1078"
name = "Valid Accounts"
reference = "https://attack.mitre.org/techniques/T1078/"
[[rule.threat.technique.subtechnique]]
id = "T1078.004"
name = "Cloud Accounts"
reference = "https://attack.mitre.org/techniques/T1078/004/"
[rule.threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[rule.investigation_fields]
field_names = [
"@timestamp",
"user_agent.original",
"source.ip",
"aws.cloudtrail.resources.arn",
"aws.cloudtrail.resources.type",
"aws.cloudtrail.user_identity.type",
"aws.cloudtrail.request_parameters",
"event.action",
"event.outcome",
"cloud.account.id",
"cloud.region",
]
[rule.new_terms]
field = "new_terms_fields"
value = ["aws.cloudtrail.resources.arn"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-7d"
Stages and Predicates
Stage 1: new_terms
data_stream.dataset: "aws.cloudtrail"
and event.provider: "cognito-identity.amazonaws.com"
and event.action: "GetCredentialsForIdentity"
and event.outcome: "success"
and aws.cloudtrail.user_identity.type: "Unknown"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
aws.cloudtrail.user_identity.type | eq |
| field:"aws::userIdentity.type" kind:eq value:"Unknown" |
data_stream.dataset | eq |
| field:"data_stream.dataset" kind:eq value:"aws.cloudtrail" |
event.action | eq |
| field:"EventType" kind:eq value:"GetCredentialsForIdentity" |
event.outcome | eq |
| field:"event.outcome" kind:eq value:"success" |
event.provider | eq |
| field:"Provider_Name" kind:eq value:"cognito-identity.amazonaws.com" |
Connection to WebService by an Unsigned Binary
#Identifies DNS queries to common web services by an unsigned program. Adversaries may implement command and control communications that use common web services in order to hide their activity.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Rule Body
[rule]
description = """
Identifies DNS queries to common web services by an unsigned program. Adversaries may implement command and control
communications that use common web services in order to hide their activity.
"""
id = "2c3efa34-fecd-4b3b-bdb6-30d547f2a1a4"
license = "Elastic License v2"
name = "Connection to WebService by an Unsigned Binary"
os_list = ["windows"]
reference = ["https://www.elastic.co/security-labs/globally-distributed-stealers"]
version = "1.0.54"
query = '''
sequence by process.entity_id with maxspan=5m
/* execution of an unsigned PE file followed by dns lookup to commonly abused trusted webservices */
[process where event.action == "start" and
not process.code_signature.trusted == true and
(process.Ext.relative_file_creation_time <= 300 or process.Ext.relative_file_name_modify_time <= 300) and
not process.hash.sha256 : ("7ce7b2c97b242169333c0920497299e070a5d19900f1751ccf691424e3572c0b",
"21f061b2c1a9d86b25355ed5a4a52302e9797bd83c19b7ff7bffb6312e4b20ae",
"13b83cc30cafdf1158c5916ed147baeccd974a5998268d331454e839684136dd",
"eef030ce340a68e7f9370146b5ae770c2545dd7e66359dae8b82222f7e7868e1",
"5c714275f327385f539a95dd86385c16db79891d7818fd15fcb32f51441a6c8c",
"d8b2ba96f2b18a89942c53651c15d477d94495e6c70645e8e72266b87f6b7eb5",
"652f26a69f928aa7800a2df3345d770cd290a7ea46ba8e97fe7b284fecbd9b56",
"53cec05a7fe060e26a3d84be15c91eac2269e6c6ed9570e2315bad26dd92d230",
"b40b9456b3816a2b2710bb6b4860bcca74dd55eef6a9f9c1119e51c1b58dd17b",
"ac3bc762543ae3875b1d55d61b7b6740faff186edc959c1490ebc6d176b0f092",
"b3dce1fda6820e5e3df33fa2e1bd9c87fe5ed6b2f44f6e6c47a32a870f0e0935",
"d7b0cc901f7d427d17df5a59c0261e415da2f4f6c44c2429c1514a0b3327f6f3",
"73ee5886a3d7ea73cd5ba31d943f1067f622eafe0f701ab23d2d9d3c1c0aafa5",
"438e750547cca4c4aaf49a5cafcfa9bbe8b9cc51772dba2791e966a9f92cad5a",
"b3dce1fda6820e5e3df33fa2e1bd9c87fe5ed6b2f44f6e6c47a32a870f0e0935",
"d49609714d5b5031f2f08470485220323ee056bde2079fb5faf763a77cd53ddb",
"6f92b27bb0387b2b49ac2ed9eb7b3632e72507de64c691eb084202e9429786e3",
"3c7f2519b3eb76408e8acc4016da9d710f0d528b2b6b5291102d8d79ffeeb8c1",
"464637413f656379e8e7b131c57ad7a5eed95d54714a8e0d130da35ba04fca69",
"f3785c74dd0bd8b629f1f8480134a7d9ef94ae9a3d28a72cde8b6f9debdb829c",
"432631e2a7195a94c2a02103031b4f213b66cfcce40f1dffcbbec46b0d3c254b",
"d3d47bd13b9d18619d541f553d0d06174f9daae26d83f7136361b07aca378c86",
"58139bcb2e48d341bd74557d52cf074ccd0f74142da254b47d4e1dfcc4fdffd4",
"0165fe4269fe548c64de31e559bd0f5186316008d797739b39bb10021b356baf") and
not process.parent.executable like "C:\\Program Files\\Microsoft Visual Studio\\*.exe" and
not process.executable : "C:\\Program Files\\Kairos\\Periscope\\PeriscopeDesktop.exe"]
[dns where
dns.question.name :
(
"pastebin.*",
"paste.ee",
"ghostbin.com",
"drive.google.com",
"d.docs.live.net",
"api.dropboxapi.*",
"content.dropboxapi.*",
"dl.dropboxusercontent.*",
"api.onedrive.com",
"*.onedrive.org",
"onedrive.live.com",
"filebin.net",
"gofile.io",
"*.ngrok.io",
"file.io",
"ngrok.com",
"*.ngrok-free.app",
"*.portmap.*",
"*serveo.net",
"*infinityfreeapp.com",
"*localtunnel.me",
"*pagekite.me",
"*localxpose.io",
"*notabug.org",
"rawcdn.githack.*",
"paste.nrecom.net",
"zerobin.net",
"controlc.com",
"requestbin.net",
"slack.com",
"api.slack.com",
"slack-redir.net",
"slack-files.com",
"cdn.discordapp.com",
"discordapp.com",
"discord.com",
"discord.gg",
"cdn.sql.gg",
"cdn.discordapp.com",
"www.uplooder.net",
"*.cdnmegafiles.com",
"transfer.sh",
"updates.peer2profit.com",
"api.telegram.org",
"t.me",
"bing.com",
"yahoo.com",
"meacz.gq",
"rwrd.org",
"*.publicvm.com",
"paste4btc.com",
"api.notion.com",
"*.sharepoint.com",
"note.youdao.com",
"mbasic.facebook.com",
"api.gofile.io",
"api.anonfiles.com",
"api.gofile.io",
"api.anonfiles.com",
"api.trello.com",
"api.notion.com",
"gist.githubusercontent.com",
"*.zulipchat.com",
"filecloud.me",
"i.ibb.co",
"files.pythonhosted.org",
"ip-api.com",
"demo.ip-api.com",
"checkip.dyndns.org",
"api.ipify.org",
"whatismyip.akamai.com",
"bot.whatismyipaddress.com",
"ifcfg.me",
"ident.me",
"ipof.in",
"ip.tyk.nu",
"icanhazip.com",
"curlmyip.com",
"wgetip.com",
"eth0.me",
"ipecho.net",
"ip.appspot.com",
"api.myip.com",
"geoiptool.com",
"api.2ip.ua",
"api.ip.sb",
"ipinfo.io",
"checkip.amazonaws.com",
"wtfismyip.com",
"iplogger.*",
"freegeoip.net",
"freegeoip.app",
"ipinfo.io",
"geoplugin.net",
"myip.dnsomatic.com",
"www.geoplugin.net",
"api64.ipify.org",
"ip4.seeip.org",
"*.geojs.io",
"*portmap.io",
"api.2ip.ua",
"api.db-ip.com",
"geolocation-db.com",
"httpbin.org",
"myip.opendns.com",
"free.keep.sh",
"tinyurl.com",
"ftpupload.net",
"cld.pt",
"yandex.ru",
"*.yandex.ru",
"*.aternos.me",
"geo.netsupportsoftware.com",
"*.ngrok-free.app",
"www.myexternalip.com",
"cdn??.space",
"steamcommunity.com",
"*.netlify.app"
) and
not (process.executable : ("C:\\Program Files\\*.exe", "C:\\Program Files (x86)\\*.exe") and dns.question.name == "pastebin.com")
]
'''
min_endpoint_version = "8.10.0"
reputation = true
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 1
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"
[[threat.technique.subtechnique]]
id = "T1071.004"
name = "DNS"
reference = "https://attack.mitre.org/techniques/T1071/004/"
[[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.10.0"
Stages and Predicates
Ordered sequence: each step below must occur in order within 5m, correlated by process.entity_id.
Stage 1: process
[process where event.action == "start" and
not process.code_signature.trusted == true and
(process.Ext.relative_file_creation_time <= 300 or process.Ext.relative_file_name_modify_time <= 300) and
not process.hash.sha256 : ("7ce7b2c97b242169333c0920497299e070a5d19900f1751ccf691424e3572c0b",
"21f061b2c1a9d86b25355ed5a4a52302e9797bd83c19b7ff7bffb6312e4b20ae",
"13b83cc30cafdf1158c5916ed147baeccd974a5998268d331454e839684136dd",
"eef030ce340a68e7f9370146b5ae770c2545dd7e66359dae8b82222f7e7868e1",
"5c714275f327385f539a95dd86385c16db79891d7818fd15fcb32f51441a6c8c",
"d8b2ba96f2b18a89942c53651c15d477d94495e6c70645e8e72266b87f6b7eb5",
"652f26a69f928aa7800a2df3345d770cd290a7ea46ba8e97fe7b284fecbd9b56",
"53cec05a7fe060e26a3d84be15c91eac2269e6c6ed9570e2315bad26dd92d230",
"b40b9456b3816a2b2710bb6b4860bcca74dd55eef6a9f9c1119e51c1b58dd17b",
"ac3bc762543ae3875b1d55d61b7b6740faff186edc959c1490ebc6d176b0f092",
"b3dce1fda6820e5e3df33fa2e1bd9c87fe5ed6b2f44f6e6c47a32a870f0e0935",
"d7b0cc901f7d427d17df5a59c0261e415da2f4f6c44c2429c1514a0b3327f6f3",
"73ee5886a3d7ea73cd5ba31d943f1067f622eafe0f701ab23d2d9d3c1c0aafa5",
"438e750547cca4c4aaf49a5cafcfa9bbe8b9cc51772dba2791e966a9f92cad5a",
"b3dce1fda6820e5e3df33fa2e1bd9c87fe5ed6b2f44f6e6c47a32a870f0e0935",
"d49609714d5b5031f2f08470485220323ee056bde2079fb5faf763a77cd53ddb",
"6f92b27bb0387b2b49ac2ed9eb7b3632e72507de64c691eb084202e9429786e3",
"3c7f2519b3eb76408e8acc4016da9d710f0d528b2b6b5291102d8d79ffeeb8c1",
"464637413f656379e8e7b131c57ad7a5eed95d54714a8e0d130da35ba04fca69",
"f3785c74dd0bd8b629f1f8480134a7d9ef94ae9a3d28a72cde8b6f9debdb829c",
"432631e2a7195a94c2a02103031b4f213b66cfcce40f1dffcbbec46b0d3c254b",
"d3d47bd13b9d18619d541f553d0d06174f9daae26d83f7136361b07aca378c86",
"58139bcb2e48d341bd74557d52cf074ccd0f74142da254b47d4e1dfcc4fdffd4",
"0165fe4269fe548c64de31e559bd0f5186316008d797739b39bb10021b356baf") and
not process.parent.executable like "C:\\Program Files\\Microsoft Visual Studio\\*.exe" and
not process.executable : "C:\\Program Files\\Kairos\\Periscope\\PeriscopeDesktop.exe"]
Stage 2: dns
[dns where
dns.question.name :
(
"pastebin.*",
"paste.ee",
"ghostbin.com",
"drive.google.com",
"d.docs.live.net",
"api.dropboxapi.*",
"content.dropboxapi.*",
"dl.dropboxusercontent.*",
"api.onedrive.com",
"*.onedrive.org",
"onedrive.live.com",
"filebin.net",
"gofile.io",
"*.ngrok.io",
"file.io",
"ngrok.com",
"*.ngrok-free.app",
"*.portmap.*",
"*serveo.net",
"*infinityfreeapp.com",
"*localtunnel.me",
"*pagekite.me",
"*localxpose.io",
"*notabug.org",
"rawcdn.githack.*",
"paste.nrecom.net",
"zerobin.net",
"controlc.com",
"requestbin.net",
"slack.com",
"api.slack.com",
"slack-redir.net",
"slack-files.com",
"cdn.discordapp.com",
"discordapp.com",
"discord.com",
"discord.gg",
"cdn.sql.gg",
"cdn.discordapp.com",
"www.uplooder.net",
"*.cdnmegafiles.com",
"transfer.sh",
"updates.peer2profit.com",
"api.telegram.org",
"t.me",
"bing.com",
"yahoo.com",
"meacz.gq",
"rwrd.org",
"*.publicvm.com",
"paste4btc.com",
"api.notion.com",
"*.sharepoint.com",
"note.youdao.com",
"mbasic.facebook.com",
"api.gofile.io",
"api.anonfiles.com",
"api.gofile.io",
"api.anonfiles.com",
"api.trello.com",
"api.notion.com",
"gist.githubusercontent.com",
"*.zulipchat.com",
"filecloud.me",
"i.ibb.co",
"files.pythonhosted.org",
"ip-api.com",
"demo.ip-api.com",
"checkip.dyndns.org",
"api.ipify.org",
"whatismyip.akamai.com",
"bot.whatismyipaddress.com",
"ifcfg.me",
"ident.me",
"ipof.in",
"ip.tyk.nu",
"icanhazip.com",
"curlmyip.com",
"wgetip.com",
"eth0.me",
"ipecho.net",
"ip.appspot.com",
"api.myip.com",
"geoiptool.com",
"api.2ip.ua",
"api.ip.sb",
"ipinfo.io",
"checkip.amazonaws.com",
"wtfismyip.com",
"iplogger.*",
"freegeoip.net",
"freegeoip.app",
"ipinfo.io",
"geoplugin.net",
"myip.dnsomatic.com",
"www.geoplugin.net",
"api64.ipify.org",
"ip4.seeip.org",
"*.geojs.io",
"*portmap.io",
"api.2ip.ua",
"api.db-ip.com",
"geolocation-db.com",
"httpbin.org",
"myip.opendns.com",
"free.keep.sh",
"tinyurl.com",
"ftpupload.net",
"cld.pt",
"yandex.ru",
"*.yandex.ru",
"*.aternos.me",
"geo.netsupportsoftware.com",
"*.ngrok-free.app",
"www.myexternalip.com",
"cdn??.space",
"steamcommunity.com",
"*.netlify.app"
) and
not (process.executable : ("C:\\Program Files\\*.exe", "C:\\Program Files (x86)\\*.exe") and dns.question.name == "pastebin.com")
]
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
dns.question.name | wildcard |
| field:"QueryName" kind:wildcard |
event.action | eq |
| field:"EventType" kind:eq value:"start" |
process.Ext.relative_file_creation_time | le |
| field:"process.Ext.relative_file_creation_time" kind:le value:"300" |
process.Ext.relative_file_name_modify_time | le |
| field:"process.Ext.relative_file_name_modify_time" kind:le value:"300" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.code_signature.trusted | eq | true | excludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true" |
process.executable | eq | C:\Program Files\Kairos\Periscope\PeriscopeDesktop.exe | excludes:process.executable field:"process.executable" value:"C:\Program Files\Kairos\Periscope\PeriscopeDesktop.exe" |
process.hash.sha256 | eq | 7ce7b2c97b242169333c0920497299e070a5d19900f1751ccf691424e3572c0b, 21f061b2c1a9d86b25355ed5a4a52302e9797bd83c19b7ff7bffb6312e4b20ae, 13b83cc30cafdf1158c5916ed147baeccd974a5998268d331454e839684136dd, eef030ce340a68e7f9370146b5ae770c2545dd7e66359dae8b82222f7e7868e1, 5c714275f327385f539a95dd86385c16db79891d7818fd15fcb32f51441a6c8c, d8b2ba96f2b18a89942c53651c15d477d94495e6c70645e8e72266b87f6b7eb5, 652f26a69f928aa7800a2df3345d770cd290a7ea46ba8e97fe7b284fecbd9b56, 53cec05a7fe060e26a3d84be15c91eac2269e6c6ed9570e2315bad26dd92d230, b40b9456b3816a2b2710bb6b4860bcca74dd55eef6a9f9c1119e51c1b58dd17b, ac3bc762543ae3875b1d55d61b7b6740faff186edc959c1490ebc6d176b0f092, b3dce1fda6820e5e3df33fa2e1bd9c87fe5ed6b2f44f6e6c47a32a870f0e0935, d7b0cc901f7d427d17df5a59c0261e415da2f4f6c44c2429c1514a0b3327f6f3, 73ee5886a3d7ea73cd5ba31d943f1067f622eafe0f701ab23d2d9d3c1c0aafa5, 438e750547cca4c4aaf49a5cafcfa9bbe8b9cc51772dba2791e966a9f92cad5a, b3dce1fda6820e5e3df33fa2e1bd9c87fe5ed6b2f44f6e6c47a32a870f0e0935, d49609714d5b5031f2f08470485220323ee056bde2079fb5faf763a77cd53ddb, 6f92b27bb0387b2b49ac2ed9eb7b3632e72507de64c691eb084202e9429786e3, 3c7f2519b3eb76408e8acc4016da9d710f0d528b2b6b5291102d8d79ffeeb8c1, 464637413f656379e8e7b131c57ad7a5eed95d54714a8e0d130da35ba04fca69, f3785c74dd0bd8b629f1f8480134a7d9ef94ae9a3d28a72cde8b6f9debdb829c, 432631e2a7195a94c2a02103031b4f213b66cfcce40f1dffcbbec46b0d3c254b, d3d47bd13b9d18619d541f553d0d06174f9daae26d83f7136361b07aca378c86, 58139bcb2e48d341bd74557d52cf074ccd0f74142da254b47d4e1dfcc4fdffd4, 0165fe4269fe548c64de31e559bd0f5186316008d797739b39bb10021b356baf | excludes:process.hash.sha256 |
process.parent.executable | wildcard | C:\Program Files\Microsoft Visual Studio\*.exe | excludes:process.parent.executable field:"process.parent.executable" value:"C:\Program Files\Microsoft Visual Studio\*.exe" |
dns.question.name | eq | pastebin.com | excludes:dns.question.name field:"dns.question.name" value:"pastebin.com" |
process.executable | wildcard | C:\Program Files\*.exe, C:\Program Files (x86)\*.exe | excludes:process.executable field:"process.executable" value:"C:\Program Files\*.exe" field:"process.executable" value:"C:\Program Files (x86)\*.exe" |
Egress Network Connection from Memory File Descriptor
#This rule detects when a process creates an in-memory file descriptor (memfd_create) followed by an egress network connection from an unusual executable. This activity indicates an active attempt to execute a fileless payload and should be considered highly abnormal or suspicious. This activity can occur when the memfd syscall is used to create a memory-resident file, such as a payload, and then execute it, after which it establishes outbound network connections for command-and-control (C2).
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Rule Body
[rule]
description = """
This rule detects when a process creates an in-memory file descriptor (memfd_create) followed by an egress network
connection from an unusual executable. This activity indicates an active attempt to execute a fileless payload and
should be considered highly abnormal or suspicious. This activity can occur when the memfd syscall is used to create a
memory-resident file, such as a payload, and then execute it, after which it establishes outbound network connections
for command-and-control (C2).
"""
id = "3e499558-b79d-4cbb-afa0-dc24a0b59ab2"
license = "Elastic License v2"
name = "Egress Network Connection from Memory File Descriptor"
os_list = ["linux"]
reference = ["https://man7.org/linux/man-pages/man2/memfd_create.2.html"]
version = "1.0.11"
query = '''
sequence by process.entity_id with maxspan=10s
[process where event.type == "start" and event.action == "memfd_create" and (
process.executable like (
"memfd:*", "?memfd:*", "/tmp/*", "/var/tmp/*", "/dev/shm/*", "./*", "/run/user/*", "/var/run/user/*",
"/boot/*", "/sys/*", "/lost+found/*", "/proc/*", "/var/mail/*", "/var/www/*", "/home/*/*", "/root/*"
) or
(process.name like "python*" and process.args == "-c") or
(process.name like ("perl*", "ruby*", "lua*", "node", "nodejs") and process.args like "-e*") or
(process.name like "php*" and process.args like "-r*") or
process.name like (".*", "*.py", "*.pyc", "*.lua", "*.pl", "*.rb", "*.bin", "*.php", "*.js", "*.mjs") or
(
process.name like ("python*", "perl*", "php*", "ruby*", "lua*", "node", "java", "javaw") and
(
process.args like (
"/tmp/*", "/var/tmp/*", "/dev/shm/*", "./*", "/run/user/*", "/var/run/user/*",
"/boot/*", "/sys/*", "/lost+found/*", "/proc/*", "/var/mail/*", "/var/www/*",
"/home/*/*", "/root/*"
) and process.args_count <= 2
)
)
) and
process.parent.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish", "mksh", "busybox") and
not (
process.executable like (
"/tmp/.mount_*", "/nix/store/*/bin/.qemu-system-x86_64-wrapped", "/root/.local/share/claude/versions/*", "/home/*/*/*",
"/usr/bin/qgis.bin", "/app/bin/evolution.bin", "/opt/cpanel/ea-php*/root/usr/bin/php-cgi", "/nix/store/*/bin/.obs-wrapped"
) or
process.command_line == "/usr/bin/php /var/www/glpi/front/cron.php" or
(
process.executable == "/home/runner/bin/Runner.Listener" and
process.Ext.memfd.name == "memfd:doublemapper"
) or
(
process.name like "php*" and
process.Ext.memfd.name in ("opcache_lock", "anon_hugepage")
) or
(
process.executable == "/app/bin/evolution.bin" and
process.Ext.memfd.name == "memfd:WebKitSharedMemory"
) or
(
process.name like "python*" and
process.Ext.memfd.name == "wayland-shm"
) or
(
process.executable like "/home/*/.local/share/claude/versions/*" and
process.Ext.memfd.name in ("memfd:spawn_stdio_stdin", "spawn_stdio_stdin")
) or
(
process.executable like "/home/*/.elixir-install/installs/otp/*/bin/beam.smp" and
process.Ext.memfd.name == "memfd:vmem"
) or
(
process.name == "dotnet" and
process.Ext.memfd.name == "memfd:doublemapper"
) or
(
process.executable == "/usr/bin/php" and
process.args like "/var/www/html/*"
) or
(
process.executable like "/usr/bin/php*" and
process.working_directory like "/var/www/vhosts/*"
) or
(
process.executable like "*/.opencode/bin/opencode*" and
process.Ext.memfd.name == "memfd:spawn_stdio_stdin"
)
)]
[network where event.type == "start" and event.action == "connection_attempted" and
not (
destination.ip == null or destination.ip == "0.0.0.0" or cidrmatch(
destination.ip, "10.0.0.0/8", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24", "192.0.0.0/29",
"192.0.0.8/32", "192.0.0.9/32", "192.0.0.10/32", "192.0.0.170/32", "192.0.0.171/32", "192.0.2.0/24",
"192.31.196.0/24", "192.52.193.0/24", "192.168.0.0/16", "192.88.99.0/24", "224.0.0.0/4", "100.64.0.0/10",
"192.175.48.0/24","198.18.0.0/15", "198.51.100.0/24", "203.0.113.0/24", "240.0.0.0/4", "::1", "FE80::/10",
"FF00::/8"
)
)]
'''
min_endpoint_version = "9.1.4"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 1
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1106"
name = "Native API"
reference = "https://attack.mitre.org/techniques/T1106/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"
[[threat.technique.subtechnique]]
id = "T1055.009"
name = "Proc Memory"
reference = "https://attack.mitre.org/techniques/T1055/009/"
[[threat.technique]]
id = "T1620"
name = "Reflective Code Loading"
reference = "https://attack.mitre.org/techniques/T1620/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[[threat]]
framework = "MITRE ATT&CK"
[threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"
[internal]
min_endpoint_version = "9.1.4"
Stages and Predicates
Ordered sequence: each step below must occur in order within 10s, correlated by process.entity_id.
Stage 1: process
[process where event.type == "start" and event.action == "memfd_create" and (
process.executable like (
"memfd:*", "?memfd:*", "/tmp/*", "/var/tmp/*", "/dev/shm/*", "./*", "/run/user/*", "/var/run/user/*",
"/boot/*", "/sys/*", "/lost+found/*", "/proc/*", "/var/mail/*", "/var/www/*", "/home/*/*", "/root/*"
) or
(process.name like "python*" and process.args == "-c") or
(process.name like ("perl*", "ruby*", "lua*", "node", "nodejs") and process.args like "-e*") or
(process.name like "php*" and process.args like "-r*") or
process.name like (".*", "*.py", "*.pyc", "*.lua", "*.pl", "*.rb", "*.bin", "*.php", "*.js", "*.mjs") or
(
process.name like ("python*", "perl*", "php*", "ruby*", "lua*", "node", "java", "javaw") and
(
process.args like (
"/tmp/*", "/var/tmp/*", "/dev/shm/*", "./*", "/run/user/*", "/var/run/user/*",
"/boot/*", "/sys/*", "/lost+found/*", "/proc/*", "/var/mail/*", "/var/www/*",
"/home/*/*", "/root/*"
) and process.args_count <= 2
)
)
) and
process.parent.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish", "mksh", "busybox") and
not (
process.executable like (
"/tmp/.mount_*", "/nix/store/*/bin/.qemu-system-x86_64-wrapped", "/root/.local/share/claude/versions/*", "/home/*/*/*",
"/usr/bin/qgis.bin", "/app/bin/evolution.bin", "/opt/cpanel/ea-php*/root/usr/bin/php-cgi", "/nix/store/*/bin/.obs-wrapped"
) or
process.command_line == "/usr/bin/php /var/www/glpi/front/cron.php" or
(
process.executable == "/home/runner/bin/Runner.Listener" and
process.Ext.memfd.name == "memfd:doublemapper"
) or
(
process.name like "php*" and
process.Ext.memfd.name in ("opcache_lock", "anon_hugepage")
) or
(
process.executable == "/app/bin/evolution.bin" and
process.Ext.memfd.name == "memfd:WebKitSharedMemory"
) or
(
process.name like "python*" and
process.Ext.memfd.name == "wayland-shm"
) or
(
process.executable like "/home/*/.local/share/claude/versions/*" and
process.Ext.memfd.name in ("memfd:spawn_stdio_stdin", "spawn_stdio_stdin")
) or
(
process.executable like "/home/*/.elixir-install/installs/otp/*/bin/beam.smp" and
process.Ext.memfd.name == "memfd:vmem"
) or
(
process.name == "dotnet" and
process.Ext.memfd.name == "memfd:doublemapper"
) or
(
process.executable == "/usr/bin/php" and
process.args like "/var/www/html/*"
) or
(
process.executable like "/usr/bin/php*" and
process.working_directory like "/var/www/vhosts/*"
) or
(
process.executable like "*/.opencode/bin/opencode*" and
process.Ext.memfd.name == "memfd:spawn_stdio_stdin"
)
)]
Stage 2: network
[network where event.type == "start" and event.action == "connection_attempted" and
not (
destination.ip == null or destination.ip == "0.0.0.0" or cidrmatch(
destination.ip, "10.0.0.0/8", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24", "192.0.0.0/29",
"192.0.0.8/32", "192.0.0.9/32", "192.0.0.10/32", "192.0.0.170/32", "192.0.0.171/32", "192.0.2.0/24",
"192.31.196.0/24", "192.52.193.0/24", "192.168.0.0/16", "192.88.99.0/24", "224.0.0.0/4", "100.64.0.0/10",
"192.175.48.0/24","198.18.0.0/15", "198.51.100.0/24", "203.0.113.0/24", "240.0.0.0/4", "::1", "FE80::/10",
"FF00::/8"
)
)]
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args | eq |
| field:"process.args" kind:eq value:"-c" |
process.args | wildcard |
| field:"process.args" kind:wildcard |
process.args_count | le |
| field:"process.args_count" kind:le value:"2" |
process.executable | wildcard |
| field:"Image" kind:wildcard |
process.name | wildcard |
| field:"process_basename" kind:wildcard |
process.parent.name | in |
| field:"parent_process_basename" kind:in |
Exclusions
The rule actively suppresses these predicates.
Emond Rules Creation or Modification
#Identifies the creation or modification of the Event Monitor Daemon (emond) rules. Adversaries may abuse this service by writing a rule to execute commands when a defined event occurs, such as system start up or user authentication.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| macOS | ESF event write (NOTIFY): Fires after a process writes data to a file. |
Rule Body
[metadata]
creation_date = "2021/01/11"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/07/30"
[rule]
author = ["Elastic", "Massimo Bertocchi"]
description = """
Identifies the creation or modification of the Event Monitor Daemon (emond) rules. Adversaries may abuse this service by
writing a rule to execute commands when a defined event occurs, such as system start up or user authentication.
"""
from = "now-9m"
index = ["logs-endpoint.events.file*"]
language = "eql"
license = "Elastic License v2"
name = "Emond Rules Creation or Modification"
references = [
"https://www.xorrior.com/emond-persistence/",
"https://www.sentinelone.com/blog/how-malware-persists-on-macos/",
]
risk_score = 47
rule_id = "a6bf4dd4-743e-4da8-8c03-3ebd753a6c90"
setup = """## Setup
This rule requires data coming in from Elastic Defend.
### Elastic Defend Integration Setup
Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
#### Prerequisite Requirements:
- Fleet is required for Elastic Defend.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
#### The following steps should be executed in order to add the Elastic Defend integration on a macOS System:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
- Click "Add Elastic Defend".
- Configure the integration name and optionally add a description.
- Select the type of environment you want to protect, for MacOS it is recommended to select "Traditional Endpoints".
- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
- Click "Save and Continue".
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
"""
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: macOS",
"Use Case: Threat Detection",
"Tactic: Persistence",
"Data Source: Elastic Defend",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
file where host.os.type == "macos" and event.action == "modification" and
file.path like ("/private/etc/emond.d/rules/*.plist", "/etc/emond.d/rules/*.plist", "/private/var/db/emondClients/*")
'''
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 Emond Rules Creation or Modification
The Event Monitor Daemon (emond) on macOS is a service that executes commands based on specific system events. Adversaries can exploit this by crafting rules to trigger malicious actions during events like startup or login. The detection rule monitors for new or altered emond rule files, signaling potential unauthorized modifications that could indicate persistence tactics.
### Possible investigation steps
- Review the file path of the modified or newly created emond rule to determine if it matches known legitimate configurations or if it appears suspicious, focusing on paths like "/private/etc/emond.d/rules/*.plist" and "/private/var/db/emondClients/*".
- Check the timestamp of the file creation or modification to correlate with any known user activity or scheduled tasks that could explain the change.
- Analyze the contents of the modified or newly created plist file to identify any commands or scripts that are set to execute, looking for signs of malicious intent or unauthorized actions.
- Investigate the user account associated with the file modification event to determine if the activity aligns with their typical behavior or if it suggests potential compromise.
- Cross-reference the event with other security alerts or logs from the same timeframe to identify any related suspicious activities or patterns that could indicate a broader attack.
### False positive analysis
- System or application updates may modify emond rule files as part of legitimate maintenance activities. Users can create exceptions for known update processes by identifying the associated process names or hashes and excluding them from alerts.
- Administrative tasks performed by IT personnel, such as configuring new system policies or settings, might involve legitimate changes to emond rules. To handle these, maintain a list of authorized personnel and their activities, and exclude these from triggering alerts.
- Security software or management tools that automate system configurations could also modify emond rules. Identify these tools and their expected behaviors, and configure exceptions based on their typical file paths or process identifiers.
- Scheduled maintenance scripts that interact with emond rules for system health checks or optimizations should be documented. Exclude these scripts by verifying their signatures or paths to prevent unnecessary alerts.
### Response and remediation
- Immediately isolate the affected macOS system from the network to prevent potential lateral movement or further execution of malicious rules.
- Review and back up the current emond rule files located in the specified directories to understand the scope of modifications and preserve evidence for further analysis.
- Remove or revert any unauthorized or suspicious emond rule files to their original state to stop any malicious actions triggered by these rules.
- Conduct a thorough scan of the system using updated antivirus or endpoint detection tools to identify and remove any additional malware or persistence mechanisms.
- Restore the system from a known good backup if the integrity of the system is in question and unauthorized changes cannot be fully reversed.
- Escalate the incident to the security operations team for further investigation and to determine if other systems may be affected by similar unauthorized emond rule modifications.
- Implement enhanced monitoring and alerting for changes to emond rule files to quickly detect and respond to future unauthorized modifications."""
[[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.014"
name = "Emond"
reference = "https://attack.mitre.org/techniques/T1546/014/"
[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.014"
name = "Emond"
reference = "https://attack.mitre.org/techniques/T1546/014/"
[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
Stages and Predicates
Stage 1: file
file where host.os.type == "macos" and event.action == "modification" and
file.path like ("/private/etc/emond.d/rules/*.plist", "/etc/emond.d/rules/*.plist", "/private/var/db/emondClients/*")
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"modification" |
file.path | wildcard |
| field:"TargetFilename" kind:wildcard |
Enumeration of Privileged Local Groups Membership
#Identifies instances of an unusual process enumerating built-in Windows privileged local groups membership like Administrators or Remote Desktop users.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4799: A security-enabled local group membership was enumerated. |
Rule Body
[metadata]
creation_date = "2020/10/15"
integration = ["system", "windows"]
maturity = "production"
updated_date = "2026/05/04"
[transform]
[[transform.osquery]]
label = "Osquery - Retrieve DNS Cache"
query = "SELECT * FROM dns_cache"
[[transform.osquery]]
label = "Osquery - Retrieve All Services"
query = "SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services"
[[transform.osquery]]
label = "Osquery - Retrieve Services Running on User Accounts"
query = """
SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE
NOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR
user_account == null)
"""
[[transform.osquery]]
label = "Osquery - Retrieve Service Unsigned Executables with Virustotal Link"
query = """
SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,
services.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =
authenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'
"""
[rule]
author = ["Elastic"]
description = """
Identifies instances of an unusual process enumerating built-in Windows privileged local groups membership like
Administrators or Remote Desktop users.
"""
from = "now-9m"
index = ["winlogbeat-*", "logs-system.security*", "logs-windows.forwarded*"]
language = "kuery"
license = "Elastic License v2"
name = "Enumeration of Privileged Local Groups Membership"
note = """## Triage and analysis
### Investigating Enumeration of Privileged Local Groups Membership
After successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.
This rule looks for the enumeration of privileged local groups' membership by suspicious processes, and excludes known legitimate utilities and programs installed. Attackers can use this information to decide the next steps of the attack, such as mapping targets for credential compromise and other post-exploitation activities.
> **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
- Identify the process, host and user involved on the event.
- 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 any abnormal account behavior, such as command executions, file creations or modifications, and network connections.
- Examine the host for derived artifacts that indicate suspicious activities:
- Analyze the process executable using a private sandboxed analysis system.
- Observe and collect information about the following activities in both the sandbox and the alert subject host:
- Attempts to contact external domains and addresses.
- Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.
- Examine the DNS cache for suspicious or anomalous entries.
- $osquery_0
- Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.
- Examine the host services for suspicious or anomalous entries.
- $osquery_1
- $osquery_2
- $osquery_3
- Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.
- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.
### False positive analysis
- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.
- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and command line conditions.
### 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.
- 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).
"""
risk_score = 47
rule_id = "291a0de9-937a-4189-94c0-3e847c8b13e4"
setup = """## Setup
Audit Security Group Management must be enabled to generate the events used by this rule.
Setup instructions: https://ela.st/audit-security-group-management
"""
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Discovery",
"Resources: Investigation Guide",
"Data Source: Windows Security Event Logs",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
host.os.type:windows and event.category:iam and event.action:user-member-enumerated and
(
group.name:(*Admin* or "RemoteDesktopUsers") or
winlog.event_data.TargetSid:("S-1-5-32-544" or "S-1-5-32-555")
) and
not (
winlog.event_data.SubjectUserName: *$ or
winlog.event_data.SubjectUserSid: ("S-1-5-19" or "S-1-5-20") or
winlog.event_data.CallerProcessName:("-" or
C\:\\Windows\\System32\\VSSVC.exe or
C\:\\Windows\\System32\\SearchIndexer.exe or
C\:\\Windows\\System32\\CompatTelRunner.exe or
C\:\\Windows\\System32\\oobe\\msoobe.exe or
C\:\\Windows\\System32\\net1.exe or
C\:\\Windows\\System32\\svchost.exe or
C\:\\Windows\\System32\\Netplwiz.exe or
C\:\\Windows\\System32\\msiexec.exe or
C\:\\Windows\\System32\\CloudExperienceHostBroker.exe or
C\:\\Windows\\System32\\RuntimeBroker.exe or
C\:\\Windows\\System32\\wbem\\WmiPrvSE.exe or
C\:\\Windows\\System32\\SrTasks.exe or
C\:\\Windows\\System32\\diskshadow.exe or
C\:\\Windows\\System32\\dfsrs.exe or
C\:\\Windows\\System32\\vssadmin.exe or
C\:\\Windows\\System32\\dllhost.exe or
C\:\\Windows\\System32\\mmc.exe or
C\:\\Windows\\System32\\SettingSyncHost.exe or
C\:\\Windows\\System32\\inetsrv\\w3wp.exe or
C\:\\Windows\\System32\\wsmprovhost.exe or
C\:\\Windows\\System32\\mstsc.exe or
C\:\\Windows\\System32\\esentutl.exe or
C\:\\Windows\\System32\\RecoveryDrive.exe or
C\:\\Windows\\System32\\SystemPropertiesComputerName.exe or
C\:\\Windows\\SysWOW64\\msiexec.exe or
C\:\\Windows\\System32\\taskhostw.exe or
C\:\\Windows\\ImmersiveControlPanel\\SystemSettings.exe or
C\:\\Windows\\Temp\\rubrik_vmware*\\snaptool.exe or
C\:\\Windows\\VeeamVssSupport\\VeeamGuestHelper.exe or
C\:\\WindowsAzure\\*WaAppAgent.exe or
C\:\\$WINDOWS.~BT\\Sources\\*.exe
)
)
'''
[[rule.filters]]
[rule.filters.meta]
negate = true
[rule.filters.query.wildcard."winlog.event_data.CallerProcessName"]
case_insensitive = true
value = "C:\\\\Program Files (x86)\\\\*.exe"
[[rule.filters]]
[rule.filters.meta]
negate = true
[rule.filters.query.wildcard."winlog.event_data.CallerProcessName"]
case_insensitive = true
value = "C:\\\\Program Files\\\\*.exe"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1069"
name = "Permission Groups Discovery"
reference = "https://attack.mitre.org/techniques/T1069/"
[[rule.threat.technique.subtechnique]]
id = "T1069.001"
name = "Local Groups"
reference = "https://attack.mitre.org/techniques/T1069/001/"
[rule.threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"
[rule.new_terms]
field = "new_terms_fields"
value = ["winlog.event_data.CallerProcessName"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-5d"
Stages and Predicates
Stage 1: new_terms
host.os.type:windows and event.category:iam and event.action:user-member-enumerated and
(
group.name:(*Admin* or "RemoteDesktopUsers") or
winlog.event_data.TargetSid:("S-1-5-32-544" or "S-1-5-32-555")
) and
not (
winlog.event_data.SubjectUserName: *$ or
winlog.event_data.SubjectUserSid: ("S-1-5-19" or "S-1-5-20") or
winlog.event_data.CallerProcessName:("-" or
C\:\\Windows\\System32\\VSSVC.exe or
C\:\\Windows\\System32\\SearchIndexer.exe or
C\:\\Windows\\System32\\CompatTelRunner.exe or
C\:\\Windows\\System32\\oobe\\msoobe.exe or
C\:\\Windows\\System32\\net1.exe or
C\:\\Windows\\System32\\svchost.exe or
C\:\\Windows\\System32\\Netplwiz.exe or
C\:\\Windows\\System32\\msiexec.exe or
C\:\\Windows\\System32\\CloudExperienceHostBroker.exe or
C\:\\Windows\\System32\\RuntimeBroker.exe or
C\:\\Windows\\System32\\wbem\\WmiPrvSE.exe or
C\:\\Windows\\System32\\SrTasks.exe or
C\:\\Windows\\System32\\diskshadow.exe or
C\:\\Windows\\System32\\dfsrs.exe or
C\:\\Windows\\System32\\vssadmin.exe or
C\:\\Windows\\System32\\dllhost.exe or
C\:\\Windows\\System32\\mmc.exe or
C\:\\Windows\\System32\\SettingSyncHost.exe or
C\:\\Windows\\System32\\inetsrv\\w3wp.exe or
C\:\\Windows\\System32\\wsmprovhost.exe or
C\:\\Windows\\System32\\mstsc.exe or
C\:\\Windows\\System32\\esentutl.exe or
C\:\\Windows\\System32\\RecoveryDrive.exe or
C\:\\Windows\\System32\\SystemPropertiesComputerName.exe or
C\:\\Windows\\SysWOW64\\msiexec.exe or
C\:\\Windows\\System32\\taskhostw.exe or
C\:\\Windows\\ImmersiveControlPanel\\SystemSettings.exe or
C\:\\Windows\\Temp\\rubrik_vmware*\\snaptool.exe or
C\:\\Windows\\VeeamVssSupport\\VeeamGuestHelper.exe or
C\:\\WindowsAzure\\*WaAppAgent.exe or
C\:\\$WINDOWS.~BT\\Sources\\*.exe
)
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"user-member-enumerated" |
event.category | eq |
| field:"event.category" kind:eq value:"iam" |
group.name | eq |
| field:"group.name" kind:eq value:"RemoteDesktopUsers" |
group.name | wildcard |
| field:"group.name" kind:wildcard value:"*Admin*" |
winlog.event_data.TargetSid | in |
| field:"TargetSid" kind:in |
Exclusions
The rule actively suppresses these predicates.
GenAI CLI Started with Unsafe Permission Bypass
#Identifies GenAI agent CLIs started with permission-bypass or auto-approval flags that disable human-in-the-loop guardrails. These modes are intended for isolated sandboxes but are frequently misused on internet-connected developer workstations, allowing prompt injection, compromised dependencies, or malicious skills to execute commands, modify files, or reach sensitive paths without confirmation.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Rule Body
[metadata]
creation_date = "2026/06/24"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/07/06"
[rule]
author = ["Elastic"]
description = """
Identifies GenAI agent CLIs started with permission-bypass or auto-approval flags that disable human-in-the-loop
guardrails. These modes are intended for isolated sandboxes but are frequently misused on internet-connected developer
workstations, allowing prompt injection, compromised dependencies, or malicious skills to execute commands, modify
files, or reach sensitive paths without confirmation.
"""
from = "now-9m"
index = ["logs-endpoint.events.process-*"]
language = "eql"
license = "Elastic License v2"
name = "GenAI CLI Started with Unsafe Permission Bypass"
note = """## Triage and analysis
### Investigating GenAI CLI Started with Unsafe Permission Bypass
GenAI coding agents normally prompt before running shell commands or editing files. Vendor-supplied bypass flags remove
those controls entirely or auto-approve all tool calls. On a networked host this materially increases blast radius from
prompt injection, poisoned MCP servers, malicious project configs, and autonomous agent workflows.
### Possible investigation steps
- Identify which GenAI tool and bypass flag were used from `process.command_line` and `process.executable`.
- Determine whether the session was intentional (CI/CD, isolated lab VM) or an interactive developer workstation.
- Review child processes spawned after startup for credential access, network exfiltration, or persistence.
- Check for recent GenAI config changes (MCP servers, skills, `.claude/settings.json`, `~/.codex/config.toml`).
- Correlate with other GenAI-related alerts on the same host and user.
### False positive analysis
- Deliberate use in approved sandbox/CI images with no outbound network access.
- Internal automation scripts that wrap GenAI CLIs with bypass flags; scope exceptions by host or user group.
- Each matching process start produces one alert; habitual bypass use in CI or developer workflows may need host or user exceptions.
### Response and remediation
- Remove bypass flags from scripts, shell profiles, and CI job definitions; use default or plan-only permission modes.
- Rotate API keys and cloud credentials accessible to the user account that ran the agent.
- Audit GenAI tool configs and MCP servers loaded during the session.
- Restrict GenAI agent usage policies to disallow permission bypass on production endpoints.
"""
references = [
"https://code.claude.com/docs/en/permission-modes",
"https://developers.openai.com/codex/cli/reference",
"https://developers.openai.com/codex/agent-approvals-security",
"https://google-gemini.github.io/gemini-cli/docs/get-started/configuration.html",
"https://specterops.io/blog/2025/11/21/an-evening-with-claude-code/",
]
risk_score = 47
rule_id = "c1326e45-6d3c-4a2d-9882-606a0c310299"
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Linux",
"OS: macOS",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Defense Evasion",
"Data Source: Elastic Defend",
"Resources: Investigation Guide",
"Domain: LLM",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where event.type == "start" and event.action in ("exec", "start") and
(
(
process.args in (
"--dangerously-skip-permissions",
"--allow-dangerously-skip-permissions",
"--permission-mode=bypassPermissions"
) or
(process.args == "--permission-mode" and process.args == "bypassPermissions")
) and
(
process.name in ("claude", "claude.exe") or
process.executable : (
"*/.local/share/claude/versions/*",
"*/.claude/downloads/*",
"*Caskroom/claude-code/*",
"*\\Claude\\versions\\*"
) or
(process.name in ("node", "node.exe") and process.args : "*@anthropic-ai/claude-code*")
)
) or
(
(
process.args in ("--dangerously-bypass-approvals-and-sandbox", "--full-auto", "--yolo") or
process.command_line : (
"* -s danger-full-access*",
"*--sandbox danger-full-access*",
"*--sandbox=danger-full-access*",
"*--ask-for-approval never*",
"*--ask-for-approval=never*"
)
) and
(
process.name in (
"codex", "codex.exe", "codex-exec",
"codex-aarch64-apple-darwin", "codex-x86_64-apple-darwin",
"codex-linux-arm64", "codex-linux-x64"
) or
(process.name in ("node", "node.exe") and process.args : ("*@openai/codex*", "*/codex", "*\\codex*"))
)
) or
(
(
process.args in ("--yolo", "-y") or
(process.args == "--approval-mode" and process.args == "yolo") or
process.args == "--approval-mode=yolo"
) and
(
process.name in ("gemini", "gemini-cli", "gemini.exe", "gemini-cli.exe") or
(process.name in ("node", "node.exe") and process.args : ("*@google/gemini-cli*", "*/gemini", "*\\gemini*"))
)
) or
(
(
process.args in (
"--yolo",
"--autopilot",
"--allow-all",
"--allow-all-tools",
"--allow-all-paths",
"--allow-all-urls"
)
) and
(
process.name in ("copilot", "copilot.exe") or
(process.name in ("node", "node.exe") and process.args : ("*@github/copilot*", "*/copilot", "*\\copilot*"))
)
) or
(
process.args == "--dangerously-skip-permissions" and
(
process.name in ("opencode", "opencode.exe", ".opencode") or
process.executable : ("*opencode-ai*", "*\\.opencode*") or
(process.name in ("node", "node.exe") and process.args : ("*opencode-ai*", "*/opencode", "*\\opencode*"))
)
)
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"
[[rule.threat.technique.subtechnique]]
id = "T1562.001"
name = "Disable or Modify Tools"
reference = "https://attack.mitre.org/techniques/T1562/001/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
Stages and Predicates
Stage 1: process
process where event.type == "start" and event.action in ("exec", "start") and
(
(
process.args in (
"--dangerously-skip-permissions",
"--allow-dangerously-skip-permissions",
"--permission-mode=bypassPermissions"
) or
(process.args == "--permission-mode" and process.args == "bypassPermissions")
) and
(
process.name in ("claude", "claude.exe") or
process.executable : (
"*/.local/share/claude/versions/*",
"*/.claude/downloads/*",
"*Caskroom/claude-code/*",
"*\\Claude\\versions\\*"
) or
(process.name in ("node", "node.exe") and process.args : "*@anthropic-ai/claude-code*")
)
) or
(
(
process.args in ("--dangerously-bypass-approvals-and-sandbox", "--full-auto", "--yolo") or
process.command_line : (
"* -s danger-full-access*",
"*--sandbox danger-full-access*",
"*--sandbox=danger-full-access*",
"*--ask-for-approval never*",
"*--ask-for-approval=never*"
)
) and
(
process.name in (
"codex", "codex.exe", "codex-exec",
"codex-aarch64-apple-darwin", "codex-x86_64-apple-darwin",
"codex-linux-arm64", "codex-linux-x64"
) or
(process.name in ("node", "node.exe") and process.args : ("*@openai/codex*", "*/codex", "*\\codex*"))
)
) or
(
(
process.args in ("--yolo", "-y") or
(process.args == "--approval-mode" and process.args == "yolo") or
process.args == "--approval-mode=yolo"
) and
(
process.name in ("gemini", "gemini-cli", "gemini.exe", "gemini-cli.exe") or
(process.name in ("node", "node.exe") and process.args : ("*@google/gemini-cli*", "*/gemini", "*\\gemini*"))
)
) or
(
(
process.args in (
"--yolo",
"--autopilot",
"--allow-all",
"--allow-all-tools",
"--allow-all-paths",
"--allow-all-urls"
)
) and
(
process.name in ("copilot", "copilot.exe") or
(process.name in ("node", "node.exe") and process.args : ("*@github/copilot*", "*/copilot", "*\\copilot*"))
)
) or
(
process.args == "--dangerously-skip-permissions" and
(
process.name in ("opencode", "opencode.exe", ".opencode") or
process.executable : ("*opencode-ai*", "*\\.opencode*") or
(process.name in ("node", "node.exe") and process.args : ("*opencode-ai*", "*/opencode", "*\\opencode*"))
)
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | in |
| field:"EventType" kind:in |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args | eq |
| field:"process.args" kind:eq |
process.args | in |
| field:"process.args" kind:in |
process.args | wildcard |
| field:"process.args" kind:wildcard |
process.command_line | wildcard |
| field:"CommandLine" kind:wildcard |
process.executable | wildcard |
| field:"Image" kind:wildcard |
process.name | in |
| field:"process_basename" kind:in |
Inhibit System Recovery via Stopping Backup Services
#Identifies the execution of Windows utilities to tamper with Data Backup related services. Adversaries may delete or remove built-in operating system data and turn off services designed to aid in the recovery of a corrupted system and prevent recovery.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Impact |
Rule Body
[rule]
description = """
Identifies the execution of Windows utilities to tamper with Data Backup related services. Adversaries may delete or
remove built-in operating system data and turn off services designed to aid in the recovery of a corrupted system and
prevent recovery.
"""
id = "220ab556-e008-44d4-9c50-44d455225eee"
license = "Elastic License v2"
name = "Inhibit System Recovery via Stopping Backup Services"
os_list = ["windows"]
version = "1.0.26"
query = '''
sequence with maxspan=1m
[process where event.action == "start" and
(
(process.executable : ("?:\\ProgramData\\*", "?:\\Users\\*", "?:\\Python*") and
not process.code_signature.trusted == true) or
process.name : ("rundll32.exe", "regsvr32.exe", "cscript.exe", "wscript.exe", "java*.exe", "powershell.exe", "cmd.exe")
) and
not process.parent.command_line: ("*:\\Program Files\\*", "*:\\Program Files (x86)\\*") and
not process.parent.executable :
("?:\\Windows\\System32\\svchost.exe",
"?:\\Windows\\VeeamVssSupport\\VeeamGuestHelper.exe",
"?:\\Windows\\Microsoft.NET\\Framework\\*\\InstallUtil.exe",
"?:\\Windows\\System32\\taskeng.exe",
"?:\\Program Files\\Symantec\\Backup Exec\\RAWS\\VSS Provider\\bevssrequestor.exe",
"?:\\Program Files\\Veritas\\Backup Exec\\RAWS\\VSS Provider\\bevssrequestor.exe",
"?:\\Program Files\\Veritas\\Veritas VSS Provider\\bevssrequestor.exe",
"?:\\Program Files\\VMware\\VMware Tools\\vmtoolsd.exe",
"?:\\Program Files\\Rubrik\\Rubrik Backup Service\\rba.exe") and
process.parent.executable != null and
not (process.name : "cmd.exe" and
process.args : ("?:\\Users\\*\\AppData\\Local\\Temp\\rubrik_vmware*\\uninstall-provider.cmd",
"Master\\DC\\bin\\x64\\*-EaseUSprovider.cmd",
"Files\\QNAP\\VSS")) and
not (process.parent.name : "powershell.exe" and process.parent.args : "Start-Process .\\Stores\\Files\\restartSqlServer.bat -Verb RunAs")
] by process.entity_id
[process where event.action == "start" and
process.pe.original_file_name : ("net.exe", "sc.exe", "cmd.exe") and
process.args : ("stop", "disabled") and
process.args :
("SamSss", "VSS", "SDRSVC", "wbengine", "GoogleVssAgent", "SstpSvc", "sacsvr", "vmicvss", "SQLWriter", "SQLTELEMETRY*",
"VeeamNFSSvc*", "VeeamTransportSvc*", "acronis*", "*backup*", "iisadmin", "veeamtransportsvc", "MSSQL*", "SQLSERVER*",
"dosvc", "MongoDB", "Oracle*", "NFSysService", "SentinelKeysServer", "DellDRLogSvc", "TPlusStd*", "TurboCRM70", "U8*Service") and
not (process.args : "vss" and process.parent.args : ("?:\\Windows\\TEMP\\rubrik_vmware*", "Agent\\InMageVSSProvider_Install.cmd"))
] by process.parent.entity_id
[process where event.action == "start" and
process.pe.original_file_name : ("net.exe", "sc.exe", "cmd.exe") and
process.args : ("stop", "disabled") and
process.args :
("SamSss", "VSS", "SDRSVC", "wbengine", "GoogleVssAgent", "SstpSvc", "sacsvr", "vmicvss", "SQLWriter", "SQLTELEMETRY*",
"VeeamNFSSvc*", "VeeamTransportSvc*", "acronis*", "*backup*", "iisadmin", "veeamtransportsvc", "MSSQL*", "SQLSERVER*",
"dosvc", "MongoDB", "Oracle*", "NFSysService", "SentinelKeysServer", "DellDRLogSvc", "TPlusStd*", "TurboCRM70", "U8*Service") and
not (process.args : "vss" and process.parent.args : ("?:\\Windows\\TEMP\\rubrik_vmware*", "Agent\\InMageVSSProvider_Install.cmd"))
] by process.parent.entity_id
'''
min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 1
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 1
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1490"
name = "Inhibit System Recovery"
reference = "https://attack.mitre.org/techniques/T1490/"
[threat.tactic]
id = "TA0040"
name = "Impact"
reference = "https://attack.mitre.org/tactics/TA0040/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Ordered sequence: each step below must occur in order within 1m, correlated by process.entity_id, process.parent.entity_id.
Stage 1: process
[process where event.action == "start" and
(
(process.executable : ("?:\\ProgramData\\*", "?:\\Users\\*", "?:\\Python*") and
not process.code_signature.trusted == true) or
process.name : ("rundll32.exe", "regsvr32.exe", "cscript.exe", "wscript.exe", "java*.exe", "powershell.exe", "cmd.exe")
) and
not process.parent.command_line: ("*:\\Program Files\\*", "*:\\Program Files (x86)\\*") and
not process.parent.executable :
("?:\\Windows\\System32\\svchost.exe",
"?:\\Windows\\VeeamVssSupport\\VeeamGuestHelper.exe",
"?:\\Windows\\Microsoft.NET\\Framework\\*\\InstallUtil.exe",
"?:\\Windows\\System32\\taskeng.exe",
"?:\\Program Files\\Symantec\\Backup Exec\\RAWS\\VSS Provider\\bevssrequestor.exe",
"?:\\Program Files\\Veritas\\Backup Exec\\RAWS\\VSS Provider\\bevssrequestor.exe",
"?:\\Program Files\\Veritas\\Veritas VSS Provider\\bevssrequestor.exe",
"?:\\Program Files\\VMware\\VMware Tools\\vmtoolsd.exe",
"?:\\Program Files\\Rubrik\\Rubrik Backup Service\\rba.exe") and
process.parent.executable != null and
not (process.name : "cmd.exe" and
process.args : ("?:\\Users\\*\\AppData\\Local\\Temp\\rubrik_vmware*\\uninstall-provider.cmd",
"Master\\DC\\bin\\x64\\*-EaseUSprovider.cmd",
"Files\\QNAP\\VSS")) and
not (process.parent.name : "powershell.exe" and process.parent.args : "Start-Process .\\Stores\\Files\\restartSqlServer.bat -Verb RunAs")
] by process.entity_id
Stage 2: process
[process where event.action == "start" and
process.pe.original_file_name : ("net.exe", "sc.exe", "cmd.exe") and
process.args : ("stop", "disabled") and
process.args :
("SamSss", "VSS", "SDRSVC", "wbengine", "GoogleVssAgent", "SstpSvc", "sacsvr", "vmicvss", "SQLWriter", "SQLTELEMETRY*",
"VeeamNFSSvc*", "VeeamTransportSvc*", "acronis*", "*backup*", "iisadmin", "veeamtransportsvc", "MSSQL*", "SQLSERVER*",
"dosvc", "MongoDB", "Oracle*", "NFSysService", "SentinelKeysServer", "DellDRLogSvc", "TPlusStd*", "TurboCRM70", "U8*Service") and
not (process.args : "vss" and process.parent.args : ("?:\\Windows\\TEMP\\rubrik_vmware*", "Agent\\InMageVSSProvider_Install.cmd"))
] by process.parent.entity_id
Stage 3: process
[process where event.action == "start" and
process.pe.original_file_name : ("net.exe", "sc.exe", "cmd.exe") and
process.args : ("stop", "disabled") and
process.args :
("SamSss", "VSS", "SDRSVC", "wbengine", "GoogleVssAgent", "SstpSvc", "sacsvr", "vmicvss", "SQLWriter", "SQLTELEMETRY*",
"VeeamNFSSvc*", "VeeamTransportSvc*", "acronis*", "*backup*", "iisadmin", "veeamtransportsvc", "MSSQL*", "SQLSERVER*",
"dosvc", "MongoDB", "Oracle*", "NFSysService", "SentinelKeysServer", "DellDRLogSvc", "TPlusStd*", "TurboCRM70", "U8*Service") and
not (process.args : "vss" and process.parent.args : ("?:\\Windows\\TEMP\\rubrik_vmware*", "Agent\\InMageVSSProvider_Install.cmd"))
] by process.parent.entity_id
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"start" |
process.args | wildcard |
| field:"process.args" kind:wildcard |
process.executable | wildcard |
| field:"Image" kind:wildcard |
process.name | wildcard |
| field:"process_basename" kind:wildcard |
process.parent.executable | is_not_null | field:"ParentImage" kind:is_not_null | |
process.pe.original_file_name | wildcard |
| field:"OriginalFileName" kind:wildcard |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.args | wildcard | ?:\Users\*\AppData\Local\Temp\rubrik_vmware*\uninstall-provider.cmd, Master\DC\bin\x64\*-EaseUSprovider.cmd, Files\QNAP\VSS | excludes:process.args field:"process.args" value:"?:\Users\*\AppData\Local\Temp\rubrik_vmware*\uninstall-provider.cmd" field:"process.args" value:"Master\DC\bin\x64\*-EaseUSprovider.cmd" field:"process.args" value:"Files\QNAP\VSS" |
process.name | eq | cmd.exe | excludes:process.name field:"process.name" value:"cmd.exe" |
process.parent.args | eq | Start-Process .\Stores\Files\restartSqlServer.bat -Verb RunAs | excludes:process.parent.args field:"process.parent.args" value:"Start-Process .\Stores\Files\restartSqlServer.bat -Verb RunAs" |
process.parent.name | eq | powershell.exe | excludes:process.parent.name field:"process.parent.name" value:"powershell.exe" |
process.parent.command_line | match | :\Program Files\, :\Program Files (x86)\ | excludes:process.parent.command_line field:"process.parent.command_line" value:":\Program Files\" field:"process.parent.command_line" value:":\Program Files (x86)\" |
process.parent.executable | wildcard | ?:\Windows\System32\svchost.exe, ?:\Windows\VeeamVssSupport\VeeamGuestHelper.exe, ?:\Windows\Microsoft.NET\Framework\*\InstallUtil.exe, ?:\Windows\System32\taskeng.exe, ?:\Program Files\Symantec\Backup Exec\RAWS\VSS Provider\bevssrequestor.exe, ?:\Program Files\Veritas\Backup Exec\RAWS\VSS Provider\bevssrequestor.exe, ?:\Program Files\Veritas\Veritas VSS Provider\bevssrequestor.exe, ?:\Program Files\VMware\VMware Tools\vmtoolsd.exe, ?:\Program Files\Rubrik\Rubrik Backup Service\rba.exe | excludes:process.parent.executable |
process.args | eq | vss | excludes:process.args field:"process.args" value:"vss" |
process.parent.args | wildcard | ?:\Windows\TEMP\rubrik_vmware*, Agent\InMageVSSProvider_Install.cmd | excludes:process.parent.args field:"process.parent.args" value:"?:\Windows\TEMP\rubrik_vmware*" field:"process.parent.args" value:"Agent\InMageVSSProvider_Install.cmd" |
Linux SSH X11 Forwarding
#This rule monitors for X11 forwarding via SSH. X11 forwarding is a feature that allows users to run graphical applications on a remote server and display the application's graphical user interface on their local machine. Attackers can abuse X11 forwarding for tunneling their GUI-based tools, pivot through compromised systems, and create covert communication channels, enabling lateral movement and facilitating remote control of systems within a network.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement | |
| Command & Control |
Rule Body
[metadata]
creation_date = "2023/08/23"
integration = ["endpoint", "crowdstrike", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2026/03/24"
[transform]
[[transform.osquery]]
label = "Osquery - Retrieve Listening Ports"
query = "SELECT pid, address, port, socket, protocol, path FROM listening_ports"
[[transform.osquery]]
label = "Osquery - Retrieve Open Sockets"
query = "SELECT pid, family, remote_address, remote_port, socket, state FROM process_open_sockets"
[[transform.osquery]]
label = "Osquery - Retrieve Information for a Specific User"
query = "SELECT * FROM users WHERE username = {{user.name}}"
[[transform.osquery]]
label = "Osquery - Investigate the Account Authentication Status"
query = "SELECT * FROM logged_in_users WHERE user = {{user.name}}"
[[transform.osquery]]
label = "Osquery - Retrieve Running Processes by User"
query = "SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.uid ORDER BY username"
[[transform.osquery]]
label = "Osquery - Retrieve Process Info"
query = "SELECT name, cmdline, parent, path, uid FROM processes"
[rule]
author = ["Elastic"]
description = """
This rule monitors for X11 forwarding via SSH. X11 forwarding is a feature that allows users to run graphical
applications on a remote server and display the application's graphical user interface on their local machine. Attackers
can abuse X11 forwarding for tunneling their GUI-based tools, pivot through compromised systems, and create covert
communication channels, enabling lateral movement and facilitating remote control of systems within a network.
"""
from = "now-9m"
index = [
"endgame-*",
"logs-crowdstrike.fdr*",
"logs-endpoint.events.process*",
"logs-sentinel_one_cloud_funnel.*",
]
language = "eql"
license = "Elastic License v2"
name = "Linux SSH X11 Forwarding"
note = """## Triage and analysis
### Investigating Linux SSH X11 Forwarding
Attackers can leverage SSH X11 forwarding to capture a user's graphical desktop session and potentially execute unauthorized GUI applications remotely.
This rule looks for the execution of SSH in conjunction with command line arguments that are capable of setting up X11 forwarding.
> **Note**:
> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/current/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.
> This investigation guide uses [placeholder fields](https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html) to dynamically pass alert data into Osquery queries. Placeholder fields were introduced in Elastic Stack version 8.7.0. If you're using Elastic Stack version 8.6.0 or earlier, you'll need to manually adjust this investigation guide's queries to ensure they properly run.
#### Possible investigation steps
- Identify any signs of suspicious network activity or anomalies that may indicate network forwarding activity. This could include unexpected traffic patterns or unusual network behavior.
- Investigate listening ports and open sockets to look for potential protocol tunneling, reverse shells, or data exfiltration.
- $osquery_0
- $osquery_1
- Identify the user account that performed the action, analyze it, and check whether it should perform this kind of action.
- $osquery_2
- Investigate whether the user is currently logged in and active.
- $osquery_3
- Investigate the script execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence and whether they are located in expected locations.
- $osquery_4
- $osquery_5
- Investigate other alerts associated with the user/host during the past 48 hours.
- If scripts or executables were dropped, retrieve the files and determine if they are malicious:
- Use a private sandboxed malware analysis system to perform analysis.
- Observe and collect information about the following activities:
- Attempts to contact external domains and addresses.
- Check if the domain is newly registered or unexpected.
- Check the reputation of the domain or IP address.
- File access, modification, and creation activities.
### Related rules
- Potential Linux Tunneling and/or Port Forwarding - 6ee947e9-de7e-4281-a55d-09289bdf947e
### False positive analysis
- If this activity is related to new benign software installation activity, consider adding exceptions — preferably with a combination of user and command line conditions.
- If this activity is related to a system administrator or developer who uses port tunneling/forwarding for benign purposes, consider adding exceptions for specific user accounts or hosts.
- Try to understand the context of the execution by thinking about the user, machine, or business purpose. A small number of endpoints, such as servers with unique software, might appear unusual but satisfy a specific business need.
### Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Isolate the involved host to prevent further post-compromise behavior.
- If the triage identified malware, search the environment for additional compromised hosts.
- Implement temporary network rules, procedures, and segmentation to contain the malware.
- Stop suspicious processes.
- Immediately block the identified indicators of compromise (IoCs).
- Inspect the affected systems for additional malware backdoors, such as reverse shells, reverse proxies, or droppers, that attackers could use to reinfect the system.
- Remove and block malicious artifacts identified during triage.
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
- Leverage the incident response data and logging to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
"""
references = ["https://book.hacktricks.xyz/generic-methodologies-and-resources/tunneling-and-port-forwarding"]
risk_score = 21
rule_id = "29f0cf93-d17c-4b12-b4f3-a433800539fa"
severity = "low"
tags = [
"Domain: Endpoint",
"OS: Linux",
"Use Case: Threat Detection",
"Tactic: Command and Control",
"Data Source: Elastic Defend",
"Data Source: Elastic Endgame",
"Data Source: Crowdstrike",
"Data Source: SentinelOne",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "start", "ProcessRollup2") and
process.name in ("ssh", "sshd") and process.args in ("-X", "-Y") and process.args_count >= 3 and
process.parent.name in ("bash", "dash", "ash", "sh", "tcsh", "csh", "zsh", "ksh", "fish")
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1572"
name = "Protocol Tunneling"
reference = "https://attack.mitre.org/techniques/T1572/"
[rule.threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1021"
name = "Remote Services"
reference = "https://attack.mitre.org/techniques/T1021/"
[[rule.threat.technique.subtechnique]]
id = "T1021.004"
name = "SSH"
reference = "https://attack.mitre.org/techniques/T1021/004/"
[rule.threat.tactic]
id = "TA0008"
name = "Lateral Movement"
reference = "https://attack.mitre.org/tactics/TA0008/"
Stages and Predicates
Stage 1: process
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "start", "ProcessRollup2") and
process.name in ("ssh", "sshd") and process.args in ("-X", "-Y") and process.args_count >= 3 and
process.parent.name in ("bash", "dash", "ash", "sh", "tcsh", "csh", "zsh", "ksh", "fish")
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | in |
| field:"EventType" kind:in |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args | in |
| field:"process.args" kind:in |
process.args_count | ge |
| field:"process.args_count" kind:ge value:"3" |
process.name | in |
| field:"process_basename" kind:in |
process.parent.name | in |
| field:"parent_process_basename" kind:in |
Multiple SonicWall Login Failures Followed by Successful Login
#Identifies multiple failed SonicWall authentication attempts against several user accounts from one source IP, followed by a successful remote-access login from the same source to the same appliance. This may indicate successful password spraying, credential stuffing, or password guessing.
Known False Positives
- Shared egress addresses, managed service providers, help desks, identity-provider outages, password rotation, or several legitimate users entering incorrect credentials before another user successfully authenticates may trigger this rule. Add exceptions only for confirmed shared-service sources and scope them to the relevant appliance.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Credential Access |
Rule Body
[metadata]
creation_date = "2026/07/31"
integration = ["sonicwall_firewall"]
maturity = "production"
updated_date = "2026/07/31"
[rule]
author = ["Elastic"]
description = """
Identifies multiple failed SonicWall authentication attempts against several user accounts from one source IP, followed
by a successful remote-access login from the same source to the same appliance. This may indicate successful password
spraying, credential stuffing, or password guessing.
"""
false_positives = [
"""
Shared egress addresses, managed service providers, help desks, identity-provider outages, password rotation, or
several legitimate users entering incorrect credentials before another user successfully authenticates may trigger
this rule. Add exceptions only for confirmed shared-service sources and scope them to the relevant appliance.
""",
]
from = "now-15m"
interval = "5m"
language = "esql"
license = "Elastic License v2"
name = "Multiple SonicWall Login Failures Followed by Successful Login"
note = """## Triage and analysis
### Investigating Multiple SonicWall Login Failures Followed by Successful Login
This rule detects at least five failed authentication events affecting at least three users from one source IP to one SonicWall appliance, followed by at least one successful remote-access login after the failure activity began. The successful user does not have to be one of the failed users because credential attacks can test several credential pairs and shared source infrastructure can target multiple accounts.
Failure event codes include incorrect or unknown credentials, RADIUS or LDAP authentication failures, and account lockouts. Successful event codes cover VPN- or WAN-zone administrator and remote-user logins, including SSL VPN.
### Possible investigation steps
- Review `source.ip`, its ASN, geolocation, reputation, and prior activity. Determine whether it belongs to expected corporate proxy, VPN egress, managed service provider, jump-host, or monitoring infrastructure.
- Review `Esql.failed_user_names`, `Esql.successful_user_names`, `Esql.failed_logins`, `Esql.failed_user_count`, and `Esql.successful_logins`. Determine whether a successful user was also targeted by the failed attempts.
- Review `Esql.failure_event_codes` and `Esql.success_event_codes` to distinguish administrator, remote-user, SSL VPN, LDAP, RADIUS, and lockout activity.
- Examine the sequence between `Esql.first_failure`, `Esql.last_failure`, `Esql.first_success`, and `Esql.last_success`. Look for automated pacing, username enumeration, repeated attempts, or continued failures after the first successful login.
- Confirm whether MFA was required and completed for each successful authentication.
- Correlate successful VPN sessions with assigned tunnel IPs, internal authentication, DNS, network flow, and endpoint activity. For administrator logins, review subsequent SonicWall configuration changes.
### False positive analysis
- Several users behind a shared public address may enter incorrect credentials while another user authenticates.
- Password rotation, expired cached credentials, LDAP or RADIUS issues, help-desk testing, and synthetic monitoring can generate failure-to-success patterns.
- Validate the source and workflow before adding an exception. Prefer an exception scoped by both source and appliance rather than excluding a user or source globally.
### Response and remediation
- If unauthorized access is suspected, disable affected accounts, terminate active sessions, reset credentials, revoke tokens or keys, and enforce MFA.
- Block or restrict the source at the SonicWall appliance while investigating.
- Review configuration changes and downstream activity from successful VPN sessions. Isolate affected systems and begin incident response if post-authentication activity is identified.
- Preserve SonicWall authentication, VPN session, and configuration audit logs before making broad changes.
"""
references = [
"https://www.huntress.com/blog/sonicwall-credential-stuffing-campaign",
"https://www.elastic.co/docs/reference/integrations/sonicwall_firewall",
"https://www.sonicwall.com/support/knowledge-base/monitoring-sslvpn-user-logins/kA1VN0000000JQz0AM",
]
risk_score = 73
rule_id = "efe7ac71-3b13-41cf-8263-30af68ce3f19"
setup = """## Setup
This rule requires the Elastic **SonicWall Firewall** integration and SonicWall Enhanced Syslog authentication events.
Configure the appliance to forward **Users > Authentication Access** and **Users > RADIUS Authentication** events.
Confirm that credential failure event codes `30`, `32`, `33`, `200`, `243`, `329`, `745`, `749`, and `1655`, and
successful remote-access event codes `235`, `236`, `237`, `238`, and `1080`, are collected. Verify that the integration
populates `data_stream.dataset`, `event.action`, `event.code`, `source.ip`, `user.name`, and either
`observer.serial_number` or a unique `observer.name`.
If several customers share one Kibana space, ensure the appliance identity is unique per tenant so activity from
different customers is not aggregated together.
"""
severity = "high"
tags = [
"Domain: Network",
"Domain: Identity",
"Use Case: Threat Detection",
"Use Case: Identity and Access Audit",
"Tactic: Credential Access",
"Tactic: Initial Access",
"Data Source: SonicWall",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "esql"
query = '''
from logs-sonicwall_firewall.log-*
| where
data_stream.dataset == "sonicwall_firewall.log" and
(
(
event.action == "login-failure" and
event.code in ("30", "32", "33", "200", "243", "329", "745", "749", "1655")
) or (
event.action == "login-success" and
event.code in ("235", "236", "237", "238", "1080")
)
) and
source.ip is not null and
user.name is not null and
(observer.serial_number is not null or observer.name is not null)
| eval
Esql.appliance_id = coalesce(observer.serial_number, observer.name),
Esql.is_failure = case(event.action == "login-failure", 1, 0),
Esql.is_success = case(event.action == "login-success", 1, 0),
Esql.failed_user = case(event.action == "login-failure", user.name, null),
Esql.successful_user = case(event.action == "login-success", user.name, null),
Esql.failure_event_code = case(event.action == "login-failure", event.code, null),
Esql.success_event_code = case(event.action == "login-success", event.code, null),
Esql.failure_timestamp = case(event.action == "login-failure", @timestamp, null),
Esql.success_timestamp = case(event.action == "login-success", @timestamp, null)
| stats
Esql.failed_logins = sum(Esql.is_failure),
Esql.successful_logins = sum(Esql.is_success),
Esql.failed_user_count = count_distinct(Esql.failed_user),
Esql.failed_user_names = values(Esql.failed_user),
Esql.successful_user_names = values(Esql.successful_user),
Esql.failure_event_codes = values(Esql.failure_event_code),
Esql.success_event_codes = values(Esql.success_event_code),
Esql.first_failure = min(Esql.failure_timestamp),
Esql.last_failure = max(Esql.failure_timestamp),
Esql.first_success = min(Esql.success_timestamp),
Esql.last_success = max(Esql.success_timestamp)
by Esql.appliance_id, source.ip
| where
Esql.failed_logins >= 5 and
Esql.failed_user_count >= 3 and
Esql.successful_logins >= 1 and
Esql.first_failure < Esql.last_success
| eval Esql.failure_to_success_seconds = date_diff("seconds", Esql.first_failure, Esql.last_success)
| sort Esql.failed_user_count desc, Esql.failed_logins desc
| keep source.ip, Esql.*
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1110"
name = "Brute Force"
reference = "https://attack.mitre.org/techniques/T1110/"
[[rule.threat.technique.subtechnique]]
id = "T1110.001"
name = "Password Guessing"
reference = "https://attack.mitre.org/techniques/T1110/001/"
[[rule.threat.technique.subtechnique]]
id = "T1110.003"
name = "Password Spraying"
reference = "https://attack.mitre.org/techniques/T1110/003/"
[[rule.threat.technique.subtechnique]]
id = "T1110.004"
name = "Credential Stuffing"
reference = "https://attack.mitre.org/techniques/T1110/004/"
[rule.threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1078"
name = "Valid Accounts"
reference = "https://attack.mitre.org/techniques/T1078/"
[[rule.threat.technique]]
id = "T1133"
name = "External Remote Services"
reference = "https://attack.mitre.org/techniques/T1133/"
[rule.threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[rule.alert_suppression]
group_by = ["Esql.appliance_id", "source.ip"]
missing_fields_strategy = "suppress"
[rule.alert_suppression.duration]
unit = "m"
value = 15
Stages and Predicates
Stage 1: from
from logs-sonicwall_firewall.log-*
Stage 2: where
| where
data_stream.dataset == "sonicwall_firewall.log" and
(
(
event.action == "login-failure" and
event.code in ("30", "32", "33", "200", "243", "329", "745", "749", "1655")
) or (
event.action == "login-success" and
event.code in ("235", "236", "237", "238", "1080")
)
) and
source.ip is not null and
user.name is not null and
(observer.serial_number is not null or observer.name is not null)
Stage 3: eval
| eval
Esql.appliance_id = coalesce(observer.serial_number, observer.name),
Esql.is_failure = case(event.action == "login-failure", 1, 0),
Esql.is_success = case(event.action == "login-success", 1, 0),
Esql.failed_user = case(event.action == "login-failure", user.name, null),
Esql.successful_user = case(event.action == "login-success", user.name, null),
Esql.failure_event_code = case(event.action == "login-failure", event.code, null),
Esql.success_event_code = case(event.action == "login-success", event.code, null),
Esql.failure_timestamp = case(event.action == "login-failure", @timestamp, null),
Esql.success_timestamp = case(event.action == "login-success", @timestamp, null)
Esql.failed_user =event.action == "login-failure"user.namenullEsql.failure_event_code =event.action == "login-failure"event.codenullEsql.failure_timestamp =event.action == "login-failure"@timestampnullEsql.is_failure =event.action == "login-failure"10Esql.is_success =event.action == "login-success"10Esql.success_event_code =event.action == "login-success"event.codenullEsql.success_timestamp =event.action == "login-success"@timestampnullEsql.successful_user =event.action == "login-success"user.namenullStage 4: stats
| stats
Esql.failed_logins = sum(Esql.is_failure),
Esql.successful_logins = sum(Esql.is_success),
Esql.failed_user_count = count_distinct(Esql.failed_user),
Esql.failed_user_names = values(Esql.failed_user),
Esql.successful_user_names = values(Esql.successful_user),
Esql.failure_event_codes = values(Esql.failure_event_code),
Esql.success_event_codes = values(Esql.success_event_code),
Esql.first_failure = min(Esql.failure_timestamp),
Esql.last_failure = max(Esql.failure_timestamp),
Esql.first_success = min(Esql.success_timestamp),
Esql.last_success = max(Esql.success_timestamp)
by Esql.appliance_id, source.ip
Stage 5: where
| where
Esql.failed_logins >= 5 and
Esql.failed_user_count >= 3 and
Esql.successful_logins >= 1 and
Esql.first_failure < Esql.last_success
Stage 6: eval
| eval Esql.failure_to_success_seconds = date_diff("seconds", Esql.first_failure, Esql.last_success)
Stage 7: sort
| sort Esql.failed_user_count desc, Esql.failed_logins desc
Stage 8: keep
| keep source.ip, Esql.*
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Esql.failed_logins | ge |
| field:"Esql.failed_logins" kind:ge value:"5" |
Esql.failed_user_count | ge |
| field:"Esql.failed_user_count" kind:ge value:"3" |
Esql.first_failure | lt |
| field:"Esql.first_failure" kind:lt value:"Esql.last_success" |
Esql.successful_logins | ge |
| field:"Esql.successful_logins" kind:ge value:"1" |
data_stream.dataset | eq |
| field:"data_stream.dataset" kind:eq value:"sonicwall_firewall.log" |
event.action | eq |
| field:"EventType" kind:eq |
event.code | in |
| field:"EventID" kind:in |
observer.name | is_not_null | field:"observer.name" kind:is_not_null | |
observer.serial_number | is_not_null | field:"observer.serial_number" kind:is_not_null | |
source.ip | is_not_null | field:"src_ip" kind:is_not_null | |
user.name | is_not_null | field:"user" kind:is_not_null |
Output Fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
source.ip | KEEP source.ip |
Esql.* | KEEP Esql.* |
Network Connection Following Ptrace Manipulation
#This rule detects a process attempting a network connection shortly after its memory or register state was modified by another process through ptrace. This behavior may indicate successful process injection followed by network activity from the injected payload.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Rule Body
[rule]
description = """
This rule detects a process attempting a network connection shortly after its memory or register state was modified by
another process through ptrace. This behavior may indicate successful process injection followed by network activity
from the injected payload.
"""
id = "6a857957-a116-4348-84c3-fc94e533912f"
license = "Elastic License v2"
name = "Network Connection Following Ptrace Manipulation"
os_list = ["linux"]
reference = [
"https://man7.org/linux/man-pages/man2/ptrace.2.html",
"https://www.akamai.com/blog/security-research/the-definitive-guide-to-linux-process-injection",
]
version = "1.0.2"
query = '''
sequence with maxspan=3s
[process where event.type == "start" and event.action == "ptrace" and (
process.Ext.ptrace.request in (4, 5, 13, 16901) or
(process.Ext.ptrace.request == 6 and
process.Ext.ptrace.addr in (48, 60, 128, 152))
) and
not process.executable in ("/opt/traps/bin/dypdng", "/system/bin/app_process64")] by process.Ext.ptrace.child_pid
[network where event.type == "start" and event.action == "connection_attempted" and
not (destination.ip == null or destination.ip == "0.0.0.0" or cidrmatch(
destination.ip, "10.0.0.0/8", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24", "192.0.0.0/29",
"192.0.0.8/32", "192.0.0.9/32", "192.0.0.10/32", "192.0.0.170/32", "192.0.0.171/32", "192.0.2.0/24",
"192.31.196.0/24", "192.52.193.0/24", "192.168.0.0/16", "192.88.99.0/24", "224.0.0.0/4", "100.64.0.0/10",
"192.175.48.0/24","198.18.0.0/15", "198.51.100.0/24", "203.0.113.0/24", "240.0.0.0/4", "::1", "FE80::/10",
"FF00::/8"
)
)] by process.pid
'''
min_endpoint_version = "9.1.4"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 1
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"
[[threat.technique.subtechnique]]
id = "T1055.008"
name = "Ptrace System Calls"
reference = "https://attack.mitre.org/techniques/T1055/008/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "9.1.4"
Stages and Predicates
Ordered sequence: each step below must occur in order within 3s, correlated by process.Ext.ptrace.child_pid, process.pid.
Stage 1: process
[process where event.type == "start" and event.action == "ptrace" and (
process.Ext.ptrace.request in (4, 5, 13, 16901) or
(process.Ext.ptrace.request == 6 and
process.Ext.ptrace.addr in (48, 60, 128, 152))
) and
not process.executable in ("/opt/traps/bin/dypdng", "/system/bin/app_process64")] by process.Ext.ptrace.child_pid
Stage 2: network
[network where event.type == "start" and event.action == "connection_attempted" and
not (destination.ip == null or destination.ip == "0.0.0.0" or cidrmatch(
destination.ip, "10.0.0.0/8", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24", "192.0.0.0/29",
"192.0.0.8/32", "192.0.0.9/32", "192.0.0.10/32", "192.0.0.170/32", "192.0.0.171/32", "192.0.2.0/24",
"192.31.196.0/24", "192.52.193.0/24", "192.168.0.0/16", "192.88.99.0/24", "224.0.0.0/4", "100.64.0.0/10",
"192.175.48.0/24","198.18.0.0/15", "198.51.100.0/24", "203.0.113.0/24", "240.0.0.0/4", "::1", "FE80::/10",
"FF00::/8"
)
)] by process.pid
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.Ext.ptrace.addr | in |
| field:"process.Ext.ptrace.addr" kind:in |
process.Ext.ptrace.request | eq |
| field:"process.Ext.ptrace.request" kind:eq value:"6" |
process.Ext.ptrace.request | in |
| field:"process.Ext.ptrace.request" kind:in |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.executable | in | /opt/traps/bin/dypdng, /system/bin/app_process64 | excludes:process.executable field:"process.executable" value:"/opt/traps/bin/dypdng" field:"process.executable" value:"/system/bin/app_process64" |
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 |
destination.ip | eq | 0.0.0.0 | excludes:destination.ip field:"destination.ip" value:"0.0.0.0" |
destination.ip | is_null | excludes:destination.ip |
Potential Beacon Masking from a Stomped Module
#Identifies multiple attempts to modify the memory protection of a memory module and the origin of the call is coming from the same target module. This may indicate evasion to mask/unmask the text section of beacon from a stomped module.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Rule Body
[rule]
description = """
Identifies multiple attempts to modify the memory protection of a memory module and the origin of the call is coming
from the same target module. This may indicate evasion to mask/unmask the text section of beacon from a stomped module.
"""
id = "d04edc65-b0a1-4445-a148-3fb7ec4f731e"
license = "Elastic License v2"
name = "Potential Beacon Masking from a Stomped Module"
os_list = ["windows"]
version = "1.0.6"
query = '''
api where process.Ext.api.name == "VirtualProtect" and
process.Ext.api.behaviors == "allocate_shellcode" and process.Ext.api.behaviors == "execute_fluctuation" and
process.Ext.api.metadata.target_address_name : "*.dll" and process.Ext.api.parameters.size >= 150000 and
stringcontains~(process.thread.Ext.call_stack_final_user_module.protection_provenance, process.Ext.api.metadata.target_address_name) and
process.thread.Ext.call_stack_final_user_module.hash.sha256 != "528056732408c8dd2ef0cd585e719acdf1407326bfac4d9566d50dbb11ac2d1d"
'''
min_endpoint_version = "8.10.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "8.10.0"
Stages and Predicates
Stage 1: api
api where process.Ext.api.name == "VirtualProtect" and
process.Ext.api.behaviors == "allocate_shellcode" and process.Ext.api.behaviors == "execute_fluctuation" and
process.Ext.api.metadata.target_address_name : "*.dll" and process.Ext.api.parameters.size >= 150000 and
stringcontains~(process.thread.Ext.call_stack_final_user_module.protection_provenance, process.Ext.api.metadata.target_address_name) and
process.thread.Ext.call_stack_final_user_module.hash.sha256 != "528056732408c8dd2ef0cd585e719acdf1407326bfac4d9566d50dbb11ac2d1d"
Indicators
These rows show field, operator, and value matches.
Potential Disabling of SELinux
#Identifies potential attempts to disable Security-Enhanced Linux (SELinux), which is a Linux kernel security feature to support access control policies. Adversaries may disable security tools to avoid possible detection of their tools and activities.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Rule Body
[metadata]
creation_date = "2020/04/22"
integration = ["endpoint", "auditd_manager", "crowdstrike", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2025/12/17"
[rule]
author = ["Elastic"]
description = """
Identifies potential attempts to disable Security-Enhanced Linux (SELinux), which is a Linux kernel security feature to
support access control policies. Adversaries may disable security tools to avoid possible detection of their tools and
activities.
"""
from = "now-9m"
index = [
"auditbeat-*",
"endgame-*",
"logs-auditd_manager.auditd-*",
"logs-crowdstrike.fdr*",
"logs-endpoint.events.process*",
"logs-sentinel_one_cloud_funnel.*",
]
language = "eql"
license = "Elastic License v2"
name = "Potential Disabling of SELinux"
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 Disabling of SELinux
SELinux is a critical security feature in Linux environments, enforcing access control policies to protect against unauthorized access. Adversaries may attempt to disable SELinux to evade detection and carry out malicious activities undetected. The detection rule identifies such attempts by monitoring for the execution of the 'setenforce 0' command, which switches SELinux to permissive mode, effectively disabling its enforcement capabilities. This rule leverages process monitoring to alert security teams of potential defense evasion tactics.
### Possible investigation steps
- Review the process execution details to confirm the presence of the 'setenforce 0' command, ensuring that the process name is 'setenforce' and the argument is '0'.
- Check the user account associated with the process execution to determine if it is a legitimate administrative user or a potential compromised account.
- Investigate the timeline of events leading up to and following the execution of the 'setenforce 0' command to identify any related suspicious activities or processes.
- Examine system logs and audit logs for any other unusual or unauthorized changes to SELinux settings or other security configurations.
- Assess the system for any signs of compromise or malicious activity, such as unexpected network connections, file modifications, or the presence of known malware indicators.
- Verify the current SELinux status and configuration to ensure it has been restored to enforcing mode if it was indeed set to permissive mode.
### False positive analysis
- System administrators may execute the 'setenforce 0' command during routine maintenance or troubleshooting, leading to false positives. To manage this, create exceptions for known maintenance windows or specific administrator accounts.
- Some automated scripts or configuration management tools might temporarily set SELinux to permissive mode for deployment purposes. Identify these scripts and exclude their execution context from triggering alerts.
- Development environments might require SELinux to be set to permissive mode for testing purposes. Consider excluding specific development hosts or environments from the rule to prevent unnecessary alerts.
- In certain cases, SELinux might be disabled as part of a controlled security audit or penetration test. Coordinate with security teams to whitelist these activities during the audit period.
### Response and remediation
- Immediately isolate the affected system from the network to prevent further unauthorized access or lateral movement by the adversary.
- Verify the current SELinux status on the affected system using the command `sestatus` to confirm if it has been switched to permissive mode.
- If SELinux is in permissive mode, re-enable it by executing `setenforce 1` and ensure that the SELinux policy is correctly enforced.
- Conduct a thorough review of system logs and process execution history to identify any unauthorized changes or suspicious activities that occurred while SELinux was disabled.
- Scan the affected system for malware or unauthorized software installations using a trusted antivirus or endpoint detection and response (EDR) tool.
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if additional systems are compromised.
- Implement additional monitoring and alerting for similar SELinux-related events to enhance detection capabilities and prevent recurrence."""
risk_score = 73
rule_id = "eb9eb8ba-a983-41d9-9c93-a1c05112ca5e"
setup = """## Setup
This rule requires data coming in from one of the following integrations:
- Elastic Defend
- Auditbeat
### Elastic Defend Integration Setup
Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
#### Prerequisite Requirements:
- Fleet is required for Elastic Defend.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
- Click "Add Elastic Defend".
- Configure the integration name and optionally add a description.
- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
- Click "Save and Continue".
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
### Auditbeat Setup
Auditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.
#### The following steps should be executed in order to add the Auditbeat on a Linux System:
- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.
- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).
- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).
- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).
- For complete “Setup and Run Auditbeat” information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).
"""
severity = "high"
tags = [
"Domain: Endpoint",
"OS: Linux",
"Use Case: Threat Detection",
"Tactic: Defense Evasion",
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Auditd Manager",
"Data Source: Crowdstrike",
"Data Source: SentinelOne",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "linux" and event.type == "start" and
event.action in ("exec", "exec_event", "start", "ProcessRollup2", "executed", "process_started") and
process.name == "setenforce" and process.args == "0"
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"
[[rule.threat.technique.subtechnique]]
id = "T1562.001"
name = "Disable or Modify Tools"
reference = "https://attack.mitre.org/techniques/T1562/001/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
Stages and Predicates
Stage 1: process
process where host.os.type == "linux" and event.type == "start" and
event.action in ("exec", "exec_event", "start", "ProcessRollup2", "executed", "process_started") and
process.name == "setenforce" and process.args == "0"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | in |
| field:"EventType" kind:in |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args | eq |
| field:"process.args" kind:eq value:"0" |
process.name | eq |
| field:"process_basename" kind:eq value:"setenforce" |
Potential Kubeletctl Execution
#Detects the execution of kubeletctl on Linux hosts. Kubeletctl is a command-line tool that can be used to interact with the Kubelet API directly, simplifying access to Kubelet endpoints that can be used for discovery and, in some cases, lateral movement within Kubernetes environments.
Known False Positives
- Administrators or developers may execute kubeletctl during legitimate troubleshooting or incident response to validate Kubelet API connectivity or enumerate pods. Confirm the user/session and change window before escalating.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Discovery |
Rule Body
[metadata]
creation_date = "2026/04/28"
integration = ["endpoint", "auditd_manager"]
maturity = "production"
updated_date = "2026/04/28"
[rule]
author = ["Elastic"]
description = """
Detects the execution of kubeletctl on Linux hosts. Kubeletctl is a command-line tool that can be used to interact with
the Kubelet API directly, simplifying access to Kubelet endpoints that can be used for discovery and, in some cases,
lateral movement within Kubernetes environments.
"""
false_positives = [
"""
Administrators or developers may execute kubeletctl during legitimate troubleshooting or incident response to validate
Kubelet API connectivity or enumerate pods. Confirm the user/session and change window before escalating.
""",
]
from = "now-9m"
index = ["auditbeat-*", "logs-auditd_manager.auditd-*", "logs-endpoint.events.process*"]
language = "eql"
license = "Elastic License v2"
name = "Potential Kubeletctl Execution"
note = """## Triage and analysis
> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
### Investigating Potential Kubeletctl Execution
This alert flags kubeletctl execution on a Linux host. Kubeletctl provides direct access to the node’s Kubelet API and can
be used to enumerate pods and nodes and attempt actions such as exec/attach/portForward. A common attacker pattern is
running `kubeletctl scan` to find reachable Kubelet endpoints, then using `pods` or `exec/attach` for follow-on access.
### Possible investigation steps
- Review the full command line to identify the intended operation (scan/pods/exec/attach/portForward) and the target
Kubelet endpoint (node IP/hostname and port via `-s`/`--server`).
- Correlate with host and container telemetry for connections to Kubelet ports (commonly 10250/10255) and look for
scanning patterns across multiple nodes.
- Check whether Kubernetes credentials were accessed or used (service account tokens, kubeconfigs, client certs) and
correlate with Kubernetes audit logs for follow-on actions.
### False positive analysis
- Approved operational debugging or incident response activity that uses kubeletctl for diagnostics.
### Response and remediation
- Restrict access to Kubelet ports at the network layer and harden Kubelet authentication/authorization.
- Rotate/revoke any exposed Kubernetes credentials and investigate for follow-on discovery or execution attempts.
"""
references = [
"https://www.cyberark.com/resources/threat-research-blog/using-kubelet-client-to-attack-the-kubernetes-cluster",
"https://github.com/cyberark/kubeletctl",
]
risk_score = 47
rule_id = "f7a131f8-44b7-4957-99a4-e6c54d93d816"
severity = "medium"
tags = [
"Domain: Endpoint",
"Domain: Container",
"Domain: Kubernetes",
"OS: Linux",
"Use Case: Threat Detection",
"Tactic: Execution",
"Tactic: Discovery",
"Data Source: Elastic Defend",
"Data Source: Auditd Manager",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "executed") and
(
process.name == "kubeletctl" or
(process.args in ("run", "exec", "scan", "pods", "runningpods", "attach", "portForward", "cri", "pid2pod") and process.args:("*:10250*", "*:10255*"))
)
'''
[[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.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[rule.threat.technique.subtechnique]]
id = "T1059.004"
name = "Unix Shell"
reference = "https://attack.mitre.org/techniques/T1059/004/"
[[rule.threat.technique]]
id = "T1609"
name = "Container Administration Command"
reference = "https://attack.mitre.org/techniques/T1609/"
[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
Stages and Predicates
Stage 1: process
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "executed") and
(
process.name == "kubeletctl" or
(process.args in ("run", "exec", "scan", "pods", "runningpods", "attach", "portForward", "cri", "pid2pod") and process.args:("*:10250*", "*:10255*"))
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | in |
| field:"EventType" kind:in |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args | in |
| field:"process.args" kind:in |
process.args | wildcard |
| field:"process.args" kind:wildcard |
process.name | eq |
| field:"process_basename" kind:eq value:"kubeletctl" |
Socat Reverse Shell or Listener Activity
#This rule detects the execution of the socat command with suspicious arguments. Attackers may use socat to set up a listener or establish a reverse connection.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Command & Control |
Rule Body
[rule]
description = """
This rule detects the execution of the socat command with suspicious arguments. Attackers may use socat to set up a
listener or establish a reverse connection.
"""
id = "613da93c-226e-4150-9125-3b476103c0b9"
license = "Elastic License v2"
name = "Socat Reverse Shell or Listener Activity"
os_list = ["linux"]
version = "1.0.18"
query = '''
process where event.type == "start" and event.action == "exec" and process.name == "socat" and
process.command_line like~ ("*exec*", "*tty*", "*fork*", "*file*", "*open*") and
process.command_line like~ ("*tcp*", "*udp*", "*openssl*") and
not (
process.command_line like~ ("*127.0.0.1*", "*localhost*", "*/dev/tty*") or
process.parent.executable in (
"/usr/bin/wsrep_sst_xtrabackup-v2", "/usr/bin/dumb-init", "/usr/bin/make", "/usr/bin/sudo", "/usr/bin/wsrep_sst_mariabackup",
"/bin/wsrep_sst_xtrabackup-v2"
) or
process.parent.command_line == "runc init" or
process.parent.command_line like "*/var/tmp/claude-*" or
process.parent.name in ("kube-apiserver", "apiserver_entrypoint.sh", "start-proxy") or
(process.working_directory == "/usr/share/epoptes-client" and process.parent.command_line == "epoptes-client") or
process.parent.args in ("/usr/bin/wsrep_sst_xtrabackup-v2", "/usr/local/share/npm-global/bin/claude", "/root/.acme.sh/acme.sh", "/usr/local/bin/acme.sh") or
process.args like ("UNIX-CONNECT:/tmp/claude-*.sock", "TCP:*.devops.maintenance.abovecloud.io:443") or
(
process.command_line like "socat TCP-LISTEN:*UNIX-CONNECT:/home/*/claude-*.sock" and
process.args like "UNIX-CONNECT:/home/*/claude-*.sock"
) or
process.command_line == "socat TCP-LISTEN:8081,reuseaddr,fork UNIX-CLIENT:/tmp/spire-agent/public/api.sock" or
process.parent.executable like ("/var/lib/docker/*", "*/.aimee-code/bin/*", "*/.claude/worktrees/*/bin/python*") or
process.parent.command_line like "*/.claude/shell-snapshots/snapshot-*"
)
'''
min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.technique.subtechnique]]
id = "T1059.004"
name = "Unix Shell"
reference = "https://attack.mitre.org/techniques/T1059/004/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"
[threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Stage 1: process
process where event.type == "start" and event.action == "exec" and process.name == "socat" and
process.command_line like~ ("*exec*", "*tty*", "*fork*", "*file*", "*open*") and
process.command_line like~ ("*tcp*", "*udp*", "*openssl*") and
not (
process.command_line like~ ("*127.0.0.1*", "*localhost*", "*/dev/tty*") or
process.parent.executable in (
"/usr/bin/wsrep_sst_xtrabackup-v2", "/usr/bin/dumb-init", "/usr/bin/make", "/usr/bin/sudo", "/usr/bin/wsrep_sst_mariabackup",
"/bin/wsrep_sst_xtrabackup-v2"
) or
process.parent.command_line == "runc init" or
process.parent.command_line like "*/var/tmp/claude-*" or
process.parent.name in ("kube-apiserver", "apiserver_entrypoint.sh", "start-proxy") or
(process.working_directory == "/usr/share/epoptes-client" and process.parent.command_line == "epoptes-client") or
process.parent.args in ("/usr/bin/wsrep_sst_xtrabackup-v2", "/usr/local/share/npm-global/bin/claude", "/root/.acme.sh/acme.sh", "/usr/local/bin/acme.sh") or
process.args like ("UNIX-CONNECT:/tmp/claude-*.sock", "TCP:*.devops.maintenance.abovecloud.io:443") or
(
process.command_line like "socat TCP-LISTEN:*UNIX-CONNECT:/home/*/claude-*.sock" and
process.args like "UNIX-CONNECT:/home/*/claude-*.sock"
) or
process.command_line == "socat TCP-LISTEN:8081,reuseaddr,fork UNIX-CLIENT:/tmp/spire-agent/public/api.sock" or
process.parent.executable like ("/var/lib/docker/*", "*/.aimee-code/bin/*", "*/.claude/worktrees/*/bin/python*") or
process.parent.command_line like "*/.claude/shell-snapshots/snapshot-*"
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"exec" |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.command_line | wildcard |
| field:"CommandLine" kind:wildcard |
process.name | eq |
| field:"process_basename" kind:eq value:"socat" |
Exclusions
The rule actively suppresses these predicates.
Suspicious Access to Cryptocurrency Wallet Files
#Identifies access attempts to multiple unique cryptocurrency wallet files by the same process. Adversaries may steal those files to for financial gains.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Rule Body
[rule]
description = """
Identifies access attempts to multiple unique cryptocurrency wallet files by the same process. Adversaries may steal
those files to for financial gains.
"""
id = "c4c69f61-db49-4e05-adea-82122e889044"
license = "Elastic License v2"
name = "Suspicious Access to Cryptocurrency Wallet Files"
os_list = ["windows"]
version = "1.0.3"
query = '''
sequence by process.entity_id with maxspan=30s
[file where event.type == "access" and process.pid != 4 and
file.path :
("*\\ElectronCash\\wallets*",
"*\\Electrum-LTC\\wallets*",
"*\\Electrum\\wallets*",
"*\\Ethereum\\keystore*",
"*\\Exodus\\exodus.wallet*",
"*\\Bitcoin\\wallets*",
"*\\Coinomi\\wallets*",
"*\\Appdata\\Roaming\\Raven\\*wallet*",
"*\\DaedalusMainnet\\wallets*",
"*\\Blockstream\\Green\\wallets*",
"*\\MultiDoge\\multidoge.wallet*",
"*\\WalletWasabi\\Client\\Wallets*",
"*\\com.liberty.jaxx\\IndexedDB\\file__0.indexeddb.leveldb",
"*\\Appdata\\Roaming\\atomic\\LocalStorage\\leveldb*",
"*AppData\\Roaming\\Guarda\\LocalStorage\\leveldb*",
"*fhbohimaelbohpjbbldcngcnapndodjp*",
"*aeachknmefphepccionboohckonoeemg*",
"*hnfanknocfeofbddgcijnmhnfnkdnaad*",
"*hifafgmccdpekplomjjkcfgodnhcellj*",
"*nkbihfbeogaeaoehlefnkodbefgpgknn*",
"*ejbalbakoplchlghecdalmeeeajnimhm*",
"*bfnaelmomeimhlpmgjnjophhpkkoljpa*",
"*fnjhmkhhmkbjkkabndcnnogagogbneec*",
"ibnejdfjmmkpcnlpebklmnkoeoihofec*",
"*klfhbdnlcfcaccoakhceodhldjojboga*",
"*aanjhgiamnacdfnlfnmgehjikagdbafd*",
"*bblmcdckkhkhfhhpfcchlpalebmonecp*",
"*hpglfhgfnhbgpjdenjgmdgoeiappafln*",
"*afbcbjpbpfadlkmhmclhkeeodmamcflc*",
"*kncchdigobghenbbaddojjnnaogfppfj*") and
not process.executable : ("?:\\Program Files (x86)\\*.exe", "?:\\Program Files\\*.exe", "?:\\Windows\\explorer.exe") and
not user.id : ("S-1-5-18", "S-1-5-19", "S-1-5-20") and
not (process.executable : "?:\\Users\\*\\AppData\\Local\\Microsoft\\OneDrive\\OneDrive.exe" and
process.code_signature.subject_name : "Microsoft *" and process.code_signature.trusted == true) and
not (process.code_signature.subject_name in ("Exodus Movement Inc", "Exodus Movement, Inc.") and process.code_signature.trusted == true and
file.path : "?:\\Users\\*\\Exodus\\exodus.wallet*")
] as event0
[file where event.type == "access" and process.pid != 4 and
file.path :
("*\\ElectronCash\\wallets*",
"*\\Electrum-LTC\\wallets*",
"*\\Electrum\\wallets*",
"*\\Ethereum\\keystore*",
"*\\Exodus\\exodus.wallet*",
"*\\Bitcoin\\wallets*",
"*\\Coinomi\\wallets*",
"*\\Appdata\\Roaming\\Raven\\*wallet*",
"*\\DaedalusMainnet\\wallets*",
"*\\Blockstream\\Green\\wallets*",
"*\\MultiDoge\\multidoge.wallet*",
"*\\WalletWasabi\\Client\\Wallets*",
"*\\com.liberty.jaxx\\IndexedDB\\file__0.indexeddb.leveldb",
"*\\Appdata\\Roaming\\atomic\\LocalStorage\\leveldb*",
"*AppData\\Roaming\\Guarda\\LocalStorage\\leveldb*",
"*fhbohimaelbohpjbbldcngcnapndodjp*",
"*aeachknmefphepccionboohckonoeemg*",
"*hnfanknocfeofbddgcijnmhnfnkdnaad*",
"*hifafgmccdpekplomjjkcfgodnhcellj*",
"*nkbihfbeogaeaoehlefnkodbefgpgknn*",
"*ejbalbakoplchlghecdalmeeeajnimhm*",
"*bfnaelmomeimhlpmgjnjophhpkkoljpa*",
"*fnjhmkhhmkbjkkabndcnnogagogbneec*",
"ibnejdfjmmkpcnlpebklmnkoeoihofec*",
"*klfhbdnlcfcaccoakhceodhldjojboga*",
"*aanjhgiamnacdfnlfnmgehjikagdbafd*",
"*bblmcdckkhkhfhhpfcchlpalebmonecp*",
"*hpglfhgfnhbgpjdenjgmdgoeiappafln*",
"*afbcbjpbpfadlkmhmclhkeeodmamcflc*",
"*kncchdigobghenbbaddojjnnaogfppfj*") and
not process.executable : ("?:\\Program Files (x86)\\*.exe", "?:\\Program Files\\*.exe") and
not user.id : ("S-1-5-18", "S-1-5-19", "S-1-5-20") and file.name != event0.file.name]
'''
min_endpoint_version = "8.6.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 = "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
Ordered sequence: each step below must occur in order within 30s, correlated by process.entity_id.
Stage 1: file
[file where event.type == "access" and process.pid != 4 and
file.path :
("*\\ElectronCash\\wallets*",
"*\\Electrum-LTC\\wallets*",
"*\\Electrum\\wallets*",
"*\\Ethereum\\keystore*",
"*\\Exodus\\exodus.wallet*",
"*\\Bitcoin\\wallets*",
"*\\Coinomi\\wallets*",
"*\\Appdata\\Roaming\\Raven\\*wallet*",
"*\\DaedalusMainnet\\wallets*",
"*\\Blockstream\\Green\\wallets*",
"*\\MultiDoge\\multidoge.wallet*",
"*\\WalletWasabi\\Client\\Wallets*",
"*\\com.liberty.jaxx\\IndexedDB\\file__0.indexeddb.leveldb",
"*\\Appdata\\Roaming\\atomic\\LocalStorage\\leveldb*",
"*AppData\\Roaming\\Guarda\\LocalStorage\\leveldb*",
"*fhbohimaelbohpjbbldcngcnapndodjp*",
"*aeachknmefphepccionboohckonoeemg*",
"*hnfanknocfeofbddgcijnmhnfnkdnaad*",
"*hifafgmccdpekplomjjkcfgodnhcellj*",
"*nkbihfbeogaeaoehlefnkodbefgpgknn*",
"*ejbalbakoplchlghecdalmeeeajnimhm*",
"*bfnaelmomeimhlpmgjnjophhpkkoljpa*",
"*fnjhmkhhmkbjkkabndcnnogagogbneec*",
"ibnejdfjmmkpcnlpebklmnkoeoihofec*",
"*klfhbdnlcfcaccoakhceodhldjojboga*",
"*aanjhgiamnacdfnlfnmgehjikagdbafd*",
"*bblmcdckkhkhfhhpfcchlpalebmonecp*",
"*hpglfhgfnhbgpjdenjgmdgoeiappafln*",
"*afbcbjpbpfadlkmhmclhkeeodmamcflc*",
"*kncchdigobghenbbaddojjnnaogfppfj*") and
not process.executable : ("?:\\Program Files (x86)\\*.exe", "?:\\Program Files\\*.exe", "?:\\Windows\\explorer.exe") and
not user.id : ("S-1-5-18", "S-1-5-19", "S-1-5-20") and
not (process.executable : "?:\\Users\\*\\AppData\\Local\\Microsoft\\OneDrive\\OneDrive.exe" and
process.code_signature.subject_name : "Microsoft *" and process.code_signature.trusted == true) and
not (process.code_signature.subject_name in ("Exodus Movement Inc", "Exodus Movement, Inc.") and process.code_signature.trusted == true and
file.path : "?:\\Users\\*\\Exodus\\exodus.wallet*")
] as event0
Stage 2: file
[file where event.type == "access" and process.pid != 4 and
file.path :
("*\\ElectronCash\\wallets*",
"*\\Electrum-LTC\\wallets*",
"*\\Electrum\\wallets*",
"*\\Ethereum\\keystore*",
"*\\Exodus\\exodus.wallet*",
"*\\Bitcoin\\wallets*",
"*\\Coinomi\\wallets*",
"*\\Appdata\\Roaming\\Raven\\*wallet*",
"*\\DaedalusMainnet\\wallets*",
"*\\Blockstream\\Green\\wallets*",
"*\\MultiDoge\\multidoge.wallet*",
"*\\WalletWasabi\\Client\\Wallets*",
"*\\com.liberty.jaxx\\IndexedDB\\file__0.indexeddb.leveldb",
"*\\Appdata\\Roaming\\atomic\\LocalStorage\\leveldb*",
"*AppData\\Roaming\\Guarda\\LocalStorage\\leveldb*",
"*fhbohimaelbohpjbbldcngcnapndodjp*",
"*aeachknmefphepccionboohckonoeemg*",
"*hnfanknocfeofbddgcijnmhnfnkdnaad*",
"*hifafgmccdpekplomjjkcfgodnhcellj*",
"*nkbihfbeogaeaoehlefnkodbefgpgknn*",
"*ejbalbakoplchlghecdalmeeeajnimhm*",
"*bfnaelmomeimhlpmgjnjophhpkkoljpa*",
"*fnjhmkhhmkbjkkabndcnnogagogbneec*",
"ibnejdfjmmkpcnlpebklmnkoeoihofec*",
"*klfhbdnlcfcaccoakhceodhldjojboga*",
"*aanjhgiamnacdfnlfnmgehjikagdbafd*",
"*bblmcdckkhkhfhhpfcchlpalebmonecp*",
"*hpglfhgfnhbgpjdenjgmdgoeiappafln*",
"*afbcbjpbpfadlkmhmclhkeeodmamcflc*",
"*kncchdigobghenbbaddojjnnaogfppfj*") and
not process.executable : ("?:\\Program Files (x86)\\*.exe", "?:\\Program Files\\*.exe") and
not user.id : ("S-1-5-18", "S-1-5-19", "S-1-5-20") and file.name != event0.file.name]
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"access" |
file.name | ne |
| field:"file.name" kind:ne value:"event0.file.name" |
file.path | wildcard |
| field:"TargetFilename" kind:wildcard |
process.pid | ne |
| field:"process_id" kind:ne value:"4" |
Exclusions
The rule actively suppresses these predicates.
Suspicious Access to LSA Secrets Registry
#Identifies access to the LSA Secrets policy registry hive by an unusual process. Adversaries with SYSTEM access to a host may attempt to access Local Security Authority (LSA) secrets, which can contain a variety of different credential materials, such as credentials for service accounts.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Rule Body
[rule]
description = """
Identifies access to the LSA Secrets policy registry hive by an unusual process. Adversaries with SYSTEM access to a
host may attempt to access Local Security Authority (LSA) secrets, which can contain a variety of different credential
materials, such as credentials for service accounts.
"""
id = "c5ee8453-bc89-42e7-a414-1ba4bec85119"
license = "Elastic License v2"
name = "Suspicious Access to LSA Secrets Registry"
os_list = ["windows"]
reference = [
"https://www.ired.team/offensive-security/credential-access-and-credential-dumping/dumping-lsa-secrets",
"https://github.com/gtworek/PSBits/tree/master/LSASecretDumper",
]
version = "1.0.43"
query = '''
registry where event.action != "modification" and
registry.path : ("HKLM\\SECURITY\\Policy\\Secrets\\*", "HKLM\\SECURITY\\CACHE*") and process.executable != null and
user.id : "S-1-5-18" and
not process.executable : ("?:\\Windows\\System32\\lsass.exe",
"\\Device\\HarddiskVolume?\\Windows\\System32\\lsass.exe",
"\\Device\\HarddiskVolume??\\Windows\\System32\\lsass.exe",
"?:\\Program Files (x86)\\DesktopCentral_Agent\\bin\\ToolsIQ.exe",
"?:\\Program Files\\Citrix\\PvsVm\\Service\\PvsVmAgent.exe",
"?:\\Windows\\Provisioning\\Autopilot\\DiagonsticAnalysis.pif",
"?:\\Program Files\\RepairTech\\LiveAgent\\SyncroLive.Agent.Runner.exe",
"?:\\Program Files\\Common Files\\Adobe\\Creative Cloud Libraries\\CCLibrary.exe",
"?:\\Windows\\System32\\SpecopsClient\\SecuredBrowserNet\\SecuredBrowserDotNetLauncher.exe",
"?:\\Program Files (x86)\\Tripwire\\TFS\\Bin\\tripwire.exe",
"?:\\Windows\\regedit.exe",
"?:\\Program Files\\Dell\\Dell Data Protection\\Encryption\\EmsService.exe",
"?:\\Program Files (x86)\\Imperva\\RemoteAgent\\RemoteAgentCtrl.exe",
"?:\\Program Files (x86)\\Lenovo\\System Update\\UACSdk.exe",
"?:\\Program Files (x86)\\CentraStage\\CagService.exe",
"?:\\Program Files\\McAfee\\Endpoint Security\\Adaptive Threat Protection\\mfeatp.exe",
"?:\\Program Files\\Bitdefender\\Endpoint Security\\EPSecurityService.exe",
// SenseIR.exe spawning powershell
"?:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"?:\\Program Files\\Neverfail\\R2\\bin\\NFServerR2.exe",
"C:\\Program Files (x86)\\AutoElevate\\AutoElevateAgent.exe",
"C:\\Program Files\\Elastic\\Agent\\data\\elastic-agent-*\\components\\osqueryd.exe") and
not (process.executable : "?:\\Windows\\System32\\dsregcmd.exe" and registry.path : "HKLM\\SECURITY\\Policy\\Secrets\\DSREGCMD\\MutexName") and
not (process.executable : "?:\\Windows\\LTSvc\\LTSVC.exe" and registry.path : "HKLM\\SECURITY\\Cache\\NL$1") and
not (process.executable : ("?:\\Program Files (x86)\\*.exe", "?:\\Program Files\\*.exe") and
registry.path : "HKLM\\SECURITY\\Policy\\Secrets\\$MACHINE.ACC\\CupdTime\\") and
not registry.path : "HKLM\\SECURITY\\Policy\\Secrets\\DSREGCMD\\MutexName" and
not (process.code_signature.subject_name :
("Musarubra US LLC", "Bitdefender SRL", "Illusive Networks LTD", "Comodo Security Solutions, Inc.",
"Proofpoint, Inc.", "Portnox Security LLC", "Urs Beckmann") and
process.code_signature.trusted == true) and
/* 8.6+ logs also failed attempts which generate some noise */
not event.outcome == "failure" and
not registry.path : ("HKLM\\SECURITY\\Policy\\Secrets\\_SC_Citrix Encryption Service\\*",
"HKLM\\SECURITY\\Policy\\Secrets\\$MACHINE.ACC\\CupdTime\\")
'''
min_endpoint_version = "8.0.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1003"
name = "OS Credential Dumping"
reference = "https://attack.mitre.org/techniques/T1003/"
[[threat.technique.subtechnique]]
id = "T1003.004"
name = "LSA Secrets"
reference = "https://attack.mitre.org/techniques/T1003/004/"
[[threat.technique.subtechnique]]
id = "T1003.005"
name = "Cached Domain Credentials"
reference = "https://attack.mitre.org/techniques/T1003/005/"
[threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"
[internal]
min_endpoint_version = "8.0.0"
Stages and Predicates
Stage 1: registry
registry where event.action != "modification" and
registry.path : ("HKLM\\SECURITY\\Policy\\Secrets\\*", "HKLM\\SECURITY\\CACHE*") and process.executable != null and
user.id : "S-1-5-18" and
not process.executable : ("?:\\Windows\\System32\\lsass.exe",
"\\Device\\HarddiskVolume?\\Windows\\System32\\lsass.exe",
"\\Device\\HarddiskVolume??\\Windows\\System32\\lsass.exe",
"?:\\Program Files (x86)\\DesktopCentral_Agent\\bin\\ToolsIQ.exe",
"?:\\Program Files\\Citrix\\PvsVm\\Service\\PvsVmAgent.exe",
"?:\\Windows\\Provisioning\\Autopilot\\DiagonsticAnalysis.pif",
"?:\\Program Files\\RepairTech\\LiveAgent\\SyncroLive.Agent.Runner.exe",
"?:\\Program Files\\Common Files\\Adobe\\Creative Cloud Libraries\\CCLibrary.exe",
"?:\\Windows\\System32\\SpecopsClient\\SecuredBrowserNet\\SecuredBrowserDotNetLauncher.exe",
"?:\\Program Files (x86)\\Tripwire\\TFS\\Bin\\tripwire.exe",
"?:\\Windows\\regedit.exe",
"?:\\Program Files\\Dell\\Dell Data Protection\\Encryption\\EmsService.exe",
"?:\\Program Files (x86)\\Imperva\\RemoteAgent\\RemoteAgentCtrl.exe",
"?:\\Program Files (x86)\\Lenovo\\System Update\\UACSdk.exe",
"?:\\Program Files (x86)\\CentraStage\\CagService.exe",
"?:\\Program Files\\McAfee\\Endpoint Security\\Adaptive Threat Protection\\mfeatp.exe",
"?:\\Program Files\\Bitdefender\\Endpoint Security\\EPSecurityService.exe",
"?:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"?:\\Program Files\\Neverfail\\R2\\bin\\NFServerR2.exe",
"C:\\Program Files (x86)\\AutoElevate\\AutoElevateAgent.exe",
"C:\\Program Files\\Elastic\\Agent\\data\\elastic-agent-*\\components\\osqueryd.exe") and
not (process.executable : "?:\\Windows\\System32\\dsregcmd.exe" and registry.path : "HKLM\\SECURITY\\Policy\\Secrets\\DSREGCMD\\MutexName") and
not (process.executable : "?:\\Windows\\LTSvc\\LTSVC.exe" and registry.path : "HKLM\\SECURITY\\Cache\\NL$1") and
not (process.executable : ("?:\\Program Files (x86)\\*.exe", "?:\\Program Files\\*.exe") and
registry.path : "HKLM\\SECURITY\\Policy\\Secrets\\$MACHINE.ACC\\CupdTime\\") and
not registry.path : "HKLM\\SECURITY\\Policy\\Secrets\\DSREGCMD\\MutexName" and
not (process.code_signature.subject_name :
("Musarubra US LLC", "Bitdefender SRL", "Illusive Networks LTD", "Comodo Security Solutions, Inc.",
"Proofpoint, Inc.", "Portnox Security LLC", "Urs Beckmann") and
process.code_signature.trusted == true) and
not event.outcome == "failure" and
not registry.path : ("HKLM\\SECURITY\\Policy\\Secrets\\_SC_Citrix Encryption Service\\*",
"HKLM\\SECURITY\\Policy\\Secrets\\$MACHINE.ACC\\CupdTime\\")
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | ne |
| field:"EventType" kind:ne value:"modification" |
process.executable | is_not_null | field:"Image" kind:is_not_null | |
registry.path | wildcard |
| field:"TargetObject" kind:wildcard |
user.id | wildcard |
| field:"user.id" kind:wildcard value:"S-1-5-18" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.code_signature.subject_name | eq | Musarubra US LLC, Bitdefender SRL, Illusive Networks LTD, Comodo Security Solutions, Inc., Proofpoint, Inc., Portnox Security LLC, Urs Beckmann | excludes:process.code_signature.subject_name |
process.code_signature.trusted | eq | true | excludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true" |
process.executable | eq | ?:\Windows\LTSvc\LTSVC.exe | excludes:process.executable field:"process.executable" value:"?:\Windows\LTSvc\LTSVC.exe" |
registry.path | eq | HKLM\SECURITY\Cache\NL$1 | excludes:registry.path field:"registry.path" value:"HKLM\SECURITY\Cache\NL$1" |
process.executable | eq | ?:\Windows\System32\dsregcmd.exe | excludes:process.executable field:"process.executable" value:"?:\Windows\System32\dsregcmd.exe" |
registry.path | eq | HKLM\SECURITY\Policy\Secrets\DSREGCMD\MutexName | excludes:registry.path field:"registry.path" value:"HKLM\SECURITY\Policy\Secrets\DSREGCMD\MutexName" |
process.executable | wildcard | ?:\Program Files (x86)\*.exe, ?:\Program Files\*.exe | excludes:process.executable field:"process.executable" value:"?:\Program Files (x86)\*.exe" field:"process.executable" value:"?:\Program Files\*.exe" |
registry.path | eq | HKLM\SECURITY\Policy\Secrets\$MACHINE.ACC\CupdTime\ | excludes:registry.path field:"registry.path" value:"HKLM\SECURITY\Policy\Secrets\$MACHINE.ACC\CupdTime\" |
event.outcome | eq | failure | excludes:event.outcome field:"event.outcome" value:"failure" |
process.executable | wildcard | ?:\Windows\System32\lsass.exe, \Device\HarddiskVolume?\Windows\System32\lsass.exe, \Device\HarddiskVolume??\Windows\System32\lsass.exe, ?:\Program Files (x86)\DesktopCentral_Agent\bin\ToolsIQ.exe, ?:\Program Files\Citrix\PvsVm\Service\PvsVmAgent.exe, ?:\Windows\Provisioning\Autopilot\DiagonsticAnalysis.pif, ?:\Program Files\RepairTech\LiveAgent\SyncroLive.Agent.Runner.exe, ?:\Program Files\Common Files\Adobe\Creative Cloud Libraries\CCLibrary.exe, ?:\Windows\System32\SpecopsClient\SecuredBrowserNet\SecuredBrowserDotNetLauncher.exe, ?:\Program Files (x86)\Tripwire\TFS\Bin\tripwire.exe, ?:\Windows\regedit.exe, ?:\Program Files\Dell\Dell Data Protection\Encryption\EmsService.exe, ?:\Program Files (x86)\Imperva\RemoteAgent\RemoteAgentCtrl.exe, ?:\Program Files (x86)\Lenovo\System Update\UACSdk.exe, ?:\Program Files (x86)\CentraStage\CagService.exe, ?:\Program Files\McAfee\Endpoint Security\Adaptive Threat Protection\mfeatp.exe, ?:\Program Files\Bitdefender\Endpoint Security\EPSecurityService.exe, ?:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe, ?:\Program Files\Neverfail\R2\bin\NFServerR2.exe, C:\Program Files (x86)\AutoElevate\AutoElevateAgent.exe, C:\Program Files\Elastic\Agent\data\elastic-agent-*\components\osqueryd.exe | excludes:process.executable |
registry.path | wildcard | HKLM\SECURITY\Policy\Secrets\_SC_Citrix Encryption Service\*, HKLM\SECURITY\Policy\Secrets\$MACHINE.ACC\CupdTime\ | excludes:registry.path field:"registry.path" value:"HKLM\SECURITY\Policy\Secrets\_SC_Citrix Encryption Service\*" field:"registry.path" value:"HKLM\SECURITY\Policy\Secrets\$MACHINE.ACC\CupdTime\" |
Suspicious Microsoft OneNote Child Process
#Identifies suspicious child processes of the Microsoft OneNote application. This may indicate an attempt to execute malicious embedded objects from a .one file.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access |
Rule Body
[rule]
description = """
Identifies suspicious child processes of the Microsoft OneNote application. This may indicate an attempt to execute
malicious embedded objects from a .one file.
"""
id = "28297d1e-c2a9-442c-9e48-98fe8ce36fab"
license = "Elastic License v2"
name = "Suspicious Microsoft OneNote Child Process"
os_list = ["windows"]
reference = ["https://blog.sevagas.com/IMG/pdf/redteam_with_onenote.pdf"]
version = "1.0.26"
query = '''
process where event.action == "start" and
process.parent.name : "ONENOTE.EXE" and
(
process.pe.original_file_name : (
"rundll32.exe",
"regsvr32.exe",
"bitsadmin.exe",
"certutil.exe",
"installutil.exe",
"schtasks.exe",
"wmic.exe",
"cscript.exe",
"wscript.exe",
"cmstp.exe",
"Microsoft.Workflow.Compiler.exe",
"regasm.exe",
"regsvcs.exe",
"mshta.exe",
"msxsl.exe",
"ieexec.exe",
"cmd.exe",
"powershell.exe",
"hh.exe",
"javaw.exe",
"pcalua.exe",
"curl.exe",
"ScriptRunner.exe",
"CertOC.exe",
"Workfolders.exe",
"odbcconf.exe",
"msiexec.exe",
"msdt.exe")
or
(process.name : "explorer.exe" and
process.args : ("*.hta*", "*.vb*", "*.wsh*", "*.js*", "*.ps*", "*.scr*", "*.pif*", "*bat*", "*.cmd*")) or
process.executable : ("?:\\Users\\*\\AppData\\*",
"?:\\Users\\Public\\",
"?:\\ProgramData\\*",
"?:\\Windows\\Tasks\\*",
"?:\\Windows\\Temp\\*",
"?:\\Windows\\System32\\Tasks\\*")
) and
/* many FPs like browsers and chat desktop apps */
not (process.executable : "?:\\Users\\*\\AppData\\*" and process.code_signature.trusted == true) and
not (process.name : "rundll32.exe" and process.command_line : "*windows\\system32\\spool\\DRIVERS\\*MonitorPrintJobStatus*") and
not (process.pe.original_file_name == "Teams.exe" and
process.code_signature.trusted == true and process.code_signature.subject_name : "Microsoft Corporation") and
not (process.name : "rundll32.exe" and process.args : "?:\\Program Files (x86)\\AllesTechnologyAgent\\Super Shield\\SuperShieldHookCpy32.dll,#1") and
not (process.code_signature.trusted == true and process.code_signature.subject_name : ("VideoLAN", "Interact Digital AG"))
'''
min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1566"
name = "Phishing"
reference = "https://attack.mitre.org/techniques/T1566/"
[[threat.technique.subtechnique]]
id = "T1566.001"
name = "Spearphishing Attachment"
reference = "https://attack.mitre.org/techniques/T1566/001/"
[threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[internal]
min_endpoint_version = "7.15.0"
Stages and Predicates
Stage 1: process
process where event.action == "start" and
process.parent.name : "ONENOTE.EXE" and
(
process.pe.original_file_name : (
"rundll32.exe",
"regsvr32.exe",
"bitsadmin.exe",
"certutil.exe",
"installutil.exe",
"schtasks.exe",
"wmic.exe",
"cscript.exe",
"wscript.exe",
"cmstp.exe",
"Microsoft.Workflow.Compiler.exe",
"regasm.exe",
"regsvcs.exe",
"mshta.exe",
"msxsl.exe",
"ieexec.exe",
"cmd.exe",
"powershell.exe",
"hh.exe",
"javaw.exe",
"pcalua.exe",
"curl.exe",
"ScriptRunner.exe",
"CertOC.exe",
"Workfolders.exe",
"odbcconf.exe",
"msiexec.exe",
"msdt.exe")
or
(process.name : "explorer.exe" and
process.args : ("*.hta*", "*.vb*", "*.wsh*", "*.js*", "*.ps*", "*.scr*", "*.pif*", "*bat*", "*.cmd*")) or
process.executable : ("?:\\Users\\*\\AppData\\*",
"?:\\Users\\Public\\",
"?:\\ProgramData\\*",
"?:\\Windows\\Tasks\\*",
"?:\\Windows\\Temp\\*",
"?:\\Windows\\System32\\Tasks\\*")
) and
not (process.executable : "?:\\Users\\*\\AppData\\*" and process.code_signature.trusted == true) and
not (process.name : "rundll32.exe" and process.command_line : "*windows\\system32\\spool\\DRIVERS\\*MonitorPrintJobStatus*") and
not (process.pe.original_file_name == "Teams.exe" and
process.code_signature.trusted == true and process.code_signature.subject_name : "Microsoft Corporation") and
not (process.name : "rundll32.exe" and process.args : "?:\\Program Files (x86)\\AllesTechnologyAgent\\Super Shield\\SuperShieldHookCpy32.dll,#1") and
not (process.code_signature.trusted == true and process.code_signature.subject_name : ("VideoLAN", "Interact Digital AG"))
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.executable | wildcard |
| field:"Image" kind:wildcard |
process.name | wildcard |
| field:"process_basename" kind:wildcard value:"explorer.exe" |
process.parent.name | wildcard |
| field:"parent_process_basename" kind:wildcard value:"ONENOTE.EXE" |
process.pe.original_file_name | wildcard |
| field:"OriginalFileName" kind:wildcard |
Exclusions
The rule actively suppresses these predicates.
VirtualProtect Call via NtTestAlert
#Detects calls to the VirtualProtect Windows API to change memory permissions and the call is originating from a thread pointing to the API NtTestAlert. This may indicate that this call is coming from a pending APC or a sleeping thread.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Rule Body
[rule]
description = """
Detects calls to the VirtualProtect Windows API to change memory permissions and the call is originating from a thread
pointing to the API NtTestAlert. This may indicate that this call is coming from a pending APC or a sleeping thread.
"""
id = "9906a386-771f-4003-b426-fbe75bdd6e73"
license = "Elastic License v2"
name = "VirtualProtect Call via NtTestAlert"
os_list = ["windows"]
reference = ["https://www.elastic.co/security-labs/doubling-down-etw-callstacks"]
version = "1.0.7"
query = '''
api where
process.Ext.api.name : "VirtualProtect" and
process.thread.Ext.call_stack_summary : "ntdll.dll*" and
_arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info : ("*NtTestAlert*", "*ZwTestAlert*")) and
_arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info : "*ProtectVirtualMemory*") and
process.thread.Ext.call_stack_summary : ("ntdll.dll", "ntdll.dll|kernelbase.dll|ntdll.dll|Unknown", "ntdll.dll|Unbacked", "ntdll.dll|Unknown") and
not _arraysearch(process.thread.Ext.call_stack, $entry, $entry.protection_provenance : ("Kernel", "Kernel|*"))
'''
min_endpoint_version = "8.8.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1036"
name = "Masquerading"
reference = "https://attack.mitre.org/techniques/T1036/"
[[threat.technique]]
id = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "8.8.0"
Stages and Predicates
Stage 1: api
api where
process.Ext.api.name : "VirtualProtect" and
process.thread.Ext.call_stack_summary : "ntdll.dll*" and
_arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info : ("*NtTestAlert*", "*ZwTestAlert*")) and
_arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info : "*ProtectVirtualMemory*") and
process.thread.Ext.call_stack_summary : ("ntdll.dll", "ntdll.dll|kernelbase.dll|ntdll.dll|Unknown", "ntdll.dll|Unbacked", "ntdll.dll|Unknown") and
not _arraysearch(process.thread.Ext.call_stack, $entry, $entry.protection_provenance : ("Kernel", "Kernel|*"))
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
process.Ext.api.name | wildcard |
| field:"process.Ext.api.name" kind:wildcard value:"VirtualProtect" |
process.thread.Ext.call_stack_summary | wildcard |
| field:"process.thread.Ext.call_stack_summary" kind:wildcard |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.thread.Ext.call_stack | array_any | excludes:process.thread.Ext.call_stack |
VScode Extension Install via URI Handler
#Detects when VScode attempts to retrieve a file via its URI handler in order to download, install and execute a VScode extension. An alternate method for installing extensions, not mentioned in the VSCode docs, is via the VSCode URI handler. The vscode:// URI protocol handler is registered automatically when VSCode is installed. When opening a URL such as vscode://hellothere.test from a browser, a prompt will first be shown to open the URL in VSCode. After opening, the URL argument vscode://hellothere.test will be sent to the registered command line "Code.exe" "--open-url" "--" "vscode://hellothere.test".
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Rule Body
[rule]
description = """
Detects when VScode attempts to retrieve a file via its URI handler in order to download, install and execute a VScode
extension. An alternate method for installing extensions, not mentioned in the VSCode docs, is via the VSCode URI
handler. The vscode:// URI protocol handler is registered automatically when VSCode is installed. When opening a URL
such as vscode://hellothere.test from a browser, a prompt will first be shown to open the URL in VSCode. After opening,
the URL argument vscode://hellothere.test will be sent to the registered command line "Code.exe" "--open-url" "--"
"vscode://hellothere.test".
"""
id = "0832e2f1-cb90-4fb1-a484-5c98e3d06ec5"
license = "Elastic License v2"
name = "VScode Extension Install via URI Handler"
os_list = ["macos"]
reference = ["https://www.mdsec.co.uk/2023/08/leveraging-vscode-extensions-for-initial-access/"]
version = "1.0.3"
query = '''
process where event.type == "start" and process.name == "code" and
process.args like~ "--open-url" and process.args like~ "vscode://*"
'''
min_endpoint_version = "8.16.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.technique.subtechnique]]
id = "T1059.004"
name = "Unix Shell"
reference = "https://attack.mitre.org/techniques/T1059/004/"
[[threat.technique]]
id = "T1204"
name = "User Execution"
reference = "https://attack.mitre.org/techniques/T1204/"
[[threat.technique.subtechnique]]
id = "T1204.001"
name = "Malicious Link"
reference = "https://attack.mitre.org/techniques/T1204/001/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[internal]
min_endpoint_version = "8.16.0"
Stages and Predicates
Stage 1: process
process where event.type == "start" and process.name == "code" and
process.args like~ "--open-url" and process.args like~ "vscode://*"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args | wildcard |
| field:"process.args" kind:wildcard |
process.name | eq |
| field:"process_basename" kind:eq value:"code" |
Web Server Discovery or Fuzzing Activity
#This rule detects potential web server discovery or fuzzing activity by identifying a high volume of HTTP GET requests resulting in 404 or 403 status codes from a single source IP address within a short timeframe. Such patterns may indicate that an attacker is attempting to discover hidden or unlinked resources on a web server, which can be a precursor to more targeted attacks.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Reconnaissance |
Rule Body
[metadata]
creation_date = "2025/11/19"
integration = ["nginx", "apache", "apache_tomcat", "iis", "traefik"]
maturity = "production"
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = """
This rule detects potential web server discovery or fuzzing activity by identifying a high volume of HTTP GET requests resulting
in 404 or 403 status codes from a single source IP address within a short timeframe. Such patterns may indicate that an attacker
is attempting to discover hidden or unlinked resources on a web server, which can be a precursor to more targeted attacks.
"""
from = "now-11m"
interval = "10m"
language = "esql"
license = "Elastic License v2"
name = "Web Server Discovery or Fuzzing Activity"
note = """ ## Triage and analysis
> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
### Investigating Web Server Discovery or Fuzzing Activity
This rule flags a single origin generating a rapid burst of GET requests that produce many 404/403 responses, a hallmark of automated web discovery or fuzzing. Attackers commonly run wordlist-driven enumeration to probe paths such as /admin/, /login, /backup.zip, /.env, /.git/, and undocumented API routes, gauging which resources exist and where access controls fail. Detecting this reconnaissance early helps prevent subsequent targeted exploitation of newly found endpoints and weak authentication flows.
### Possible investigation steps
- Correlate user-agent, TLS JA3/JA4, Host/SNI, and X-Forwarded-For to fingerprint the client, identify common fuzzing tools or disguised automation, and recover the true origin if traffic traversed a CDN or proxy.
- Summarize the top requested paths and response codes for this source to spot any 2xx or 401 outcomes amid the denials, flagging hits on sensitive locations such as /.env, /.git, /admin interfaces, backups, installer scripts, and undocumented API routes.
- Pivot to the same timeframe for adjacent web and authentication activity from this origin to see whether POSTs, credential attempts, or parameterized requests followed the enumeration, indicating progression toward exploitation or spraying.
- Review WAF/CDN and reverse-proxy logs for blocks, challenges, or rate limiting and whether multiple virtual hosts were targeted via the Host header, confirming if and how far requests reached the application tier.
- Validate whether the source aligns with approved internal scanners or scheduled testing via inventories and change records, and if not, enrich with ASN/geolocation, reverse DNS, and threat intel to assess reputation and recurrence across your estate.
### False positive analysis
- An internal QA link checker or monitoring crawler run from a single host can request hundreds of unique paths and generate many 404/403 GETs when routes, assets, or permissions are misconfigured.
- A shared egress IP (NAT or corporate proxy) aggregating many users during a faulty deployment can trigger high volumes of 404/403 GETs as browsers collectively hit moved or newly restricted resources.
### Response and remediation
- Immediately rate-limit or block the offending source IP at the WAF/CDN and reverse proxy, applying a challenge or temporary ban to the observed User-Agent and JA3/JA4 fingerprint driving the 500+ unique-path 404/403 GET burst.
- If traffic came through a proxy or CDN, use X-Forwarded-For to identify and block the true origin, and add a temporary ASN or geolocation block if the source aligns with known scanner networks.
- Verify whether the source is an approved internal scanner; if not, disable the job or container, remove any scheduled tasks and API keys used, and notify the owner to stop testing against production immediately.
- Review the requested path list to identify any 2xx or 401 hits and remediate exposures such as accessible /.env, /.git, /admin interfaces, backup archives, or installer scripts by removing files, disabling endpoints, and rotating secrets.
- Escalate to incident response if enumeration persists after blocking, pivots to POSTs or credential attempts, originates from rotating IPs (Tor/VPN/residential), or produces 2xx on sensitive endpoints despite WAF rules.
- Harden the web tier by enabling per-IP rate limiting and bot challenges, turning off directory listing and default app endpoints, blocking patterns like /.git/, /.env, and /backup.zip at the WAF, and restricting origin access to CDN egress only.
"""
risk_score = 21
rule_id = "8383a8d0-008b-47a5-94e5-496629dc3590"
severity = "low"
tags = [
"Domain: Web",
"Use Case: Threat Detection",
"Tactic: Reconnaissance",
"Data Source: Nginx",
"Data Source: Apache",
"Data Source: Apache Tomcat",
"Data Source: IIS",
"Data Source: Traefik",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "esql"
query = '''
from logs-nginx.access-*, logs-apache.access-*, logs-apache_tomcat.access-*, logs-iis.access-*, logs-traefik.access-*
| where
http.request.method == "GET" and
http.response.status_code in (404, 403)
| eval Esql.url_original_to_lower = to_lower(url.original)
| keep
@timestamp,
data_stream.dataset,
http.request.method,
http.response.status_code,
source.ip,
agent.id,
agent.name,
Esql.url_original_to_lower,
data_stream.namespace
| stats
Esql.event_count = count(),
Esql.url_original_count_distinct = count_distinct(Esql.url_original_to_lower),
Esql.agent_name_values = values(agent.name),
Esql.agent_id_values = values(agent.id),
Esql.http_request_method_values = values(http.request.method),
Esql.http_response_status_code_values = values(http.response.status_code),
Esql.url_original_values = values(Esql.url_original_to_lower),
Esql.data_stream_dataset_values = values(data_stream.dataset),
Esql.data_stream_namespace_values = values(data_stream.namespace)
by source.ip
| where
Esql.event_count > 500 and Esql.url_original_count_distinct > 250
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1595"
name = "Active Scanning"
reference = "https://attack.mitre.org/techniques/T1595/"
[[rule.threat.technique.subtechnique]]
id = "T1595.002"
name = "Vulnerability Scanning"
reference = "https://attack.mitre.org/techniques/T1595/002/"
[[rule.threat.technique.subtechnique]]
id = "T1595.003"
name = "Wordlist Scanning"
reference = "https://attack.mitre.org/techniques/T1595/003/"
[rule.threat.tactic]
id = "TA0043"
name = "Reconnaissance"
reference = "https://attack.mitre.org/tactics/TA0043/"
Stages and Predicates
Stage 1: from
from logs-nginx.access-*, logs-apache.access-*, logs-apache_tomcat.access-*, logs-iis.access-*, logs-traefik.access-*
Stage 2: where
| where
http.request.method == "GET" and
http.response.status_code in (404, 403)
Stage 3: eval
| eval Esql.url_original_to_lower = to_lower(url.original)
Stage 4: keep
| keep
@timestamp,
data_stream.dataset,
http.request.method,
http.response.status_code,
source.ip,
agent.id,
agent.name,
Esql.url_original_to_lower,
data_stream.namespace
Stage 5: stats
| stats
Esql.event_count = count(),
Esql.url_original_count_distinct = count_distinct(Esql.url_original_to_lower),
Esql.agent_name_values = values(agent.name),
Esql.agent_id_values = values(agent.id),
Esql.http_request_method_values = values(http.request.method),
Esql.http_response_status_code_values = values(http.response.status_code),
Esql.url_original_values = values(Esql.url_original_to_lower),
Esql.data_stream_dataset_values = values(data_stream.dataset),
Esql.data_stream_namespace_values = values(data_stream.namespace)
by source.ip
Stage 6: where
| where
Esql.event_count > 500 and Esql.url_original_count_distinct > 250
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.url_original_count_distinct | STATS Esql.url_original_count_distinct = count_distinct(Esql.url_original_to_lower) |
Esql.agent_name_values | STATS Esql.agent_name_values = values(agent.name) |
Esql.agent_id_values | STATS Esql.agent_id_values = values(agent.id) |
Esql.http_request_method_values | STATS Esql.http_request_method_values = values(http.request.method) |
Esql.http_response_status_code_values | STATS Esql.http_response_status_code_values = values(http.response.status_code) |
Esql.url_original_values | STATS Esql.url_original_values = values(Esql.url_original_to_lower) |
Esql.data_stream_dataset_values | STATS Esql.data_stream_dataset_values = values(data_stream.dataset) |
Esql.data_stream_namespace_values | STATS Esql.data_stream_namespace_values = values(data_stream.namespace) |
source.ip | STATS BY |
XDG-Open Command Execution
#This rule monitors for the execution of the xdg-open process that is typically used to open documents and URLs in the user's preferred desktop application. Attackers may use this command to trick users into opening malicious documents or URLs to gain access to the target system.
MITRE ATT&CK Coverage
Rule Body
[metadata]
creation_date = "2026/07/02"
integration = ["endpoint", "crowdstrike", "sentinel_one_cloud_funnel", "auditd_manager"]
maturity = "production"
updated_date = "2026/07/20"
[rule]
author = ["Elastic"]
description = """
This rule monitors for the execution of the xdg-open process that is typically used to open documents and
URLs in the user's preferred desktop application. Attackers may use this command to trick users into opening
malicious documents or URLs to gain access to the target system.
"""
from = "now-9m"
index = [
"endgame-*",
"logs-crowdstrike.fdr*",
"logs-endpoint.events.process*",
"logs-sentinel_one_cloud_funnel.*",
"logs-auditd_manager.auditd-*",
]
language = "eql"
license = "Elastic License v2"
name = "XDG-Open Command Execution"
note = """## Triage and analysis
> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
### Investigating XDG-Open Command Execution
This rule detects when the Linux `xdg-open` utility launches, which can indicate an attempt to hand a file or URL to the user’s default desktop application. That matters because attackers abuse this trusted helper to make malicious content appear as a normal user action and gain execution through user interaction. A common pattern is a script or archive invoking `xdg-open` on a local lure document or phishing URL so the desktop immediately opens it in the browser or document viewer.
### Possible investigation steps
- Trace the parent and ancestor chain to determine whether `xdg-open` was launched by a browser, email client, chat app, archive extractor, script interpreter, or remote shell, and assess whether that lineage matches normal user behavior.
- Determine what was handed to `xdg-open` and classify it as a local file or URL; for files, examine the path, hash, download origin, and recent creation time, and for URLs, review reputation, redirects, and whether the destination is a known phishing or malware host.
- Correlate the event with nearby activity on the same host such as browser downloads, email attachment access, extraction of compressed archives, removable media access, or files written to temporary directories to identify the original delivery mechanism.
- Review the application that opened next and any follow-on child activity to see whether a browser, document viewer, or office suite subsequently spawned scripts, shell interpreters, network connections, or additional payloads.
- Validate the execution context by confirming an active graphical user session and the expected user account, since `xdg-open` launched from headless, privileged, or automation contexts is more suspicious and may indicate script-driven abuse.
### False positive analysis
- A legitimate interactive desktop action such as a user clicking a help link, local document, or downloaded file can invoke `xdg-open`, so verify the process has an expected GUI parent, runs in the user’s normal session, and opens a path or URL consistent with recent user activity.
- Login, onboarding, or administrative scripts may use `xdg-open` to launch an internal page or local documentation for users, so confirm the parent script or autostart entry is an approved file in a standard location and that the same command appears repeatedly for other users or hosts.
### Response and remediation
- Isolate the affected Linux host from the network except for approved management channels, stop the user from interacting further with the opened browser tab or document, and block the malicious URL, domain, and any downloaded file hashes across web, email, and endpoint controls.
- Terminate the malicious process chain launched after `xdg-open`, quarantine the lure file or browser download, and remove persistence artifacts such as `~/.config/autostart` entries, user or system `systemd` units, cron jobs, shell profile modifications, and unauthorized desktop launchers.
- Reset the affected user’s passwords and revoke active sessions, tokens, and browser-stored credentials if `xdg-open` led to a phishing page, credential prompt, or any site that could have captured authentication data.
- Restore the host to a known-good state by reimaging or rolling back from a trusted baseline when the opened file or URL led to payload execution, unauthorized package installation, startup changes, or execution with elevated privileges.
- Escalate to incident response immediately if the same lure URL or document appears on multiple hosts, any root-level persistence or remote access tooling is found, or there are signs of lateral movement, data staging, or exfiltration.
- Harden the environment by patching browsers and document handlers, restricting script-driven `xdg-open` use from temporary or download directories where feasible, tightening email and web filtering for similar lures, and adding detections for `xdg-open` spawned by shell interpreters, archive extractors, chat clients, or remote shells.
"""
risk_score = 47
rule_id = "904023d7-8307-48bc-ad49-c454dfc2fae3"
setup = """## Setup
This rule requires data coming in from Elastic Defend.
### Elastic Defend Integration Setup
Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
#### Prerequisite Requirements:
- Fleet is required for Elastic Defend.
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
- Go to the Kibana home page and click "Add integrations".
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
- Click "Add Elastic Defend".
- Configure the integration name and optionally add a description.
- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
- Click "Save and Continue".
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
"""
severity = "medium"
tags = [
"Domain: Endpoint",
"OS: Linux",
"Use Case: Threat Detection",
"Tactic: Execution",
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Crowdstrike",
"Data Source: SentinelOne",
"Data Source: Auditd Manager",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "linux" and event.type == "start" and
event.action in ("exec", "exec_event", "executed", "process_started", "ProcessRollup2") and (
process.name == "xdg-open" or
process.args in ("/bin/xdg-open", "/usr/bin/xdg-open", "/usr/local/bin/xdg-open", "xdg-open")
)
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[rule.threat.tactic]
name = "Execution"
id = "TA0002"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[rule.threat.technique]]
id = "T1204"
name = "User Execution"
reference = "https://attack.mitre.org/techniques/T1204/"
[[rule.threat.technique.subtechnique]]
id = "T1204.001"
name = "Malicious Link"
reference = "https://attack.mitre.org/techniques/T1204/001/"
[[rule.threat.technique.subtechnique]]
id = "T1204.002"
name = "Malicious File"
reference = "https://attack.mitre.org/techniques/T1204/002/"
[[rule.threat.technique.subtechnique]]
id = "T1204.004"
name = "Malicious Copy and Paste"
reference = "https://attack.mitre.org/techniques/T1204/004/"
Stages and Predicates
Stage 1: process
process where host.os.type == "linux" and event.type == "start" and
event.action in ("exec", "exec_event", "executed", "process_started", "ProcessRollup2") and (
process.name == "xdg-open" or
process.args in ("/bin/xdg-open", "/usr/bin/xdg-open", "/usr/local/bin/xdg-open", "xdg-open")
)
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | in |
| field:"EventType" kind:in |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.args | in |
| field:"process.args" kind:in |
process.name | eq |
| field:"process_basename" kind:eq value:"xdg-open" |