uefi_r2
Tools for analyzing UEFI firmware using radare2/rizin
Dependencies
rizin
min commit: d5f1aea5953fb7cbc59d219d7fa13d20390089f7
max commit: c09ff31205f18f478234249fc76b101ebb101663 (v0.3.3)
Installation
Install with pip (tested on python3.6 and above):
$ 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
Metadata
Release files for uefi-r2 1.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| uefi_r2-1.2.4.tar.gz | 113.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| uefi_r2-1.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 242.6 kB
Release files / uefi_r2-1.2.4.tar.gz
| Download URL | uefi_r2-1.2.4.tar.gz |
|---|---|
| Size | 113.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77c270575c7f1f08bfa02c1d2473671ef1c706d708aaa539b27f4010f7e446ad
|
|
BLAKE2b-256 checksum How to use checksums |
8ab7c75eec580d3c5d49191f3c673cc53d19b5a83ac045bf6091de9641bb3206
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / uefi_r2-1.2.4-py3-none-any.whl
| Download URL | uefi_r2-1.2.4-py3-none-any.whl |
|---|---|
| Size | 129.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab6b8750821cf032200bf5f76623e038b7289e311f9ef1f08864222273cc4888
|
|
BLAKE2b-256 checksum How to use checksums |
ce53f705382f6029676ff0ca521782be686ba297878d93a1b5a230e5fda7d0a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|