Nicolas Iooss 9be66dadbd Replace print_buffer(bytestostring(data)) with print_buffer_bytes
`print_buffer_bytes` can directly handle bytes, instead of converting
them to a string.

While at it, replace buggy calls to `print_buffer(buffer)` (when
`buffer` uses type `bytes`) with `print_buffer_bytes(buffer)`.
This fixes `./chipsec_util.py idt 0`. Before it failed with:

    [CHIPSEC] Dumping IDT of 8 CPU threads
    [cpu0] Physical Address: 0x000000036639E000
    [cpu0] # of entries    : 256
    [cpu0] Contents (4 entries):
    Traceback (most recent call last):
      File "./chipsec_util.py", line 210, in <module>
        sys.exit(main())
      File "./chipsec_util.py", line 205, in main
        return chipsecMain.main()
      File "./chipsec_util.py", line 190, in main
        comm.run()
      File "chipsec/utilcmd/desc_cmd.py", line 84, in run
        self.cs.msr.IDT_all(4)
      File "chipsec/hal/msr.py", line 166, in IDT_all
        self.IDT(tid, num_entries)
      File "chipsec/hal/msr.py", line 158, in IDT
        return self.dump_Descriptor_Table(cpu_thread_id, DESCRIPTOR_TABLE_CODE_IDTR, num_entries)
      File "chipsec/hal/msr.py", line 144, in dump_Descriptor_Table
        print_buffer(dt)
      File "chipsec/logger.py", line 493, in print_buffer
        prt_str = bytes2string(arr, length)
      File "chipsec/logger.py", line 466, in bytes2string
        num_string += [f'{ord(c):02X} ']
    TypeError: ord() expected string of length 1, but int found

There was another bug in `hal/msr.py` where `ord(dt[...])` was used
instead of `dt`.

Signed-off-by: Nicolas Iooss <nicolas.iooss_git@polytechnique.org>
2023-05-31 16:39:35 -07:00
2023-05-31 09:40:42 -07:00
2023-05-08 09:27:49 -07:00
2023-05-26 18:33:08 -07:00
2022-05-18 13:14:24 -07:00
2023-05-26 18:32:51 -07:00
2023-05-26 18:32:51 -07:00
2023-05-31 09:40:42 -07:00
2016-06-30 15:34:21 -07:00
2014-03-06 13:57:11 -08:00
2022-07-25 17:05:40 -07:00
2022-02-09 16:38:01 -08:00
2023-05-10 16:38:26 -07:00

CHIPSEC: Platform Security Assessment Framework

Build Status

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: chipsec@intel.com

Mailing list:

Twitter:

For AMD related questions or suggestions please contact Gabriel Kerneis at: Gabriel.Kerneis@ssi.gouv.fr

S
Description
Automated archival mirror of github.com/chipsec/chipsec
Readme GPL-2.0 130 MiB
Languages
Python 90.6%
C 7.6%
Assembly 1.6%
Batchfile 0.1%