Skip to content

Commit ceb9e47

Browse files
w0rk3rgithub-actions[bot]
authored andcommitted
[Rule Tuning] Add Initial Microsoft Defender for Endpoint Compatibility to Windows DRs (#3825)
* [Rule Tuning] Add Initial Microsoft Defender for Endpoint Compatibility to Windows DRs * . * Update integration-schemas.json.gz * Fix integration manifests Removed changes from: - rules/windows/collection_email_powershell_exchange_mailbox.toml - rules/windows/command_and_control_rdp_tunnel_plink.toml - rules/windows/command_and_control_screenconnect_childproc.toml - rules/windows/credential_access_domain_backup_dpapi_private_keys.toml - rules/windows/credential_access_kirbi_file.toml - rules/windows/defense_evasion_amsi_bypass_dllhijack.toml - rules/windows/defense_evasion_persistence_account_tokenfilterpolicy.toml - rules/windows/defense_evasion_suspicious_zoom_child_process.toml - rules/windows/execution_command_shell_started_by_unusual_process.toml - rules/windows/initial_access_suspicious_ms_outlook_child_process.toml - rules/windows/persistence_adobe_hijack_persistence.toml - rules/windows/persistence_appcertdlls_registry.toml - rules/windows/persistence_system_shells_via_services.toml (selectively cherry picked from commit 54d5b44)
1 parent aac9da6 commit ceb9e47

11 files changed

+34
-25
lines changed
498 Bytes
Binary file not shown.
Binary file not shown.

detection_rules/schemas/definitions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
'system',
4242
'windows',
4343
'sentinel_one_cloud_funnel',
44-
'ti_rapid7_threat_command']
44+
'ti_rapid7_threat_command',
45+
'm365_defender']
4546
NON_PUBLIC_FIELDS = {
4647
"related_integrations": (Version.parse('8.3.0'), None),
4748
"required_fields": (Version.parse('8.3.0'), None),

rules/windows/credential_access_lsass_openprocess_api.toml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2023/03/02"
3-
integration = ["endpoint"]
3+
integration = ["endpoint", "m365_defender"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/06/25"
66

77
[transform]
88
[[transform.osquery]]
@@ -34,7 +34,7 @@ authenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.resu
3434
author = ["Elastic"]
3535
description = "Identifies access attempts to the LSASS handle, which may indicate an attempt to dump credentials from LSASS memory.\n"
3636
from = "now-9m"
37-
index = ["logs-endpoint.events.api-*"]
37+
index = ["logs-endpoint.events.api-*", "logs-m365_defender.event-*"]
3838
language = "eql"
3939
license = "Elastic License v2"
4040
name = "LSASS Process Access via Windows API"
@@ -112,16 +112,15 @@ tags = [
112112
"Tactic: Credential Access",
113113
"Tactic: Execution",
114114
"Data Source: Elastic Defend",
115+
"Data Source: Microsoft Defender for Endpoint"
115116
]
116117
timestamp_override = "event.ingested"
117118
type = "eql"
118119

119120
query = '''
120121
api where host.os.type == "windows" and
121122
process.Ext.api.name in ("OpenProcess", "OpenThread") and Target.process.name : "lsass.exe" and
122-
not
123-
(
124-
process.executable : (
123+
not process.executable : (
125124
"?:\\ProgramData\\GetSupportService*\\Updates\\Update_*.exe",
126125
"?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe",
127126
"?:\\Program Files (x86)\\Asiainfo Security\\OfficeScan Client\\NTRTScan.exe",
@@ -158,7 +157,6 @@ api where host.os.type == "windows" and
158157
"?:\\Windows\\System32\\RtkAudUService64.exe",
159158
"?:\\Windows\\System32\\wbem\\WmiPrvSE.exe",
160159
"?:\\Windows\\SysWOW64\\wbem\\WmiPrvSE.exe"
161-
) and process.code_signature.trusted == true
162160
)
163161
'''
164162

rules/windows/defense_evasion_file_creation_mult_extension.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2021/01/19"
3-
integration = ["endpoint", "windows"]
3+
integration = ["endpoint", "windows", "m365_defender"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/06/25"
66

77
[rule]
88
author = ["Elastic"]
@@ -12,7 +12,7 @@ when the name or location of a file is manipulated as a means of tricking a user
1212
benign file type but is actually executable code.
1313
"""
1414
from = "now-9m"
15-
index = ["winlogbeat-*", "logs-endpoint.events.file-*", "logs-windows.sysmon_operational-*", "endgame-*"]
15+
index = ["winlogbeat-*", "logs-endpoint.events.file-*", "logs-windows.sysmon_operational-*", "endgame-*", "logs-m365_defender.event-*"]
1616
language = "eql"
1717
license = "Elastic License v2"
1818
name = "Executable File Creation with Multiple Extensions"
@@ -35,6 +35,7 @@ tags = [
3535
"Data Source: Elastic Endgame",
3636
"Data Source: Elastic Defend",
3737
"Data Source: Sysmon",
38+
"Data Source: Microsoft Defender for Endpoint"
3839
]
3940
timestamp_override = "event.ingested"
4041
type = "eql"
@@ -43,8 +44,7 @@ query = '''
4344
file where host.os.type == "windows" and event.type == "creation" and file.extension : "exe" and
4445
file.name regex~ """.*\.(vbs|vbe|bat|js|cmd|wsh|ps1|pdf|docx?|xlsx?|pptx?|txt|rtf|gif|jpg|png|bmp|hta|txt|img|iso)\.exe""" and
4546
not (process.executable : ("?:\\Windows\\System32\\msiexec.exe", "C:\\Users\\*\\QGIS_SCCM\\Files\\QGIS-OSGeo4W-*-Setup-x86_64.exe") and
46-
file.path : "?:\\Program Files\\QGIS *\\apps\\grass\\*.exe") and
47-
not process.executable : ("/bin/sh", "/usr/sbin/MailScanner", "/usr/bin/perl")
47+
file.path : "?:\\Program Files\\QGIS *\\apps\\grass\\*.exe")
4848
'''
4949

5050

rules/windows/defense_evasion_masquerading_trusted_directory.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2020/11/18"
3-
integration = ["endpoint", "windows"]
3+
integration = ["endpoint", "windows", "m365_defender"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/06/25"
66

77
[rule]
88
author = ["Elastic"]
@@ -18,6 +18,7 @@ index = [
1818
"logs-windows.*",
1919
"endgame-*",
2020
"logs-system.security*",
21+
"logs-m365_defender.event-*"
2122
]
2223
language = "eql"
2324
license = "Elastic License v2"
@@ -40,6 +41,7 @@ tags = [
4041
"Tactic: Defense Evasion",
4142
"Data Source: Elastic Endgame",
4243
"Data Source: Elastic Defend",
44+
"Data Source: Microsoft Defender for Endpoint"
4345
]
4446
timestamp_override = "event.ingested"
4547
type = "eql"

rules/windows/defense_evasion_via_filter_manager.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2020/02/18"
3-
integration = ["endpoint", "windows"]
3+
integration = ["endpoint", "windows", "m365_defender"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/06/25"
66

77
[transform]
88
[[transform.osquery]]
@@ -43,6 +43,7 @@ index = [
4343
"logs-windows.*",
4444
"endgame-*",
4545
"logs-system.security*",
46+
"logs-m365_defender.event-*"
4647
]
4748
language = "eql"
4849
license = "Elastic License v2"
@@ -110,6 +111,7 @@ tags = [
110111
"Data Source: Elastic Endgame",
111112
"Resources: Investigation Guide",
112113
"Data Source: Elastic Defend",
114+
"Data Source: Microsoft Defender for Endpoint"
113115
]
114116
timestamp_override = "event.ingested"
115117
type = "eql"

rules/windows/discovery_whoami_command_activity.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2020/02/18"
3-
integration = ["endpoint", "system", "windows"]
3+
integration = ["endpoint", "system", "windows", "m365_defender"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/06/25"
66

77
[rule]
88
author = ["Elastic"]
@@ -17,7 +17,7 @@ false_positives = [
1717
""",
1818
]
1919
from = "now-9m"
20-
index = ["winlogbeat-*", "logs-endpoint.events.process-*", "logs-windows.*", "logs-system.*", "endgame-*"]
20+
index = ["winlogbeat-*", "logs-endpoint.events.process-*", "logs-windows.*", "logs-system.*", "endgame-*", "logs-m365_defender.event-*"]
2121
language = "eql"
2222
license = "Elastic License v2"
2323
name = "Whoami Process Activity"
@@ -72,6 +72,7 @@ tags = [
7272
"Resources: Investigation Guide",
7373
"Data Source: Elastic Endgame",
7474
"Data Source: Elastic Defend",
75+
"Data Source: Microsoft Defender for Endpoint"
7576
]
7677
timestamp_override = "event.ingested"
7778
type = "eql"

rules/windows/initial_access_exploit_jetbrains_teamcity.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2024/03/24"
3-
integration = ["endpoint", "windows", "system"]
3+
integration = ["endpoint", "windows", "system", "m365_defender"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/06/25"
66

77
[rule]
88
author = ["Elastic"]
@@ -23,6 +23,7 @@ index = [
2323
"logs-windows.*",
2424
"endgame-*",
2525
"logs-system.security*",
26+
"logs-m365_defender.event-*"
2627
]
2728
language = "eql"
2829
license = "Elastic License v2"
@@ -41,6 +42,7 @@ tags = [
4142
"Data Source: Elastic Endgame",
4243
"Use Case: Vulnerability",
4344
"Data Source: Elastic Defend",
45+
"Data Source: Microsoft Defender for Endpoint"
4446
]
4547
timestamp_override = "event.ingested"
4648
type = "eql"

rules/windows/privilege_escalation_uac_bypass_event_viewer.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2020/03/17"
3-
integration = ["endpoint", "windows", "system"]
3+
integration = ["endpoint", "windows", "system", "m365_defender"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/06/25"
66

77
[transform]
88
[[transform.osquery]]
@@ -43,6 +43,7 @@ index = [
4343
"logs-windows.*",
4444
"endgame-*",
4545
"logs-system.security*",
46+
"logs-m365_defender.event-*"
4647
]
4748
language = "eql"
4849
license = "Elastic License v2"
@@ -121,6 +122,7 @@ tags = [
121122
"Resources: Investigation Guide",
122123
"Data Source: Elastic Endgame",
123124
"Data Source: Elastic Defend",
125+
"Data Source: Microsoft Defender for Endpoint"
124126
]
125127
timestamp_override = "event.ingested"
126128
type = "eql"

tests/test_all_rules.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,8 @@ def test_required_tags(self):
311311
'logs-windows.sysmon_operational-*': {'all': ['Data Source: Sysmon']},
312312
'logs-windows.powershell*': {'all': ['Data Source: PowerShell Logs']},
313313
'logs-sentinel_one_cloud_funnel.*': {'all': ['Data Source: SentinelOne']},
314-
'logs-fim.event-*': {'all': ['Data Source: File Integrity Monitoring']}
314+
'logs-fim.event-*': {'all': ['Data Source: File Integrity Monitoring']},
315+
'logs-m365_defender.event-*': {'all': ['Data Source: Microsoft Defender for Endpoint']}
315316
}
316317

317318
for rule in self.all_rules:

0 commit comments

Comments
 (0)