Detectionhighexperimental

Windows Defender Context Menu Removed

Detects the use of reg.exe or PowerShell to delete the Windows Defender context menu handler registry keys. This action removes the "Scan with Microsoft Defender" option from the right-click menu for files, directories, and drives. Attackers may use this technique to hinder manual, on-demand scans and reduce the visibility of the security product.

Open in Detection LabConvert ruleBuild Package
Matt Anderson (Huntress)Created 2025-07-09b9e8c7d6-a5f4-4e3d-8b1a-9f0c8d7e6a5bwindows
Log Source
WindowsProcess Creation
ProductWindows← raw: windows
CategoryProcess Creation← raw: process_creation

Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.

Detection Logic
Detection Logic3 selectors
detection:
    selection_img:
        - Image|endswith:
              - '\powershell_ise.exe'
              - '\powershell.exe'
              - '\pwsh.exe'
              - '\reg.exe'
        - OriginalFileName:
              - 'powershell_ise.EXE'
              - 'PowerShell.EXE'
              - 'pwsh.dll'
              - 'reg.exe'
    selection_action:
        CommandLine|contains:
            - 'del'
            - 'Remove-Item'
            - 'ri '
    selection_reg_path:
        CommandLine|contains: '\shellex\ContextMenuHandlers\EPP'
    condition: all of selection_*
False Positives

May be part of a system customization or "debloating" script, but this is highly unusual in a managed corporate environment.

Rule Metadata
Rule ID
b9e8c7d6-a5f4-4e3d-8b1a-9f0c8d7e6a5b
Status
experimental
Level
high
Type
Detection
Created
2025-07-09
Path
rules/windows/process_creation/proc_creation_win_defender_remove_context_menu.yml
Raw Tags
attack.defense-impairmentattack.t1685
View on GitHub