T1601.001 Patch System Image

Adversaries may modify the operating system of a network device to introduce new capabilities or weaken existing defenses.(Citation: Killing the myth of Cisco IOS rootkits) (Citation: Killing IOS diversity myth) (Citation: Cisco IOS Shellcode) (Citation: Cisco IOS Forensics Developments) (Citation: Juniper Netscreen of the Dead) Some network devices are built with a monolithic architecture, where the entire operating system and most of the functionality of the device is contained within a single file. Adversaries may change this file in storage, to be loaded in a future boot, or in memory during runtime.

To change the operating system in storage, the adversary will typically use the standard procedures available to device operators. This may involve downloading a new file via typical protocols used on network devices, such as TFTP, FTP, SCP, or a console connection. The original file may be overwritten, or a new file may be written alongside of it and the device reconfigured to boot to the compromised image.

To change the operating system in memory, the adversary typically can use one of two methods. In the first, the adversary would make use of native debug commands in the original, unaltered running operating system that allow them to directly modify the relevant memory addresses containing the running operating system. This method typically requires administrative level access to the device.

In the second method for changing the operating system in memory, the adversary would make use of the boot loader. The boot loader is the first piece of software that loads when the device starts that, in turn, will launch the operating system. Adversaries may use malicious code previously implanted in the boot loader, such as through the ROMMONkit method, to directly manipulate running operating system code in memory. This malicious code in the bootloader provides the capability of direct memory manipulation to the adversary, allowing them to patch the live operating system during runtime.

By modifying the instructions stored in the system image file, adversaries may either weaken existing defenses or provision new capabilities that the device did not have before. Examples of existing defenses that can be impeded include encryption, via Weaken Encryption, authentication, via Network Device Authentication, and perimeter defenses, via Network Boundary Bridging. Adding new capabilities for the adversary’s purpose include Keylogging, Multi-hop Proxy, and Port Knocking.

Adversaries may also compromise existing commands in the operating system to produce false output to mislead defenders. When this method is used in conjunction with Downgrade System Image, one example of a compromised system command may include changing the output of the command that shows the version of the currently running operating system. By patching the operating system, the adversary can change this command to instead display the original, higher revision number that they replaced through the system downgrade.

When the operating system is patched in storage, this can be achieved in either the resident storage (typically a form of flash memory, which is non-volatile) or via TFTP Boot.

When the technique is performed on the running operating system in memory and not on the stored copy, this technique will not survive across reboots. However, live memory modification of the operating system can be combined with ROMMONkit to achieve persistence.

View in MITRE ATT&CK®

CRI Profile Mappings

Capability ID Capability Description Mapping Type ATT&CK ID ATT&CK Name Notes
PR.IR-01.05 Remote access protection Mitigates T1601.001 Patch System Image
Comments
This diagnostic statement implements security controls and restrictions for remote user access to systems. Remote user access control involves managing and securing how users remotely access systems, such as through encrypted connections and account use policies, which help prevent adversary access.
References
    PR.AA-05.02 Privileged system access Mitigates T1601.001 Patch System Image
    Comments
    This diagnostic statement protects against Patch System Image 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 T1601.001 Patch System Image
      Comments
      This diagnostic statement protects against Patch System Image 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 T1601.001 Patch System Image
        Comments
        This diagnostic statement provides protection from Patch System Image 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 the system image
        References
          PR.PS-01.07 Cryptographic keys and certificates Mitigates T1601.001 Patch System Image
          Comments
          This diagnostic statement protects against Patch System Image through the use of revocation of keys and key management. Employing key protection strategies and key management for key material used in managing and signing images, limitations to specific accounts along with access control mechanisms provides protection against adversaries attempting to modify or patch system images.
          References
            PR.AA-03.01 Authentication requirements Mitigates T1601.001 Patch System Image
            Comments
            This diagnostic statement describes how the organization implement appropriate authentication requirements, including selecting mechanisms based on risk, utilizing multi-factor authentication where necessary, and safeguarding the storage of authenticators like pins and passwords to protect sensitive access credentials.
            References
              EX.MM-01.01 Third-party monitoring and management resources Mitigates T1601.001 Patch System Image
              Comments
              This diagnostic statement provides for the implementation of procedures for management of third party products such as vendor provided digitally signed operating system images to validate the integrity of the software used on their platform.
              References
                PR.AA-01.01 Identity and credential management Mitigates T1601.001 Patch System Image
                Comments
                This diagnostic statement protects against Patch System Image through the use of hardened access control policies, secure defaults, password complexity requirements, multifactor authentication requirements, and removal of terminated accounts.
                References

                  NIST 800-53 Mappings

                  Capability ID Capability Description Mapping Type ATT&CK ID ATT&CK Name Notes
                  CM-06 Configuration Settings mitigates T1601.001 Patch System Image
                  CM-05 Access Restrictions for Change mitigates T1601.001 Patch System Image
                  IA-05 Authenticator Management mitigates T1601.001 Patch System Image
                  SA-10 Developer Configuration Management mitigates T1601.001 Patch System Image
                  IA-07 Cryptographic Module Authentication mitigates T1601.001 Patch System Image
                  RA-09 Criticality Analysis mitigates T1601.001 Patch System Image
                  SR-11 Component Authenticity mitigates T1601.001 Patch System Image
                  SR-04 Provenance mitigates T1601.001 Patch System Image
                  SR-05 Acquisition Strategies, Tools, and Methods mitigates T1601.001 Patch System Image
                  SC-34 Non-modifiable Executable Programs mitigates T1601.001 Patch System Image
                  SI-02 Flaw Remediation mitigates T1601.001 Patch System Image
                  CM-08 System Component Inventory mitigates T1601.001 Patch System Image
                  SI-07 Software, Firmware, and Information Integrity mitigates T1601.001 Patch System Image
                  CM-02 Baseline Configuration mitigates T1601.001 Patch System Image
                  CM-02 Baseline Configuration mitigates T1601.001 Patch System Image
                  SA-11 Developer Testing and Evaluation mitigates T1601.001 Patch System Image
                  IA-02 Identification and Authentication (Organizational Users) mitigates T1601.001 Patch System Image
                  CM-07 Least Functionality mitigates T1601.001 Patch System Image
                  SI-04 System Monitoring mitigates T1601.001 Patch System Image
                  AC-02 Account Management mitigates T1601.001 Patch System Image
                  AC-03 Access Enforcement mitigates T1601.001 Patch System Image
                  AC-04 Information Flow Enforcement mitigates T1601.001 Patch System Image
                  AC-05 Separation of Duties mitigates T1601.001 Patch System Image
                  AC-06 Least Privilege mitigates T1601.001 Patch System Image
                  CM-03 Configuration Change Control mitigates T1601.001 Patch System Image

                  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 T1601.001 Patch System Image
                  attribute.integrity.variety.Software installation Software installation or code modification related-to T1601.001 Patch System Image