Skip to main content

Tools for analyzing UEFI firmware using radare2/rizin

Project description

License: GPL v3 uefi_r2 CI uefi_r2 pypi

fwhunt Logo

uefi_r2

Tools for analyzing UEFI firmware using radare2/rizin

Dependencies

rizin

commit: d5f1aea5953fb7cbc59d219d7fa13d20390089f7

Installation

Install with pip:

$ python -m pip install uefi-r2

Install manually:

$ git clone https://github.com/binarly-io/uefi_r2.git && cd uefi_r2
$ python setup.py install

Example

With script

./uefi_r2_analyzer.py analyze-image {image_path} -o out.json
./uefi_r2_analyzer.py scan --rule {rule_path} {image_path}

From code

UefiAnalyzer

Basic usage examples:

from uefi_r2.uefi_analyzer import UefiAnalyzer

...
uefi_analyzer = UefiAnalyzer(image_path=image_path)
print(uefi_analyzer.get_summary())
uefi_analyzer.close()
from uefi_r2.uefi_analyzer import UefiAnalyzer

...
with UefiAnalyzer(image_path=image_path) as uefi_analyzer:
    print(uefi_analyzer.get_summary())

On Linux platforms, you can pass blob for analysis instead of file:

from uefi_r2.uefi_analyzer import UefiAnalyzer

...
with UefiAnalyzer(blob=data) as uefi_analyzer:
    print(uefi_analyzer.get_summary())

UefiScanner

from uefi_r2.uefi_analyzer import UefiAnalyzer
from uefi_r2.uefi_scanner import UefiRule, UefiScanner

...
uefi_analyzer = UefiAnalyzer(image_path)
uefi_rule = UefiRule(rule)
scanner = UefiScanner(uefi_analyzer, uefi_rule)
result = scanner.result

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uefi_r2-1.2.2.tar.gz (113.0 kB view details)

Uploaded Source

Built Distribution

uefi_r2-1.2.2-py3-none-any.whl (129.1 kB view details)

Uploaded Python 3

File details

Details for the file uefi_r2-1.2.2.tar.gz.

File metadata

  • Download URL: uefi_r2-1.2.2.tar.gz
  • Upload date:
  • Size: 113.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2

File hashes

Hashes for uefi_r2-1.2.2.tar.gz
Algorithm Hash digest
SHA256 528cff9287ba1fd5db26832b18361ac5836561d0656487bafae357ef422b0d50
MD5 d64710c551bce246fe636552e2c9625f
BLAKE2b-256 dc790191a886e70d5146fddc0167fa23d6531dc863e6c3791aaaf76e97ef6421

See more details on using hashes here.

File details

Details for the file uefi_r2-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: uefi_r2-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 129.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2

File hashes

Hashes for uefi_r2-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 272e1ed0b455f6ed80b20c2852900d1d7b5575aff6311d1a12ae5a6c7417ed19
MD5 e08eff9e4d878e095f7c6ddbceebfec3
BLAKE2b-256 1b1d13a497595c52eb158782a65ec432b91da5c7a1d75dd0c6bd88fd3ab791da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page