Tools for analyzing UEFI firmware and checking UEFI modules with FwHunt rules
Project description
FwHunt Community Scanner
Tools for analyzing UEFI firmware and checking UEFI modules with FwHunt rules.
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 fwhunt-scan
Install manually:
$ git clone https://github.com/binarly-io/fwhunt-scan.git && cd fwhunt_scan
$ python setup.py install
Example
With script
./fwhunt_scan_analyzer.py analyze-image {image_path} -o out.json
./fwhunt_scan_analyzer.py scan --rule {rule_path} {image_path}
From code
UefiAnalyzer
Basic usage examples:
from fwhunt_scan.uefi_analyzer import UefiAnalyzer
...
uefi_analyzer = UefiAnalyzer(image_path=image_path)
print(uefi_analyzer.get_summary())
uefi_analyzer.close()
from fwhunt_scan.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 fwhunt_scan.uefi_analyzer import UefiAnalyzer
...
with UefiAnalyzer(blob=data) as uefi_analyzer:
print(uefi_analyzer.get_summary())
UefiScanner
from fwhunt_scan.uefi_analyzer import UefiAnalyzer
from fwhunt_scan.uefi_scanner import UefiRule, UefiScanner
...
uefi_analyzer = UefiAnalyzer(image_path)
# rule1 and rule2 - contents of the rules on YAML format
uefi_rules = [UefiRule(rule1), UefiRule(rule2)]
scanner = UefiScanner(uefi_analyzer, uefi_rules)
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
fwhunt_scan-2.0.0.tar.gz
(113.3 kB
view hashes)
Built Distribution
fwhunt_scan-2.0.0-py3-none-any.whl
(129.1 kB
view hashes)
Close
Hashes for fwhunt_scan-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5efa0d7bc41047dc50d9b37a2a209559715157a1e82f16c08727fdf1368faba |
|
MD5 | d59e6289838778366b165c3685512f0a |
|
BLAKE2b-256 | b1b93aa6a3214ca99b9074bc580c2e918b14665e13d3d7ac58424c3132cfe80c |