The Disable Task Manager rule detects an adversary attempting to prevent users from accessing the Task Manager, a common technique to hinder system monitoring and process management. SOC teams should proactively hunt for this behavior in Azure Sentinel as it may indicate an ongoing persistence or evasion tactic used by adversaries to maintain control over the system.
YARA Rule
rule disable_taskmanager {
meta:
author = "x0r"
description = "Disable Task Manager"
version = "0.1"
strings:
$p1 = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System" nocase
$r1 = "DisableTaskMgr"
condition:
1 of ($p*) and 1 of ($r*)
}
This YARA rule can be deployed in the following contexts:
This rule contains 2 string patterns in its detection logic.
Scenario: System Maintenance Task via Task Scheduler
Description: A legitimate scheduled task is configured to disable Task Manager as part of system maintenance or security hardening.
Filter/Exclusion: process.parent_process_name == "schtasks.exe" or process.name == "schtasks.exe"
Scenario: Group Policy Preference (GPP) Deployment
Description: An administrator uses Group Policy to disable Task Manager across the enterprise, which triggers the detection rule.
Filter/Exclusion: process.parent_process_name == "gpupdate.exe" or process.name == "gpupdate.exe"
Scenario: Security Software Configuration
Description: A security tool (e.g., Microsoft Defender, Bitdefender, or Kaspersky) disables Task Manager as part of its real-time protection or endpoint protection configuration.
Filter/Exclusion: process.name == "msseces.exe" or process.name == "bitdefender.exe" or process.name == "kavservice.exe"
Scenario: Administrative Script Execution
Description: A PowerShell or batch script, run by an admin, is used to disable Task Manager for compliance or security reasons.
Filter/Exclusion: process.name == "powershell.exe" with parent_process_name == "cmd.exe" or parent_process_name == "explorer.exe"
Scenario: Remote Desktop Services (RDS) Configuration
Description: In a remote desktop environment, Task Manager is disabled for end-user sessions to prevent unauthorized access.
Filter/Exclusion: process.name == "mstsc.exe" or process.name == "tsclient.exe" or process.parent_process_name == "tscon.exe"