Platform Firmware Resilience – (Part -1)
Introduction
Modern computing systems consist of layered architectures. The software, including both operating systems and applications, is built on the underlying platform. This platform of hardware and firmware initializes the system, boots the system, and provides runtime services. Platform firmware, along with its configuration data, is absolutely central to trustworthiness and security in computing systems. Unfortunately, firmware is extremely privileged and very hard to fix. This makes it an attractive target for sophisticated attacks. A successful attack on the platform firmware can make a system inoperable or allow persistent malware to compromise low-level services, which then leads to data exfiltration, operational disruption, or other security breaches.
Why Platform Firmware Resiliency is Needed
Resiliency - Core Principles
1. Protect
Protection controls ensure that firmware code and platform-sensitive data that cannot be tampered with remain intact. Such include:
a. Secure Boot
b. Firmware Update Integrity
c. Hardware-Based Protection
d. Access Control
2. Detection
Detection mechanisms can detect whether the platform firmware code or the critical data is compromised. These are:
a. Integrity Measurement
b. Runtime Monitoring
c. Logging and Auditing
d. Firmware Attestation
3. Recovery
Recovery mechanisms restore the integrity of platform firmware code and sensitive data in case of compromise. The methods include:
a. Backup and Restore
b. Fallback Mechanisms
c. Authorized Recovery
d. Manufacturer-Assisted Recovery
Detailed Discussion on the principles
Protection
The?Protection?section focuses on safeguarding the firmware and critical data of platform devices against malicious attacks and unintended modifications. This includes firmware in management controllers, service processors, storage devices, network controllers, and graphics processing units (GPUs). Protection also extends to critical data, as its compromise can undermine platform integrity. Below are the key guidelines and components for ensuring robust protection:
Protection and Update of Mutable Code
This section outlines guidelines for protecting mutable firmware code, emphasizing principles such as authenticated firmware updates, integrity protection, and non-bypassability of security mechanisms.
Authenticated Update Mechanism
Integrity Protection
Non-Bypassability
Immutable Code Protection
Runtime Critical Platform Firmware Protection
Running in RAM:
o??? If firmware is copied into RAM for running, its modification by software needs to be prevented. This could be done with hardware-enforced memory protection mechanisms.
o??? Alternatively, the firmware must finish its execution without any interference during running time, and no executing software is permitted till then.
RAM-based Temporary Data Store:
o??? If such critical firmware relies on the RAM for temporary data storage, then such a memory section should not be accessible by applications without control.
o??? Thus, trusted memory sections or hardware-based isolation techniques, such as Intel SGX, ARM TrustZone, shall have to be used.
Running in Cache:
Avoid Interference:
o??? Software must not be allowed to alter, deny execution of, or otherwise interfere with the operation of critical firmware.
o??? Privilege levels, MPUs, or secure enclaves can enforce this.
Trusted Memory:
o??? The role of trusted memory is very important in runtime protection because it has allowed a secure environment for firmware execution and data storing.
o??? This mechanism will ensure critical firmware and all data associated with it are not compromised by tampering or access by untrusted software.
o??? Mechanisms like trusted memory which might be through hardware-based encryption of memory or even access control help to harden the firmware against runtime attacks.
Protection of Critical Data
This section deals with protection of critical data accessed by the devices. When such data are allowed to change without authorization, functionality and security may be put at risk. This must, therefore, not be allowed. To this effect, critical data must also be protected and provision made for making alterations to it.
The basic guiding principles are:
o??? Controlled Modifiability:
Critical data must be changeable only through the device itself, or through well-defined interfaces provided by the device firmware, for example, APIs and standards-based interfaces.
o??? Dependent Symbiont Devices:
Devices that are dependent on a host may have to rely on the host device to enforce this requirement.
o??? Validation of Updates:
Updates to critical data shall be validated, with either the device or host device, to ensure that the data is validly formed. This includes:
Range or Bounds Checking:?It ensures that data falls within defined limits.
Format Validation:?This validates the form and format of data.
Update Authorization:
Important data updates should be authorized through a Platform Administrator, or using an authorized mechanism of firmware updates.
Authentication may also be carried out through techniques like digital signature for authenticating integrity and authenticity of important data before its utilization.
o??? Factory default settings need to be secured at the same level as firmware code.
Such defaults should be updatable with the same security mechanisms as for firmware updates.
Examples of Sensitive Data:
o??? Fuse Settings:
OTP fuses store sensitive data such as cryptographic keys, device configuration, or security policies. Once programmed, fuses are not changeable, thus the storage is tamper-proof.
o??? ROM Tables:
These tables will store immutable information, like bootloader settings or hardcoded parameters for a particular piece of hardware. Once written, these tables will be not be changed since they cannot be altered.
o??? User Keys:
Such data will include, for example, cryptographic keys used in encryption, decryption, or authentication and shall be securely stored and managed. Typically, such keys are stored on secure hardware modules, such as in TPMs or HSMs.
Secure Storage and Access:
o??? Critical data must be stored in trusted memory regions or hardware-isolated areas, where unauthorized access is not possible.
o??? Access to critical data should be limited to authorized firmware components or processes.
Recovery of Critical Data:
o??? Critical data should be recoverable from secure backups or factory defaults in case it is corrupted.
o??? The recovery mechanisms should ensure that only authenticated and validated data is restored.
Detection
The?Detection?section outlines mechanisms to identify unauthorized changes to device firmware and critical data before they can negatively impact the device's functionality. These detection mechanisms are particularly essential for devices lacking strong firmware protections, and they also help ensure the effectiveness of existing protection mechanisms. Below are the key guidelines for detection:
Detection of Corrupted Code
Detection mechanisms are critical for verifying the integrity of firmware and ensuring that unauthorized or corrupted firmware does not compromise the device.
The firmware should be authenticated and genuine before execution and not unauthorized or corrupted to gain access to the system. The most important rules are as follows:
o??? Digital Signature Verification:
Verify using an accepted digital signature algorithm like RSA, ECDSA, or cryptographic hash such as SHA-256 before executing outside the RTD to ensure firmware integrity.
o??? Verification Procedure:
Certificate Validation:?To begin with, the updating process should verify whether the used signing certificate to sign the firmware is authentic. This should include a verification of the certificate chain and ensure it comes from a trusted authority.
Verification of Firmware Signature:?The update process after ensuring the certificate authentication should validate whether the digital signature of the firmware image matches that of the same signed hash. It would, therefore, tell whether the firmware has been altered or not.
o??? Symbiont Devices:
Symbiont devices (Devices that rely on a host). In this kind of device, the host can be expected to check firmware integrity.
A stand-alone boot-capable symbiont device is expected to validate its own integrity prior to any firmware execution.
o??? Hardware-based Devices:
The hardware-based devices such as FPGAs or CPLDs sometimes may not support cryptographic methods.
In such situations, mechanisms based on hardware should be implemented to identify load failures or corruption based on checksums, parity checks, or error-detection codes.
o??? Role of Certificates:
In the authentication process, certificates hold a very high role. Certificates ensure that the update is valid and reliable. Certificates provide a link between the firmware image and the source in a trusted link.
The certificates are to be so stored and kept that they must not be easily exploited for illicit operations without valid authorization. At the time of validation, either expired or the revoked certificates shall be rejected.
Detection of Corrupted Critical Data
This section emphasizes the detection of corrupted critical data in platform devices, ensuring that data integrity is maintained to prevent operational failure or security vulnerabilities.
Read More