Metadata-Version: 2.4
Name: cert-uefi-parser
Version: 1.0.3
Summary: Various data structures and parsing tools for UEFI firmware.
Author-email: CERT Threat Analysis Team <cert@cert.org>
License: # CERT UEFI Parser License
        Copyright 2025 Carnegie Mellon University.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are
        met:
        
        Redistributions of source code must retain the above copyright notice,
        this list of conditions and the following disclaimer.
        
        Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
        
        Products derived from this software may not include “Carnegie Mellon
        University,” "SEI” and/or “Software Engineering Institute" in the name
        of such derived product, nor shall “Carnegie Mellon University,” "SEI”
        and/or “Software Engineering Institute" be used to endorse or promote
        products derived from this software without prior written
        permission. For written permission, please contact
        permission@sei.cmu.edu.
        
        ACKNOWLEDGMENTS AND DISCLAIMERS:
        
        CERT UEFI Parser includes and/or can make use of certain third party
        software ("Third Party Software"). The Third Party Software that is
        used by CERT UEFI Parser is dependent upon your system configuration,
        but typically includes the software identified in this license.txt
        file, and/or described in the documentation and/or read me file. By
        using CERT UEFI Parser, you agree to comply with any and all relevant
        Third Party Software terms and conditions contained in any such Third
        Party Software or separate license file distributed with such Third
        Party Software. The parties who own the Third Party Software ("Third
        Party Licensors") are intended third party beneficiaries to this
        License with respect to the terms applicable to their Third Party
        Software. Third Party Software licenses only apply to the Third Party
        Software and not any other portion of CERT UEFI Parser or CERT UEFI
        Parser as a whole.
        
        This material is based upon work supported by the Department of War
        under Air Force Contract No. FA8702-15-D-0002 with Carnegie Mellon
        University for the operation of the Software Engineering Institute, a
        federally funded research and development center.
        
        The opinions, findings, conclusions, and/or recommendations contained
        in this material are those of the author(s) and should not be
        construed as an official US Government position, policy, or decision,
        unless designated by other documentation.
        
        NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING
        INSTITUTE MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON
        UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR
        IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF
        FITNESS FOR PURPOSE OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS
        OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT
        MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT,
        TRADEMARK, OR COPYRIGHT INFRINGEMENT.
        
        [DISTRIBUTION STATEMENT A] This material has been approved for public
        release and unlimited distribution.  Please see Copyright notice for
        non-US Government use and distribution.
        
        DM25-1401
        
Project-URL: Homepage, https://github.com/cmu-sei/cert-uefi-parser
Project-URL: Repository, https://github.com/cmu-sei/cert-uefi-parser
Project-URL: Issues, https://github.com/cmu-sei/cert-uefi-parser/issues
Keywords: uefi,firmware,uefi-parser,support-tools,security,bios
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: System Administrators
Classifier: Topic :: Security
Classifier: Programming Language :: Python :: 3
Classifier: License :: Other/Proprietary License
Classifier: Topic :: Security
Classifier: Topic :: System :: Hardware
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: typing_extensions
Requires-Dist: construct>=2.10.70
Requires-Dist: pefile
Requires-Dist: asn1crypto
Requires-Dist: uswid
Requires-Dist: cert-uefi-support
Provides-Extra: qt
Requires-Dist: PySide6; extra == "qt"
Dynamic: license-file

CERT UEFI Parser
================

The CERT UEFI Parser is a Python-based tool for inspecting firmware ROM
images, installers, and related files, especially those associated with UEFI.
It combines information from the UEFI specifications with insights from
independent firmware research (for example, Igor Skochinsky’s Intel ME work).

Written for Python 3 and built on the Construct parsing framework, the parser
is more flexible than the EDK2 reference implementation and is easier to extend
to proprietary or experimental data structures.  CERT UEFI Parser aims to
support all data formats commonly found inside UEFI ROMs, including Portable
Executables (PEs) and image structures.  The project is free of NDAs or other
restrictions; all proprietary formats have been reverse engineered from public
information and original analysis.

Installation
------------

The parser depends on the **cert-uefi-support** package, which provides
lower-level decompression and binary utilities.  Both packages are now
available on PyPI.

Basic installation:

```
  $ python3 -m venv cert-venv
  $ source cert-venv/bin/activate
  $ pip install cert-uefi-support cert-uefi-parser
```

### Optional GUI Support (Qt)

GUI support is optional and provided via the PySide6 package.  It is a
large dependency, so it is not installed by default.  To install with the GUI
extras:

```
  $ pip install cert-uefi-support cert-uefi-parser[qt]
```


### Installing from the Official Git Repositories


```
  $ python3 -m venv cert-venv
  $ git clone https://github.com/cmu-sei/cert-uefi-support.git
  $ cd cert-uefi-support
  $ git submodule update --init --recursive
  $ ../cert-venv/bin/pip install .
  $ cd ..
  
  $ git clone https://github.com/cmu-sei/cert-uefi-parser.git
  $ cd cert-uefi-parser
  $ ../cert-venv/bin/pip install .
  $ cd ..
```


Usage
-----

CERT UEFI Parser provides four primary output modes: a graphical interface, an
ASCII text display (with ANSI color output enabled by default), a full JSON
representation, and a filtered JSON representation containing fields that are
useful for generating a Software Bill of Materials (SBOM).


```
  $ ./cert-venv/bin/cert-uefi-parser --gui {firmware-related-file}
  $ ./cert-venv/bin/cert-uefi-parser --text {firmware-related-file} | less
  $ ./cert-venv/bin/cert-uefi-parser --json {firmware-related-file} >output.json
  $ ./cert-venv/bin/cert-uefi-parser --sbom {firmware-related-file} >output.json
```


Sample firmware files can typically be obtained by downloading the BIOS or
UEFI update tools from your system vendor’s support site.  While not all
models are guaranteed to be fully supported, many common vendor formats parse
successfully, and examining these update files is a good way to begin exploring
the parser’s capabilities.

