Skip to content

Commit 0021de3

Browse files
authored
Merge branch 'main' into react_network_detection
2 parents 6e8edb7 + a1e40de commit 0021de3

File tree

63 files changed

+1466
-479
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1466
-479
lines changed
114 Bytes
Binary file not shown.
332 Bytes
Binary file not shown.

detection_rules/etc/non-ecs-schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@
150150
"kibana.alert.rule.type": "keyword",
151151
"kibana.alert.rule.threat.tactic.name": "keyword"
152152
},
153+
"logs-github.audit-*": {
154+
"github.reasons.code": "keyword",
155+
"github.reasons.message": "text"
156+
},
153157
"logs-google_workspace*": {
154158
"gsuite.admin": "keyword",
155159
"gsuite.admin.new_value": "keyword",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ For a production-ready and more integrated solution that is designed to work wit
4949
* [Sysmon Event IDs 17, 18: Named Pipe Events](sysmon_eventid17_18_pipe_event.md)
5050
* [Sysmon Event IDs 19, 20, 21: WMI Events](sysmon_eventid19_20_21_wmi_event.md)
5151
* [Sysmon Event ID 22: DNS Query](sysmon_eventid22_dns_query.md)
52-
* [Sysmon Event ID 23: File Delete](sysmon_eventid23_file_delete.md)
52+
* [Sysmon Event ID 23: File Delete](sysmon_eventid23_file_delete.md)

docs/docset.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cross_links:
33
- docs-content
44
exclude:
55
- '_*.md'
6-
- 'README.md'
6+
- 'readme.md'
77

88
extensions:
99
- detection-rules
@@ -13,7 +13,7 @@ toc:
1313
detection_rules: ['../rules', '../rules_building_block']
1414
- folder: audit_policies/windows
1515
children:
16-
- file: README.md
16+
- file: readme.md
1717
- file: audit_authorization_policy_change.md
1818
- file: audit_computer_account_management.md
1919
- file: audit_detailed_file_share.md

rules/cross-platform/defense_evasion_agent_spoofing_multiple_hosts.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2021/07/14"
33
integration = ["endpoint"]
44
maturity = "production"
5-
updated_date = "2025/11/13"
5+
updated_date = "2025/12/10"
66

77
[rule]
88
author = ["Elastic"]
@@ -30,7 +30,7 @@ type = "esql"
3030

3131
query = '''
3232
from logs-endpoint.* metadata _id
33-
| where event.agent_id_status is not null
33+
| where event.agent_id_status is not null and agent.id is not null
3434
| stats Esql.count_distinct_host_ids = count_distinct(host.id), Esql.host_id_values = values(host.id), Esql.user_id_values_user_id = values(user.id) by agent.id
3535
| where Esql.count_distinct_host_ids >= 2
3636
| keep Esql.count_distinct_host_ids, Esql.host_id_values, Esql.user_id_values_user_id, agent.id

rules/cross-platform/impact_hosts_file_modified.toml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/07/07"
33
integration = ["endpoint", "windows"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/12/11"
66

77
[rule]
88
author = ["Elastic"]
@@ -78,23 +78,37 @@ timestamp_override = "event.ingested"
7878
type = "eql"
7979

8080
query = '''
81-
any where
81+
any where process.executable != null and
8282
8383
/* file events for creation; file change events are not captured by some of the included sources for linux and so may
8484
miss this, which is the purpose of the process + command line args logic below */
8585
(
86-
event.category == "file" and event.type in ("change", "creation") and
86+
event.category == "file" and event.type in ("change", "creation") and event.action != "rename" and
8787
file.path : ("/private/etc/hosts", "/etc/hosts", "?:\\Windows\\System32\\drivers\\etc\\hosts") and
88-
not process.name in ("dockerd", "rootlesskit", "podman", "crio")
88+
not process.name in ("dockerd", "rootlesskit", "podman", "crio") and
89+
not process.executable : ("C:\\Program Files\\Fortinet\\FortiClient\\FCDBLog.exe",
90+
"C:\\Program Files\\Seqrite\\Seqrite\\SCANNER.EXE",
91+
"C:\\Windows\\Temp\\*.ins\\inst.exe",
92+
"C:\\Windows\\System32\\svchost.exe",
93+
"C:\\Program Files\\NordVPN\\nordvpn-service.exe",
94+
"C:\\Program Files\\Tailscale\\tailscaled.exe",
95+
"C:\\Program Files\\Docker\\Docker\\com.docker.service",
96+
"C:\\Program Files\\Quick Heal\\Quick Heal AntiVirus Pro\\scanner.exe",
97+
"C:\\Program Files (x86)\\Quick Heal AntiVirus Pro\\SCANNER.EXE",
98+
"C:\\Program Files\\Quick Heal\\Quick Heal Internet Security\\scanner.exe",
99+
"C:\\Program Files (x86)\\Cisco\\Cisco AnyConnect Secure Mobility Client\\vpnagent.exe",
100+
"/opt/IBM/InformationServer/Server/DSEngine/bin/uvsh",
101+
"/usr/local/demisto/server")
89102
)
90103
or
91104
92105
/* process events for change targeting linux only */
93106
(
94107
event.category == "process" and event.type in ("start") and
95108
process.name in ("nano", "vim", "vi", "emacs", "echo", "sed") and
96-
process.args : ("/etc/hosts") and
97-
not process.parent.name in ("dhclient-script", "google_set_hostname")
109+
(process.args : ("/etc/hosts") or (process.working_directory == "/etc" and process.args == "hosts")) and
110+
not process.parent.name in ("dhclient-script", "google_set_hostname") and
111+
not process.command_line == "sed -i /Added by Google/d /etc/hosts"
98112
)
99113
'''
100114

rules/cross-platform/multiple_alerts_email_elastic_defend_correlation.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[metadata]
22
creation_date = "2025/11/19"
3+
integration = ["endpoint", "checkpoint_email"]
34
maturity = "production"
4-
updated_date = "2025/11/19"
5+
updated_date = "2025/12/15"
56

67
[rule]
78
author = ["Elastic"]
@@ -22,14 +23,15 @@ tags = [
2223
"Rule Type: Higher-Order Rule",
2324
"Resources: Investigation Guide",
2425
"Data Source: Elastic Defend",
26+
"Data Source: Check Point Harmony Email & Collaboration",
2527
"Domain: Email",
2628
"Domain: Endpoint"
2729
]
2830
timestamp_override = "event.ingested"
2931
type = "esql"
3032

3133
query = '''
32-
from logs-* metadata _id
34+
from logs-endpoint.alerts-*, logs-checkpoint_email.event-* metadata _id
3335
// Email or Elastic Defend alerts where user name is populated
3436
| where
3537
(event.category == "email" and event.kind == "alert" and destination.user.name is not null) or
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
[metadata]
2+
creation_date = "2025/12/15"
3+
maturity = "production"
4+
updated_date = "2025/12/15"
5+
6+
[rule]
7+
author = ["Elastic"]
8+
description = """
9+
This rule uses alert data to determine when multiple alerts from different integrations with unique event categories and involving
10+
the same destination.ip are triggered. Analysts can use this to prioritize triage and response, as these IP address is more likely
11+
to be related to a compromise.
12+
"""
13+
from = "now-60m"
14+
interval = "30m"
15+
language = "esql"
16+
license = "Elastic License v2"
17+
name = "Alerts From Multiple Integrations by Destination Address"
18+
risk_score = 73
19+
rule_id = "08933236-b27a-49f6-b04a-a616983f04b9"
20+
severity = "high"
21+
tags = ["Use Case: Threat Detection", "Rule Type: Higher-Order Rule", "Resources: Investigation Guide"]
22+
timestamp_override = "event.ingested"
23+
type = "esql"
24+
25+
query = '''
26+
from .alerts-security.*
27+
28+
// any alerts excluding low severity, threat_match and machine_learning rules
29+
| where kibana.alert.rule.name is not null and destination.ip is not null and kibana.alert.risk_score > 21 and not kibana.alert.rule.type in ("threat_match", "machine_learning")
30+
31+
// group alerts by destination.ip and extract values of interest for alert triage
32+
| stats Esql.event_module_distinct_count = COUNT_DISTINCT(event.module),
33+
Esql.rule_name_distinct_count = COUNT_DISTINCT(kibana.alert.rule.name),
34+
Esql.event_category_distinct_count = COUNT_DISTINCT(event.category),
35+
Esql.rule_risk_score_distinct_count = COUNT_DISTINCT(kibana.alert.risk_score),
36+
Esql.event_module_values = VALUES(event.module),
37+
Esql.rule_name_values = VALUES(kibana.alert.rule.name),
38+
Esql.message_values = VALUES(message),
39+
Esql.event_category_values = VALUES(event.category),
40+
Esql.event_action_values = VALUES(event.action),
41+
Esql.source_ip_values = VALUES(source.ip),
42+
Esql.host_id_values = VALUES(host.id),
43+
Esql.agent_id_values = VALUES(agent.id),
44+
Esql.user_name_values = VALUES(user.name),
45+
Esql.rule_severity_values = VALUES(kibana.alert.risk_score) by destination.ip
46+
47+
// filter for alerts from same destination.ip reported by different integrations with unique categories and with different severity levels or presence of high severity alerts
48+
| where Esql.event_module_distinct_count >= 2 and Esql.event_category_distinct_count >= 2 and (Esql.rule_risk_score_distinct_count >= 2 or Esql.rule_severity_values == 73 or Esql.rule_severity_values == 99)
49+
| keep destination.ip, Esql.*
50+
'''
51+
note = """## Triage and analysis
52+
53+
> **Disclaimer**:
54+
> 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.
55+
56+
### Investigating Alerts From Multiple Integrations by Destination Address
57+
58+
The detection rule uses alert data to determine when multiple alerts from different integrations involving the same destination.ip are triggered.
59+
60+
### Possible investigation steps
61+
62+
- Review the alert details to identify the specific host involved and the different modules and rules that triggered the alert.
63+
- Examine the timeline of the alerts to understand the sequence of events and determine if there is a pattern or progression in the tactics used.
64+
- Correlate the alert data with other logs and telemetry from the host, such as process creation, network connections, and file modifications, to gather additional context.
65+
- Investigate any known vulnerabilities or misconfigurations on the host that could have been exploited by the adversary.
66+
- Check for any indicators of compromise (IOCs) associated with the alerts, such as suspicious IP addresses, domains, or file hashes, and search for these across the network.
67+
- Assess the impact and scope of the potential compromise by determining if other hosts or systems have similar alerts or related activity.
68+
69+
### False positive analysis
70+
71+
- Alerts from routine administrative tasks may trigger multiple tactics. Review and exclude known benign activities such as scheduled software updates or system maintenance.
72+
- Security tools running on the host might generate alerts across different tactics. Identify and exclude alerts from trusted security applications to reduce noise.
73+
- Automated scripts or batch processes can mimic adversarial behavior. Analyze and whitelist these processes if they are verified as non-threatening.
74+
- Frequent alerts from development or testing environments can be misleading. Consider excluding these environments from the rule or applying a different risk score.
75+
- User behavior anomalies, such as accessing multiple systems or applications, might trigger alerts. Implement user behavior baselines to differentiate between normal and suspicious activities.
76+
77+
### Response and remediation
78+
79+
- Isolate the affected host from the network immediately to prevent further lateral movement by the adversary.
80+
- Conduct a thorough forensic analysis of the host to identify the specific vulnerabilities exploited and gather evidence of the attack phases involved.
81+
- Remove any identified malicious software or unauthorized access tools from the host, ensuring all persistence mechanisms are eradicated.
82+
- Apply security patches and updates to the host to address any exploited vulnerabilities and prevent similar attacks.
83+
- Restore the host from a known good backup if necessary, ensuring that the backup is free from compromise.
84+
- Monitor the host and network for any signs of re-infection or further suspicious activity, using enhanced logging and alerting based on the identified attack patterns.
85+
- Escalate the incident to the appropriate internal or external cybersecurity teams for further investigation and potential legal action if the attack is part of a larger campaign."""
86+
87+
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
[metadata]
2+
creation_date = "2025/12/15"
3+
maturity = "production"
4+
updated_date = "2025/12/15"
5+
6+
[rule]
7+
author = ["Elastic"]
8+
description = """
9+
This rule uses alert data to determine when multiple alerts from different integrations with unique event categories and
10+
involving the same source.ip are triggered. Analysts can use this to prioritize triage and response, as these IP addresses
11+
are more likely to be related to a compromise.
12+
"""
13+
from = "now-60m"
14+
interval = "30m"
15+
language = "esql"
16+
license = "Elastic License v2"
17+
name = "Alerts From Multiple Integrations by Source Address"
18+
risk_score = 73
19+
rule_id = "7d02c440-52a8-4854-ad3f-71af7fbb4fc6"
20+
severity = "high"
21+
tags = ["Use Case: Threat Detection", "Rule Type: Higher-Order Rule", "Resources: Investigation Guide"]
22+
timestamp_override = "event.ingested"
23+
type = "esql"
24+
25+
query = '''
26+
from .alerts-security.*
27+
28+
// any alerts excluding low severity and the noisy ones
29+
| where kibana.alert.rule.name is not null and source.ip is not null and kibana.alert.risk_score > 21 and
30+
not kibana.alert.rule.type in ("threat_match", "machine_learning")
31+
32+
// group alerts by source.ip and extract values of interest for alert triage
33+
| stats Esql.event_module_distinct_count = COUNT_DISTINCT(event.module),
34+
Esql.rule_name_distinct_count = COUNT_DISTINCT(kibana.alert.rule.name),
35+
Esql.event_category_distinct_count = COUNT_DISTINCT(event.category),
36+
Esql.rule_risk_score_distinct_count = COUNT_DISTINCT(kibana.alert.risk_score),
37+
Esql.event_module_values = VALUES(event.module),
38+
Esql.rule_name_values = VALUES(kibana.alert.rule.name),
39+
Esql.message_values = VALUES(message),
40+
Esql.event_category_values = VALUES(event.category),
41+
Esql.event_action_values = VALUES(event.action),
42+
Esql.destination_ip_values = VALUES(destination.ip),
43+
Esql.host_id_values = VALUES(host.id),
44+
Esql.agent_id_values = VALUES(agent.id),
45+
Esql.user_name_values = VALUES(user.name),
46+
Esql.rule_severity_values = VALUES(kibana.alert.risk_score) by source.ip
47+
48+
// filter for alerts from same source.ip reported by different integrations with unique categories and with different severity levels
49+
| where Esql.event_module_distinct_count >= 2 and Esql.event_category_distinct_count >= 2 and (Esql.rule_risk_score_distinct_count >= 2 or Esql.rule_severity_values == 73 or Esql.rule_severity_values == 99)
50+
| keep source.ip, Esql.*
51+
'''
52+
note = """## Triage and analysis
53+
54+
> **Disclaimer**:
55+
> 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.
56+
57+
### Investigating Alerts From Multiple Integrations by Source Address
58+
59+
The detection rule uses alert data to determine when multiple alerts from different integrations involving the same source.ip are triggered.
60+
61+
### Possible investigation steps
62+
63+
- Review the alert details to identify the specific host involved and the different modules and rules that triggered the alert.
64+
- Examine the timeline of the alerts to understand the sequence of events and determine if there is a pattern or progression in the tactics used.
65+
- Correlate the alert data with other logs and telemetry from the host, such as process creation, network connections, and file modifications, to gather additional context.
66+
- Investigate any known vulnerabilities or misconfigurations on the host that could have been exploited by the adversary.
67+
- Check for any indicators of compromise (IOCs) associated with the alerts, such as suspicious IP addresses, domains, or file hashes, and search for these across the network.
68+
- Assess the impact and scope of the potential compromise by determining if other hosts or systems have similar alerts or related activity.
69+
70+
### False positive analysis
71+
72+
- Alerts from routine administrative tasks may trigger multiple tactics. Review and exclude known benign activities such as scheduled software updates or system maintenance.
73+
- Security tools running on the host might generate alerts across different tactics. Identify and exclude alerts from trusted security applications to reduce noise.
74+
- Automated scripts or batch processes can mimic adversarial behavior. Analyze and whitelist these processes if they are verified as non-threatening.
75+
- Frequent alerts from development or testing environments can be misleading. Consider excluding these environments from the rule or applying a different risk score.
76+
- User behavior anomalies, such as accessing multiple systems or applications, might trigger alerts. Implement user behavior baselines to differentiate between normal and suspicious activities.
77+
78+
### Response and remediation
79+
80+
- Isolate the affected host from the network immediately to prevent further lateral movement by the adversary.
81+
- Conduct a thorough forensic analysis of the host to identify the specific vulnerabilities exploited and gather evidence of the attack phases involved.
82+
- Remove any identified malicious software or unauthorized access tools from the host, ensuring all persistence mechanisms are eradicated.
83+
- Apply security patches and updates to the host to address any exploited vulnerabilities and prevent similar attacks.
84+
- Restore the host from a known good backup if necessary, ensuring that the backup is free from compromise.
85+
- Monitor the host and network for any signs of re-infection or further suspicious activity, using enhanced logging and alerting based on the identified attack patterns.
86+
- Escalate the incident to the appropriate internal or external cybersecurity teams for further investigation and potential legal action if the attack is part of a larger campaign."""
87+
88+

0 commit comments

Comments
 (0)