T1553.006 Code Signing Policy Modification

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.(Citation: Microsoft DSE June 2017)(Citation: Apple Disable SIP) 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.(Citation: Microsoft Unsigned Driver Apr 2017)(Citation: Apple Disable SIP)

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.(Citation: Microsoft TESTSIGNING Feb 2021)(Citation: Apple Disable SIP)(Citation: FireEye HIKIT Rootkit Part 2)(Citation: GitHub Turla Driver Loader) Examples of commands that can modify the code signing policy of a system include <code>bcdedit.exe -set TESTSIGNING ON</code> on Windows and <code>csrutil disable</code> on macOS.(Citation: Microsoft TESTSIGNING Feb 2021)(Citation: Apple Disable SIP) 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.(Citation: F-Secure BlackEnergy 2014)

To gain access to kernel memory to modify variables related to signature checks, such as modifying <code>g_CiOptions</code> to disable Driver Signature Enforcement, adversaries may conduct Exploitation for Privilege Escalation using a signed, but vulnerable driver.(Citation: Unit42 AcidBox June 2020)(Citation: GitHub Turla Driver Loader)

View in MITRE ATT&CK®

CRI Profile Mappings

Capability ID Capability Description Mapping Type ATT&CK ID ATT&CK Name Notes
PR.AA-05.02 Privileged system access Mitigates T1553.006 Code Signing Policy Modification
Comments
This diagnostic statement protects against Code Signing Policy Modification through the use of privileged account management and the use of multi-factor authentication.
References
    DE.CM-09.01 Software and data integrity checking Mitigates T1553.006 Code Signing Policy Modification
    Comments
    This diagnostic statement protects against Code Signing Policy Modification through the use of verifying integrity of software/firmware, loading software that is trusted, ensuring privileged process integrity and checking software signatures.
    References
      PR.PS-01.03 Configuration deviation Mitigates T1553.006 Code Signing Policy Modification
      Comments
      This diagnostic statement provides protection from Code Signing Policy Modification through the implementation of security configuration baselines for OS, software, file integrity monitoring and imaging. Security baselining and integrity checking can help protect against adversaries attempting to compromise and modify software and its configurations.
      References
        PR.IR-01.06 Production environment segregation Mitigates T1553.006 Code Signing Policy Modification
        Comments
        This diagnostic statement provides protections for production environments. Measures such as network segmentation and access control reduce the attack surface, restrict movement by adversaries, and protect critical assets and data from compromise.
        References

          NIST 800-53 Mappings

          Capability ID Capability Description Mapping Type ATT&CK ID ATT&CK Name Notes
          CM-05 Access Restrictions for Change mitigates T1553.006 Code Signing Policy Modification
          SA-10 Developer Configuration Management mitigates T1553.006 Code Signing Policy Modification
          IA-07 Cryptographic Module Authentication mitigates T1553.006 Code Signing Policy Modification
          RA-09 Criticality Analysis mitigates T1553.006 Code Signing Policy Modification
          SC-34 Non-modifiable Executable Programs mitigates T1553.006 Code Signing Policy Modification
          SI-02 Flaw Remediation mitigates T1553.006 Code Signing Policy Modification
          CM-08 System Component Inventory mitigates T1553.006 Code Signing Policy Modification
          SI-07 Software, Firmware, and Information Integrity mitigates T1553.006 Code Signing Policy Modification
          CM-02 Baseline Configuration mitigates T1553.006 Code Signing Policy Modification
          SA-11 Developer Testing and Evaluation mitigates T1553.006 Code Signing Policy Modification
          CM-07 Least Functionality mitigates T1553.006 Code Signing Policy Modification
          AC-06 Least Privilege mitigates T1553.006 Code Signing Policy Modification
          CM-03 Configuration Change Control mitigates T1553.006 Code Signing Policy Modification

          VERIS Mappings

          Capability ID Capability Description Mapping Type ATT&CK ID ATT&CK Name Notes
          action.malware.variety.Disable controls Disable or interfere with security controls related-to T1553.006 Code Signing Policy Modification

          Azure Mappings

          Capability ID Capability Description Mapping Type ATT&CK ID ATT&CK Name Notes
          alerts_for_windows_machines Alerts for Windows Machines technique_scores T1553.006 Code Signing Policy Modification
          Comments
          This control can be used to monitor for the execution of commands that could modify the code signing policy of a system, such as bcdedit.exe -set TESTSIGNING ON.
          References