Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
firmware-analysis-toolkit — 用于仿真固件并分析其安全漏洞的工具包 | Kitploit
工具/GitHubGitHub/attify/firmware-analysis-toolkit
嵌入式系统安全物联网安全漏洞分析逆向工程二进制分析学习与教育固件分析
GitHubattify/firmware-analysis-toolkit

firmware-analysis-toolkit

用于仿真固件并分析其安全漏洞的工具包

查看仓库
1.6k2831年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

固件分析工具包

FAT 旨在帮助安全研究人员分析和识别物联网及嵌入式设备固件中的漏洞。该工具也用于由 Attify 举办的“Offensive IoT Exploitation”培训课程。

注意:

  • 目前,它只是一个用于自动化 Firmadyne 的脚本,Firmadyne 是一款用于固件仿真的工具。如果实际仿真遇到问题,请将问题提交到 firmadyne issues。

  • 如果你遇到问题,可以尝试 AttifyOS,它预装了固件分析工具包和其他工具,开箱即用。


固件分析工具包(以下简称 FAT)基于 Firmadyne 并做了一些改动。Firmadyne 使用 PostgreSQL 数据库来存储仿真镜像的信息。但仅就固件仿真的核心功能而言,实际上并不需要 PostgreSQL。因此 FAT 没有使用它。

安装说明

FAT 使用 Python 3 开发。不过你需要同时安装 Python 3 和 Python 2,因为 Firmadyne 及其部分依赖使用 Python 2。强烈建议在虚拟机内安装 FAT。

安装只需克隆仓库并运行脚本 ./setup.sh。

root@kitploit:~
git clone https://github.com/attify/firmware-analysis-toolkit
cd firmware-analysis-toolkit
./setup.sh

安装完成后,编辑文件 fat.config,按如下格式提供 sudo 密码。Firmadyne 的部分操作需要 sudo 权限。提供 sudo 密码是为了实现流程自动化。

root@kitploit:~
[DEFAULT]
sudo_password=attify123
firmadyne_path=/home/attify/firmadyne

运行 FAT

root@kitploit:~
$ ./fat.py <固件文件>
  • 将固件文件名作为参数提供给脚本。

  • 脚本会显示所创建网络接口的 IP 地址。请记下这些地址。

  • 最后,它会提示正在运行固件。按下 ENTER 键,等待固件启动。用上一步显示的 IP 地址执行 ping 操作,或在浏览器中打开。

恭喜!固件已成功仿真。

要清除所有已分析的固件镜像,请运行

root@kitploit:~
$ ./reset.py

示例 1

root@kitploit:~
$ ./fat.py DIR-601_REVB_FIRMWARE_2.01.BIN 

                               __           _   
                              / _|         | |  
                             | |_    __ _  | |_ 
                             |  _|  / _` | | __|
                             | |   | (_| | | |_ 
                             |_|    \__,_|  \__|                    
                    
                Welcome to the Firmware Analysis Toolkit - v0.3
    Offensive IoT Exploitation Training http://bit.do/offensiveiotexploitation
                  By Attify - https://attify.com  | @attifyme
    
[+] Firmware: DIR-601_REVB_FIRMWARE_2.01.BIN
[+] Extracting the firmware...
[+] Image ID: 1
[+] Identifying architecture...
[+] Architecture: mipseb
[+] Building QEMU disk image...
[+] Setting up the network connection, please standby...
[+] Network interfaces: [('br0', '192.168.0.1')]
[+] All set! Press ENTER to run the firmware...
[+] When running, press Ctrl + A X to terminate qemu

Asciicast

asciicast

示例 2

root@kitploit:~
$ ./fat.py DIR890A1_FW103b07.bin --qemu 2.5.0

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

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

[+] Firmware: DIR890A1_FW103b07.bin
[+] Extracting the firmware...
[+] Image ID: 2
[+] Identifying architecture...
[+] Architecture: armel
[+] Building QEMU disk image...
[+] Setting up the network connection, please standby...
[+] Network interfaces: [('br0', '192.168.0.1'), ('br1', '192.168.7.1')]
[+] Using qemu-system-arm from /home/attify/firmware-analysis-toolkit/qemu-builds/2.5.0
[+] All set! Press ENTER to run the firmware...
[+] When running, press Ctrl + A X to terminate qemu

附加说明

  • 目前,ARM firmadyne 内核 无法与 Ubuntu 18.04 官方仓库中的最新版 Qemu (2.11.1) 配合使用。不过,Ubuntu 16.04 上的 Qemu (2.5.0) 可以正常工作。你也可以像示例 2 那样使用 firmadyne 自带的 Qemu (2.5.0)。

  • 如果没有检测到网络接口,请尝试增大 scripts/inferNetwork.sh 中的超时时间(默认 60 秒),修改如下:

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

已知问题

  • FAT 无法在 Ubuntu 20.04 上运行。主要原因在于 Firmadyne 的部分依赖(尤其是 binwalk)需要 Python 2。除非上游修复此问题,否则请坚持使用 Ubuntu 18.04 或更低版本。 Ubuntu 20.04 现已支持。当前版本的 FAT 已修补 binwalk 安装脚本以解决此问题。

构建静态 Qemu

仓库中已经包含了 Qemu 2.0.0、2.5.0 和 3.0.0 的静态构建(在 Releases 中),但如果你想自行构建,请按照以下步骤操作。

在一个干净的 Ubuntu 16.04 虚拟机中运行。(务必使用 16.04,更高版本在静态编译方面存在问题。)

Qemu 2.0.0

root@kitploit:~
sudo apt update && sudo apt build-dep qemu -y
wget https://download.qemu.org/qemu-2.0.0.tar.bz2
tar xf qemu-2.0.0.tar.bz2
mkdir qemu-2.0.0-build
cd qemu-2.0.0
./configure --prefix=$(realpath ../qemu-2.0.0-build) --static --target-list=arm-softmmu,mips-softmmu,mipsel-softmmu --disable-smartcard-nss --disable-spice --disable-libusb --disable-usb-redir
make
make install

编译后的二进制文件位于 qemu-2.0.0-build 目录中。

Qemu 2.5.0

root@kitploit:~
sudo apt update && sudo apt build-dep qemu -y
wget https://download.qemu.org/qemu-2.5.0.tar.bz2
tar xf qemu-2.5.0.tar.bz2
mkdir qemu-2.5.0-build
cd qemu-2.5.0
./configure --prefix=$(realpath ../qemu-2.5.0-build) --static --target-list=arm-softmmu,mips-softmmu,mipsel-softmmu --disable-smartcard --disable-libusb --disable-usb-redir
make 
make install

编译后的二进制文件位于 qemu-2.5.0-build 目录中。

Qemu 3.0.0

root@kitploit:~
sudo apt update && sudo apt build-dep qemu -y
wget https://download.qemu.org/qemu-3.0.0.tar.bz2
tar xf qemu-3.0.0.tar.bz2
mkdir qemu-3.0.0-build
cd qemu-3.0.0
./configure --prefix=$(realpath ../qemu-3.0.0-build) --static --target-list=arm-softmmu,mips-softmmu,mipsel-softmmu --disable-smartcard --disable-libusb --disable-usb-redir
make 
make install

编译后的二进制文件位于 qemu-3.0.0-build 目录中。

注意:也可以在 Alpine 系统上静态编译 Qemu,但此方法尚未经过测试。通常更倾向于在 Alpine 而非 Ubuntu 上进行编译,因为 Alpine 使用 musl libc,其在静态链接方面优于 Ubuntu 上的 glibc。

下载工具