Tools for analyzing UEFI firmware using radare2/rizin
Project description
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
Release history Release notifications | RSS feed
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.1.3.tar.gz
(111.0 kB
view details)
Built Distribution
uefi_r2-1.1.3-py3-none-any.whl
(127.2 kB
view details)
File details
Details for the file uefi_r2-1.1.3.tar.gz
.
File metadata
- Download URL: uefi_r2-1.1.3.tar.gz
- Upload date:
- Size: 111.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a7d124f501ec3320abebe02a8a19bc1f6c5d68989d50decfd18bc61cb3b8a00 |
|
MD5 | c396771b2186237b198872747986f130 |
|
BLAKE2b-256 | c915a38a2f385cca1396f1df6f4412dfe27271251cd755676d505da5d73b04a6 |
File details
Details for the file uefi_r2-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: uefi_r2-1.1.3-py3-none-any.whl
- Upload date:
- Size: 127.2 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3aa7a31047d1cac0b6ef34d84025d9057e15eda08ace0c1fc41dd03f6d7b88c |
|
MD5 | b826ee8dc21fe608fecac0b45a13f065 |
|
BLAKE2b-256 | f3ce7934d8a8e77e0ec07749bb77fe8dd0af7e510c6529cd9df45437724b9ef3 |