The hypothesis is that an adversary may be attempting to disable the Registry editor to prevent forensic analysis or modify system settings. A SOC team should proactively hunt for this behavior in Azure Sentinel to identify potential tampering with system configurations and detect early signs of persistent or adversarial activity.
rule disable_registry {
meta:
author = "x0r"
description = "Disable Registry editor"
version = "0.1"
strings:
$p1 = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System" nocase
$c1 = "RegSetValue"
$r1 = "DisableRegistryTools"
$r2 = "DisableRegedit"
condition:
1 of ($p*) and $c1 and 1 of ($r*)
}
This YARA rule can be deployed in the following contexts:
This rule contains 4 string patterns in its detection logic.
Scenario: System Maintenance Task via Task Scheduler
Description: A legitimate system maintenance task scheduled via Task Scheduler may attempt to modify the registry to disable the Registry Editor as part of a security hardening process.
Filter/Exclusion: Check the TaskName field for known system maintenance tasks (e.g., Microsoft\Windows\TaskScheduler\TaskScheduler). Use a filter like:
TaskName contains "TaskScheduler"
Scenario: Group Policy Object (GPO) Deployment
Description: An administrator may deploy a Group Policy Object (GPO) that disables the Registry Editor to enforce security policies across the domain.
Filter/Exclusion: Check the Source or User field for GPO-related activity (e.g., GPO Name: Security Settings). Use a filter like:
Source contains "GroupPolicy"
Scenario: Administrative Tool Configuration
Description: A system administrator may use tools like Registry Editor or PowerShell to disable the Registry Editor as part of a configuration task.
Filter/Exclusion: Check the ProcessName field for known administrative tools (e.g., regedit.exe, powershell.exe). Use a filter like:
ProcessName contains "regedit.exe" or "powershell.exe"
Scenario: Scheduled Job for Security Compliance
Description: A scheduled job, such as one created by Microsoft Security Compliance Manager (SCM), may disable the Registry Editor to meet compliance standards.
Filter/Exclusion: Check the JobName or Command field for known compliance tools (e.g., SCM Compliance Job). Use a filter like:
JobName contains "SCM Compliance"