You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firmware Analysis Toolkit (FAT henceforth) is based on Firmadyne with some changes. Firmadyne uses a PostgreSQL database to store information about the emulated images. However just for the core functionality i.e. emulating firmware, PostgreSQL is not really needed. Hence FAT doesn't use it.
24
18
25
19
## Setup instructions
26
20
27
-
If you are a training student and setting this as a pre-requirement for the training, it is recommended to install the tools in the /root/tools folder, and individual tools in there.
FAT is developed in Python 3. However you need to have both Python 3 and Python 2 installed since parts of Firmadyne and its dependencies use Python 2. It's highly recommended to install FAT inside a Virtual Machine.
Adjust the paths to firmadyne and binwalk in `fat.py` and `reset.py`. Additionally, provide the root password. Firmadyne requires root privileges for some of its operations. The root password is provided in the script itself to automate the process.
31
+
After installation is completed, edit the file `fat.config` and provide the sudo password as shown below. Firmadyne requires sudo privileges for some of its operations. The sudo password is provided to automate the process.
77
32
78
-
```python
79
-
# Configurations - change this according to your system
Find the location of binwalk using `which binwalk` . Modify the file `shared-ng.inc` to change the value of variable `BINWALK` to the value of `/usr/local/bin/binwalk` (if that is where your binwalk is installed). .
Once you have completed the above steps you can run can fat. The syntax for running fat is
110
-
111
-
112
41
```
113
-
$ python fat.py <firmware file>
42
+
$ ./fat.py <firmware file>
114
43
```
115
44
116
-
+ Provide the firmware filename as an argument to the script. If not provided, the script would prompt for it at runtime.
117
-
118
-
+ The script will then ask you to enter the brand name. Enter the brand which the firmware belongs to. This is for pure database storage and categorisational purposes.
45
+
+ Provide the firmware filename as an argument to the script.
119
46
120
47
+ The script would display the IP addresses assigned to the created network interfaces. Note it down.
121
48
122
49
+ Finally, it will say that running the firmware. Hit ENTER and wait until the firmware boots up. Ping the IP which was shown in the previous step, or open in the browser.
123
50
124
-
***Congrats! The firmware is finally emulated. The next step will be to setup the proxy in Firefox and run mitmproxy.***
[+] command line : sudo /home/ec/firmadyne/scratch/1/run.sh
162
-
[*] Press ENTER to run the firmware...
75
+
[+] Firmware: DIR-601_REVB_FIRMWARE_2.01.BIN
76
+
[+] Extracting the firmware...
77
+
[+] Image ID: 1
78
+
[+] Identifying architecture...
79
+
[+] Architecture: mipseb
80
+
[+] Building QEMU disk image...
81
+
[+] Setting up the network connection, please standby...
82
+
[+] Network interfaces: [('br0', '192.168.0.1')]
83
+
[+] All set! Press ENTER to run the firmware...
84
+
[+] When running, press Ctrl + A X to terminate qemu
163
85
```
86
+
87
+
## Additional Notes
88
+
89
+
- As of now, the [ARM firmadyne kernel](https://github.com/firmadyne/kernel-v4.1) doesn't work with the latest version of Qemu (2.11.1) available on the Ubuntu 18.04 official repositiory. However, Qemu (2.5.0) on Ubuntu 16.04 does work.
90
+
91
+
- If no network interfaces are detected, try increasing the timeout value from 60 in `scripts/inferNetwork.sh` as shown below
92
+
```
93
+
echo "Running firmware ${IID}: terminating after 60 secs..."
0 commit comments