Cross-source coverage
T1553.006 / ATT&CK
Subvert Trust Controls: Code Signing Policy Modification
2 rules across 1 source.
From MITRE ATT&CK 19.2
Adversaries may modify code signing policies to enable execution of unsigned or self-signed code. Code signing provides a level of authenticity on a program from a developer and a guarantee that the program has not been tampered with. Security controls can include enforcement mechanisms to ensure that only valid, signed code can be run on an operating system.
Some of these security controls may be enabled by default, such as Driver Signature Enforcement (DSE) on Windows or System Integrity Protection (SIP) on macOS. Other such controls may be disabled by default but are configurable through application controls, such as only allowing signed Dynamic-Link Libraries (DLLs) to execute on a system. Since it can be useful for developers to modify default signature enforcement policies during the development and testing of applications, disabling of these features may be possible with elevated permissions.
Adversaries may modify code signing policies in a number of ways, including through use of command-line or GUI utilities, Modify Registry, rebooting the computer in a debug/recovery mode, or by altering the value of variables in kernel memory. Examples of commands that can modify the code signing policy of a system include bcdedit.exe -set TESTSIGNING ON on Windows and csrutil disable on macOS. Depending on the implementation, successful modification of a signing policy may require reboot of the compromised system. Additionally, some implementations can introduce visible artifacts for the user (ex: a watermark in the corner of the screen stating the system is in Test Mode). Adversaries may attempt to remove such artifacts.
To gain access to kernel memory to modify variables related to signature checks, such as modifying g_CiOptions to disable Driver Signature Enforcement, adversaries may conduct Exploitation for Privilege Escalation using a signed, but vulnerable driver.
- Tactics
- Defense Impairment
- Platforms
- macOS · Windows
- Telemetry
-
WinEventLog:Securitymacos:unifiedlog
How MITRE says to detect it DET0523
Detect Code Signing Policy Modification (Windows & macOS)
Windows Analytic 1446
Monitors execution of administrative utilities (e.g., bcdedit.exe) or registry modifications that disable Driver Signature Enforcement (DSE) or enable Test Signing. Correlates command-line activity, registry changes, and subsequent process executions that bypass signing enforcement.
WinEventLog:SecurityEventCode=4688WinEventLog:SecurityEventCode=4657
macOS Analytic 1447
Detects modification of System Integrity Protection (SIP) or code signing enforcement policies through csrutil or kernel variable tampering. Correlates execution of csrutil disable commands with subsequent policy state changes and anomalous unsigned process executions.
macos:unifiedlogcsrutil disablemacos:unifiedlogg_CiOptions modification or SIP state changemacos:unifiedlogUnsigned binary execution following SIP change
elastic/detection-rules
2 rules| Detection | Severity | Format |
|---|---|---|
| Code Signing Policy Modification Through Built-in tools | Medium | Elastic TOML |
| Code Signing Policy Modification Through Registry | Medium | Elastic TOML |