233 Commits

Author SHA1 Message Date
c7zero 7e3bd57562 added github user v1.2.5 2016-11-10 18:04:54 -08:00
Thiébaud Weksteen 9765775224 Use test_suite to run the tests (#119) 2016-11-07 17:56:24 -08:00
c7zero 8ee894b880 More generic handling of chipsec tools (#118)
* More generic handling of chipsec_tools

* file extension fix

* Installing chipsec-manual.pdf
2016-11-04 14:38:06 -07:00
c7zero f87207a0fc Updated Linux installation instructions in chipsec-manual.pdf 2016-11-04 14:13:35 -07:00
c7zero 911701c69d Revert "Updated Linux install instructions in chipsec-manual.pdf"
This reverts commit f7722edf76.
2016-11-04 14:09:54 -07:00
c7zero f7722edf76 Updated Linux install instructions in chipsec-manual.pdf 2016-11-04 14:06:05 -07:00
Thiébaud Weksteen 63991da054 Improve build_ext (#115) 2016-11-03 15:27:24 -07:00
timevortex 58b531aef9 Only align to 4KB if WP or RP is set (#117)
Prior to this change, the output was:
[*] BIOS Region: Base = 0x00510000, Limit = 0x00FFFFFF
SPI Protected Ranges
------------------------------------------------------------
PRx (offset) | Value    | Base     | Limit    | WP? | RP?
------------------------------------------------------------
PR0 (74)     | 8FFF0FF0 | 00FF0000 | 00FFFFFF | 1   | 0 
PR1 (78)     | 00000000 | 00000000 | 00000FFF | 0   | 0 
PR2 (7C)     | 00000000 | 00000000 | 00000FFF | 0   | 0 
PR3 (80)     | 00000000 | 00000000 | 00000FFF | 0   | 0 
PR4 (84)     | 00000000 | 00000000 | 00000FFF | 0   | 0 

Now: it is:
[*] BIOS Region: Base = 0x00510000, Limit = 0x00FFFFFF
SPI Protected Ranges
------------------------------------------------------------
PRx (offset) | Value    | Base     | Limit    | WP? | RP?
------------------------------------------------------------
PR0 (74)     | 8FFF0FF0 | 00FF0000 | 00FFFFFF | 1   | 0 
PR1 (78)     | 00000000 | 00000000 | 00000000 | 0   | 0 
PR2 (7C)     | 00000000 | 00000000 | 00000000 | 0   | 0 
PR3 (80)     | 00000000 | 00000000 | 00000000 | 0   | 0 
PR4 (84)     | 00000000 | 00000000 | 00000000 | 0   | 0
2016-10-28 12:16:00 -07:00
c7zero 716e28f70d SPI HAL cleanup to use XML config (#114)
Removed hardcoded offsets from hal.spi when reading FREGx and PRx and
replaced with XML config.

This commit also includes PR #109 (Make sure Limit of SPI Protected
Range is calculated correctly) by @timevortex except bits 11:0 of PRx
limit are also set to FFFh when PRL field is 0 (in this case PRx applies
to the first 4kB of flash).
2016-10-27 08:56:42 -07:00
Thiébaud Weksteen 303b3c9822 Add --skip-driver option to setup.py (#113) 2016-10-26 00:02:53 -07:00
Thiébaud Weksteen 9653a5c709 Remove driver loading/unloading from hardware tests (#112) 2016-10-25 14:01:48 -07:00
abazhaniuk 9e42ff337d add compression tools to python package (#111) 2016-10-25 14:01:27 -07:00
CHIPSEC 5ddd390d47 Added AUTHORS file 2016-10-20 16:37:24 -07:00
CHIPSEC bd1bf1cca3 Revert "Added AUTHORS file"
This reverts commit 12348da4064aa51955dd55ab9d7ea3b7b917a8f1.
2016-10-20 16:37:24 -07:00
CHIPSEC 52c95a944b Added AUTHORS file 2016-10-20 16:37:24 -07:00
c7zero d7fc07b578 Updated Windows driver readme to close issue #105 2016-10-19 20:34:20 -07:00
c7zero 06b1f0dd5f More documentation update
Fixed passing the argv to chipsec_main.main() and chipsec_util.main()
when importing them as packages
2016-10-19 20:06:28 -07:00
CHIPSEC cd3595239b Skylake/Kabylake platform config update 2016-10-19 01:37:46 -07:00
abazhaniuk 94fe7f02f1 change setup.py build driver by default. change root directory of chipsec. move WARNING.txt to chipsec. remove PKG-INFO (#107) 2016-10-18 18:19:42 -07:00
c7zero fd7849c05e Documentation update 2016-10-15 23:20:32 -07:00
mikhail-gorobets 4f3ad0e732 Hypercall performance improvements and bug fixes (#106) 2016-10-15 15:46:07 -07:00
c7zero 9f90729c51 Windows helper improvements (#102)
* Windows helper improvements

- chipsec service management in Windows helper is simplified via
win32serviceutil, better error handling
- fixed issues with chipsec service not being stopped/deleted
- "exists" command-line option is deprecated. If chipsec service is
running we'll connect to it
- removed support of running old modules that don't inherit BaseModule
- bumped chipsec version to 1.2.5

* Fixing return values in service functions
2016-10-12 23:09:47 -07:00
mikhail-gorobets 7f911df6c3 Merge pull request #103 from mikhail-gorobets/hypercall-ioctl-linux
Hypercall IOCTL for Linux driver
2016-10-12 17:13:24 -07:00
mikhail-gorobets 5fdfb94372 Hypercall IOCTL for Linux driver 2016-10-11 16:55:07 -07:00
c7zero 96dedad18d Fixed logger 2016-10-09 00:53:33 -07:00
mikhail-gorobets e03d31db90 Updated Xen Hypercall Fuzzer (#100)
Added functionality:
- basic hypercall fuzzing
- hypervisor information
2016-10-09 00:24:09 -07:00
c7zero 3ac7e77fce Updated BYT.xml and CHT.xml 2016-10-07 01:08:27 -07:00
CHIPSEC 19264866a9 Add/Fix Cherry Trail SoC support (#93)
* compile cores.so with linux driver

* Releasing new modules

added memconfig, common.ia32cfg, common.rtclock, common.spi_fdopss, and
tools.cpu.sinkhole

* Correct name and XML cfg for Cherry Trail

Previously did not have XML config and incorrectly listed as "Braswell".
Tested on Compute Stick CS125 with Atom x5-Z8330.

* Braswell & Cherry Trail have same DID

Further inspection shows that both Braswell and Cherry Trail SoCs share
the same DID. Therefore, modifying the names in chipset.py to reflect
either one.
2016-10-07 00:02:25 -07:00
c7zero 8b14207707 Support of VirtIO devices in hypervisors (#98)
chipsec_util.py vmm virtio
2016-10-06 17:58:58 -07:00
c7zero 7fa0bc6f53 Updated documentation (#96) 2016-10-06 17:15:43 -07:00
c7zero 3b2cb44899 Remove redundant scripts (#95) 2016-10-03 17:56:59 -07:00
c7zero a08d4c2167 Added tools.vmm.xen.xsa188 module (#94)
The module is a DoS PoC for Xen XSA-188 discovered by Mikhail Gorobets
(mikhail-gorobets)
2016-09-29 09:10:00 -07:00
Justin J 83ab7128e7 Add SMILock control to BayTrail config (#77) 2016-09-29 09:09:09 -07:00
c7zero 1fc1bd7209 Fixed search after PR #92 2016-09-26 14:37:02 -07:00
andrew-furtak 6c47d78d51 Added parsing RAW files. Fixed incorrect check in NextFwFile. (#92) 2016-09-26 14:03:08 -07:00
frinzell 48bd9f2afd Added VTGENCTRL register definition (#91) 2016-09-26 14:01:01 -07:00
c7zero fda2e25180 Add detection of EFI binaries vulnerable to ThinkPwn to blacklist config (#89)
* Added detection of EFI binaries vulnerable to ThinkPwn to tools.uefi.blacklist module config

This commit extends blacklist.json black-list configuration file for
tools.uefi.blacklist module with detection of EFI binaries vulnerable to
vulnerability in SystemSmmRuntimeRt a.k.a. 'ThinkPwn' discovered by
Dmytro Oleksiuk (@d_olex). Reference:
http://blog.cr4.sh/2016/06/exploring-and-exploiting-lenovo.html

The attributes detected are
- GUID of vulnerable UEFI SmmRuntime protocol within contents of EFI
binaries
- 2 names (aka UI strings) 'SystemSmmRuntimeRt.efi' and 'SmmRuntime' and
2 GUIDs of vulnerable EFI binaries found in different systems

* Comments
2016-09-21 09:35:17 -07:00
c7zero 86ebc84b20 Fix issue #19 2016-09-15 00:45:45 -07:00
c7zero 8e3d895bb9 Kabylake platform support (#88)
* Kabylake platform support

Added Kabylake Device IDs and configuration XML

* Fixed skl.xml and kbl.xml
2016-09-15 00:21:31 -07:00
c7zero c42b527b9d Updated README 2016-09-10 01:23:55 -07:00
Thiébaud Weksteen 2091060dbb Catch exception when enumerating PCI devices (#87) 2016-09-10 00:10:17 -07:00
Thiébaud Weksteen 647ed5cf33 Check that hardware sequencing is enabled (#86) 2016-09-10 00:06:26 -07:00
andrew-furtak 08dd602a9d Make line endings consistent. Issue #13 fix (#85)
* Line endings converted to DOS

* Switched to Linux OEL/LF
2016-09-07 15:23:33 -07:00
c7zero 4cad75f575 Sync OSX helper with latest OSHelper interface (#83)
PR #59 did modifications to OSHelper interface with native helpers
(usage of start_driver and driver_loaded, removing destroy...). OSX
helper didn't pick them up. This commit syncs OSX helper
2016-09-06 22:12:00 -07:00
andrew-furtak 8cc67f0ade Fix issue #81 as proposed (#82)
* BIOS images parsing improved. Minor issues fixed.

* Fixed ValidateFwVolumeHeader. More accurate driver requirements for uefi cmd.

* More relaxed check in ValidateFwVolumeHeader.

* Changes in NVAR UEFI variables parsing proposed by Sebastien Bourdon-Richard

* Issue #81: fixed error in getNVstore_NVAR, returned wrong NV store. Shortened check UD/not UD and fix NVRAM directory creation in traverse_uefi_region.
2016-09-06 21:42:52 -07:00
abazhaniuk ffc74a766d setup.py supports driver in linux version of CHIPSEC (#80)
* fix path error in chipsec_util after install chipsec on the linux system

* Refactored setup.py for use setuptools. Small changes in chipsec_util/chipsec_main for it

* cleanup

* 1) Moved directory drivers from chipsec/source/drivers to chipsec/source/tool
It's necessary for packing driver source code into python package by setup.py
2) In setup.py for Linux version of CHIPSEC:
  1. Add driver to the package
  2. Add option full_build for build and install CHIPSEC with driver
2016-09-06 21:41:42 -07:00
c7zero 40a8ae5d6e Support of native API mode (#59)
* Native API mode support

With this change CHIPSEC can operate in two modes:
1. Using CHIPSEC own kernel driver (default mode, --no_driver option was
not specified)
2. Native OS API mode when helper API can be implemented via native OS
API (--no_driver command-line option was specified)

At the moment, most of the helper API are not implemented in native
mode, except get_ACPI_table in Windows helper.

Helpers, HAL components or modules can use use_native_api() function of
the helper to determine which mode to use. Currently, it directly maps
to --no_driver option. Modules can call this function in is_supported()
if they can only run in either of the modes.

Additional changes:
1. Cleaned up destroy/delete/stop mess in the helpers. Removed destroy()
from the helpers
2. Fixed --exists mode when CHIPSEC works with kernel driver which has
already been loaded.

* Fixed missing driver_exists in start() in Linux and EFI helpers

* Updated mock_helper

* use_native_api

- Added use_native_api to cs
- Added use_native_api routing to OSHelper
- Refactred Linux helper to have "native" functions (physical_mem,
pci_reg, mmio, variables)

* Bugfixes

1. Chaged ACPI HAL to use read_physical_mem in native API mode as well
(/dev/mem) and only attempt get_ACPI_table if helper doesn't implement
native_read_physical_mem
2. Fixed set_EFI_variable in Linux helper
3. Fixed exceptions in OSHelper

* Added raising exceptions in native_read/write_physical_mem in win32helper

* Fixed incorrect change

* UEFI variable changes

- Fixed EFIVAR/VAR_set_EFI_variable return status inconsistency
- Added EFI status codes
- clenup
2016-09-01 17:30:27 -07:00
andrew-furtak 48e3a3b58e VSS UEFI variables parsing improved. Check for correct firmware volumes added. Fixed wrong variable name. (#73)
* BIOS images parsing improved. Minor issues fixed.

* Fixed ValidateFwVolumeHeader. More accurate driver requirements for uefi cmd.

* More relaxed check in ValidateFwVolumeHeader.
2016-08-31 22:59:48 -07:00
c7zero 0dbce79bf9 Add posibility to free allocated memory (#72)
* add IOCTL_FREE_PHYSMEM

* add allocated_mem_list in order to avoid: double free, freeing memory not allocated through IOCTL_ALLOC_PHYSMEM, memory leak because IOCTL_FREE_PHYSMEM is not called
2016-08-31 00:53:31 -07:00
Thiébaud Weksteen b00c037101 Add OSX driver (#69)
* Add alpha version of OSX driver

* Fix README

* Add note on support

* Clean up test

* Change type of CR values

* Add handlers for non-implemented methods
2016-08-25 15:20:18 -07:00