Windows SafeBoot Registry Key Deletion via reg.exe Command-Line

Flags reg.exe deleting the \SYSTEM\CurrentControlSet\Control\SafeBoot registry key via command line.

FreeUnreviewedSigmahighv1
title: Windows SafeBoot Registry Key Deletion via reg.exe Command-Line
id: 8a0d069e-43f4-418c-87ff-c2a02a837852
related:
  - id: d7662ff6-9e97-4596-a61d-9839e32dee8d
    type: similar
  - id: fc0e89b5-adb0-43c1-b749-c12a10ec37de
    type: derived
status: test
description: This rule identifies process executions of reg.exe where the command line includes the delete operation targeting the SafeBoot registry path (\SYSTEM\CurrentControlSet\Control\SafeBoot). Attackers may use this behavior to interfere with SafeBoot protections and reduce the ability of security tools to execute or recover. The detection relies on Windows process creation telemetry, matching reg.exe execution and specific command-line substrings indicating deletion of the SafeBoot key.
references:
  - https://www.trendmicro.com/en_us/research/22/e/avoslocker-ransomware-variant-abuses-driver-file-to-disable-anti-Virus-scans-log4shell.html
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_reg_delete_safeboot.yml
author: Nasreddine Bencherchali (Nextron Systems), Tim Shelton, Huntrule Team
date: 2022-08-08
modified: 2023-02-04
tags:
  - attack.defense-impairment
  - attack.t1685
logsource:
  category: process_creation
  product: windows
detection:
  selection_img:
    - Image|endswith: reg.exe
    - OriginalFileName: reg.exe
  selection_delete:
    CommandLine|contains|all:
      - " delete "
      - \SYSTEM\CurrentControlSet\Control\SafeBoot
  condition: all of selection_*
falsepositives:
  - Unlikely
level: high
license: DRL-1.1

What it detects

This rule identifies process executions of reg.exe where the command line includes the delete operation targeting the SafeBoot registry path (\SYSTEM\CurrentControlSet\Control\SafeBoot). Attackers may use this behavior to interfere with SafeBoot protections and reduce the ability of security tools to execute or recover. The detection relies on Windows process creation telemetry, matching reg.exe execution and specific command-line substrings indicating deletion of the SafeBoot key.

Known false positives

  • Unlikely

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.