前言

最近开始搞IoT,这里记录一下工具准备的过程。使用了attify OS,内含了很多工具,也包括了fat,这里主要记录一下fat的使用以及调错过程。

fat

fat项目地址

安装

1
2
3
git clone https://github.com/attify/firmware-analysis-toolkit
cd firmware-analysis-toolkit
./setup.sh

国内网络较差,可能需要使用科学上网工具。

配置fat.config

1
2
3
[DEFAULT]
sudo_password=attify123
firmadyne_path=/home/attify/firmadyne

使用

1
2
3
$ ./fat.py <firmware file>
# 或者
$ ./fat.py DIR890A1_FW103b07.bin --qemu 2.5.0 # 指定qemu版本

这些都是比较简单的,主要还是记录下我遇到的问题。

问题

不能分配到网卡(类似如下情况issues

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
iot@attifyos ~/t/firmware-analysis-toolkit> 
./fat.py ~/Desktop/Route/miwifi_r4a_firmware_72d65_2.28.62.bin

__ _
/ _| | |
| |_ __ _ | |_
| _| / _` | | __|
| | | (_| | | |_
|_| \__,_| \__|

Welcome to the Firmware Analysis Toolkit - v0.3
Offensive IoT Exploitation Training http://bit.do/offensiveiotexploitation
By Attify - https://attify.com | @attifyme

[+] Firmware: miwifi_r4a_firmware_72d65_2.28.62.bin
[+] Extracting the firmware...
[+] Image ID: 2
[+] Identifying architecture...
[+] Architecture: mipsel
[+] Building QEMU disk image...
[+] Setting up the network connection, please standby...
[+] Network interfaces: []
[+] All set! Press ENTER to run the firmware...
[+] When running, press Ctrl + A X to terminate qemu

倒数第三行提示没有网卡

解决方案参考

If no network interfaces are detected, try increasing the timeout value from 60 in scripts/inferNetwork.sh as shown below

scripts/inferNetwork.sh中的timeout=60改为timeout=120

1
2
echo "Running firmware ${IID}: terminating after 60 secs..."
timeout --preserve-status --signal SIGINT 60 "${SCRIPT_DIR}/run.${ARCH}.sh" "${IID}"

改为

1
2
echo "Running firmware ${IID}: terminating after 60 secs..."
timeout --preserve-status --signal SIGINT 120 "${SCRIPT_DIR}/run.${ARCH}.sh" "${IID}"