Ubuntu下的固件分析Binwalk的安装

本文详细介绍在Ubuntu16环境下安装binwalk的过程,包括Python2.7的安装与配置、依赖库及工具组件的安装等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

自述

这次安装binwalk踩了N多的坑,为大家避一下,并介绍一下软件的安装;

安装

环境

这方面需要是Ubuntu16 这系列的版本的, 刚开始我用的是 Ubuntu20 ,结果报了很多错;

然后需要虚拟机上面安装 python2.7;

安装语句:

一.安装python 2.7

首先使用以下命令更新包列表:

$ sudo apt-get update

然后安装python2.7

$ sudo apt-get install python2.7
$ sudo apt update

安装python2.7 pip

$ sudo apt install python-pip
$ pip install --upgrade pip

二.binwalk安装

$ sudo apt-get update
$ sudo apt-get install build-essential autoconf git
 
# https://github.com/devttys0/binwalk/wiki/Quick-Start-Guide
$ wget https://github.com/devttys0/binwalk/archive/master.zip
$ unzip master.zip
 
$ (cd binwalk-master && sudo python setup.py uninstall && sudo python setup.py install)
 
# 自动安装依赖库文件和工具组件
$ sudo ./binwalk-master/deps.sh

要是上面的# 自动安装依赖库文件和工具组件执行不了,执行下面这一个;

# 自动安装依赖库文件
$ sudo ./deps.sh

安装python-lzma

sudo apt-get install python-lzma

安装好之后基本上就可以使用一些常规的命令了;

binwalk -Y 
binwalk -Me   解压固件

3.有选择性的安装binwalk的依赖库文件和组件工具。

$ sudo apt-get update
$ sudo apt-get install build-essential autoconf git
 
# https://github.com/devttys0/binwalk/blob/master/INSTALL.md
$ git clone https://github.com/devttys0/binwalk.git
$ cd binwalk
 
# python2.7安装
$ sudo python setup.py install
 
# python2.7手动安装依赖库
$ sudo apt-get install python-lzma
 
$ sudo apt-get install python-crypto
 
$ sudo apt-get install libqt4-opengl python-opengl python-qt4 python-qt4-gl python-numpy python-scipy python-pip
$ sudo pip install pyqtgraph
 
$ sudo apt-get install python-pip
$ sudo pip install capstone
 
# Install standard extraction utilities(必选)
$ sudo apt-get install mtd-utils gzip bzip2 tar arj lhasa p7zip p7zip-full cabextract cramfsprogs cramfsswap squashfs-tools
 
# Install sasquatch to extract non-standard SquashFS images(必选)
$ sudo apt-get install zlib1g-dev liblzma-dev liblzo2-dev
$ git clone https://github.com/devttys0/sasquatch
$ (cd sasquatch && ./build.sh)
 
# Install jefferson to extract JFFS2 file systems(可选)
$ sudo pip install cstruct
$ git clone https://github.com/sviehb/jefferson
$ (cd jefferson && sudo python setup.py install)
 
# Install ubi_reader to extract UBIFS file systems(可选)
$ sudo apt-get install liblzo2-dev python-lzo
$ git clone https://github.com/jrspruitt/ubi_reader
$ (cd ubi_reader && sudo python setup.py install)
 
# Install yaffshiv to extract YAFFS file systems(可选)
$ git clone https://github.com/devttys0/yaffshiv
$ (cd yaffshiv && sudo python setup.py install)
 
# Install unstuff (closed source) to extract StuffIt archive files(可选)
$ wget -O - http://my.smithmicro.com/downloads/files/stuffit520.611linux-i386.tar.gz | tar -zxv
$ sudo cp bin/unstuff /usr/local/bin/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

半岛铁盒@

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值