Skip to content

Commit db963ff

Browse files
Merge branch 'main' into esql-field-validation
2 parents 289bbef + 9f57937 commit db963ff

8 files changed

+290
-25
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[metadata]
2+
creation_date = "2025/09/18"
3+
integration = ["endpoint"]
4+
maturity = "production"
5+
updated_date = "2025/09/18"
6+
7+
[rule]
8+
author = ["Elastic"]
9+
description = """
10+
This rule detects the execution of TruffleHog, a tool used to search for high-entropy strings and secrets
11+
in code repositories, which may indicate an attempt to access credentials. This tool was abused by the Shai-Hulud
12+
worm to search for credentials in code repositories.
13+
"""
14+
false_positives = [
15+
"""
16+
Trufflehog is a legitimate open-source tool used by security professionals and developers to search for sensitive
17+
information, such as passwords, API keys, and other secrets, within code repositories. It is commonly employed
18+
during security assessments and code reviews to identify potential vulnerabilities.
19+
""",
20+
]
21+
from = "now-9m"
22+
index = ["logs-endpoint.events.process-*"]
23+
language = "eql"
24+
license = "Elastic License v2"
25+
name = "Credential Access via TruffleHog Execution"
26+
references = ["https://www.elastic.co/blog/shai-hulud-worm-npm-supply-chain-compromise"]
27+
risk_score = 21
28+
rule_id = "47595dea-452b-4d37-b82d-6dd691325139"
29+
severity = "low"
30+
tags = [
31+
"Domain: Endpoint",
32+
"OS: Linux",
33+
"OS: Windows",
34+
"OS: macOS",
35+
"Use Case: Threat Detection",
36+
"Tactic: Credential Access",
37+
"Data Source: Elastic Defend"
38+
]
39+
timestamp_override = "event.ingested"
40+
type = "eql"
41+
query = '''
42+
process where event.type == "start" and process.name : ("trufflehog.exe", "trufflehog") and
43+
process.args == "--results=verified" and process.args == "--json" and process.args == "filesystem"
44+
'''
45+
46+
[[rule.threat]]
47+
framework = "MITRE ATT&CK"
48+
49+
[[rule.threat.technique]]
50+
id = "T1003"
51+
name = "OS Credential Dumping"
52+
reference = "https://attack.mitre.org/techniques/T1003/"
53+
54+
[[rule.threat.technique]]
55+
id = "T1555"
56+
name = "Credentials from Password Stores"
57+
reference = "https://attack.mitre.org/techniques/T1555/"
58+
59+
[rule.threat.tactic]
60+
id = "TA0006"
61+
name = "Credential Access"
62+
reference = "https://attack.mitre.org/tactics/TA0006/"

rules/integrations/azure/privilege_escalation_entra_id_elevate_to_user_administrator_access.toml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2025/05/22"
33
integration = ["azure"]
44
maturity = "production"
5-
updated_date = "2025/05/22"
5+
updated_date = "2025/09/15"
66

77
[rule]
88
author = ["Elastic", "Austin Songer"]
@@ -23,7 +23,7 @@ note = """## Triage and Analysis
2323
2424
### Investigating Microsoft Entra ID Elevated Access to User Access Administrator
2525
26-
This rule identifies when a user elevates their permissions to the "User Access Administrator" role in Microsoft Entra ID (Azure AD). This role allows full control over access management for Azure resources and can be abused by attackers for lateral movement, persistence, or privilege escalation. Since this is a **New Terms** rule, the alert will only trigger if the user has not performed this elevation in the past 14 days, helping reduce alert fatigue.
26+
This rule identifies when a user elevates their permissions to the "User Access Administrator" role in Azure RBAC. This role allows full control over access management for Azure resources and can be abused by attackers for lateral movement, persistence, or privilege escalation. Since this is a New Terms rule, the alert will only trigger if the user has not performed this elevation in the past 14 days, helping reduce alert fatigue.
2727
2828
### Possible investigation steps
2929
@@ -61,12 +61,14 @@ This rule identifies when a user elevates their permissions to the "User Access
6161
references = [
6262
"https://learn.microsoft.com/en-us/azure/role-based-access-control/elevate-access-global-admin?tabs=azure-portal%2Centra-audit-logs/",
6363
"https://permiso.io/blog/azures-apex-permissions-elevate-access-the-logs-security-teams-overlook",
64+
"https://www.microsoft.com/en-us/security/blog/2025/08/27/storm-0501s-evolving-techniques-lead-to-cloud-based-ransomware/"
6465
]
65-
risk_score = 47
66+
risk_score = 73
6667
rule_id = "8d9c4128-372a-11f0-9d8f-f661ea17fbcd"
67-
severity = "medium"
68+
severity = "high"
6869
tags = [
6970
"Domain: Cloud",
71+
"Domain: Identity",
7072
"Data Source: Azure",
7173
"Data Source: Microsoft Entra ID",
7274
"Data Source: Microsoft Entra ID Audit Logs",
@@ -79,8 +81,10 @@ type = "new_terms"
7981

8082
query = '''
8183
event.dataset: azure.auditlogs
82-
and azure.auditlogs.operation_name: "User has elevated their access to User Access Administrator for their Azure Resources"
83-
and event.outcome: "success"
84+
and (
85+
azure.auditlogs.operation_name: "User has elevated their access to User Access Administrator for their Azure Resources" or
86+
azure.auditlogs.properties.additional_details.value: "Microsoft.Authorization/elevateAccess/action"
87+
) and event.outcome: "success"
8488
'''
8589

8690

@@ -107,6 +111,6 @@ field = "new_terms_fields"
107111
value = ["azure.auditlogs.properties.initiated_by.user.userPrincipalName"]
108112
[[rule.new_terms.history_window_start]]
109113
field = "history_window_start"
110-
value = "now-14d"
114+
value = "now-7d"
111115

112116

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
[metadata]
2+
creation_date = "2025/09/18"
3+
integration = ["endpoint"]
4+
maturity = "production"
5+
updated_date = "2025/09/18"
6+
7+
[rule]
8+
author = ["Elastic"]
9+
description = """
10+
This rule detects when Node.js, directly or via a shell, spawns the curl or wget command. This may indicate
11+
command and control behavior. Adversaries may use Node.js to download additional tools or payloads onto
12+
the system.
13+
"""
14+
from = "now-9m"
15+
index = ["logs-endpoint.events.process*"]
16+
language = "eql"
17+
license = "Elastic License v2"
18+
name = "Curl or Wget Spawned via Node.js"
19+
risk_score = 21
20+
rule_id = "d9af2479-ad13-4471-a312-f586517f1243"
21+
setup = """## Setup
22+
23+
This rule requires data coming in from Elastic Defend.
24+
25+
### Elastic Defend Integration Setup
26+
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.
27+
28+
#### Prerequisite Requirements:
29+
- Fleet is required for Elastic Defend.
30+
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
31+
32+
#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
33+
- Go to the Kibana home page and click "Add integrations".
34+
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
35+
- Click "Add Elastic Defend".
36+
- Configure the integration name and optionally add a description.
37+
- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
38+
- 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).
39+
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
40+
- 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.
41+
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).
42+
- Click "Save and Continue".
43+
- 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.
44+
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
45+
"""
46+
severity = "low"
47+
tags = [
48+
"Domain: Endpoint",
49+
"OS: Linux",
50+
"Use Case: Threat Detection",
51+
"Tactic: Command and Control",
52+
"Data Source: Elastic Defend",
53+
]
54+
timestamp_override = "event.ingested"
55+
type = "eql"
56+
query = '''
57+
process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and process.parent.name == "node" and (
58+
(
59+
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and
60+
process.args == "-c" and process.command_line like~ ("*curl*", "*wget*")
61+
) or
62+
(
63+
process.name in ("curl", "wget")
64+
)
65+
)
66+
'''
67+
68+
[[rule.threat]]
69+
framework = "MITRE ATT&CK"
70+
71+
[rule.threat.tactic]
72+
name = "Command and Control"
73+
id = "TA0011"
74+
reference = "https://attack.mitre.org/tactics/TA0011/"
75+
76+
[[rule.threat.technique]]
77+
name = "Application Layer Protocol"
78+
id = "T1071"
79+
reference = "https://attack.mitre.org/techniques/T1071/"
80+
81+
[[rule.threat.technique.subtechnique]]
82+
name = "Web Protocols"
83+
id = "T1071.001"
84+
reference = "https://attack.mitre.org/techniques/T1071/001/"
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
[metadata]
2+
creation_date = "2025/09/18"
3+
integration = ["endpoint"]
4+
maturity = "production"
5+
updated_date = "2025/09/18"
6+
7+
[rule]
8+
author = ["Elastic"]
9+
description = """
10+
This rule detects when the Node.js runtime spawns a shell to execute the GitHub CLI (gh) command to retrieve
11+
a GitHub authentication token. The GitHub CLI is a command-line tool that allows users to interact with
12+
GitHub from the terminal. The "gh auth token" command is used to retrieve an authentication token for
13+
GitHub, which can be used to authenticate API requests and perform actions on behalf of the user. Adversaries
14+
may use this technique to access GitHub repositories and potentially exfiltrate sensitive information or
15+
perform malicious actions. This activity was observed in the wild as part of the Shai-Hulud worm.
16+
"""
17+
from = "now-9m"
18+
index = ["logs-endpoint.events.process*"]
19+
language = "eql"
20+
license = "Elastic License v2"
21+
name = "GitHub Authentication Token Access via Node.js"
22+
references = ["https://www.elastic.co/blog/shai-hulud-worm-npm-supply-chain-compromise"]
23+
risk_score = 47
24+
rule_id = "e5d69377-f8cf-4e8f-8328-690822cd012a"
25+
setup = """## Setup
26+
27+
This rule requires data coming in from Elastic Defend.
28+
29+
### Elastic Defend Integration Setup
30+
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.
31+
32+
#### Prerequisite Requirements:
33+
- Fleet is required for Elastic Defend.
34+
- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
35+
36+
#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
37+
- Go to the Kibana home page and click "Add integrations".
38+
- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
39+
- Click "Add Elastic Defend".
40+
- Configure the integration name and optionally add a description.
41+
- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
42+
- 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).
43+
- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
44+
- 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.
45+
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).
46+
- Click "Save and Continue".
47+
- 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.
48+
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
49+
"""
50+
severity = "medium"
51+
tags = [
52+
"Domain: Endpoint",
53+
"OS: Linux",
54+
"Use Case: Threat Detection",
55+
"Tactic: Credential Access",
56+
"Tactic: Discovery",
57+
"Data Source: Elastic Defend",
58+
"Resources: Investigation Guide",
59+
]
60+
timestamp_override = "event.ingested"
61+
type = "eql"
62+
query = '''
63+
process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and process.parent.name == "node" and
64+
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and process.args == "gh auth token"
65+
'''
66+
67+
[[rule.threat]]
68+
framework = "MITRE ATT&CK"
69+
70+
[[rule.threat.technique]]
71+
id = "T1552"
72+
name = "Unsecured Credentials"
73+
reference = "https://attack.mitre.org/techniques/T1552/"
74+
75+
[[rule.threat.technique]]
76+
id = "T1528"
77+
name = "Steal Application Access Token"
78+
reference = "https://attack.mitre.org/techniques/T1528/"
79+
80+
[rule.threat.tactic]
81+
id = "TA0006"
82+
name = "Credential Access"
83+
reference = "https://attack.mitre.org/tactics/TA0006/"
84+
85+
[[rule.threat]]
86+
framework = "MITRE ATT&CK"
87+
88+
[[rule.threat.technique]]
89+
id = "T1613"
90+
name = "Container and Resource Discovery"
91+
reference = "https://attack.mitre.org/techniques/T1613/"
92+
93+
[rule.threat.tactic]
94+
id = "TA0007"
95+
name = "Discovery"
96+
reference = "https://attack.mitre.org/tactics/TA0007/"

rules/windows/command_and_control_dns_susp_tld.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2025/08/20"
33
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2025/09/05"
5+
updated_date = "2025/09/18"
66

77
[rule]
88
author = ["Elastic"]
@@ -79,7 +79,7 @@ network where host.os.type == "windows" and dns.question.name != null and
7979
"java.exe", "javaw.exe", "*.pif", "*.com", "*.scr") or
8080
(?process.code_signature.trusted == false or ?process.code_signature.exists == false) or
8181
?process.code_signature.subject_name : ("AutoIt Consulting Ltd", "OpenJS Foundation", "Python Software Foundation") or
82-
process.executable : ("?:\\Users\\*.exe", "?:\\ProgramData\\*.exe")
82+
?process.executable : ("?:\\Users\\*.exe", "?:\\ProgramData\\*.exe")
8383
) and
8484
dns.question.name regex """.*\.(top|buzz|xyz|rest|ml|cf|gq|ga|onion|monster|cyou|quest|cc|bar|cfd|click|cam|surf|tk|shop|club|icu|pw|ws|online|fun|life|boats|store|hair|skin|motorcycles|christmas|lol|makeup|mom|bond|beauty|biz|live|work|zip|country|accountant|date|party|science|loan|win|men|faith|review|racing|download|host)"""
8585
'''

rules/windows/defense_evasion_regmod_remotemonologue.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2025/04/14"
33
integration = ["endpoint", "m365_defender", "sentinel_one_cloud_funnel", "windows"]
44
maturity = "production"
5-
updated_date = "2025/08/08"
5+
updated_date = "2025/09/18"
66

77
[rule]
88
author = ["Elastic"]
@@ -111,7 +111,7 @@ registry where host.os.type == "windows" and event.action != "deletion" and
111111
"HKLM\\SOFTWARE\\Microsoft\\Office\\ClickToRun\\VREGISTRY_*",
112112
"\\REGISTRY\\MACHINE\\SOFTWARE\\Microsoft\\Office\\ClickToRun\\VREGISTRY_*"
113113
) or
114-
(process.executable : "C:\\windows\\System32\\msiexec.exe" and user.id : "S-1-5-18")
114+
(process.executable : "C:\\windows\\System32\\msiexec.exe" and ?user.id : "S-1-5-18")
115115
)
116116
'''
117117

rules/windows/execution_suspicious_powershell_imgload.toml

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/11/17"
33
integration = ["endpoint"]
44
maturity = "production"
5-
updated_date = "2024/09/23"
5+
updated_date = "2025/09/18"
66

77
[rule]
88
author = ["Elastic"]
@@ -74,23 +74,42 @@ timestamp_override = "event.ingested"
7474
type = "new_terms"
7575

7676
query = '''
77-
host.os.type:windows and event.category:library and
78-
dll.name:("System.Management.Automation.dll" or "System.Management.Automation.ni.dll") and
77+
host.os.type:windows and event.category:library and
78+
dll.name:("System.Management.Automation.dll" or "System.Management.Automation.ni.dll") and
7979
not (
80-
process.code_signature.subject_name:("Microsoft Corporation" or "Microsoft Dynamic Code Publisher" or "Microsoft Windows") and process.code_signature.trusted:true and not process.name.caseless:("regsvr32.exe" or "rundll32.exe")
81-
) and
80+
process.code_signature.subject_name:(
81+
"Microsoft Corporation" or
82+
"Microsoft Dynamic Code Publisher" or
83+
"Microsoft Windows"
84+
) and process.code_signature.trusted:true and not process.name.caseless:"regsvr32.exe"
85+
) and
8286
not (
83-
process.executable.caseless:(C\:\\Program*Files*\(x86\)\\*.exe or C\:\\Program*Files\\*.exe) and
87+
process.executable:(C\:\\Program*Files*\(x86\)\\*.exe or C\:\\Program*Files\\*.exe) and
8488
process.code_signature.trusted:true
85-
) and
89+
) and
8690
not (
87-
process.executable.caseless: C\:\\Windows\\Lenovo\\*.exe and process.code_signature.subject_name:"Lenovo" and
91+
process.executable: C\:\\Windows\\Lenovo\\*.exe and process.code_signature.subject_name:"Lenovo" and
8892
process.code_signature.trusted:true
89-
) and
93+
) and
9094
not (
91-
process.executable.caseless: "C:\\ProgramData\\chocolatey\\choco.exe" and
92-
process.code_signature.subject_name:"Chocolatey Software, Inc." and process.code_signature.trusted:true
93-
) and not process.executable.caseless : "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
95+
process.executable: C\:\\Windows\\AdminArsenal\\PDQInventory-Scanner\\service-*\\exec\\PDQInventoryScanner.exe and
96+
process.code_signature.subject_name:"PDQ.com Corporation" and
97+
process.code_signature.trusted:true
98+
) and
99+
not (
100+
process.executable: C\:\\Windows\\Temp\\\{*\}\\_is*.exe and
101+
process.code_signature.subject_name:("Dell Technologies Inc." or "Dell Inc" or "Dell Inc.") and
102+
process.code_signature.trusted:true
103+
) and
104+
not (
105+
process.executable: C\:\\ProgramData\\chocolatey\\* and
106+
process.code_signature.subject_name:("Chocolatey Software, Inc." or "Chocolatey Software, Inc") and
107+
process.code_signature.trusted:true
108+
) and
109+
not process.executable : (
110+
"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" or
111+
"C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe"
112+
)
94113
'''
95114

96115

0 commit comments

Comments
 (0)