Firmware Analysis

Firmware security and vulnerability scanning commands.

Binarly

The Binarly test step executes a scan using the Binarly service to analyze firmware binaries. For more information, visit Binarly Risk Hunt.

AttributeTypeRequiredDefaultDescription
cmdconstYesbinarlyMust be binarly report
namestringYesUniquely identifies the test step in reports and logs
parametersBinarlyParametersYesBinarly-specific parameters
optionsOptionsObjectNoAdditional command options

Binarly Parameters

AttributeTypeRequiredDescription
tokenstringYesAuthentication token for Binarly service
file_pathstringYesPath to the binary file to be scanned

Binarly Example

cmd: binarly report
name: "Scan BIOS for vulnerabilities"
parameters:
  token: "your-binarly-token"
  file_path: "/path/to/firmware.bin"
options:
  timeout: "10m" # Scan might take a while

ChipSec

Run ChipSec on the DUT.

AttributeTypeRequiredDefaultDescription
cmdconstYeschipsecCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectNoAdditional transport options
optionsOptionsObjectNoAdditional command options
parametersChipSecOptionsYesOptions passed into ChipSec

ChipSec Options

AttributeTypeRequiredDefaultDescription
modules[]stringYesList of modules that get executed from the ChipSec test suite
pchstringNoPCH parameter that gets passed into ChipSec as --pch parameter
platformstringNoPlatform parameter that gets passed into ChipSec as --platform parameter

ChipSec Example

cmd: chipsec
name: Run chipsec tests
transport:
  proto: ssh
  options:
    host: "[[attributes.Host]]"
    user: root
    password: root
parameters:
  modules:
    [
      common.bios_kbrd_buffer,
      common.bios_smi,
      common.bios_ts,
      common.bios_wp,
      common.ia32cfg,
      common.me_mfg_mode,
      common.memlock,
      common.rtclock,
      common.smm,
      common.smrr,
      common.spi_access,
      common.spi_desc,
      common.spi_fdopss,
      common.spi_lock,
      common.uefi.access_uefispec,
      common.memconfig,
      common.remap,
      common.smm_dma,
    ]

Firmware Version

Check the ESRT Firmware version entry on the DUT.

AttributeTypeRequiredDefaultDescription
cmdconstYesfirmware versionCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectYesAdditional transport options
optionsOptionsObjectNoAdditional command options
parametersFirmwareVersionOptionsYesOptions passed into the firmware version cmd

Firmware Version Options

AttributeTypeRequiredDefaultDescription
formatstringNonumberFormat of the tool’s output. Available options: number, hex, pair, triplet, quad.
expectFirmware Version Expect OptionsYesExpected Options

Firmware Version Expect Options

AttributeTypeRequiredDefaultDescription
versionstringYesexpectExpected firmware version in the specified format.

Firmware Version Example

cmd: firmware version
name: Get firmware version (ESRT)
transport: *transport
parameters:
  format: pair
  expect:
    version: "1.11"

FWHunt

Run Firmware Hunt on the firmware binary file.

AttributeTypeRequiredDefaultDescription
cmdconstYesfwhuntCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
optionsOptionsObjectNoAdditional command options
parametersFWHuntOptionsYesOptions passed into the fwhunt cmd

FWHunt Options

AttributeTypeRequiredDefaultDescription
pathstringYesPath of the binary to be analyzed.
rules_dirs[]stringNoList of directories to search for rules. If not specified, the default rules directory will be used.
rules[]stringNoList of rules to run.
report_onlybooleanNofalseOnly report findings, do not interpret the output.

FWHunt Example

name: FwHunt Test
steps:
  - cmd: fwhunt
    name: Run FwHunt tests
    parameters:
      path: "[[input.Binary]]"
      report_only: true

FWTS

Run Firmware Test-Suite on the DUT.

AttributeTypeRequiredDefaultDescription
cmdconstYesfwtsCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectYesAdditional transport options
optionsOptionsObjectNoAdditional command options
parametersFWTS OptionsYesOptions passed into the fwts cmd

FWTS Options

AttributeTypeRequiredDefaultDescription
flags[]stringNoList of flags to pass to fwts.
report_onlybooleanNofalseOnly report findings, do not interpret the output.

FWTS Example

cmd: fwts
name: Run Firmware Testsuite tests
options:
  timeout: 10m
transport: *transport
parameters:
  flags: [-b]
  report_only: true

HSI

Report Host Firmware Security on the DUT.

AttributeTypeRequiredDefaultDescription
cmdconstYeshsiCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectYesAdditional transport options

HSI Example

cmd: hsi
name: Report Host Firmware Security
options:
  timeout: 10m
transport: *transport