Skip to content
Merged
Changes from 16 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
2c6abc6
Update and rename rules_building_block/defense_evasion_masquerading_w…
Samirbous Jun 17, 2026
b2e2ec5
Update defense_evasion_masquerading_windows_dll.toml
Samirbous Jun 17, 2026
3cba5c2
Apply suggestion from @w0rk3r
w0rk3r Jun 17, 2026
799ef74
Update defense_evasion_masquerading_windows_dll.toml
Samirbous Jun 17, 2026
0b8c2e4
Update defense_evasion_masquerading_windows_dll.toml
Samirbous Jun 17, 2026
52f7c43
Merge branch 'main' into Samirbous-patch-4
Samirbous Jun 17, 2026
04c9c1c
Fix TOML parse error in masquerading Windows DLL rule note
Samirbous Jun 17, 2026
b9f16c8
Update command_and_control_dns_tunneling_nslookup.toml
Samirbous Jul 3, 2026
bffddbf
Update command_and_control_dns_tunneling_nslookup.toml
Samirbous Jul 3, 2026
34e3605
Create exfiltration_dns_excessive_chunked_queries.toml
Samirbous Jul 3, 2026
c1f1731
Merge branch 'Samirbous-patch-4' of https://github.com/elastic/detect…
Samirbous Jul 3, 2026
18f2c93
[New] Potential Evasion via Boot Time Removal Tool
Samirbous Aug 21, 2026
55f990e
Delete rules/windows/exfiltration_dns_excessive_chunked_queries.toml
Samirbous Aug 21, 2026
8698d48
Update command_and_control_dns_tunneling_nslookup.toml
Samirbous Aug 21, 2026
77e454a
Update command_and_control_dns_tunneling_nslookup.toml
Samirbous Aug 21, 2026
c50e228
Update defense_evasion_boot_time_removal_tool.toml
Samirbous Aug 21, 2026
464821f
Update rules/windows/defense_evasion_boot_time_removal_tool.toml
Samirbous Aug 26, 2026
d7a75ca
Merge branch 'main' into BRT
Samirbous Aug 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
211 changes: 211 additions & 0 deletions rules/windows/defense_evasion_boot_time_removal_tool.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
[metadata]
creation_date = "2026/08/21"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/08/21"

[rule]
author = ["Elastic"]
description = """
Identifies creation of a `:changelist` NTFS alternate data stream or a Windows service Args registry value pointing to
a `:changelist` path. Microsoft Defender's Boot-Time Removal (BTR.sys) driver reads an RC4-encrypted transaction blob
from a driver ADS named `:changelist`, referenced by HKLM\\SYSTEM\\*ControlSet*\\Services\\*\\Args. Adversaries can
reproduce this staging outside Defender to abuse BTR.sys as a signed kernel primitive for arbitrary file and registry
operations. This rule focuses on non-System writers and excludes Microsoft-signed MRT.exe running as SYSTEM, which may
perform related remediation staging.
Comment thread
Samirbous marked this conversation as resolved.
Outdated
"""
from = "now-9m"
language = "esql"
license = "Elastic License v2"
name = "Potential Evasion via Boot Time Removal Tool"
note = """## Triage and analysis

### Investigating Potential Evasion via Boot Time Removal Tool

Windows Defender's Boot-Time Removal driver (`BTR.sys`) is instructed via an encrypted configuration stored in an
Alternate Data Stream named `:changelist` on a `.sys` image. The service `Args` value under
`HKLM\\SYSTEM\\*ControlSet*\\Services\\<name>\\Args` points at that ADS path. Check Point Research (BTR Reforged)
showed that the same staging can be performed by non-Defender tooling (for example BTR_CLI) to drive Ring-0 file and
registry actions, including neutralization of security products during early boot.

#### Possible investigation steps

- Identify whether the alert is a file ADS creation or a service `Args` registry write using `event.category`,
`file.name` / `file.path`, and `registry.path` / `registry.data.strings`.
- Review `process.executable`, `process.name`, `process.pid`, `process.parent.executable`, and `user.id` to determine
whether a Defender component, MRT, or an unexpected user-mode binary staged the `:changelist` artifact.
- For file events, inspect the base `.sys` path (strip `:changelist`), size, hash, and code signature. Confirm whether
the driver was recently dropped under a user-writable path (Downloads, Temp, Desktop) versus a Defender-managed path.
- For registry events, note the service key name under `Services\\*` and check sibling values (`ImagePath`, `Type`,
`Group`). Abuse tooling often sets `Group` to `Boot Bus Extender` and may create the service via direct registry
writes / `NtLoadDriver` without a corresponding SCM service-install event (7045).
- Hunt on the same `host.id` for related activity: creation of `*.sys:*.dat` feedback ADS, load of a Microsoft-signed
driver matching BTR, creation/deletion of `\\\\SystemRoot\\\\Temp\\\\BootClean.log` by PID 4, and deletions of security
binaries attributed to System.
- Correlate with other alerts for the same `user.id` and `host.id` in the prior 48 hours for privilege escalation,
driver load, or Defender tampering.

### False positive analysis

- Legitimate Defender or MRT reboot remediation may create `:changelist` ADS and related service Args values. This rule
excludes PID 4 and Microsoft-signed `MRT.exe` as SYSTEM; unsigned or differently signed `MRT.exe` still alerts. Rare
Defender paths (for example `MsMpEng.exe`) may still match and should be validated before exceptioning.
- Security research labs intentionally exercising BTR_CLI or similar PoCs will generate true-positive-looking events;
confirm host cohort and change windows.

### Response and remediation

- If activity is unexplained: isolate the host, preserve the `.sys` file and `:changelist` stream, export the service
registry key, and capture the staging process tree before cleanup.
- Search the estate for the same `file.name` / ADS pattern, service `Args` values containing `:changelist`, and related
driver hashes.
- Remove unauthorized service keys and staged drivers, restore any deleted security components from known-good media,
and rotate credentials for accounts that held `SeLoadDriverPrivilege` on the host.
- Restrict and monitor assignment/use of `SeLoadDriverPrivilege`; treat signed remediation drivers as LOLDrivers that
require lineage and ADS context monitoring, not signature blocking alone.
"""

setup = """## Setup

This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.

Setup instructions: https://ela.st/install-elastic-defend
"""

references = [
"https://research.checkpoint.com/2026/btr-reforged-weaponizing-defenders-remediation-driver-as-a-kernel-operation-primitive/",
"https://github.com/Dump-GUY/BTR_CLI",
]
risk_score = 73
rule_id = "942c8f59-f01c-4dc0-a05f-2f5bba836ad8"
severity = "high"
tags = [
"Domain: Endpoint",
"OS: Windows",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"OS: Windows",
"OS: Windows",
"Platform: Windows",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@terrancedejesus why do we need to tags that say same thing?

"Use Case: Threat Detection",
"Tactic: Defense Evasion",
"Tactic: Persistence",
"Resources: Investigation Guide",
"Data Source: Elastic Defend",
]
timestamp_override = "event.ingested"
type = "esql"

query = '''
from logs-endpoint.events.file-*, logs-endpoint.events.registry-* metadata _id, _version, _index
| where host.os.type == "windows"
and process.pid != 4
and not (
user.id == "S-1-5-18"
and to_lower(process.executable) like """?:\\windows\\system32\\mrt.exe"""
and process.code_signature.subject_name in ("Microsoft Windows", "Microsoft Corporation")
and process.code_signature.trusted == true
Comment thread
Samirbous marked this conversation as resolved.
)
and (
(
event.category == "file"
and event.type == "creation"
and ends_with(to_lower(file.name), ":changelist")
Comment thread
Samirbous marked this conversation as resolved.
)
or (
event.category == "registry"
and event.type == "change"
and to_lower(registry.path) like """*\\system\\*controlset*\\services\\*\\args"""
and to_lower(registry.data.strings) like "*:changelist"
)
)
| keep
@timestamp,
host.id,
host.name,
user.id,
user.name,
process.pid,
process.name,
process.executable,
process.code_signature.subject_name,
event.category,
event.type,
file.path,
file.name,
file.size,
registry.path,
registry.value,
registry.data.strings,
data_stream.namespace,
_id,
_version,
_index
| limit 100
'''

[rule.investigation_fields]
field_names = [
"@timestamp",
"host.id",
"host.name",
"user.id",
"user.name",
"process.pid",
"process.name",
"process.executable",
"process.code_signature.subject_name",
"event.category",
"file.path",
"file.name",
"file.size",
"registry.path",
"registry.value",
"registry.data.strings",
]

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1564"
name = "Hide Artifacts"
reference = "https://attack.mitre.org/techniques/T1564/"

[[rule.threat.technique.subtechnique]]
id = "T1564.004"
name = "NTFS File Attributes"
reference = "https://attack.mitre.org/techniques/T1564/004/"

[[rule.threat.technique]]
id = "T1112"
name = "Modify Registry"
reference = "https://attack.mitre.org/techniques/T1112/"

[[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/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1543"
name = "Create or Modify System Process"
reference = "https://attack.mitre.org/techniques/T1543/"

[[rule.threat.technique.subtechnique]]
id = "T1543.003"
name = "Windows Service"
reference = "https://attack.mitre.org/techniques/T1543/003/"

[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
Loading