Detect Code Signing Policy Modification in Google Chronicle
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/
YARA-L Detection Query
rule t1553_006_code_signing_policy_modification {
meta:
author = "Argus Detection Engineering"
description = "Detects T1553.006 Code Signing Policy Modification — bcdedit enabling test signing or disabling integrity checks, and registry modifications disabling HVCI, RequireSignedAppInit_DLLs, EnableVirtualizationBasedSecurity, or CI control keys. Used by APT39, BlackEnergy, Turla, and Pandora for BYOVD rootkit staging."
mitre_attack_tactic = "Defense Evasion"
mitre_attack_technique = "T1553.006"
severity = "CRITICAL"
priority = "HIGH"
version = "1.0"
created = "2026-04-13"
events:
(
// Branch 1: bcdedit test signing or integrity check bypass
$e1.metadata.event_type = "PROCESS_LAUNCH"
and re.regex($e1.target.process.file.full_path, `(?i)\\bcdedit\.exe$`)
and (
re.regex($e1.target.process.command_line, `(?i)testsigning`) or
re.regex($e1.target.process.command_line, `(?i)nointegritychecks`) or
re.regex($e1.target.process.command_line, `(?i)bootdebug`) or
re.regex($e1.target.process.command_line, `(?i)loadoptions.*safeboot`)
)
)
or
(
// Branch 2: Registry modifications disabling code integrity controls
$e1.metadata.event_type = "REGISTRY_MODIFICATION"
and (
re.regex($e1.target.registry.registry_key, `(?i)\\Windows\\RequireSignedAppInit_DLLs`) or
re.regex($e1.target.registry.registry_key, `(?i)\\Windows\\LoadAppInit_DLLs`) or
re.regex($e1.target.registry.registry_key, `(?i)DeviceGuard\\EnableVirtualizationBasedSecurity`) or
re.regex($e1.target.registry.registry_key, `(?i)DeviceGuard\\HypervisorEnforcedCodeIntegrity`) or
re.regex($e1.target.registry.registry_key, `(?i)DeviceGuard\\RequirePlatformSecurityFeatures`) or
re.regex($e1.target.registry.registry_key, `(?i)\\Control\\CI\\`) or
re.regex($e1.target.registry.registry_key, `(?i)\\Control\\CodeIntegrity`)
)
and (
$e1.target.registry.registry_value_data = "0" or
re.regex($e1.target.registry.registry_value_data, `(?i)0x0+$`)
)
)
condition:
$e1
} Chronicle YARA-L 2.0 rule detecting T1553.006 Code Signing Policy Modification using UDM event model. Branch 1 matches PROCESS_LAUNCH events where bcdedit.exe is invoked with arguments enabling test signing mode or disabling boot-time integrity checks. Branch 2 matches REGISTRY_MODIFICATION events where code integrity enforcement registry values under DeviceGuard, Windows AppInit, or CI/CodeIntegrity control keys are set to zero (disabled). Covers APT39, BlackEnergy, Turla, Hikit, and Pandora TTPs for BYOVD driver loading.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate kernel driver developers on approved engineering workstations enabling TESTSIGNING as part of a signed, supervised internal development workflow
- IT automation scripts (Ansible, Puppet, Chef) managing DeviceGuard registry baseline configuration as part of gold image build pipelines — may write zero values before re-enabling via policy
- Microsoft Defender Credential Guard setup and teardown procedures that temporarily modify EnableVirtualizationBasedSecurity or HypervisorEnforcedCodeIntegrity registry values
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.
- 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.
- 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.
- 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.
- 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.
- 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.
References (13)
- https://attack.mitre.org/techniques/T1553/006/
- https://docs.microsoft.com/en-us/windows-hardware/drivers/install/the-testsigning-boot-configuration-option
- https://docs.microsoft.com/en-us/windows-hardware/drivers/install/installing-an-unsigned-driver-during-development-and-test
- https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection
- https://blog-assets.f-secure.com/wp-content/uploads/2019/10/15163408/BlackEnergy_Quedagh.pdf
- https://web.archive.org/web/20210920172620/https://www.fireeye.com/blog/threat-research/2012/08/hikit-rootkit-advanced-persistent-attack-techniques-part-2.html
- https://unit42.paloaltonetworks.com/acidbox-rare-malware/
- https://github.com/hfiref0x/TDL
- https://www.loldrivers.io/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1553.006/T1553.006.md
- https://github.com/SigmaHQ/sigma/search?q=testsigning
- https://learn.microsoft.com/en-us/windows/security/threat-protection/device-guard/enable-virtualization-based-protection-of-code-integrity
- https://www.trendmicro.com/en_us/research/21/d/iron-tiger-apt-updates-toolkit-with-evolved-supply-chain-attack-capabilities.html
Unlock Pro Content
Get the full detection package for T1553.006 including response playbook, investigation guide, and atomic red team tests.