chipsec.modules.tools.uefi.scan_image module¶
The module can generate a list of EFI executables from (U)EFI firmware file or extracted from flash ROM, and then later check firmware image in flash ROM or file against this list of expected executables
- Usage:
chipsec_main -m tools.uefi.scan_image [-a generate|check,<json>,<fw_image>[,norm]]generateGenerates a list of EFI executable binaries from the UEFIfirmware image (default)
checkDecodes UEFI firmware image and checks all EFI executablebinaries against a specified list
jsonJSON file with configuration of allowed list EFIexecutables (default =
efilist.json)
fw_imageFull file path to UEFI firmware image. If not specified,the module will dump firmware image directly from ROM
normOptional,generatewithfw_imageonly. Addssha256_normto each PE32 and TE entry: the SHA-256 of the module with its placement undone (relocations reversed; ImageBase, TimeDateStamp, CheckSum and section relocation pointers zeroed), prefixed with the normalization used (uefi-pe-rebase0.v1:sha256:...oruefi-te-rebase0.v1:sha256:...). Omitted where the module cannot be normalized exactly.checkignores the field
Examples:
>>> chipsec_main -m tools.uefi.scan_image
Creates a list of EFI executable binaries in efilist.json from the firmware
image extracted from ROM
>>> chipsec_main -i -n -m tools.uefi.scan_image -a generate,efilist.json,uefi.rom
Creates a list of EFI executable binaries in efilist.json from uefi.rom
firmware binary
>>> chipsec_main -i -n -m tools.uefi.scan_image -a generate,efilist.json,uefi.rom,norm
Same, and also records each module’s sha256_norm, which stays the same
wherever the module is placed in flash
>>> chipsec_main -i -n -m tools.uefi.scan_image -a check,efilist.json,uefi.rom
Decodes uefi.rom UEFI firmware image binary and checks all EFI executables
in it against a list defined in efilist.json
Note
-iand-narguments can be used when specifying firmware file because the module doesn’t depend on the platform and doesn’t need kernel driver