Join our Newsletter — 33% off our NHI Course
Home› Guides› MITRE ATT&CK T1542 Pre-OS Boot: Detecting Firmware, Bootkit…
Guide SOC & Detection Engineering

MITRE ATT&CK T1542 Pre-OS Boot: Detecting Firmware, Bootkit and Boot Image Persistence

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 12 November 2026 12 min read
On this page

Code that runs before the operating system survives reinstalls and disk replacement, and sits below the endpoint tools that are meant to find it. MITRE ATT&CK T1542 Pre-OS Boot covers adversaries abusing firmware and boot mechanisms that load before the operating system to persist at a layer where host-based defences cannot see them. In ATT&CK v20 it sits under two tactics, Stealth (TA0005) and Persistence (TA0003), on Windows, Linux, macOS and network devices, with five sub-techniques, five mitigations and a detection strategy for the parent and each sub-technique. This guide is the technique view: how each sub-technique differs, the recorded cases, the telemetry in the v20 detection strategies, and how to respond when one is suspected. It is for detection engineers, endpoint and network teams. The boot chain itself, Secure Boot keys and the BlackLotus certificate rotation are covered in the Firmware and Boot Security Guide, and persistence as a whole in the Persistence Techniques Guide; this page does not repeat them.

Key takeaways

  • Five targets, one idea. System firmware (T1542.001), component firmware (T1542.002), boot records (T1542.003 Bootkit), Cisco ROMMON (T1542.004) and network boot images over TFTP (T1542.005) all run before the operating system.
  • Detect the write, not the implant. The v20 detection strategies look for raw disk writes, changes to the EFI System Partition and /boot, flashing tools run from unusual parents, and boot variables pointing to non-standard images.
  • Attestation is the only view from below. Measured Boot stores hashes of firmware and boot components in the TPM so a remote attestation server can judge the device, independent of an operating system that may be lying.
  • Network devices count. Two of the five sub-techniques target routers and switches; configuration and boot variable monitoring is the main signal there.
  • Remediation is physical work. A firmware implant is removed by reflashing a known-good image or replacing the board, not by reimaging the disk.

The five sub-techniques

ATT&CK v20 describes T1542 as adversaries overwriting data in boot drivers or firmware such as BIOS and UEFI to persist below the operating system, noting this is particularly difficult to detect because host software-based defences will not see it. The ATT&CK page shows version 2.0, last modified 12 May 2026.

Sub-techniquePlatforms (v20)What is modifiedDetection strategy
T1542.001 System FirmwareWindows, Network DevicesBIOS or UEFI firmware in SPI flashDET0099
T1542.002 Component FirmwareWindows, Linux, macOSFirmware of other components such as disk drives, outside the main system firmwareDET0323
T1542.003 BootkitLinux, WindowsMaster Boot Record, Volume Boot Record or boot components, so code runs before the OSDET0150
T1542.004 ROMMONkitNetwork DevicesCisco ROM Monitor, the boot loader that initialises hardware and software at power onDET0175
T1542.005 TFTP BootNetwork DevicesDevice configuration pointing netboot at a malicious TFTP server and imageDET0582

Related but separate techniques: T1601 Modify System Image changes the network device operating system itself, T1495 Firmware Corruption destroys firmware for impact rather than persistence, and T1014 Rootkit hides at the kernel level after boot.

How adversaries use it: real cases

The procedure examples below are from the ATT&CK v20 data, with the sources ATT&CK cites.

Sub-techniqueGroup or softwareRecorded behaviour
System FirmwareLoJax (APT28)UEFI rootkit deployed to persist remote access software on targeted systems (ESET, September 2018)
System FirmwareHacking Team UEFI Rootkit; Trojan.MebromiUEFI rootkit persisting remote access software; BIOS modification
Component FirmwareEquationCapability to overwrite hard drive firmware from some manufacturers
Component FirmwareCyclops BlinkPersisted by patching legitimate device firmware when downloaded, including WatchGuard devices (NCSC, February 2022)
BootkitAPT41, APT28, Lazarus Group, ROCKBOOT, BOOTRASH, FinFisher, Carberp, TrickBotMBR and VBR bootkits for persistence and hiding; TrickBot can implant code in device firmware
BootkitWhisperGateOverwrites the MBR with a bootloader that wipes drives and shows a fake ransom note at boot

LoJax in detail

ESET's research, which ATT&CK cites, found Sednit (APT28) operators writing a malicious UEFI module into SPI flash. At boot the module dropped and ran malware on disk, so it survived operating system reinstallation and disk replacement. The operators used three tools: one to dump low-level system settings, one to save an image of SPI flash, and one to add the module to the image and write it back. All three used a kernel driver bundled with a legitimate hardware utility and signed with a valid certificate. Where platform protections blocked writes, the patching tool exploited a known vulnerability affecting older chipsets. ESET's remediation was to reflash the SPI flash with a clean, board-specific image or replace the motherboard, and its recommendations included keeping UEFI current and using a hardware root of trust such as Intel Boot Guard on supported processors. ESET also noted in an update that Secure Boot did not protect against this rootkit, a reminder that Secure Boot verifies the boot loader, not the firmware doing the verifying.

Cyclops Blink in detail

The NCSC malware analysis report (23 February 2022) describes Cyclops Blink waiting for a firmware upgrade image, replacing the legitimate installer, adding itself and a startup script to the image, and recalculating the image HMAC, which was possible because the devices used a hard-coded key, so the modified image passed verification. The botnet had been active since at least June 2019. The lesson: a firmware update path is part of the attack surface, and image verification is only as strong as the key behind it.

What to detect and where

The table combines the parent strategy DET0278 with the sub-technique strategies. Log sources are as named in ATT&CK v20; the detection ideas are NHI Mgmt Group recommendations.

PlatformLog sources (v20)What to look for
WindowsSecurity 4688; Sysmon 9 (RawAccessRead), 11 (file create), 6 (driver load)Raw disk access by anything other than backup, disk encryption or imaging tools; file writes to the EFI System Partition outside patch windows; vendor flash tools run by non-IT accounts; signed hardware utility drivers loading on standard endpoints
Linuxauditd writes to /boot/grub/*, /boot/efi/* and block devices; execve of dd, efibootmgr, flashrom, grub-installBoot file changes not owned by a package manager transaction; firmware flashing tools on servers outside maintenance
macOSUnified log execution of bless or nvram; modification of /System/Library/CoreServices/boot.efi; unsigned kext loadsBoot parameter changes from untrusted parents, especially followed by kext loads
Network devicesConfiguration logs, syslog, flow recordsBoot variable changed to a non-standard image (for example boot system tftp), upgrade rom-monitor commands, firmware uploads over TFTP, FTP or SCP outside maintenance, unplanned reloads after firmware changes
Firmware integrityFirmware integrity checks against known-good baselines (DET0323)Mismatches between the running firmware and the vendor image for that model and version

Measured boot and attestation

Microsoft documents four layers in the Windows boot process: Secure Boot verifies the boot loader signature, Trusted Boot has the boot loader and kernel verify each later component, Early Launch Anti-Malware (ELAM) checks boot drivers before other non-Microsoft drivers load, and Measured Boot records hashes of the firmware, boot loader, boot drivers and everything loaded before the anti-malware driver into the TPM. Measured Boot requires UEFI 2.3.1 and a TPM, plus a remote attestation client and server. At the end of startup the TPM signs the log with a key from the attestation server, which judges the device healthy or sends it to a quarantine network. Attestation is the detection that does not depend on the compromised layer telling the truth; tie it to conditional access so an unhealthy device loses access rather than raising a ticket.

Keeping the noise down

  • Know your flashers: list the vendor firmware update tools and agents in use and alert on any other process writing to firmware or raw disk.
  • Use change windows: boot partition and firmware changes outside an approved patch window or change ticket are the signal; inside them, verify versions match the vendor release.
  • Watch reboots: an unexpected reboot or reload shortly after a boot change is common to every sub-technique.

Mitigations

ATT&CK v20 maps five mitigations to T1542, with sub-technique specifics for network devices (M1031 Network Intrusion Prevention and M1028 Operating System Configuration also apply to TFTP Boot). Concrete settings are NHI Mgmt Group guidance.

Mitigation (v20)ATT&CK guidanceHow to apply it
M1046 Boot IntegrityUse TPM technology and a secure or trusted boot process; check BIOS or EFI integrity; move the root of trust to hardware; on network devices enable secure boot features that validate the boot environment and image signatureSecure Boot on, Measured Boot with attestation on high-value hosts, hardware root of trust where the platform supports it, image signature verification on network devices. See M1046 Boot Integrity.
M1051 Update SoftwarePatch the BIOS and EFI as necessary; regular firmware updatesFirmware in the patch programme with its own inventory and version targets. See M1051 Update Software.
M1026 Privileged Account ManagementProper permissions to prevent access to privileged accounts needed for these actions; AAA such as TACACS+ on network devicesRestrict firmware tools and boot configuration to a small admin group; command authorisation and accounting on network devices
M1047 AuditPeriodically check the integrity of the running configuration and system imageScheduled firmware and image integrity checks against vendor hashes. See M1047 Audit.
M1035 Limit Access to Resource Over NetworkPrevent access to file shares, remote access and unnecessary services; restrict protocols without encryption or authentication and management interfaces from untrusted sourcesManagement plane on a dedicated network; no TFTP from user networks. See the Network Device Management Plane Hardening Guide.

Where identity fits

Most pre-OS boot techniques need administrative access first: local administrator or root to write raw disk or flash firmware, or privileged network device access to change boot variables. The credentials behind firmware update agents, baseboard management controllers and network automation accounts are therefore high-value non-human identities. Keep them in a vault, scope them to the devices they manage, log every use, and rotate them after any suspected boot-level compromise, since an implant that survives a reimage can capture them again.

Responding to a suspected pre-OS implant

  1. Preserve first: capture the firmware image and boot records with vendor or approved forensic tools before any update, alongside TPM event logs and EDR data.
  2. Isolate: move the device to a quarantine network; for network devices, route around them if possible.
  3. Compare: check the captured firmware and boot components against the vendor's known-good image for that model and version.
  4. Remediate below the OS: reflash firmware with a clean board-specific image, or replace the board; rebuild boot records; for network devices, reload a verified image and ROMMON from trusted media.
  5. Rotate credentials: rotate local administrator, BMC and device credentials and any service account used on the host.
  6. Hunt across the fleet: look for the same flashing tool, driver or boot variable change elsewhere.

Detailed response steps are in the Firmware and Bootkit Compromise Playbook.

How to test your coverage

  1. Telemetry check: on a lab host, write a benign file to the EFI System Partition and run a firmware inventory tool from an unusual parent; confirm Sysmon 9 and 11 or auditd events reach the SIEM and alert.
  2. Attestation check: change a boot setting on a lab device and confirm the attestation service marks it unhealthy and access policy reacts.
  3. Network device check: on a lab router, change the boot variable and confirm the configuration change alert fires.
  4. Firmware inventory: confirm you can report firmware version for every laptop, server and network device model.
  5. Record results: update the ATT&CK coverage map per sub-technique.

Metrics

  • Secure Boot coverage: share of endpoints and servers with Secure Boot enabled.
  • Attestation coverage: share of high-value hosts reporting Measured Boot health.
  • Firmware currency: share of devices on the vendor's current firmware for their model.
  • Unexplained boot changes: boot partition or boot variable changes without a change record, per month.
  • Integrity check cadence: share of network devices with an image integrity check in the last 90 days.

Framework mapping

FrameworkRelevant items
MITRE ATT&CK v20TA0005 Stealth, TA0003 Persistence; T1542.001 to T1542.005; related T1601, T1495, T1014
ATT&CK mitigations and detectionM1046, M1051, M1026, M1047, M1035 (plus M1031, M1028 for TFTP Boot); DET0278, DET0099, DET0323, DET0150, DET0175, DET0582
NIST SP 800-53 Rev. 5SI-7 Software, Firmware, and Information Integrity, SI-7(9) Verify Boot Process, CM-6 Configuration Settings, CM-8 System Component Inventory, AU-2 Event Logging
NIST CSF 2.0PR.PS-01 (configuration management), PR.PS-02 (software maintained), DE.CM-09 (computing hardware and software monitored)
CIS Controls v8.1Control 4 Secure Configuration, Control 7 Continuous Vulnerability Management, Control 8 Audit Log Management

Practitioner checklist

  • Enable Secure Boot fleet-wide and Measured Boot with attestation on high-value hosts.
  • Inventory firmware versions for every model and put firmware in the patch programme.
  • Collect Sysmon 9 and 11 for the EFI System Partition and raw disk access; auditd for /boot and flashing tools.
  • Alert on network device boot variable changes, ROMMON upgrades and TFTP image transfers.
  • Restrict firmware tools and boot configuration to a small admin group; vault BMC and device credentials.
  • Schedule image and firmware integrity checks against vendor hashes.
  • Keep a tested reflash procedure and known-good images per model.
  • Test detections and attestation each quarter in a lab.

Standards and references

Related NHI Mgmt Group resources: ATT&CK Persistence Tactic · ATT&CK Stealth and Defense Impairment Tactics Guide · Hardware Root of Trust Guide · Linux Secure Boot and Shim Guide · Network Device Syslog and Configuration Change Detection Guide

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 12 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org