Wednesday, August 28, 2013

Fixing BinWalk in Kali Linux

There is a issue with binwalk that is installed by default in Kali, that causes it to think that 'Plugins' is undefined, the complete error is:

Traceback (most recent call last):
  File "/usr/bin/binwalk", line 536, in <module>
    main()
  File "/usr/bin/binwalk", line 481, in main
    plugins_blacklist=plugin_blacklist)
  File "/usr/lib/pymodules/python2.7/binwalk/__init__.py", line 306, in scan
    self.plugins = Plugins(self, whitelist=plugins_whitelist, blacklist=plugins_blacklist)
NameError: global name 'Plugins' is not defined

A quick fix is to just reinstall it, you can do that with just a few commands:

wget https://binwalk.googlecode.com/files/binwalk-1.2.1.tar.gz
tar xvzf binwalk-1.2.1.tar.gz
cd binwalk-1.2.1/src
./debian_quick_install.sh
And that's all there is to it. Note that at the time of writing this, v1.2.1 is the most current.