T1542.002 Google Chronicle · YARA-L

Detect Component Firmware in Google Chronicle

Adversaries may modify component firmware to persist on systems. Some adversaries employ sophisticated means to compromise computer components and install malicious firmware that will execute adversary code outside of the operating system and main system firmware or BIOS. This technique may be similar to System Firmware (T1542.001) but conducted upon other system components such as hard drives, network interface cards, and other peripheral devices that may not have the same level of integrity checking. Malicious component firmware provides persistent access that survives disk reimaging, OS reinstallation, and most host-based defenses. Notable examples include the Equation Group's capability to overwrite hard drive firmware across multiple manufacturers (Seagate, Western Digital, Toshiba) and Cyclops Blink's persistent firmware patching of WatchGuard network devices.

MITRE ATT&CK

Tactic
Persistence Defense Evasion
Technique
T1542 Pre-OS Boot
Sub-technique
T1542.002 Component Firmware
Canonical reference
https://attack.mitre.org/techniques/T1542/002/

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule t1542_002_component_firmware_modification {
  meta:
    author = "Argus Detection Engineering"
    description = "Detects component firmware modification attempts using known firmware utilities with write operations or raw device path access. Covers MITRE ATT&CK T1542.002."
    mitre_attack_tactic = "Persistence"
    mitre_attack_technique = "T1542.002"
    severity = "CRITICAL"
    confidence = "HIGH"
    version = "1.0"
    created = "2026-04-21"

  events:
    $e.metadata.event_type = "PROCESS_LAUNCH"
    $e.principal.hostname = $hostname
    $e.principal.user.userid = $user
    $e.target.process.command_line = $cmd
    $e.target.process.file.full_path = $img

    (
      // Firmware tool detected in process image path
      re.regex($img, `(?i)(hdparm|flashrom|nvflash|fwupdmgr|fwupd-tool|afuwin|afudos|amiflash|awdflash|mflash|ethtool|sg_write_buffer|sg3_utils|nvme|sdparm|atapwd|nls_933w)(\.exe)?$`) or

      // Firmware tool with write operation arguments
      (
        re.regex($img, `(?i)(hdparm|flashrom|nvflash|fwupd|sg_write_buffer|ethtool|nvme|sdparm)`) and
        re.regex($cmd, `(?i)(--write-sector|--yes-i-know-what-i-am-doing|security-set-pass|security-unlock|security-erase|security-disable|--flash|writedmabuf|--fwdl|--fw-download|download_fw)`)
      ) or

      // Raw device path access with firmware tool
      (
        re.regex($img, `(?i)(hdparm|flashrom|nvflash|fwupd|sg_write_buffer|ethtool|nvme|sdparm)`) and
        re.regex($cmd, `(?i)(/dev/sd[a-z]|/dev/nvme[0-9]|/dev/hd[ab]|\\\\.\\\\physicaldrive|\\\\.\\\\scsi|\\\\device\\\\harddisk)`)
      ) or

      // Explicit write flags on raw device paths (any process)
      (
        re.regex($cmd, `(?i)(--yes-i-know-what-i-am-doing|--write-sector|security-erase|security-set-pass)`) and
        re.regex($cmd, `(?i)(/dev/sd[a-z]|/dev/nvme|physicaldrive|\\\\device\\\\harddisk)`)
      )
    )

  condition:
    $e
}
critical severity high confidence

Chronicle YARA-L 2.0 rule detecting component firmware modification via process launch events. Identifies known firmware utilities (hdparm, flashrom, nvflash, fwupdmgr, ethtool, sg_write_buffer, etc.) executing with write/flash arguments or accessing raw device paths indicative of T1542.002 persistence techniques.

Data Sources

Chronicle UDM - Endpoint DetectionGoogle Chronicle - Windows Event ForwardingChronicle UDM - Linux Auditd

Required Tables

UDM events (PROCESS_LAUNCH)

False Positives & Tuning

  • Legitimate firmware update workflows triggered by enterprise patch management solutions such as Microsoft Endpoint Configuration Manager or Ansible playbooks during maintenance windows
  • IT hardware technicians using sg3_utils or nvme-cli for NVMe drive health diagnostics without write operations on production endpoints
  • Embedded systems or IoT device management platforms using fwupdmgr or vendor-specific tools for approved firmware lifecycle management
Download portable Sigma rule (.yml)

Other platforms for T1542.002


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Hard Drive Firmware Version Enumeration via WMI

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe and CommandLine containing 'Win32_DiskDrive' and 'FirmwareRevision'. Security Event ID 4688 if command line auditing is enabled. WMI Activity Event ID 5860 in Microsoft-Windows-WMI-Activity/Operational log showing WMI query execution.

  2. Test 2ATA Disk Identity Read with hdparm (Linux)

    Expected signal: Linux auditd syscall record: type=EXECVE msg=audit(...): argc=3 a0='hdparm' a1='-I' a2='/dev/sda'. Syslog entry for sudo privilege escalation. If Sysmon for Linux is deployed, Event ID 1 (Process Create) with Image=/sbin/hdparm and CommandLine containing '/dev/sda'.

  3. Test 3NVMe Drive Firmware Slot Information Read (Linux)

    Expected signal: Linux auditd execve syscall records for nvme with arguments 'fw-log /dev/nvme0' and 'id-ctrl /dev/nvme0'. Syslog sudo authentication entries. Process creation event with raw NVMe device path in command arguments.

  4. Test 4Firmware Image Staging File Creation

    Expected signal: Sysmon Event ID 1: Process Create for powershell.exe. Sysmon Event ID 11: File Create with TargetFilename matching *\Temp\hdd_fw_update.bin with .bin extension. The file-based hunting query for .bin/.rom/.fw creation in non-standard directories will match with InitiatingProcessFileName=powershell.exe.

Unlock Pro Content

Get the full detection package for T1542.002 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections