Skip to content

[New] Potential Evasion via Boot Time Removal Tool - #6690

Merged
Samirbous merged 18 commits into
mainfrom
BRT
Aug 26, 2026
Merged

[New] Potential Evasion via Boot Time Removal Tool#6690
Samirbous merged 18 commits into
mainfrom
BRT

Conversation

@Samirbous

Copy link
Copy Markdown
Contributor

Identify abuse of BTR driver (microsoft driver) to tamper with system objects from kernel mode such as locked file deletion. Normal process that drops changelist ADS or modify Args registry is the MRT.exe (malware removal tool). This rule fies on other than MRT.

image

Samirbous and others added 12 commits June 17, 2026 15:03
…indows_dll.toml to rules/windows/defense_evasion_masquerading_windows_dll.toml
Escape backslashes in Windows paths within the investigation guide so pytoml can load the rule file.

Co-authored-by: Cursor <cursoragent@cursor.com>
Identify abuse of BTR driver (microsoft driver) to tamper with system objects from kernel mode such as locked file deletion. Normal process that drops changelist ADS or modify Args registry is the MRT.exe (malware removal tool). This rule fies on other than MRT.
@Samirbous Samirbous self-assigned this Aug 21, 2026
Copilot AI lite review requested due to automatic review settings August 21, 2026 22:46
@Samirbous Samirbous added Rule: New Proposal for new rule OS: Windows windows related rules labels Aug 21, 2026
@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 21, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ Potential DNS Tunneling via NsLookup (eql)
    • stack_validation_failed: no_alerts - 0 alerts
  • ❌ Potential DNS Exfiltration via Excessive Chunked Queries (esql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta
  • ❌ Potential Evasion via Boot Time Removal Tool (esql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 21, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ Potential DNS Tunneling via NsLookup (eql)
    • stack_validation_failed: no_alerts - 0 alerts
  • ❌ Potential Evasion via Boot Time Removal Tool (esql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 21, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ Potential Evasion via Boot Time Removal Tool (esql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 21, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ Potential Evasion via Boot Time Removal Tool (esql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

Copilot AI left a comment

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.

Pull request overview

Adds a Windows detection for potential BTR.sys abuse involving ADS and service registry modifications, alongside unrelated DNS detection updates.

Changes:

  • Added BTR abuse detection and investigation guidance.
  • Added DNS exfiltration detection.
  • Extended the NsLookup DNS tunneling rule for CrowdStrike data.

Reviewed changes

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

File Review findings
rules/windows/defense_evasion_boot_time_removal_tool.toml Moderate issues: use file.path for ADS detection and require a trusted Microsoft signature for MRT suppression.
rules/windows/exfiltration_dns_excessive_chunked_queries.toml Unrelated scope, incorrect dates, and duplicate Esql.base_domain selection.
rules/windows/command_and_control_dns_tunneling_nslookup.toml Unrelated scope and stale updated_date.
Suppressed comments (3)

rules/windows/defense_evasion_boot_time_removal_tool.toml:102

  • The MRT exclusion is not null-safe: for an unsigned MRT event, process.code_signature.subject_name is null, so the inner AND and its NOT evaluate to null and the ES|QL WHERE drops the event. This contradicts the guide's claim that unsigned MRT still alerts; coalesce missing signature fields and require process.code_signature.trusted == true before excluding Microsoft-signed MRT.
  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")
  )

rules/windows/defense_evasion_boot_time_removal_tool.toml:113

  • ES|QL LIKE is case-sensitive, but registry.data.strings is not normalized here. Because Windows stream names are case-insensitive, an Args value containing :ChangeList (or another casing) bypasses this predicate; normalize the field before matching.
      and to_lower(registry.data.strings) like "*:changelist"

rules/windows/defense_evasion_boot_time_removal_tool.toml:101

  • The MRT exclusion trusts only the path and signer subject, so a Microsoft-signed executable with a different original name can be copied or renamed to System32\MRT.exe and have its BTR staging suppressed. Require the PE original filename and a verified trusted signature in addition to the existing subject check so only the real MRT binary is excluded.
    and to_lower(process.executable) like """?:\\windows\\system32\\mrt.exe"""
    and process.code_signature.subject_name in ("Microsoft Windows", "Microsoft Corporation")

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread rules/windows/defense_evasion_boot_time_removal_tool.toml
Comment thread rules/windows/defense_evasion_boot_time_removal_tool.toml Outdated
@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 21, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ Potential Evasion via Boot Time Removal Tool (esql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@bryans3c bryans3c left a comment

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.

Some nits, LGTM!

Comment thread rules/windows/defense_evasion_boot_time_removal_tool.toml
Comment thread rules/windows/defense_evasion_boot_time_removal_tool.toml Outdated
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?

@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 26, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ Potential Evasion via Boot Time Removal Tool (esql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 26, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ Potential Evasion via Boot Time Removal Tool (esql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@Samirbous
Samirbous merged commit 1528aa5 into main Aug 26, 2026
15 of 18 checks passed
@Samirbous
Samirbous deleted the BRT branch August 26, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport: auto Domain: Endpoint OS: Windows windows related rules Rule: New Proposal for new rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants