Git Product home page Git Product logo

chipsec's Introduction

CHIPSEC: Platform Security Assessment Framework

Build Status OpenSSF Best Practices

CHIPSEC is a framework for analyzing the security of PC platforms including hardware, system firmware (BIOS/UEFI), and platform components. It includes a security test suite, tools for accessing various low level interfaces, and forensic capabilities. It can be run on Windows, Linux, Mac OS X and UEFI shell. Instructions for installing and using CHIPSEC can be found in the manual.

NOTE: This software is for security testing purposes. Use at your own risk. Read WARNING.txt before using.

First version of CHIPSEC was released in March 2014: Announcement at CanSecWest 2014

Recent presentation on how to use CHIPSEC to find vulnerabilities in firmware, hypervisors and hardware configuration, explore low level system assets and even detect firmware implants: Exploring Your System Deeper

Release Convention

  • CHIPSEC uses a major.minor.patch release version number
  • Changes to the arguments or calling conventions will be held for a minor version update

Projects That Include CHIPSEC

Contact Us

For any questions or suggestions please contact us at: [email protected]

Discord:

Twitter:

Mailing list:

For AMD related questions or suggestions please contact Gabriel Kerneis at: [email protected]

chipsec's People

Contributors

0xfede7c8 avatar abazhaniuk avatar andrew-furtak avatar assafcarlsbad avatar brentholtsclaw avatar c7zero avatar chipsec-bbci avatar chipsecintel avatar citypw avatar dependabot[bot] avatar dscott90 avatar erikbjorge avatar fishilico avatar frinzell avatar iherna2 avatar jun2zhou avatar kerneis-anssi avatar michaelm396in avatar mikhail-gorobets avatar minipli-oss avatar nicholasarmour avatar npmitche avatar oscaragomez avatar platomav avatar raisfathin avatar sae86 avatar sewittsiemens avatar tweksteen avatar wrffrz avatar yaperez-anssi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chipsec's Issues

chipsec support for legacy BIOS and UEFI-compatibility mode boot.

Currently, chipsec efi symbol is missing on OS with BIOS and UEFI-compatibility mode boot. We need to workaround the efi structure to compile the driver successfully.

chipsec driver build errors:

WARNING: "efi" [/home/user/git/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/chipsec.ko] undefined!

Fix pci_fuzz and pcie_overlap_fuzz

tools.vmm.pci_fuzz and tools.vmm.pci_overlap_fuzz use old design and don't inherit BaseModule class. Since recent change to remove support of old module design, these module are broken.

can't build with GCC plugins( e.g: latent_entropy)

Platform: Debian 8( x86_64) + kernel 4.9

root@debian8-test:/home/shawn/chipsec# python setup.py install
running install
running bdist_egg
running egg_info
writing chipsec.egg-info/PKG-INFO
writing top-level names to chipsec.egg-info/top_level.txt
writing dependency_links to chipsec.egg-info/dependency_links.txt
writing entry points to chipsec.egg-info/entry_points.txt
reading manifest file 'chipsec.egg-info/SOURCES.txt'
writing manifest file 'chipsec.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying chipsec_main.py -> build/lib.linux-x86_64-2.7
copying chipsec_util.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/chipsec_tools
copying chipsec_tools/init.py -> build/lib.linux-x86_64-2.7/chipsec_tools
creating build/lib.linux-x86_64-2.7/chipsec
copying chipsec/module_common.py -> build/lib.linux-x86_64-2.7/chipsec
copying chipsec/chipset.py -> build/lib.linux-x86_64-2.7/chipsec
copying chipsec/logger.py -> build/lib.linux-x86_64-2.7/chipsec
copying chipsec/module.py -> build/lib.linux-x86_64-2.7/chipsec
copying chipsec/file.py -> build/lib.linux-x86_64-2.7/chipsec
copying chipsec/init.py -> build/lib.linux-x86_64-2.7/chipsec
copying chipsec/defines.py -> build/lib.linux-x86_64-2.7/chipsec
copying chipsec/command.py -> build/lib.linux-x86_64-2.7/chipsec
copying chipsec/xmlout.py -> build/lib.linux-x86_64-2.7/chipsec
creating build/lib.linux-x86_64-2.7/chipsec_tools/linux
copying chipsec_tools/linux/init.py -> build/lib.linux-x86_64-2.7/chipsec_tools/linux
creating build/lib.linux-x86_64-2.7/chipsec_tools/windows
copying chipsec_tools/windows/init.py -> build/lib.linux-x86_64-2.7/chipsec_tools/windows
creating build/lib.linux-x86_64-2.7/chipsec/helper
copying chipsec/helper/helpers.py -> build/lib.linux-x86_64-2.7/chipsec/helper
copying chipsec/helper/oshelper.py -> build/lib.linux-x86_64-2.7/chipsec/helper
copying chipsec/helper/init.py -> build/lib.linux-x86_64-2.7/chipsec/helper
creating build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/uefi_common.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/cmos.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/io.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/paging.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/cpuid.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/mmio.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/msr.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/tpm12_commands.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/iommu.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/smbus.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/pci.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/interrupts.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/uefi_search.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/spi_uefi.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/spi.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/ec.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/acpi.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/msgbus.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/ucode.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/uefi.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/spd.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/spi_descriptor.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/vmm.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/init.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/cpu.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/physmem.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/uefi_platform.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/hal_base.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/iobar.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/pcidb.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/tpm.py -> build/lib.linux-x86_64-2.7/chipsec/hal
copying chipsec/hal/acpi_tables.py -> build/lib.linux-x86_64-2.7/chipsec/hal
creating build/lib.linux-x86_64-2.7/chipsec/modules
copying chipsec/modules/smm_dma.py -> build/lib.linux-x86_64-2.7/chipsec/modules
copying chipsec/modules/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules
copying chipsec/modules/remap.py -> build/lib.linux-x86_64-2.7/chipsec/modules
copying chipsec/modules/memconfig.py -> build/lib.linux-x86_64-2.7/chipsec/modules
creating build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/ec_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/cmos_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/spi_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/acpi_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/decode_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/chipset_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/interrupts_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/pci_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/iommu_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/vmm_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/init.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/desc_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/mmio_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/smbus_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/uefi_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/spidesc_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/msr_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/mmcfg_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/spd_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/cpu_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/io_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/mem_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/ucode_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
copying chipsec/utilcmd/msgbus_cmd.py -> build/lib.linux-x86_64-2.7/chipsec/utilcmd
creating build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/init.py -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/common.py -> build/lib.linux-x86_64-2.7/chipsec/cfg
creating build/lib.linux-x86_64-2.7/chipsec/helper/osx
copying chipsec/helper/osx/init.py -> build/lib.linux-x86_64-2.7/chipsec/helper/osx
copying chipsec/helper/osx/helper.py -> build/lib.linux-x86_64-2.7/chipsec/helper/osx
creating build/lib.linux-x86_64-2.7/chipsec/helper/efi
copying chipsec/helper/efi/efihelper.py -> build/lib.linux-x86_64-2.7/chipsec/helper/efi
copying chipsec/helper/efi/init.py -> build/lib.linux-x86_64-2.7/chipsec/helper/efi
creating build/lib.linux-x86_64-2.7/chipsec/helper/linux
copying chipsec/helper/linux/init.py -> build/lib.linux-x86_64-2.7/chipsec/helper/linux
copying chipsec/helper/linux/helper.py -> build/lib.linux-x86_64-2.7/chipsec/helper/linux
creating build/lib.linux-x86_64-2.7/chipsec/helper/win
copying chipsec/helper/win/init.py -> build/lib.linux-x86_64-2.7/chipsec/helper/win
copying chipsec/helper/win/win32helper.py -> build/lib.linux-x86_64-2.7/chipsec/helper/win
creating build/lib.linux-x86_64-2.7/chipsec/modules/byt
copying chipsec/modules/byt/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/byt
creating build/lib.linux-x86_64-2.7/chipsec/modules/common
copying chipsec/modules/common/bios_kbrd_buffer.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common
copying chipsec/modules/common/bios_wp.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common
copying chipsec/modules/common/spi_desc.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common
copying chipsec/modules/common/spi_fdopss.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common
copying chipsec/modules/common/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common
copying chipsec/modules/common/rtclock.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common
copying chipsec/modules/common/bios_smi.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common
copying chipsec/modules/common/spi_lock.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common
copying chipsec/modules/common/smrr.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common
copying chipsec/modules/common/ia32cfg.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common
copying chipsec/modules/common/bios_ts.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common
copying chipsec/modules/common/smm.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common
creating build/lib.linux-x86_64-2.7/chipsec/modules/ivb
copying chipsec/modules/ivb/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/ivb
creating build/lib.linux-x86_64-2.7/chipsec/modules/snb
copying chipsec/modules/snb/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/snb
creating build/lib.linux-x86_64-2.7/chipsec/modules/hsw
copying chipsec/modules/hsw/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/hsw
creating build/lib.linux-x86_64-2.7/chipsec/modules/tools
copying chipsec/modules/tools/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools
creating build/lib.linux-x86_64-2.7/chipsec/modules/bdw
copying chipsec/modules/bdw/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/bdw
creating build/lib.linux-x86_64-2.7/chipsec/modules/common/uefi
copying chipsec/modules/common/uefi/s3bootscript.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common/uefi
copying chipsec/modules/common/uefi/access_uefispec.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common/uefi
copying chipsec/modules/common/uefi/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common/uefi
creating build/lib.linux-x86_64-2.7/chipsec/modules/common/secureboot
copying chipsec/modules/common/secureboot/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common/secureboot
copying chipsec/modules/common/secureboot/variables.py -> build/lib.linux-x86_64-2.7/chipsec/modules/common/secureboot
creating build/lib.linux-x86_64-2.7/chipsec/modules/tools/smm
copying chipsec/modules/tools/smm/smm_ptr.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/smm
copying chipsec/modules/tools/smm/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/smm
creating build/lib.linux-x86_64-2.7/chipsec/modules/tools/uefi
copying chipsec/modules/tools/uefi/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/uefi
copying chipsec/modules/tools/uefi/blacklist.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/uefi
copying chipsec/modules/tools/uefi/s3script_modify.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/uefi
creating build/lib.linux-x86_64-2.7/chipsec/modules/tools/cpu
copying chipsec/modules/tools/cpu/sinkhole.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/cpu
copying chipsec/modules/tools/cpu/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/cpu
creating build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/pcie_overlap_fuzz.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/iofuzz.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/msr_fuzz.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/cpuid_fuzz.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/venom.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/hypercallfuzz.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/pcie_fuzz.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/common.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm
creating build/lib.linux-x86_64-2.7/chipsec/modules/tools/secureboot
copying chipsec/modules/tools/secureboot/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/secureboot
copying chipsec/modules/tools/secureboot/te.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/secureboot
creating build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/synth_dev.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/vmbusfuzz.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/define.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/vmbus.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/synth_kbd.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/hypercall.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/hypercallfuzz.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/hv
creating build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/vbox
copying chipsec/modules/tools/vmm/vbox/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/vbox
copying chipsec/modules/tools/vmm/vbox/vbox_crash_apicbase.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/vbox
creating build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/xen
copying chipsec/modules/tools/vmm/xen/xsa188.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/xen
copying chipsec/modules/tools/vmm/xen/define.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/xen
copying chipsec/modules/tools/vmm/xen/init.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/xen
copying chipsec/modules/tools/vmm/xen/hypercall.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/xen
copying chipsec/modules/tools/vmm/xen/hypercallfuzz.py -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/xen
copying chipsec/VERSION -> build/lib.linux-x86_64-2.7/chipsec
copying chipsec/WARNING.txt -> build/lib.linux-x86_64-2.7/chipsec
copying chipsec_tools/linux/TianoCompress.bin -> build/lib.linux-x86_64-2.7/chipsec_tools/linux
copying chipsec_tools/linux/LzmaCompress.bin -> build/lib.linux-x86_64-2.7/chipsec_tools/linux
copying chipsec/cfg/cht.xml -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/common.xml -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/hsx.xml -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/qrk.xml -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/bdw.xml -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/jkt.xml -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/iommu.xml -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/kbl.xml -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/skl.xml -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/hsw.xml -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/byt.xml -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/avn.xml -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/ivt.xml -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/template.xml -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/cfg/chipsec_cfg.xsd -> build/lib.linux-x86_64-2.7/chipsec/cfg
copying chipsec/modules/tools/smm/smm_config.ini -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/smm
copying chipsec/modules/tools/uefi/blacklist.json -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/uefi
copying chipsec/modules/tools/secureboot/te.cfg -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/secureboot
copying chipsec/modules/tools/vmm/hv/initial_data.json -> build/lib.linux-x86_64-2.7/chipsec/modules/tools/vmm/hv
running build_ext
building 'chipsec.helper.linux.cores' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/chipsec
creating build/temp.linux-x86_64-2.7/chipsec/helper
creating build/temp.linux-x86_64-2.7/chipsec/helper/linux
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c chipsec/helper/linux/cores.c -o build/temp.linux-x86_64-2.7/chipsec/helper/linux/cores.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/chipsec/helper/linux/cores.o -o build/lib.linux-x86_64-2.7/chipsec/helper/linux/cores.so
building the linux driver
creating /home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers
creating /home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux
copying drivers/linux/dkms.conf -> /home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux
copying drivers/linux/README -> /home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux
copying drivers/linux/COPYING -> /home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux
creating /home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/include
copying drivers/linux/include/chipsec.h -> /home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/include
creating /home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/amd64
copying drivers/linux/amd64/cpu.asm -> /home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/amd64
copying drivers/linux/chipsec_km.c -> /home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux
creating /home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/i386
copying drivers/linux/i386/cpu.asm -> /home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/i386
copying drivers/linux/Makefile -> /home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux
copying drivers/linux/AUTHORS -> /home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux
copying drivers/linux/WARNING.txt -> /home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux
cc1: error: cannot load plugin ./scripts/gcc-plugins/latent_entropy_plugin.so
./scripts/gcc-plugins/latent_entropy_plugin.so: undefined symbol: symtab
make[2]: *** [/home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/chipsec_km.o] Error 1
make[1]: *** [module/home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux] Error 2
make: *** [chipsec] Error 2
Traceback (most recent call last):
File "setup.py", line 206, in
**extra_kw
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 161, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 147, in call_command
self.run_command(cmdname)
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/install_lib.py", line 22, in run
self.build()
File "/usr/lib/python2.7/distutils/command/install_lib.py", line 111, in build
self.run_command('build_ext')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "setup.py", line 112, in run
self._build_linux_driver()
File "setup.py", line 77, in _build_linux_driver
subprocess.check_output(["make", "-C", build_driver])
File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['make', '-C', '/home/shawn/chipsec/build/lib.linux-x86_64-2.7/drivers/linux']' returned non-zero exit status 2

help- need to save a list of set parameters

hi,
I'm new to chipsec.
chipsec is running on UEFI shell through usb thumb drive. i want it to save a list of set parameters about the computer- lets say - amount of available RAM, number of CPU cores, pcie lanes and so on..

how can I do it? thanks

Can't build Win7 driver with x86 enviroment command prompt

At least can't build the driver well on my working machine: Win10, DDK: 7600.16385.1.

The root cause is that the enviroment is specific for WinXP and function KeQueryActiveProcessorCount is not available. Using x64 command prompt can build the driver without any error.

The document readme might need to update.

Adding a new chipset

One of my test laptops has a Pentium N3700 chip which is apparently from the Braswell family and provokes an error: Platform is not supported (Unsupported Platform: VID = 0x8086, DID = 0x2280)

Can you tell me how I would go about adding support for this chipset and/or chipset family?

module_template is executed when running chipsec_main

Although this module is automatically skipped because the is_supported method returns False, the output of the overall tests is confusing as it will appear in the 'Skipped' section.

A simple filtering when loading the modules to ignore the name 'module_template' would fix this.

cpuid_fuzz module global name logger not found problem

when I run chipsec_main with cpuid_fuzz module ,it gets error global name 'logger' not found problem in the log. So I checked the code and modified https://github.com/chipsec/chipsec/blob/master/source/tool/chipsec/modules/tools/vmm/cpuid_fuzz.py#L80 and https://github.com/chipsec/chipsec/blob/master/source/tool/chipsec/modules/tools/vmm/cpuid_fuzz.py#L83
to self.logger.xxxxx then the error disappear. So I guess there're some mistakes in your code and you can see if there're some code to modifly.

Mixed EOL

Most of the Python source files are using a mixture of LF and CRLF as end-of-line characters. This turns any contribution to the code into an obstacle course. Please pick one or the other and apply to all the source files.

If you decide to go for the CRLF (Windows option), it is as simple as running:

find . -name \*.py -exec unix2dos {} \;

Once modified, git diff provides the option --ignore-space-at-eol to verify that only EOL characters have been adjusted.

setup.py will fail with install command on Fedora 25

I am having trouble building Chipsec on Fedora 25. Please see the attached log.txt for the output of the command sudo python setup.py build_ext -i
log.txt

This output does not seem to want to go into the log: gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory error: command 'gcc' failed with exit status 1

I checked for the existence of that directory and file, but the redhat directory does not exist inside of /usr/lib/rpm/*. [user@machine]$ sudo ls /usr/lib/rpm fileattrs macros.d osgi.req rpm.daily rpmdb_recover rpm.log tgpg gstreamer1.prov maven.prov platform rpmdb_dump rpmdb_stat rpmpopt-4.13.0.1 javadoc.req maven.req postscriptdriver.prov rpmdb_load rpmdb_upgrade rpmrc macros osgi.prov rpm2cpio.sh rpmdb_loadcvt rpmdb_verify rpm.supp

Please let me know if there is anything that I can provide to help you out more.

EDIT: It seems that I have not obtained all of the dependencies for Fedora. I am used to using Debian based distros, so I believe that this is the reason for the bug. Closing now for it is not a real issue.

Sample output example

Chipsec is really a great tool for BIOS-related system forensic.

It would be nice to add some examples with known bootkits (infected systems):

  • Rovnix
  • Win64/Olmarik / TDSS

Especially to help users to spot any change (or not) in the bios parameter block while they use chipsec.

Thank you

chipsec freezes from uefi shell

Booted from USB stick with uefi shell and chipsec on Mac.

Boots fine and then I select the USB stick and try to run chipsec:

fs3:
cd EFI\Chipsec
python chipsec_main.py
...
[x][ Module: Pre-boot Passwords in the BIOS Keyboard Buffer
[x][ =====================================

It just freezes at this point.

Similar freeze happens if I try:

fs3:
cd EFI\Chipsec
python chipsec_util.py acpi list
...
[CHIPSEC] Executing command 'acpi' with args [list]
...

Why is it freezing?

Facing issue while running chipsec_main.exe/ chipsec_util.exe from windows server 2008 R2 64 bit OS

Hello,

I downloaded the chipsec code and followed the steps given in manual to compile chipsec in windows 2008 R2 64 bit OS. I could compile chipsec successfully and could start chipsec as a service through command prompt. But after doing all this when I try to run chipsec_main.exe/ chipsec_util.exe from the command line, I am seeing the failure as mentioned below.
Am I missing any steps or any settings which i need to perform before running chipsec_main.exe/ chipsec_util.exe commands? Is windows 2008 R2 64 bit OS not supported by chipsec?
chipsec_command_failure

macOS-related weird errors

Hello,

I tried chipsec on my iMac from 2011 and 2015 (SIP was completely disabled then I tried again with "csrutil --without kext" with no success) and on both of these I got the following:

iMac Mid 2011:

[CHIPSEC] ***************************  SUMMARY  ***************************
[CHIPSEC] Time elapsed          0.743
[CHIPSEC] Modules total         17
[CHIPSEC] Modules failed to run 7:
ERROR: chipsec.modules.common.bios_smi
ERROR: chipsec.modules.common.ia32cfg
ERROR: chipsec.modules.common.smrr
ERROR: chipsec.modules.common.secureboot.variables
ERROR: chipsec.modules.common.uefi.access_uefispec
ERROR: chipsec.modules.common.uefi.s3bootscript
ERROR: chipsec.modules.smm_dma
[CHIPSEC] Modules passed        7:
[+] PASSED: chipsec.modules.common.bios_kbrd_buffer
[+] PASSED: chipsec.modules.common.bios_ts
[+] PASSED: chipsec.modules.common.smm
[+] PASSED: chipsec.modules.common.spi_fdopss
[+] PASSED: chipsec.modules.common.spi_lock
[+] PASSED: chipsec.modules.memconfig
[+] PASSED: chipsec.modules.remap
[CHIPSEC] Modules failed        2:
[-] FAILED: chipsec.modules.common.bios_wp
[-] FAILED: chipsec.modules.common.spi_desc
[CHIPSEC] Modules with warnings 1:
[!] WARNING: chipsec.modules.common.rtclock
[CHIPSEC] Modules skipped 0:
[CHIPSEC] Modules with Exceptions 7:
ERROR: chipsec.modules.common.bios_smi
ERROR: chipsec.modules.common.ia32cfg
ERROR: chipsec.modules.common.smrr
ERROR: chipsec.modules.common.secureboot.variables
ERROR: chipsec.modules.common.uefi.access_uefispec
ERROR: chipsec.modules.common.uefi.s3bootscript
ERROR: chipsec.modules.smm_dma
[CHIPSEC] *****************************************************************

iMac Late 2015:

[CHIPSEC] ***************************  SUMMARY  ***************************
[CHIPSEC] Time elapsed          0.007
[CHIPSEC] Modules total         17
[CHIPSEC] Modules failed to run 7:
ERROR: chipsec.modules.common.bios_smi
ERROR: chipsec.modules.common.ia32cfg
ERROR: chipsec.modules.common.smrr
ERROR: chipsec.modules.common.secureboot.variables
ERROR: chipsec.modules.common.uefi.access_uefispec
ERROR: chipsec.modules.common.uefi.s3bootscript
ERROR: chipsec.modules.smm_dma
[CHIPSEC] Modules passed        5:
[+] PASSED: chipsec.modules.common.bios_kbrd_buffer
[+] PASSED: chipsec.modules.common.bios_ts
[+] PASSED: chipsec.modules.common.smm
[+] PASSED: chipsec.modules.common.spi_fdopss
[+] PASSED: chipsec.modules.common.spi_lock
[CHIPSEC] Modules failed        2:
[-] FAILED: chipsec.modules.common.bios_wp
[-] FAILED: chipsec.modules.common.spi_desc
[CHIPSEC] Modules with warnings 0:
[CHIPSEC] Modules skipped 3:
[*] SKIPPED: chipsec.modules.common.rtclock
[*] SKIPPED: chipsec.modules.memconfig
[*] SKIPPED: chipsec.modules.remap
[CHIPSEC] Modules with Exceptions 7:
ERROR: chipsec.modules.common.bios_smi
ERROR: chipsec.modules.common.ia32cfg
ERROR: chipsec.modules.common.smrr
ERROR: chipsec.modules.common.secureboot.variables
ERROR: chipsec.modules.common.uefi.access_uefispec
ERROR: chipsec.modules.common.uefi.s3bootscript
ERROR: chipsec.modules.smm_dma
[CHIPSEC] *****************************************************************

So chipsec.modules.common.bios_wp and chipsec.modules.common.spi_desc failed, here is the details:

[*] running module: chipsec.modules.common.bios_wp
[x][ =======================================================================
[x][ Module: BIOS Region Write Protection
[x][ =======================================================================
[*] BC = 0x00 << BIOS Control (b:d.f 00:31.0 + 0xDC)
    [00] BIOSWE           = 0 << BIOS Write Enable 
    [01] BLE              = 0 << BIOS Lock Enable 
    [02] SRC              = 0 << SPI Read Configuration 
    [04] TSS              = 0 << Top Swap Status 
    [05] SMM_BWP          = 0 << SMM BIOS Write Protection 
[-] BIOS region write protection is disabled!
[*] running module: chipsec.modules.common.spi_desc
[*] Module path: /usr/local/lib/python2.7/site-packages/chipsec/modules/common/spi_desc.pyc
[x][ =======================================================================
[x][ Module: SPI Flash Region Access Control
[x][ =======================================================================
[*] FRAP = 0x0000FFFF << SPI Flash Regions Access Permissions Register (SPIBAR + 0x50)
    [00] BRRA             = FF << BIOS Region Read Access 
    [08] BRWA             = FF << BIOS Region Write Access 
    [16] BMRAG            = 0 << BIOS Master Read Access Grant 
    [24] BMWAG            = 0 << BIOS Master Write Access Grant 
[*] Software access to SPI flash regions: read = 0xFF, write = 0xFF
[-] Software has write access to SPI flash descriptor

[-] FAILED: SPI flash permissions allow SW to write flash descriptor

So... is it just a false positive or is there a much bigger trouble there?

Regards,
S

module organization

We've been thinking about reorganizing the location of modules. Currently, we have some under common and some directly in the modules directory. There's not any real difference.

It might make sense to create a new structure to organize modules by type (eg. spi, smm, uefi, etc.) instead.

Issue is to discuss and make changes (or just close if we decide not to change the organization).

Implement option parsing in chipsec_utils.py

Currently, there is not proper command line option parsing in chipsec_utils. Only "-n" is manually implemented. We should implement correct parsing using getopt (similarly to what chipsec_main is doing).

This includes handling:

  • The different verbose modes (-v-, -d, replacing HAL and UTIL_TRACE global variables)
  • Specify a plarform (-p)

[!] WARNING: chipsec.modules.common.uefi.access_uefispec

the warning could be found with CRB BIOS, detail log as below.
Is it normal behavior?

[WARNING]

[!] WARNING: chipsec.modules.common.uefi.access_uefispec
[*] running module: chipsec.modules.common.uefi.access_uefispec

[*] Module path: chipsec/modules/common/uefi/access_uefispec.pyc

[x][ =======================================================================

[x][ Module: Access Control of EFI Variables

[x][ =======================================================================

[*] Testing UEFI variables ..

[!] Found two instances of the variable ConOut.

[*] Variable ConOut (NV+BS+RT)

[*] Variable ConOut (BS)

[!] Missing attributes:NV+RT

[!] Found two instances of the variable ConIn.

[*] Variable ConIn (NV+BS+RT)

[*] Variable ConIn (BS)

[!] Missing attributes:NV+RT

[-] Variables with attributes that differ from UEFI spec:

ConOut

ConIn

Add firmware_vendor, firmware_product, firmware_type and firmware_version

It would be great to add firmware_vendor, firmware_product, firmware_version and firmware_type functions to chipsec/chipset.py. The actual implementation would be OS dependent and thus should be in helpers. It would also depend if CHIPSEC is running in driver or driverless mode.

  • In driver mode, these should be read directly from SMBIOS tables extracted from memory.
  • In driverless mode, we could use wrappers around GetSystemFirmwareTable and GetFirmwareType on Windows and "/sys/class/dmi/id" and "/sys/firmware/efi" fs on Linux.

unsupported plateforme

ERROR: Unsupported Platform: VID = 0x8086, DID = 0x0044
ERROR: Platform is not supported (Unsupported Platform: VID = 0x8086, DID = 0x0044).

Do you want more information to complete your tool ?

recompile driver on kernel upgrade for linux distro packaging

For linux distros that package chipsec, we will want them to recompile the driver whenever they update the kernel. This may mean that we should store the driver in a separate place from the code. This issue is to figure out the path forward and resolve.

Some options for now:

  • pass a path for where to put the driver as an option to setup.py
  • call driver makefile each time you run chipsec to ensure it is up to date
  • leave as is (linux distro packages may break when distro updates kernel)

OS X 10.11.6: errors with chipsec_util.py

OS X 10.11.6, mid-2010 MBP6,2, SMC v1.58f17, BootROM MBP61.0057.B11

Building the kext with Xcode was fine. Loading it was apparently too… only had to set it to root:wheel beforehand:

sudo kextutil ~/GitHub/chipsec/chipsec/helper/osx/chipsec.kext 
Password:
Diagnostics for ~/GitHub/chipsec/chipsec/helper/osx/chipsec.kext:
Code Signing Failure: not code signed
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext "~/GitHub/chipsec/chipsec/helper/osx/chipsec.kext"
kext signature failure override allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext "~/GitHub/chipsec/chipsec/helper/osx/chipsec.kext"

Then, with the python scripts, the errors began:

sudo python chipsec_util.py spi info
Password:

################################################################
##                                                            ##
##  CHIPSEC: Platform Hardware Security Assessment Framework  ##
##                                                            ##
################################################################
[CHIPSEC] Version 1.2.5
[CHIPSEC] API mode: using CHIPSEC kernel module API
ERROR: Unsupported Platform: VID = 0x8086, DID = 0x0044
WARNING: *******************************************************************
WARNING: * Unknown platform!
WARNING: * Platform dependent functionality will likely be incorrect
WARNING: * Error Message: "Unsupported Platform: VID = 0x8086, DID = 0x0044"
WARNING: *******************************************************************
[CHIPSEC] Executing command 'spi' with args ['info']

Traceback (most recent call last):
  File "chipsec_util.py", line 263, in <module>
    sys.exit( main() )
  File "chipsec_util.py", line 259, in main
    return chipsecUtil.main()
  File "chipsec_util.py", line 226, in main
    comm.run()
  File "~/GitHub/chipsec/chipsec/utilcmd/spi_cmd.py", line 69, in run
    _spi = SPI( self.cs )
  File "/~/GitHub/chipsec/chipsec/hal/spi.py", line 174, in __init__
    self.cs.helper.map_io_space(self.rcba_spi_base, Cfg.SPI_MMIO_BASE_LENGTH, 0)
  File "~/GitHub/chipsec/chipsec/helper/oshelper.py", line 250, in map_io_space
    return self.helper.map_io_space(physical_address, length, cache_type)
AttributeError: 'OSXHelper' object has no attribute 'map_io_space'

…and…

sudo python chipsec_util.py spi dump rom.bin                                                                                  [12:41:41]
Password:

################################################################
##                                                            ##
##  CHIPSEC: Platform Hardware Security Assessment Framework  ##
##                                                            ##
################################################################
[CHIPSEC] Version 1.2.5
[CHIPSEC] API mode: using CHIPSEC kernel module API
ERROR: Unsupported Platform: VID = 0x8086, DID = 0x0044
WARNING: *******************************************************************
WARNING: * Unknown platform!
WARNING: * Platform dependent functionality will likely be incorrect
WARNING: * Error Message: "Unsupported Platform: VID = 0x8086, DID = 0x0044"
WARNING: *******************************************************************
[CHIPSEC] Executing command 'spi' with args ['dump', 'rom.bin']

Traceback (most recent call last):
  File "chipsec_util.py", line 263, in <module>
    sys.exit( main() )
  File "chipsec_util.py", line 259, in main
    return chipsecUtil.main()
  File "chipsec_util.py", line 226, in main
    comm.run()
  File "~/GitHub/chipsec/chipsec/utilcmd/spi_cmd.py", line 69, in run
    _spi = SPI( self.cs )
  File "~/GitHub/chipsec/chipsec/hal/spi.py", line 174, in __init__
    self.cs.helper.map_io_space(self.rcba_spi_base, Cfg.SPI_MMIO_BASE_LENGTH, 0)
  File "~/GitHub/chipsec/chipsec/helper/oshelper.py", line 250, in map_io_space
    return self.helper.map_io_space(physical_address, length, cache_type)
AttributeError: 'OSXHelper' object has no attribute 'map_io_space'

[*] SKIPPED: chipsec.modules.common.smm on Atom

SMRAM enabled and locked is skipped on Atom chipsets (BayTrail). This test should not be skipped as SMRAM is supported and the configuration must be tested.

Related is the smm_dma module, again skipped on Atom chipsets but TSEG and SMRAM configurations should be checked.

chipsec_util not working on macOS

chipsec_main works fine, but when I run chipsec_util.py uefi <any command> I get the following error:

ERROR: 'OSXHelper' object has no attribute 'driver_loaded'

I've tried both using chipsec via pip and installing manually.

macOS 10.12.2
chipsec 1.2.5

Please make a source release on PyPi

Without a PyPi release it is difficult to have a direct dependency on this project. Although it is sometimes possible to have a pip[ dependency (e.g. in requirementst.txt) on a github checkout, because the setup.py in this project is not at the top level this makes it a little more complicated.

It would be very helpful if you could also support PyPi (just a matter running setup.py register, setup.py upload).

Thanks kindly
Michael.

Wrong target directory for XML configuration

Unfortunately, it is not possible to guess the exact directory where the package will be installed. Using virtualenv on Ubuntu, the target directory is "lib/python2.7/site-packages/chipsec/cfg" and not "Lib/site-packages/chipsec/cfg". The correct approach to solve this issue is to use package_data instead of data_files (see https://docs.python.org/2.7/distutils/setupscript.html#installing-package-data). This will copy the *.xml, *.xsd and VERSION files to the expected locations.

Although this seems like the final solution, it is worth noticing that we will now have a VERSION file in the middle of site-packages. Not the cleanest installation... This stems from the current directory layout, especially that the tools/ directory is considered as a package (which is not). Ideally, the chispec_main.py and chipsec_utils.py should be installed as scripts (see https://docs.python.org/2.7/distutils/setupscript.html#installing-scripts) and the VERSION file should simply be removed and the version added to chipsec/__init__.py under the variable __version__ (see PEP 0396).

I've submitted a pull request for the partial fix described in the first paragraph.

[Errno 2] No such file or directory: '/dev/chipsec'

Hi,

I'm seeing this on MacOS Sierra.
I am running as root.
Any suggestions?

Cheers
S

[CHIPSEC] Version 1.2.5
[CHIPSEC] Arguments: 
ERROR: Could not start the OS Helper, are you running as Admin/root?
           Message: "Unable to open the Chipsec device.
[Errno 2] No such file or directory: '/dev/chipsec'"

chipsec_util uefi decode fails

[CHIPSEC] Parsing EFI volumes from '/home/igor/rom_new1.bin'..
Traceback (most recent call last):
  File "chipsec_util.py", line 214, in <module>
    ec = chipsecUtil.main(argv)
  File "chipsec_util.py", line 181, in main
    comm.run()
  File "/home/igor/chipsec/source/tool/chipsec/utilcmd/uefi_cmd.py", line 237, in run
    decode_uefi_region(_uefi, cur_dir, filename, fwtype)
  File "/home/igor/chipsec/source/tool/chipsec/hal/spi_uefi.py", line 496, in decode_uefi_region
    parse_uefi_region_from_file( _uefi, fname, fwtype, fv_pth )
  File "/home/igor/chipsec/source/tool/chipsec/hal/spi_uefi.py", line 483, in parse_uefi_region_from_file
    traverse_uefi_region( _uefi, rom, fwtype, outpath, True, True )
  File "/home/igor/chipsec/source/tool/chipsec/hal/spi_uefi.py", line 458, in traverse_uefi_region
    if dumpall: _uefi.parse_EFI_variables( os.path.join(file_dir_path, 'DEFAULT_NVRAM'), FvImage, False, FWType.EFI_FW_TYPE_NVAR )
NameError: global name 'file_dir_path' is not defined

IIRC it did work a couple months ago.

Handle Native PCI read on OSX

At least, we should be able to read the configuration register of 0:0:0 to initialize the chipset class. This will allow us to execute chipsec_utils commands without the driver loaded.

INI/CFG/JSON data files are not copied when installing CHIPSEC as a package

When installing chipsec as "setup.py install" data files for the modules are not copied.
Options:

  1. Move to setuptools and use "include_package_data = True" or recursive package_data
  2. Specify paths to each data file while using distutils in package_data
  3. Enumerate all ini/cfg/json files recursively for package_data

Can't build the chipsec on x86 32-bit GNU/Linux

Testing platform: Debian 8 + kernel 4.9

root@debian32-test:/home/shawn/chipsec# python setup.py install
running install
running bdist_egg
running egg_info
creating chipsec.egg-info
writing chipsec.egg-info/PKG-INFO
writing top-level names to chipsec.egg-info/top_level.txt
writing dependency_links to chipsec.egg-info/dependency_links.txt
writing entry points to chipsec.egg-info/entry_points.txt
writing manifest file 'chipsec.egg-info/SOURCES.txt'
reading manifest file 'chipsec.egg-info/SOURCES.txt'
writing manifest file 'chipsec.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
creating build
creating build/lib.linux-i686-2.7
copying chipsec_main.py -> build/lib.linux-i686-2.7
copying chipsec_util.py -> build/lib.linux-i686-2.7
creating build/lib.linux-i686-2.7/chipsec_tools
copying chipsec_tools/init.py -> build/lib.linux-i686-2.7/chipsec_tools
creating build/lib.linux-i686-2.7/chipsec
copying chipsec/init.py -> build/lib.linux-i686-2.7/chipsec
copying chipsec/file.py -> build/lib.linux-i686-2.7/chipsec
copying chipsec/defines.py -> build/lib.linux-i686-2.7/chipsec
copying chipsec/module.py -> build/lib.linux-i686-2.7/chipsec
copying chipsec/module_common.py -> build/lib.linux-i686-2.7/chipsec
copying chipsec/logger.py -> build/lib.linux-i686-2.7/chipsec
copying chipsec/command.py -> build/lib.linux-i686-2.7/chipsec
copying chipsec/xmlout.py -> build/lib.linux-i686-2.7/chipsec
copying chipsec/chipset.py -> build/lib.linux-i686-2.7/chipsec
creating build/lib.linux-i686-2.7/chipsec_tools/linux
copying chipsec_tools/linux/init.py -> build/lib.linux-i686-2.7/chipsec_tools/linux
creating build/lib.linux-i686-2.7/chipsec_tools/windows
copying chipsec_tools/windows/init.py -> build/lib.linux-i686-2.7/chipsec_tools/windows
creating build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/init.py -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/common.py -> build/lib.linux-i686-2.7/chipsec/cfg
creating build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/ucode_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/init.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/mmio_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/pci_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/uefi_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/iommu_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/interrupts_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/ec_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/chipset_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/msgbus_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/acpi_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/decode_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/cmos_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/io_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/mem_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/vmm_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/spi_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/spd_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/cpu_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/spidesc_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/mmcfg_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/msr_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/smbus_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
copying chipsec/utilcmd/desc_cmd.py -> build/lib.linux-i686-2.7/chipsec/utilcmd
creating build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/acpi.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/mmio.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/init.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/ec.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/spi.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/tpm.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/uefi.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/iommu.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/vmm.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/hal_base.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/pcidb.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/uefi_common.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/smbus.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/uefi_platform.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/io.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/physmem.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/ucode.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/tpm12_commands.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/msgbus.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/cpuid.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/spi_descriptor.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/cpu.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/acpi_tables.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/pci.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/spi_uefi.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/cmos.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/uefi_search.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/spd.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/iobar.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/paging.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/interrupts.py -> build/lib.linux-i686-2.7/chipsec/hal
copying chipsec/hal/msr.py -> build/lib.linux-i686-2.7/chipsec/hal
creating build/lib.linux-i686-2.7/chipsec/helper
copying chipsec/helper/init.py -> build/lib.linux-i686-2.7/chipsec/helper
copying chipsec/helper/oshelper.py -> build/lib.linux-i686-2.7/chipsec/helper
copying chipsec/helper/helpers.py -> build/lib.linux-i686-2.7/chipsec/helper
creating build/lib.linux-i686-2.7/chipsec/modules
copying chipsec/modules/init.py -> build/lib.linux-i686-2.7/chipsec/modules
copying chipsec/modules/remap.py -> build/lib.linux-i686-2.7/chipsec/modules
copying chipsec/modules/smm_dma.py -> build/lib.linux-i686-2.7/chipsec/modules
copying chipsec/modules/memconfig.py -> build/lib.linux-i686-2.7/chipsec/modules
creating build/lib.linux-i686-2.7/chipsec/helper/efi
copying chipsec/helper/efi/init.py -> build/lib.linux-i686-2.7/chipsec/helper/efi
copying chipsec/helper/efi/efihelper.py -> build/lib.linux-i686-2.7/chipsec/helper/efi
creating build/lib.linux-i686-2.7/chipsec/helper/osx
copying chipsec/helper/osx/init.py -> build/lib.linux-i686-2.7/chipsec/helper/osx
copying chipsec/helper/osx/helper.py -> build/lib.linux-i686-2.7/chipsec/helper/osx
creating build/lib.linux-i686-2.7/chipsec/helper/linux
copying chipsec/helper/linux/init.py -> build/lib.linux-i686-2.7/chipsec/helper/linux
copying chipsec/helper/linux/helper.py -> build/lib.linux-i686-2.7/chipsec/helper/linux
creating build/lib.linux-i686-2.7/chipsec/helper/win
copying chipsec/helper/win/init.py -> build/lib.linux-i686-2.7/chipsec/helper/win
copying chipsec/helper/win/win32helper.py -> build/lib.linux-i686-2.7/chipsec/helper/win
creating build/lib.linux-i686-2.7/chipsec/modules/byt
copying chipsec/modules/byt/init.py -> build/lib.linux-i686-2.7/chipsec/modules/byt
creating build/lib.linux-i686-2.7/chipsec/modules/tools
copying chipsec/modules/tools/init.py -> build/lib.linux-i686-2.7/chipsec/modules/tools
creating build/lib.linux-i686-2.7/chipsec/modules/common
copying chipsec/modules/common/init.py -> build/lib.linux-i686-2.7/chipsec/modules/common
copying chipsec/modules/common/bios_ts.py -> build/lib.linux-i686-2.7/chipsec/modules/common
copying chipsec/modules/common/bios_wp.py -> build/lib.linux-i686-2.7/chipsec/modules/common
copying chipsec/modules/common/spi_fdopss.py -> build/lib.linux-i686-2.7/chipsec/modules/common
copying chipsec/modules/common/bios_smi.py -> build/lib.linux-i686-2.7/chipsec/modules/common
copying chipsec/modules/common/spi_desc.py -> build/lib.linux-i686-2.7/chipsec/modules/common
copying chipsec/modules/common/rtclock.py -> build/lib.linux-i686-2.7/chipsec/modules/common
copying chipsec/modules/common/ia32cfg.py -> build/lib.linux-i686-2.7/chipsec/modules/common
copying chipsec/modules/common/smm.py -> build/lib.linux-i686-2.7/chipsec/modules/common
copying chipsec/modules/common/bios_kbrd_buffer.py -> build/lib.linux-i686-2.7/chipsec/modules/common
copying chipsec/modules/common/spi_lock.py -> build/lib.linux-i686-2.7/chipsec/modules/common
copying chipsec/modules/common/smrr.py -> build/lib.linux-i686-2.7/chipsec/modules/common
creating build/lib.linux-i686-2.7/chipsec/modules/snb
copying chipsec/modules/snb/init.py -> build/lib.linux-i686-2.7/chipsec/modules/snb
creating build/lib.linux-i686-2.7/chipsec/modules/ivb
copying chipsec/modules/ivb/init.py -> build/lib.linux-i686-2.7/chipsec/modules/ivb
creating build/lib.linux-i686-2.7/chipsec/modules/bdw
copying chipsec/modules/bdw/init.py -> build/lib.linux-i686-2.7/chipsec/modules/bdw
creating build/lib.linux-i686-2.7/chipsec/modules/hsw
copying chipsec/modules/hsw/init.py -> build/lib.linux-i686-2.7/chipsec/modules/hsw
creating build/lib.linux-i686-2.7/chipsec/modules/tools/cpu
copying chipsec/modules/tools/cpu/init.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/cpu
copying chipsec/modules/tools/cpu/sinkhole.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/cpu
creating build/lib.linux-i686-2.7/chipsec/modules/tools/secureboot
copying chipsec/modules/tools/secureboot/init.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/secureboot
copying chipsec/modules/tools/secureboot/te.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/secureboot
creating build/lib.linux-i686-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/init.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/pcie_overlap_fuzz.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/common.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/cpuid_fuzz.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/pcie_fuzz.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/msr_fuzz.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/iofuzz.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/venom.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm
copying chipsec/modules/tools/vmm/hypercallfuzz.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm
creating build/lib.linux-i686-2.7/chipsec/modules/tools/uefi
copying chipsec/modules/tools/uefi/init.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/uefi
copying chipsec/modules/tools/uefi/blacklist.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/uefi
copying chipsec/modules/tools/uefi/s3script_modify.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/uefi
creating build/lib.linux-i686-2.7/chipsec/modules/tools/smm
copying chipsec/modules/tools/smm/init.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/smm
copying chipsec/modules/tools/smm/smm_ptr.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/smm
creating build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/xen
copying chipsec/modules/tools/vmm/xen/init.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/xen
copying chipsec/modules/tools/vmm/xen/hypercall.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/xen
copying chipsec/modules/tools/vmm/xen/hypercallfuzz.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/xen
copying chipsec/modules/tools/vmm/xen/xsa188.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/xen
copying chipsec/modules/tools/vmm/xen/define.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/xen
creating build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/vbox
copying chipsec/modules/tools/vmm/vbox/init.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/vbox
copying chipsec/modules/tools/vmm/vbox/vbox_crash_apicbase.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/vbox
creating build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/init.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/synth_dev.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/synth_kbd.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/hypercall.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/vmbusfuzz.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/hypercallfuzz.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/vmbus.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/hv
copying chipsec/modules/tools/vmm/hv/define.py -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/hv
creating build/lib.linux-i686-2.7/chipsec/modules/common/secureboot
copying chipsec/modules/common/secureboot/init.py -> build/lib.linux-i686-2.7/chipsec/modules/common/secureboot
copying chipsec/modules/common/secureboot/variables.py -> build/lib.linux-i686-2.7/chipsec/modules/common/secureboot
creating build/lib.linux-i686-2.7/chipsec/modules/common/uefi
copying chipsec/modules/common/uefi/init.py -> build/lib.linux-i686-2.7/chipsec/modules/common/uefi
copying chipsec/modules/common/uefi/s3bootscript.py -> build/lib.linux-i686-2.7/chipsec/modules/common/uefi
copying chipsec/modules/common/uefi/access_uefispec.py -> build/lib.linux-i686-2.7/chipsec/modules/common/uefi
copying chipsec/VERSION -> build/lib.linux-i686-2.7/chipsec
copying chipsec/WARNING.txt -> build/lib.linux-i686-2.7/chipsec
copying chipsec_tools/linux/TianoCompress.bin -> build/lib.linux-i686-2.7/chipsec_tools/linux
copying chipsec_tools/linux/LzmaCompress.bin -> build/lib.linux-i686-2.7/chipsec_tools/linux
copying chipsec/cfg/jkt.xml -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/skl.xml -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/avn.xml -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/kbl.xml -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/bdw.xml -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/common.xml -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/qrk.xml -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/hsx.xml -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/cht.xml -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/byt.xml -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/hsw.xml -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/template.xml -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/ivt.xml -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/iommu.xml -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/cfg/chipsec_cfg.xsd -> build/lib.linux-i686-2.7/chipsec/cfg
copying chipsec/modules/tools/secureboot/te.cfg -> build/lib.linux-i686-2.7/chipsec/modules/tools/secureboot
copying chipsec/modules/tools/uefi/blacklist.json -> build/lib.linux-i686-2.7/chipsec/modules/tools/uefi
copying chipsec/modules/tools/smm/smm_config.ini -> build/lib.linux-i686-2.7/chipsec/modules/tools/smm
copying chipsec/modules/tools/vmm/hv/initial_data.json -> build/lib.linux-i686-2.7/chipsec/modules/tools/vmm/hv
running build_ext
building 'chipsec.helper.linux.cores' extension
creating build/temp.linux-i686-2.7
creating build/temp.linux-i686-2.7/chipsec
creating build/temp.linux-i686-2.7/chipsec/helper
creating build/temp.linux-i686-2.7/chipsec/helper/linux
i586-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c chipsec/helper/linux/cores.c -o build/temp.linux-i686-2.7/chipsec/helper/linux/cores.o
i586-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-i686-2.7/chipsec/helper/linux/cores.o -o build/lib.linux-i686-2.7/chipsec/helper/linux/cores.so
building the linux driver
creating /home/shawn/chipsec/build/lib.linux-i686-2.7/drivers
creating /home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux
creating /home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux/i386
copying drivers/linux/i386/cpu.asm -> /home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux/i386
copying drivers/linux/AUTHORS -> /home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux
copying drivers/linux/chipsec_km.c -> /home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux
copying drivers/linux/dkms.conf -> /home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux
copying drivers/linux/README -> /home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux
copying drivers/linux/Makefile -> /home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux
copying drivers/linux/WARNING.txt -> /home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux
/home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux/chipsec_km.c:589:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
ucode_start = (unsigned long long)ucode_buf;
^
/home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux/chipsec_km.c: In function ‘d_ioctl’:
/home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux/chipsec_km.c:1435:18: error: label at end of compound statement
case 8:
^
/home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux/chipsec_km.c:1410:36: warning: unused variable ‘second’ [-Wunused-variable]
unsigned long addr, first, second;
^
/home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux/chipsec_km.c:1410:29: warning: unused variable ‘first’ [-Wunused-variable]
unsigned long addr, first, second;
^
/home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux/chipsec_km.c: In function ‘cleanup_module’:
/home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux/chipsec_km.c:1685:9: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘physaddr_t’ [-Wformat=]
printk(KERN_INFO "auto freeing allocated memory (va = %p, pa = 0x%llx)\n", element->va, element->pa);
^
make[2]: *** [/home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux/chipsec_km.o] Error 1
make[1]: *** [module/home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux] Error 2
make: *** [chipsec] Error 2
Traceback (most recent call last):
File "setup.py", line 206, in
**extra_kw
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 161, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 147, in call_command
self.run_command(cmdname)
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/install_lib.py", line 22, in run
self.build()
File "/usr/lib/python2.7/distutils/command/install_lib.py", line 111, in build
self.run_command('build_ext')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "setup.py", line 112, in run
self._build_linux_driver()
File "setup.py", line 77, in _build_linux_driver
subprocess.check_output(["make", "-C", build_driver])
File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['make', '-C', '/home/shawn/chipsec/build/lib.linux-i686-2.7/drivers/linux']' returned non-zero exit status 2

VERSION file issue

From issue #12:

Although this seems like the final solution, it is worth noticing that we will now have a VERSION file in the middle of site-packages. Not the cleanest installation... This stems from the current directory layout, especially that the tools/ directory is considered as a package (which is not). Ideally, the chispec_main.py and chipsec_utils.py should be installed as scripts (see https://docs.python.org/2.7/distutils/setupscript.html#installing-scripts) and the VERSION file should simply be removed and the version added to chipsec/init.py under the variable version (see PEP 0396).

Parse EFI variables problem with NVAR and EFI_FIRMWARE_FILE_SYSTEM2_GUID

Hi,

I am trying to parse EFI variables with this command but it does not work.

chipsec_util.py decode rom.bin nvar

No EFI variables are dumped except for the DEFAULT_NVAR.

After looking into chipsec source, I think my problem is related to this part of the code:

if fwbin.Name == NVAR_NVRAM_FS_FILE and fwbin.UD:

My rom FV format is EFI_FIRMWARE_FILE_SYSTEM2_GUID and the variables are stored in NVAR_NVRAM_FS_FILE.

The code below seems to solve my problem. Do you think it's a correct solution to implement?

elif fwbin.Type == EFI_FV_FILETYPE_RAW:
    if fwbin.Name == NVAR_NVRAM_FS_FILE: 
        if fwbin.UD:
            if dumpall: _uefi.parse_EFI_variables( os.path.join(fwbin_dir, 'DEFAULT_NVRAM'), fv.Image, False, FWType.EFI_FW_TYPE_NVAR )
        else:
            if dumpall: _uefi.parse_EFI_variables( os.path.join(fwbin_dir, 'NVRAM'), fv.Image, False, FWType.EFI_FW_TYPE_NVAR )

Also, I have notice that this part of code was still using the FvImage variable so I have change it for fv.Image.

Thanks,

Regards,

Sebastien

OSXHelper' object has no attribute 'decompress_file

On Macbook 12 early 2016 - got the update to get past the 'no attribute 'map_io_space'' issue - thanks for that. Now encountering another unimplemented function for OSXHelper: 'decompress_file'.

$ sudo chipsec_main -m tools.uefi.whitelist -a generate
Password:
################################################################

CHIPSEC: Platform Hardware Security Assessment Framework

################################################################
[CHIPSEC] Version 1.2.5
[CHIPSEC] Arguments: -m tools.uefi.whitelist -a generate
[CHIPSEC] API mode: using CHIPSEC kernel module API
[CHIPSEC] OS : Darwin 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
[CHIPSEC] Platform: Mobile 6th Generation Core Processor (Skylake Y)
[CHIPSEC] VID: 8086
[CHIPSEC] DID: 190C

[+] loaded chipsec.modules.tools.uefi.whitelist
[*] running loaded modules ..

[] running module: chipsec.modules.tools.uefi.whitelist
[
] Module arguments (1):
['generate']
[x][ =======================================================================
[x][ Module: simple white-list generation/checking for (U)EFI firmware
[x][ =======================================================================
[] dumping firmware image from ROM to 'fw.bin': 0x006C9000 bytes at [0x00137000:0x007FFFFF]
[
] generating a list of EFI executables from firmware image...
ERROR: Exception occurred during chipsec.modules.tools.uefi.whitelist.run(): ''OSXHelper' object has no attribute 'decompress_file''

[CHIPSEC] *************************** SUMMARY ***************************
[CHIPSEC] Time elapsed 116.709
[CHIPSEC] Modules total 1
[CHIPSEC] Modules failed to run 1:
ERROR: chipsec.modules.tools.uefi.whitelist
[CHIPSEC] Modules passed 0:
[CHIPSEC] Modules failed 0:
[CHIPSEC] Modules with warnings 0:
[CHIPSEC] Modules skipped 0:
[CHIPSEC] Modules with Exceptions 1:
ERROR: chipsec.modules.tools.uefi.whitelist
[CHIPSEC] *****************************************************************

install and run for the first time

when writing "sc create chipsec binpath=<PATH_TO_CHIPSEC_SYS> type= kernel DisplayName="Chipsec driver" as the manual says to do to run chipsec
on cmd , it says "access is denied" why? and what does it mean?

Doesn't work on Macs from EFI shell

Format USB drive as FAT

Download refit EFI shell
http://downloads.sourceforge.net/refit/rEFIt-0.14.dmg?use_mirror=

Copy refit/efi/tools/shell.efi to USB/efi/boot/bootx64.efi

Setup chipsec folders per instructions in manual

Boot Mac holding option

Select "EFI Boot" drive

fs3:\chipsec-master-broke> python chipsec_util.py spi read 0 0x10
################################################################

CHIPSEC: Platform Hardware Security Assessment Framework

################################################################
[CHIPSEC] Version 1.2.5
[CHIPSEC] API mode: using CHIPSEC kernel module API
[CHIPSEC] Executing command 'spi' with args ['read', '0', '0x10']

[CHIPSEC] reading 0x10 bytes from SPI Flash starting at FLA = 0x0
[CHIPSEC] it may take a few minutes (use DEBUG or VERBOSE logger options to see
[spi] reading 0x10 bytes from SPI at FLA = 0x0 (in 4 0x4-byte chunks + 0x0-byte
ERROR: [efi] unsupported size 1 by write_mmio_reg
ERROR: [efi] unsupported size 1 by write_mmio_reg
ERROR: [efi] unsupported size 1 by write_mmio_reg
ERROR: [efi] unsupported size 1 by write_mmio_reg
ERROR: [efi] unsupported size 1 by write_mmio_reg
ERROR: [efi] unsupported size 1 by write_mmio_reg
ERROR: [efi] unsupported size 1 by write_mmio_reg
ERROR: [efi] unsupported size 1 by write_mmio_reg
ERROR: [efi] unsupported size 1 by write_mmio_reg
ERROR: [efi] unsupported size 1 by write_mmio_reg
ERROR: [efi] unsupported size 1 by write_mmio_reg
ERROR: [efi] unsupported size 1 by write_mmio_reg
ERROR: [efi] unsupported size 1 by write_mmio_reg
7c ff ff ff 7c ff ff ff 7c ff ff ff 7c ff ff ff | | | | |
[CHIPSEC] completed SPI flash memory read
[CHIPSEC] (spi read) time elapsed 0.000

write_mmio_reg type mismatch

Both Linux and Windows helpers expect an integer for the parameter 'value' of write_mmio_reg. This is what is being sent from the upper layers (HAL).

The EFI helper however, expect a string/buffer instead. Because of this, commands such as 'spi info' will fail.

Refactor the logging code to use Python's default classes

This is a ticket to keep track of the refactoring of the logging code. What should be done:

  • Refactor logger.py. Create a default logger class that extends logging.Logger. Create three Handlers: console, log file and XML output. Move the coloring code to a Formatter class (we may want to reuse existing code such as coloredlogs).

  • Update all the calling code. Add a self.logger = logging.getLogger(__name__) to automatically populate the location of the log. (No more "[modules]" in the log messages themselves). There should be no more conditional call for logging in the code (i.e., if logger().VERBOSE:...)

  • Update chipsec_main and chipsec_utils to use and configure the new logging flags. (e.g., HAL can be replaced by a filter on the calling site).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.