Binwalk Extractor failed

See original GitHub issue

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).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
mittybeercommented, Jul 31, 2022

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 @.***>

This issue was fixed in 6911f56 https://github.com/pr0v3rbs/FirmAE/commit/6911f56d92937b0d30bb58ab36d622c31a97a1ee

— Reply to this email directly, view it on GitHub https://github.com/pr0v3rbs/FirmAE/issues/33#issuecomment-1200385427, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATNYJ77YT72JVPAY2JFAMX3VWZAGNANCNFSM5E5BHUDA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

1reaction
lovericscommented, Nov 2, 2021

In FirmAE/sources/extractor/extractor.py on line 445 add --run-as=root to binwalk-scan. This will allow binwalk to run as expected.

for module in binwalk.scan(self.item, "--run-as=root", "-e", "-r", "-C", self.temp,
                                       signature=True, quiet=True):
Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to run external extractor [HELP] · Issue #171 - GitHub
The extraction tools unsquashfs and sasquatch aren't installed on your system. Check out the installation documentation on how to install ...
Read more >
External extractor '7z' error when extract F/W image use Binwalk
Got error when tried to extract compressed F/W image use Binwalk 2.3.3: WARNING: Extractor.execute failed to run external extractor '7z e -y ...
Read more >
FS#65997 : [binwalk] Binwalk extract doesn't work for squasfs ...
Trying to extract parts from a firmware which has a squashfs part with the '-e' option fails with the following message: $ binwalk...
Read more >
binwalk - butter-fly
failed to run external extractor 'sasquatch -p 1 -le -d ... module for binwalk to provide proper LZMA identification and extraction results.
Read more >
1511958 – binwalk should depend on p7zip-plugins
Description of problem: Fails to extract TP-Link firmware without p7zip-plugins installed. Version-Release number of selected component (if ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found