T1553.006 Elastic Security · Elastic

Detect Code Signing Policy Modification in Elastic Security

Adversaries may modify code signing policies to enable execution of unsigned or self-signed code. On Windows, this includes enabling TESTSIGNING boot mode via bcdedit.exe, disabling Driver Signature Enforcement (DSE) by modifying the g_CiOptions kernel variable (typically via a BYOVD exploit), or changing registry keys that control signed DLL enforcement such as RequireSignedAppInit_DLLs. On macOS, adversaries disable System Integrity Protection (SIP) using csrutil disable from Recovery Mode. Threat actors including APT39, BlackEnergy, Hikit, Pandora, and Turla have used these techniques to load unsigned rootkit drivers and persist with kernel-level access.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1553 Subvert Trust Controls
Sub-technique
T1553.006 Code Signing Policy Modification
Canonical reference
https://attack.mitre.org/techniques/T1553/006/

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by host.name with maxspan=5m
  [process where event.type == "start"
   and process.name : "bcdedit.exe"
   and process.args : ("testsigning", "nointegritychecks", "bootdebug", "loadoptions", "safeboot")]
or
[registry where event.type in ("creation", "change")
   and registry.path : (
     "*\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Windows\\RequireSignedAppInit_DLLs",
     "*\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Windows\\LoadAppInit_DLLs",
     "*\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\\EnableVirtualizationBasedSecurity",
     "*\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\\HypervisorEnforcedCodeIntegrity",
     "*\\SYSTEM\\CurrentControlSet\\Control\\DeviceGuard\\RequirePlatformSecurityFeatures",
     "*\\SYSTEM\\CurrentControlSet\\Control\\CI\\*",
     "*\\SYSTEM\\CurrentControlSet\\Control\\CodeIntegrity\\*"
   )
   and registry.data.strings : ("0", "0x00000000", "00000000")]
| where process.name : "bcdedit.exe" or registry.path != null
critical severity high confidence

Detects T1553.006 Code Signing Policy Modification via two patterns: (1) bcdedit.exe invoked with arguments that enable test signing mode or disable integrity checks (nointegritychecks, testsigning on, bootdebug), and (2) registry modifications that disable code integrity enforcement values such as RequireSignedAppInit_DLLs, HypervisorEnforcedCodeIntegrity, EnableVirtualizationBasedSecurity, or changes to the CI/CodeIntegrity control keys. These are indicators of BYOVD attack staging, rootkit driver loading, or persistent kernel-level code execution.

Data Sources

Elastic Endpoint SecurityWindows Sysmon via Elastic AgentElastic Defend

Required Tables

logs-endpoint.events.process-*logs-endpoint.events.registry-*logs-windows.sysmon_operational-*

False Positives & Tuning

  • Kernel developers or driver signing lab environments legitimately enabling TESTSIGNING mode on dedicated test machines during driver development and certification workflows
  • Enterprise device management or imaging tools (e.g., MDT, SCCM task sequences) that temporarily disable integrity checks during OS provisioning or bare-metal deployment
  • Security product installers (e.g., endpoint detection agents, hypervisor-based security tools) that modify DeviceGuard registry keys as part of a supported installation procedure
Download portable Sigma rule (.yml)

Other platforms for T1553.006


Testing Methodology

Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Enable TESTSIGNING Boot Mode via bcdedit

    Expected signal: Sysmon Event ID 1: Process Create with Image=C:\Windows\System32\bcdedit.exe, CommandLine='bcdedit /set testsigning on'. Security Event ID 4688 (with process command line auditing enabled) with same details. Note: no additional event is generated when TESTSIGNING takes effect at next reboot — the bcdedit process event is the only log entry.

  2. Test 2Disable Driver Signature Enforcement via nointegritychecks

    Expected signal: Sysmon Event ID 1: Process Create with Image=bcdedit.exe and CommandLine containing 'nointegritychecks on'. Security Event ID 4688 if process command line auditing is enabled. Microsoft-Windows-Kernel-Boot/Operational Event ID 16 will show the changed boot configuration at next boot cycle.

  3. Test 3Disable RequireSignedAppInit_DLLs via Registry

    Expected signal: Sysmon Event ID 13: Registry Value Set with TargetObject='HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\RequireSignedAppInit_DLLs', Details='DWORD (0x00000000)'. Sysmon Event ID 1: Process Create for reg.exe with full command line. Security Event ID 4657 if object access auditing is configured for registry keys.

  4. Test 4Disable Hypervisor-Protected Code Integrity (HVCI) via Registry

    Expected signal: Sysmon Event ID 13: Registry Value Set with TargetObject containing 'DeviceGuard\HypervisorEnforcedCodeIntegrity', Details='DWORD (0x00000000)'. Sysmon Event ID 1 for reg.exe process. Security Event ID 4657 (if object access auditing enabled). At next reboot: Windows Event Log Microsoft-Windows-DeviceGuard/Operational will show HVCI enforcement status change.

  5. Test 5macOS System Integrity Protection Status Check and Disable Simulation

    Expected signal: macOS Unified Log (ULS): process execution of csrutil with 'disable' argument. EDR telemetry (if macOS endpoint agent deployed): process creation event for /usr/bin/csrutil with arguments 'disable'. The command will fail with 'csrutil: failed to modify system integrity configuration. This tool needs to be executed from Recovery OS.' which itself is a detectable signal.

Unlock Pro Content

Get the full detection package for T1553.006 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections