forked from ReFirmLabs/binwalk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
101 lines (58 loc) · 3.6 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
BEFORE YOU START
-----------------------------------------
Binwalk supports Python 2.7 - 3.x. Although binwalk is slightly faster in Python 3, the Python OpenGL bindings
are still experimental for Python 3, so Python 2.7 is recommended.
The following installation procedures assume that you are installing binwalk to be run using Python 2.7.
If you want to use binwalk in Python 3, some package names and installation procedures may differ slightly.
You will also need to have a C compiler installed to build the supporting C libraries.
INSTALLATION
-----------------------------------------
Installation follows the typical configure/make process:
$ ./configure
$ make deps # Skip this if you don't want extraction utilities and dependencies auto-installed
$ make
$ sudo make install
Note that 'make deps' should work on most Debian and RedHat based systems. If this does not work for your system,
see below for manaully installing dependencies / extraction utilities.
MANUALLY INSTALLING DEPENDENCIES
-----------------------------------------
Most binwalk features will work out of the box without any additional dependencies. However, to take full advantage
of binwalk's capabilities, you need to install:
o libmagic
o libfuzzy
o pyqtgraph
Most Unix systems will already have libmagic installed (it is used by the Unix 'file' utility). If not, you can install
it via your system's package manager:
$ sudo apt-get install libmagic1
Or install it from source:
$ wget ftp://ftp.astron.com/pub/file/file-5.14.tar.gz
$ tar -zxvf file-5.14.tar.gz
$ cd file-5.14 && ./configure && make && sudo make install
For most Debian based distros, libfuzzy can be installed via apt-get:
$ sudo apt-get install libfuzzy2
To install libfuzzy from source, download the gzipped tarball from http://ssdeep.sourceforge.net/#download, then run:
$ tar -zxvf ssdeep-2.10.tar.gz
$ cd ssdeep-2.10 && ./configure && make && sudo make install
You'll need to install the dependencies for pyqtgraph (you may also need to install OpenGL drivers for your video card):
$ sudo apt-get install libqt4-opengl python-opengl python-qt4 python-qt4-gl python-numpy python-scipy
Most distros don't have pyqtgraph in their default repositories, so it's best to install it from source:
$ wget http://www.pyqtgraph.org/downloads/pyqtgraph-0.9.8.tar.gz
$ tar -zxvf pyqtgraph-0.9.8.tar.gz
$ cd pyqtgraph-0.9.8 && sudo ./setup.py install
MANUALLY INSTALLING EXTRACTION UTILITIES
-------------------------------------------
Binwalk can automatically invoke external extraction utilities to extract various types of files that it may find during
a scan. These utilities are optional, but recommended if you plan on using binwalk's extraction features.
Most utilities can be installed from your distro's repositories (package names may vary slightly based
on your particular distro):
$ sudo apt-get install git mtd-utils zlib1g-dev liblzma-dev ncompress gzip bzip2 tar arj p7zip p7zip-full openjdk-6-jdk
However, the Firmware-Mod-Kit, which contains many file system extractors, needs to be built from source
and placed in the /opt/firmware-mod-kit directory:
$ sudo mkdir -p /opt/firmware-mod-kit
$ sudo chmod -R a+rwx /opt/firmware-mod-kit
$ git clone https://code.google.com/p/firmware-mod-kit /opt/firmware-mod-kit/
$ cd /opt/firmware-mod-kit/src && ./configure && make
UNINSTALL
-----------------------------------------
The following command will remove binwalk from your system (note that this does *not* include dependencies installed via 'make deps'):
$ sudo make uninstall