FirmAE: Binwalk Extractor failed
Just tested this on 2 freshly installed Ubuntu machines. When trying to run FirmAE, binwalk seems to throw some errors related to its running uid.
sudo ./run.sh -c dlink ../Downloads/dataset/dlink/DIR822B1_FW200KRb06.bin
[*] ../Downloads/dataset/dlink/DIR822B1_FW200KRb06.bin emulation start!!!
Extractor Exception: Binwalk extraction uses many third party utilities, which may not be secure. If you wish to have extraction utilities executed as the current user, use '--run-as=root' (binwalk itself must be run as root).
----------------------------------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/binwalk/core/module.py", line 258, in __init__
self.load()
File "/usr/local/lib/python3.9/dist-packages/binwalk/modules/extractor.py", line 147, in load
raise ModuleException("Binwalk extraction uses many third party utilities, which may not be secure. If you wish to have extraction utilities executed as the current user, use '--run-as=%s' (binwalk itself must be run as root)." % user_info.pw_name)
binwalk.core.exceptions.ModuleException: Binwalk extraction uses many third party utilities, which may not be secure. If you wish to have extraction utilities executed as the current user, use '--run-as=root' (binwalk itself must be run as root).
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 17 (10 by maintainers)
Commits related to this issue
- Enforcing root user for binwalk Issue #33 — committed to pr0v3rbs/FirmAE by pr0v3rbs 3 years ago
- Revert d75cd1b and set the binwalk version 2.3.1 Issue #33 — committed to pr0v3rbs/FirmAE by pr0v3rbs 3 years ago
- Pin binwalk version to 2.3.1 in `core/Dockerfile`. See #33. — committed to Kibouo/FirmAE by Kibouo 3 years ago
Great!
Thanks a lot. I Will be testing it with my students next week.
Kind regards,
Mick Beer
Op zo 31 jul. 2022 om 11:18 schreef Mingeun Kim @.***>
In FirmAE/sources/extractor/extractor.py on line 445 add
--run-as=roottobinwalk-scan. This will allow binwalk to run as expected.@pr0v3rbs Im Already root user that’s why
sudois missing in the command. (anyway i checked also with sudo before i commented.)# sudo ./run.sh -d tplink /root/Desktop/firmware/DIR880A1_FW107WWb08.bin[*] /root/Desktop/firmware/DIR880A1_FW107WWb08.bin emulation start!!!General Error: Cannot open file --run-as=root (CWD: /tmp/tmpgm2pp_2h) : [Errno 2] No such file or directory: ‘–run-as=root’
Traceback (most recent call last): File “/root/Desktop/FirmAE/./sources/extractor/extractor.py”, line 445, in extract for module in binwalk.scan(self.item, “–run-as=root”, “-e”, “-r”, “-C”, self.temp, File “/usr/lib/python3/dist-packages/binwalk/init.py”, line 10, in scan objs = m.execute() File “/usr/lib/python3/dist-packages/binwalk/core/module.py”, line 783, in execute obj = self.run(module) File “/usr/lib/python3/dist-packages/binwalk/core/module.py”, line 802, in run obj = self.load(module, kwargs) File “/usr/lib/python3/dist-packages/binwalk/core/module.py”, line 833, in load argv.update(self.dependencies(module, argv[‘enabled’])) File “/usr/lib/python3/dist-packages/binwalk/core/module.py”, line 865, in dependencies raise ModuleException(“Failed to load " + dependency.name + " module”) binwalk.core.exceptions.ModuleException: Failed to load General module
thanks