Skip to content

Commit ebcd05f

Browse files
w0rk3rDefSecSentinelshashank-elastic
authored
[Rule Tuning] Misc Windows Tunings (#5955)
Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com> Co-authored-by: shashank-elastic <91139415+shashank-elastic@users.noreply.github.com>
1 parent b805dbe commit ebcd05f

3 files changed

Lines changed: 73 additions & 14 deletions

rules/windows/command_and_control_common_webservices.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/11/04"
33
integration = ["endpoint", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2026/03/30"
5+
updated_date = "2026/04/21"
66

77
[transform]
88
[[transform.investigate]]
@@ -331,7 +331,9 @@ network where host.os.type == "windows" and
331331
"Island Technology Inc.",
332332
"GitHub, Inc.",
333333
"Red Hat, Inc",
334-
"Mozilla Corporation"
334+
"Mozilla Corporation",
335+
"Spotify AB",
336+
"DeepL SE"
335337
)
336338
)
337339
)

rules_building_block/credential_access_iis_apppoolsa_pwd_appcmd.toml renamed to rules/windows/credential_access_iis_apppoolsa_pwd_appcmd.toml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
[metadata]
2-
bypass_bbr_timing = true
32
creation_date = "2020/08/18"
4-
integration = ["endpoint", "windows", "system"]
3+
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
54
maturity = "production"
6-
updated_date = "2026/03/24"
5+
updated_date = "2026/04/21"
76

87
[rule]
98
author = ["Elastic"]
10-
building_block_type = "default"
119
description = """
12-
Identifies the Internet Information Services (IIS) command-line tool, AppCmd, being used to list passwords. An attacker
13-
with IIS web server access via a web shell can decrypt and dump the IIS AppPool service account password using AppCmd.
10+
Identifies the Internet Information Services (IIS) command-line tool, AppCmd, being used to dump sensitive configuration
11+
data such as application pool credentials. An attacker with IIS web server access via a web shell can extract service
12+
account passwords by requesting full configuration output or targeting credential-related fields.
1413
"""
1514
from = "now-9m"
1615
index = [
1716
"endgame-*",
17+
"logs-crowdstrike.fdr*",
1818
"logs-endpoint.events.process-*",
19+
"logs-m365_defender.event-*",
20+
"logs-sentinel_one_cloud_funnel.*",
1921
"logs-system.security*",
20-
"logs-windows.*",
22+
"logs-windows.forwarded*",
23+
"logs-windows.sysmon_operational-*",
2124
"winlogbeat-*",
2225
]
2326
language = "eql"
@@ -34,16 +37,23 @@ tags = [
3437
"Tactic: Credential Access",
3538
"Data Source: Elastic Endgame",
3639
"Data Source: Elastic Defend",
37-
"Rule Type: BBR",
3840
"Data Source: Windows Security Event Logs",
41+
"Data Source: Microsoft Defender XDR",
42+
"Data Source: Sysmon",
43+
"Data Source: SentinelOne",
44+
"Data Source: Crowdstrike",
3945
]
4046
timestamp_override = "event.ingested"
4147
type = "eql"
4248

4349
query = '''
4450
process where host.os.type == "windows" and event.type == "start" and
4551
(process.name : "appcmd.exe" or ?process.pe.original_file_name == "appcmd.exe") and
46-
process.args : "list" and process.args : "/text*"
52+
process.args : "list" and
53+
(
54+
process.args : ("/text:*password*", "/text:*processModel*", "/text:*userName*", "/config", "*connectionstring*") or
55+
process.args == "/text:*"
56+
)
4757
'''
4858

4959

rules/windows/defense_evasion_disabling_windows_defender_powershell.toml

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
creation_date = "2021/07/07"
33
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2026/04/07"
5+
updated_date = "2026/04/21"
66

77
[rule]
88
author = ["Elastic"]
9-
description = "Identifies use of the Set-MpPreference PowerShell command to disable or weaken certain Windows Defender settings."
9+
description = """
10+
Identifies use of the Set-MpPreference or Add-MpPreference PowerShell commands to disable or weaken certain Windows
11+
Defender settings, including detection of base64-encoded variants used to bypass command-line inspection.
12+
"""
1013
false_positives = ["Planned Windows Defender configuration changes."]
1114
from = "now-9m"
1215
index = [
@@ -64,6 +67,7 @@ references = [
6467
"https://docs.microsoft.com/en-us/powershell/module/defender/set-mppreference?view=windowsserver2019-ps",
6568
"https://www.elastic.co/security-labs/operation-bleeding-bear",
6669
"https://www.elastic.co/security-labs/invisible-miners-unveiling-ghostengine",
70+
"https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_powershell_defender_disable_feature.yml",
6771
]
6872
risk_score = 47
6973
rule_id = "c8cccb06-faf2-4cd5-886e-2c9636cfcb87"
@@ -92,7 +96,50 @@ process where host.os.type == "windows" and event.type == "start" and
9296
process.name : ("powershell.exe", "pwsh.exe", "powershell_ise.exe") or
9397
?process.pe.original_file_name in ("PowerShell.EXE", "pwsh.dll", "powershell_ise.EXE")
9498
) and
95-
process.args : "Set-MpPreference" and process.args : ("-Disable*", "Disabled", "NeverSend", "-Exclusion*")
99+
(
100+
(
101+
process.args : ("Set-MpPreference", "Add-MpPreference") and
102+
process.args : ("-Disable*", "Disabled", "NeverSend", "-Exclusion*")
103+
) or
104+
/* base64-encoded (UTF-16LE) fragments of critical Defender settings, 3 byte-alignment offsets each */
105+
(
106+
process.command_line : ("*-e *", "*-en *", "* -enc*", "*FromBase64String*") and
107+
process.command_line : (
108+
/* DisableRealtimeMonitoring */
109+
"*RABpAHMAYQBiAGwAZQBSAGUAYQBsAHQAaQBtAGUATQBvAG4AaQB0AG8AcgBpAG4AZwAgA*",
110+
"*QAaQBzAGEAYgBsAGUAUgBlAGEAbAB0AGkAbQBlAE0AbwBuAGkAdABvAHIAaQBuAGcAIA*",
111+
"*EAGkAcwBhAGIAbABlAFIAZQBhAGwAdABpAG0AZQBNAG8AbgBpAHQAbwByAGkAbgBnACAA*",
112+
/* disablerealtimemonitoring */
113+
"*ZABpAHMAYQBiAGwAZQByAGUAYQBsAHQAaQBtAGUAbQBvAG4AaQB0AG8AcgBpAG4AZwAgA*",
114+
"*QAaQBzAGEAYgBsAGUAcgBlAGEAbAB0AGkAbQBlAG0AbwBuAGkAdABvAHIAaQBuAGcAIA*",
115+
"*kAGkAcwBhAGIAbABlAHIAZQBhAGwAdABpAG0AZQBtAG8AbgBpAHQAbwByAGkAbgBnACAA*",
116+
/* DisableIOAVProtection */
117+
"*RABpAHMAYQBiAGwAZQBJAE8AQQBWAFAAcgBvAHQAZQBjAHQAaQBvAG4AIA*",
118+
"*QAaQBzAGEAYgBsAGUASQBPAEEAVgBQAHIAbwB0AGUAYwB0AGkAbwBuACAA*",
119+
"*EAGkAcwBhAGIAbABlAEkATwBBAFYAUAByAG8AdABlAGMAdABpAG8AbgAgA*",
120+
/* disableioavprotection */
121+
"*ZABpAHMAYQBiAGwAZQBpAG8AYQB2AHAAcgBvAHQAZQBjAHQAaQBvAG4AIA*",
122+
"*QAaQBzAGEAYgBsAGUAaQBvAGEAdgBwAHIAbwB0AGUAYwB0AGkAbwBuACAA*",
123+
"*kAGkAcwBhAGIAbABlAGkAbwBhAHYAcAByAG8AdABlAGMAdABpAG8AbgAgA*",
124+
/* DisableBehaviorMonitoring */
125+
"*RABpAHMAYQBiAGwAZQBCAGUAaABhAHYAaQBvAHIATQBvAG4AaQB0AG8AcgBpAG4AZwAgA*",
126+
"*QAaQBzAGEAYgBsAGUAQgBlAGgAYQB2AGkAbwByAE0AbwBuAGkAdABvAHIAaQBuAGcAIA*",
127+
"*EAGkAcwBhAGIAbABlAEIAZQBoAGEAdgBpAG8AcgBNAG8AbgBpAHQAbwByAGkAbgBnACAA*",
128+
/* disablebehaviormonitoring */
129+
"*ZABpAHMAYQBiAGwAZQBiAGUAaABhAHYAaQBvAHIAbQBvAG4AaQB0AG8AcgBpAG4AZwAgA*",
130+
"*QAaQBzAGEAYgBsAGUAYgBlAGgAYQB2AGkAbwByAG0AbwBuAGkAdABvAHIAaQBuAGcAIA*",
131+
"*kAGkAcwBhAGIAbABlAGIAZQBoAGEAdgBpAG8AcgBtAG8AbgBpAHQAbwByAGkAbgBnACAA*",
132+
/* DisableBlockAtFirstSeen */
133+
"*RABpAHMAYQBiAGwAZQBCAGwAbwBjAGsAQQB0AEYAaQByAHMAdABTAGUAZQBuACAA*",
134+
"*QAaQBzAGEAYgBsAGUAQgBsAG8AYwBrAEEAdABGAGkAcgBzAHQAUwBlAGUAbgAgA*",
135+
"*EAGkAcwBhAGIAbABlAEIAbABvAGMAawBBAHQARgBpAHIAcwB0AFMAZQBlAG4AIA*",
136+
/* disableblockatfirstseen */
137+
"*ZABpAHMAYQBiAGwAZQBiAGwAbwBjAGsAYQB0AGYAaQByAHMAdABzAGUAZQBuACAA*",
138+
"*QAaQBzAGEAYgBsAGUAYgBsAG8AYwBrAGEAdABmAGkAcgBzAHQAcwBlAGUAbgAgA*",
139+
"*kAGkAcwBhAGIAbABlAGIAbABvAGMAawBhAHQAZgBpAHIAcwB0AHMAZQBlAG4AIA*"
140+
)
141+
)
142+
)
96143
'''
97144

98145

0 commit comments

Comments
 (0)