Firmware Security and Updates

From Kicksecure
Jump to navigation Jump to search

Firmware Security and Updating Issues


Info This chapter contains general security advice and is unspecific to Kicksecure.

Due to the difficulty of this topic and the specificity of hardware and host OS firmware, this issue is generally outside the scope of Kicksecure documentation. The links provided further below may not be the most relevant to the end user, necessitating further individual research.

Firmware on Personal Computers[edit]

Firmware is generally defined as the type of software that provides control, monitoring and data manipulation of engineered products. [1] In the case of computers, firmware is held in non-volatile memory devices such as, or flash and is associated with: [2] [3] [4] [5]

Firmware Updating and Security Problems[edit]


The major problem with updating firmware is that it cannot be done automatically in most cases. Therefore, it is difficult to fix functionality or security issues after the hardware has shipped. While utility programs are often available to update BIOS, firmware in other devices is rarely updated and mechanisms for detecting and updating firmware is not standardized. [2]

If firmware can be upgraded, this is usually possible via a program created by the provider. Old firmware should always be saved before upgrading. If the process fails or the newer version performs worse, the process can be reverted. [6] Updating firmware may or may not improve security. On the one hand it may fix vulnerabilities, but on the other hand an update may introduce a new backdoor.

Unfortunately most end users must blindly trust the hardware producer, so it probably better to install non-free updates rather than risk being vulnerable to known attacks in the wild. [7] Until these re-writable firmware areas are locked down or the code is open-sourced and vastly simplified, it is likely to remain a rich environment for malicious adversaries. [8] [9]

The reality is that advanced adversaries are routinely hacking the firmware of Internet routers, switches and, along with harddrive, and UEFI/EFI and ethernet The number of targets is already in the tens of thousands on an annual basis. Subverting firmware in this manner provides a stealthy and persistent presence that can eavesdrop on or re-route all network data, or access information in invisible storage areas that are unecrypted (bypassing disk encryption). Worst of all, firmware sabotage is believed to survive software updates or complete operating system re-installations. Attacks may also be designed to corrupt firmware so machines are prevented from booting, even with an external drive.

Supply Chain Attacks[edit]

Compromising a computing company's infrastructure is an advanced attack methodology that has risen to prominence over the last ten years: [10]

Supply chain attacks can happen when hackers gain access to a software company's infrastructure—development environment, build servers, update servers, etc.—and are able to inject malware into new software releases or security updates.

A recent example of malware that successfully targeted computer firmware is the late-2018 "Operation ShadowHammer" attack, which affected an estimated half a million Windows users utilizing ASUS hardware. In this case, the ASUS Live Update -- which is responsible for automatically updating components like BIOS, UEFI, drivers and applications -- was compromised.

It was discovered that the backdoored utility actually targeted the MAC addresses of a few hundred users, which were actually hard-coded into the trojan samples analyzed. The implication is that an advanced nation state attacker was willing to infect an untold number of innocent users for their targeted operations on a far smaller subset. [11] This sophisticated supply chain attack involved several steps: [12]

  • The ASUS server which served the live update tool was compromised.
  • The malicious file was signed with legitimate ASUS digital certificates so the software appeared genuine. [13] The file was actually a three-year old binary containing harmful code.
  • Users downloaded the malicious, backdoored utility through the ASUS update server.
  • The trojan utility searched for targets using a set of unique MAC addresses. [14]
  • Once located, a command-and-control server under the attacker's control installed additional malware on the machine.

Another relatively recent example concerns backdoors that were built into Android mobile firmware in 2017. In this case, Google researchers confirmed the advanced backdoors were preinstalled on devices before they left manufacturer factories: [15]

Triada first came to light in 2016 in articles published by Kaspersky and, the first of which said the malware was "one of the most advanced mobile Trojans" the security firm's analysts had ever encountered. Once installed, Triada's chief purpose was to install apps that could be used to send spam and display ads. It employed an impressive kit of tools, including rooting exploits that bypassed security protections built into Android and the means to modify the Android OS' all-powerful Zygote process. That meant the malware could directly tamper with every installed app. Triada also connected to no fewer than 17 command and control servers. In July 2017, security firm Dr. Web reported that its researchers had found Triada built into the firmware of several Android, including the Leagoo M5 Plus, Leagoo M8, Nomu S10, and Nomu S20. The attackers used the backdoor to surreptitiously download and install modules. Because the backdoor was embedded into one of the OS libraries and located in the system section, it couldn't be deleted using standard methods, the report said.

This malicious Android firmware was primarily adware and focused on allowing code to be injected into the system user interface to display advertisements, the downloading and installation of applications of the attackers' choice, and encrypted communications with command and control servers. Nevertheless, it further demonstrates the weaknesses that exist in the global supply chain for various devices.

These attacks are concerning because it reveals adversaries are prepared to undermine the security underpinning the entire supply chain for their purposes, whether it is manufactured/assembled components or via breaches of trusted vendor software channels. As most users of specific computer/device hardware trust the manufacturing company, this is a very difficult problem to address, particularly since it can remain undiscovered for a long period.

In addition, this mode of attack suggests that overall improvements in computing security are forcing sophisticated attackers to "raise their game," because in general they choose the path of least resistance when attempting to infiltrate the systems of targets. [10]

For further reading on this topic, see:

Processor Microcode Updates[edit]

One recent example of a firmware vulnerability is the processor microcode update for modern chips to address execution The Debian is non-free software, therefore only available in the Debian nonfree repository, meaning it is not installed by default in Kicksecure. [16] [17] Kicksecure recommends to avoid nonfreedom software but in this case idealism would result in insecurity.

It is unnecessary to apply these updates in standard Kicksecure and Kicksecure inside Qubes guest VMs, as they do not have the ability to alter the microcode. However, processor microcode updates should always be applied on the host operating system (for processors by Intel or AMD) [18]. [19]

Microcode Package Check[edit]

In the following checks, the package is not installed if there is no output.

To check whether the microcode package is installed.

Debian based[edit]

On the host. Run.

dpkg -l | grep microcode


In dom0. Run.

dnf list | grep microcode

The Qubes check should confirm the microcode_ctl.x86_64 package is already installed. [20]

Install Microcode Package[edit]


Install intel-microcode. To accomplish that, the following steps A. to D. need to be done.

A. Update the package lists.

sudo apt update

B. Upgrade the system.

sudo apt full-upgrade

C. Install the intel-microcode package.

Using apt command line parameter --no-install-recommends is in most cases optional.

sudo apt install --no-install-recommends intel-microcode

D. Done.

The procedure of installing intel-microcode is complete.


Install amd64-microcode. To accomplish that, the following steps A. to D. need to be done.

A. Update the package lists.

sudo apt update

B. Upgrade the system.

sudo apt full-upgrade

C. Install the amd64-microcode package.

Using apt command line parameter --no-install-recommends is in most cases optional.

sudo apt install --no-install-recommends amd64-microcode

D. Done.

The procedure of installing amd64-microcode is complete.


It is possible to check if the system is vulnerable to the and attacks, which use flaws in modern chip design to bypass system protections.


Install spectre-meltdown-checker. To accomplish that, the following steps A. to D. need to be done.

A. Update the package lists.

sudo apt update

B. Upgrade the system.

sudo apt full-upgrade

C. Install the spectre-meltdown-checker package.

Using apt command line parameter --no-install-recommends is in most cases optional.

sudo apt install --no-install-recommends spectre-meltdown-checker

D. Done.

The procedure of installing spectre-meltdown-checker is complete.


sudo spectre-meltdown-checker --paranoid ; echo $?

Forum Discussion[edit]


See Also[edit]


  2. 2.0 2.1
  7. Also see this debian-security mailing list thread: How secure is an installation with no non-free packages?
  9. Mark Shuttleworth, founder of the Ubuntu Linux distribution, has described proprietary firmware as a security, stating "firmware on your device is the NSA's best friend" and calling firmware "a trojan horse of monumental proportions".
  10. 10.0 10.1
  13. Reinforcing the notion that digital certificates are an imperfect security mechanism.
  14. MD5 hash values were hard-coded and found to correspond to unique MAC addresses for network adapter cards. This indicates the attackers knew the MAC addresses of their targets in advance.
  16. Relevant Debian packages for processor microcode: and
  17. Installing these updates by default would require the Debian nonfree repository, and logically also make Kicksecure images nonfree.
  18. ARM and POWER found to be as well affected, but less than what found in Intel and AMD.
  19. See:
  20. This package is installed by default in Qubes to automatically protect users against hardware threats.

Unfinished: This wiki is a work in progress. Please do not report broken links until this notice is removed, use Search Engines First and contribute improving this wiki.

We believe security software like Kicksecure needs to remain Open Source and independent. Would you help sustain and grow the project? Learn more about our 12 year success story and maybe DONATE!