CHIPSEC Modules¶
A CHIPSEC module is just a python class that inherits from BaseModule and implements is_supported
and run
. Modules are stored under the chipsec installation directory in a subdirectory “modules”. The “modules” directory contains one subdirectory for each chipset that chipsec supports. There is also a directory for common modules that should apply to every platform.
chipsec/modules/
modules including tests or tools (that’s where most of the chipsec functionality is)
chipsec/modules/common/
modules common to all platforms
chipsec/modules/<platform>/
modules specific to <platform>
chipsec/modules/tools/
security tools based on CHIPSEC framework (fuzzers, etc.)
Internally the chipsec application uses the concept of a module name, which is a string of the form: common.bios_wp
.
This means module common.bios_wp
is a python script called bios_wp.py
that is stored at <ROOT_DIR>\chipsec\modules\common\
.
Modules can be mapped to one or more security vulnerabilities being checked. More information also found in the documentation for any individual module.
Known vulnerabilities can be mapped to CHIPSEC modules as follows:
Vulnerability Description |
CHIPSEC Module |
Example |
---|---|---|
SMI event configuration is not locked |
common.bios_smi |
|
SPI flash descriptor is not protected |
common.spi_desc |
|
SPI controller security override is enabled |
common.spi_fdopss |
|
SPI flash controller is not locked |
common.spi_lock |
|
Device-specific SPI flash protection is not used |
chipsec_util spi write (manual analysis) |
|
SMM BIOS write protection is not correctly used |
common.bios_wp |
|
Flash protected ranges do not protect bios region |
common.bios_wp |
|
BIOS interface is not locked |
common.bios_ts |
Vulnerability Description |
CHIPSEC Module |
Example |
---|---|---|
Compatibility SMRAM is not locked |
common.smm |
|
SMM cache attack |
common.smrr |
|
Memory remapping vulnerability in SMM protection |
remap |
|
DMA protections of SMRAM are not in use |
smm_dma |
|
Graphics aperture redirection of SMRAM |
chipsec_util memconfig remap |
|
Memory sinkhole vulnerability |
tools.cpu.sinkhole |
Vulnerability Description |
CHIPSEC Module |
Example |
---|---|---|
Root certificate |
common.bios_wp, common.secureboot.variables |
|
Key exchange keys |
common.secureboot.variables |
|
Controls in setup variable (CSM enable/disable, image verification policies, secure boot enable/disable, clear/restore keys) |
chipsec_util uefi var-find Setup |
|
TE header confusion |
tools.secureboot.te |
|
UEFI NVRAM is not write protected |
common.bios_wp |
|
Insecure handling of secure boot disable |
chipsec_util uefi var-list |
Vulnerability Description |
CHIPSEC Module |
Example |
---|---|---|
Secure boot configuration is stored in unprotected variable |
common.secureboot.variables, chipsec_util uefi var-list |
|
Variable permissions are not set according to specification |
common.uefi.access_uefispec |
|
Sensitive data (like passwords) are stored in uefi variables |
chipsec_util uefi var-list (manual analysis) |
|
Firmware doesn’t sanitize pointers/addresses stored in variables |
chipsec_util uefi var-list (manual analysis) |
|
Firmware hangs on invalid variable content |
chipsec_util uefi var-write, chipsec_util uefi var-delete (manual analysis) |
|
Hardware configuration stored in unprotected variables |
chipsec_util uefi var-list (manual analysis) |
|
Re-creating variables with less restrictive permissions |
chipsec_util uefi var-write (manual analysis) |
|
Variable NVRAM overflow |
chipsec_util uefi var-write (manual analysis) |
|
Critical configuration is stored in unprotected CMOS |
chipsec_util cmos, common.rtclock |
Vulnerability Description |
CHIPSEC Module |
Example |
---|---|---|
Boot block top-swap mode is not locked |
common.bios_ts |
|
Architectural features not locked |
common.ia32cfg |
|
Memory map is not locked |
memconfig |
|
IOMMU usage |
chipsec_util iommu |
|
Memory remapping is not locked |
remap |
Vulnerability Description |
CHIPSEC Module |
Example |
---|---|---|
SMI handlers use pointers/addresses from OS without validation |
tools.smm.smm_ptr |
|
Legacy SMI handlers call legacy BIOS outside SMRAM |
||
INT15 in legacy SMI handlers |
||
UEFI SMI handlers call UEFI services outside SMRAM |
||
Malicious CommBuffer pointer and contents |
||
Race condition during SMI handler |
||
Authenticated variables SMI handler is not implemented |
chipsec_util uefi var-write |
|
SmmRuntime vulnerability |
tools.uefi.scan_blocked |
Vulnerability Description |
CHIPSEC Module |
Example |
---|---|---|
Software vulnerabilities when parsing, decompressing, and loading data from ROM |
||
Software vulnerabilities in implementation of digital signature verification |
||
Pointers stored in UEFI variables and used during boot |
chipsec_util uefi var-write |
|
Loading unsigned PCI option ROMs |
chipsec_util pci xrom |
|
Boot hangs due to error condition (eg. ASSERT) |
Vulnerability Description |
CHIPSEC Module |
Example |
---|---|---|
Insufficient protection of S3 boot script table |
common.uefi.s3bootscript, tools.uefi.s3script_modify |
|
Dispatch opcodes in S3 boot script call functions in unprotected memory |
common.uefi.s3bootscript, tools.uefi.s3script_modify |
|
S3 boot script interpreter stored in unprotected memory |
||
Pointer to S3 boot script table in unprotected UEFI variable |
common.uefi.s3bootscript, tools.uefi.s3script_modify |
|
Critical setting not recorded in S3 boot script table |
chipsec_util uefi s3bootscript (manual analysis) |
|
OS waking vector in ACPI tables can be modified |
chipsec_util acpi dump (manual analysis) |
|
Using pointers on S3 resume stored in unprotected UEFI variables |
chipsec_util uefi var-write |
Vulnerability Description |
CHIPSEC Module |
Example |
---|---|---|
Software vulnerabilities when parsing firmware updates |
||
Unauthenticated firmware updates |
||
Runtime firmware update that can be interrupted |
||
Signature not checked on capsule update executable |
Vulnerability Description |
CHIPSEC Module |
Example |
---|---|---|
Software vulnerabilities when handling messages over network interfaces |
||
Booting unauthenticated firmware over unprotected network interfaces |
Vulnerability Description |
CHIPSEC Module |
Example |
---|---|---|
BIOS keyboard buffer is not cleared during boot |
common.bios_kbrd_buffer |
|
DMA attack from devices during firmware execution |
Modules¶
- List of modules
- chipsec.modules.bdw package
- chipsec.modules.byt package
- chipsec.modules.common package
- chipsec.modules.common.cpu package
- chipsec.modules.common.secureboot package
- chipsec.modules.common.uefi package
- chipsec.modules.common.bios_kbrd_buffer module
- chipsec.modules.common.bios_smi module
- chipsec.modules.common.bios_ts module
- chipsec.modules.common.bios_wp module
- chipsec.modules.common.cet module
- chipsec.modules.common.debugenabled module
- chipsec.modules.common.ia32cfg module
- chipsec.modules.common.me_mfg_mode module
- chipsec.modules.common.memconfig module
- chipsec.modules.common.memlock module
- chipsec.modules.common.remap module
- chipsec.modules.common.rom_armor module
- chipsec.modules.common.rtclock module
- chipsec.modules.common.sgx_check module
- chipsec.modules.common.sgx_check_sidekick module
- chipsec.modules.common.smm module
- chipsec.modules.common.smm_addr module
- chipsec.modules.common.smm_close module
- chipsec.modules.common.smm_code_chk module
- chipsec.modules.common.smm_dma module
- chipsec.modules.common.smm_lock module
- chipsec.modules.common.smrr module
- chipsec.modules.common.spd_wd module
- chipsec.modules.common.spi_access module
- chipsec.modules.common.spi_desc module
- chipsec.modules.common.spi_fdopss module
- chipsec.modules.common.spi_lock module
- chipsec.modules.hsw package
- chipsec.modules.ivb package
- chipsec.modules.snb package
- chipsec.modules.tools package
- chipsec.modules.tools.cpu package
- chipsec.modules.tools.secureboot package
- chipsec.modules.tools.smm package
- chipsec.modules.tools.uefi package
- chipsec.modules.tools.vmm package
- chipsec.modules.tools.vmm.hv package
- chipsec.modules.tools.vmm.hv.define module
- chipsec.modules.tools.vmm.hv.hypercall module
- chipsec.modules.tools.vmm.hv.hypercallfuzz module
- chipsec.modules.tools.vmm.hv.synth_dev module
- chipsec.modules.tools.vmm.hv.synth_kbd module
- chipsec.modules.tools.vmm.hv.vmbus module
- chipsec.modules.tools.vmm.hv.vmbusfuzz module
- chipsec.modules.tools.vmm.vbox package
- chipsec.modules.tools.vmm.xen package
- chipsec.modules.tools.vmm.common module
- chipsec.modules.tools.vmm.cpuid_fuzz module
- chipsec.modules.tools.vmm.ept_finder module
- chipsec.modules.tools.vmm.hypercallfuzz module
- chipsec.modules.tools.vmm.iofuzz module
- chipsec.modules.tools.vmm.msr_fuzz module
- chipsec.modules.tools.vmm.pcie_fuzz module
- chipsec.modules.tools.vmm.pcie_overlap_fuzz module
- chipsec.modules.tools.vmm.venom module
- chipsec.modules.tools.vmm.hv package
- chipsec.modules.tools.wsmt module