binwalkv3安装记录新(成功版)

news2025/1/7 15:54:54

Binwalk v3

官方教程:
Compile From Source · ReFirmLabs/binwalk Wiki
下载地址:Compile From Source · ReFirmLabs/binwalk Wiki

Tip

The compiled binary will be located at binwalk/target/release/binwalk.

You may copy it to, and run it from, any directory you prefer.

About

This is an updated version of the Binwalk firmware analysis tool. It has been re-written in Rust, and is currently considered unstable/experimental.

While the usage and output is similar to that of previous Binwalk releases, this version has several notable improvements:

  • Rust go BRRRT
  • JSON output summary
  • Multi-threaded analysis
  • Efficient pattern matching
  • Smarter file carving and extraction
  • Much improved signature validation and reporting

Supported Platforms

Binwalk is only supported on 64-bit Linux systems, and only tested on Debian/Ubuntu Linux. It is recommended that you run Binwalk on a Debian-based system.

Installation

Build Dependencies

To compile Binwalk from source, you must first have the Rust compiler installed:

sudo apt install curl
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. $HOME/.cargo/env

Additionally, entropy graphing requires the fontconfig library to be installed:

sudo apt install libfontconfig1-dev

Compiling From Source

To download and build the Binwalk source code:

sudo apt install git
git clone -b binwalkv3 https://github.com/ReFirmLabs/binwalk.git
cd binwalk
sudo ./binwalk/dependencies/ubuntu.sh
cargo build --release
./target/release/binwalk --help

The Binwalk binary will be located at the target/release/binwalk path, as shown above. You may copy it to, and run it from, any location on your system that you prefer.

Runtime Dependencies

Binwalk relies on several external command-line utilities to perform extraction. Some are installed on most Linux systems by default, others are not.

To install all required extraction utilities:

sudo apt install p7zip-full zstd unzip tar sleuthkit cabextract lz4 lzop device-tree-compiler unrar
sudo apt install python3-pip
sudo pip3 install uefi_firmware
sudo pip3 install jefferson
sudo pip3 install ubi-reader
# Thanks to the ONEKEY team for maintaining this Sasquatch Debian package!
curl -L -o sasquatch_1.0.deb "https://github.com/onekey-sec/sasquatch/releases/download/sasquatch-v4.5.1-4/sasquatch_1.0_$(dpkg --print-architecture).deb"
sudo dpkg -i sasquatch_1.0.deb
rm sasquatch_1.0.deb
sudo apt install build-essential clang liblzo2-dev libucl-dev liblz4-dev
git clone https://github.com/askac/dumpifs.git
cd dumpifs
make dumpifs
sudo cp ./dumpifs /usr/local/bin/dumpifs
mkdir srec
cd srec
wget http://www.goffart.co.uk/s-record/download/srec_151_src.zip
unzip srec_151_src.zip
make
sudo cp srec2bin /usr/local/bin/

Usage

To list all supported file types and required extraction utilities:

To scan a file’s contents:

To exclude specific signatures from a scan:

binwalk -x jpeg,png,pdf file_name.bin

To only serch for specific signatures during a scan:

binwalk -y jpeg,png,pdf file_name.bin

To scan a file and extract its contents (default output directory is extractions):

To recursively scan and extract a file’s contents:

binwalk -Me file_name.bin

Generate an entropy graph of the specified file (a PNG image will be saved to the current working directory):

To save signature or entropy analysis results to a JSON file:

binwalk -l results.json file_name.bin

Command Line Output

For each identified file type, Binwalk displays the file offset in both decimal and hexadecimal, along with a brief description.

Output is color-coded to indicate the confidence of the reported results:

There is no strict definition for the confidence level of each result, but they can generally be interpreted as:

  • red: Low confidence; the “magic bytes” for the reported file type were identified, but little-to-no additional validation was performed
  • yellow: Medium confidence; a reasonable amount of validation/sanity-checking was performed on the file metadata
  • green: High confidence; both file metadata and at least some portions of the file data were checked for accuracy

Note that during recursive extraction only “interesting” results will be displayed; use the --verbose command line option to display all results.

Supported Signatures

All supported file signatures and their corresponding extraction utility (if any) can be displayed with the --list command line option:

Each signature is color-coded to indicate:

  • green: Signature is fully supported
  • yellow: Signature is prone to false positives and will only be matched at the beginning of a file

The values displayed in the Signature Name column can be used with the --include and --exclude signature filter arguments.

Entropy Graphs

Entropy graphs (--entropy) display a plot of how random the contents of a file are, with the level of randomness displayed on the y axis and the file offset displayed on the x axis:

Randomness is calculated on a unit-less scale of 0 (not random at all) to 8 (very random). Since compressed and encrypted data is, by nature, very random, this is useful for identifying sections of a file that have been compressed or encrypted.

JSON Output

The JSON logs (--log) include more detailed signature and extraction information than is reported on the command line.

If an entropy scan was requested (--entropy), the JSON data will contain the raw entropy data for the specified file.

Errors and Logging

Errors and debug logs are handled by the Rust env_logger, which allows users to control log levels via the RUST_LOG environment variable:

RUST_LOG=off binwalk -Me file_name.bin
RUST_LOG=info binwalk -Me file_name.bin
RUST_LOG=debug binwalk -Me file_name.bin

All errors and debug information are printed to stderr.

Limitations

Binwalk is a command line utility only; there is no library, API, or plugins (yet).

Binwalk can be very resource intensive. By default it will use all available CPU cores (this can be controlled with the --threads argument), and reads files into memory in their entirety.

报错总结

本次安装没有出现git网络不可达之类的错误,谢天谢地!!

有一些库没有安装:

要提前装好make gcc等,他报错什么balabala没有命令,没有目录,就装什么咯

例如:7zip 无法定位软件包
sudo apt-get install p7zip

报错:

fatal error: openssl/sha.h: No such file or directory 

原因是:没有安装libssl-dev~

libssl-dev包含libraries, header files and manpages,他是openssl的一部分,而openssl对ssl进行了实现~

使用sudo apt-get install libssl-dev来安装libssl-dev即可

fatal error: bzlib.h: No such file or directory 

解决办法:boost编译时的库依赖bzlib.h尚未安装
sudo apt-get install libbz2-dev

zlib.h:没有那个文件或目录

安装sudo apt-get install zlib1g-dev

argo build时候遇到的报错:

[Build error] error: failed to run custom build command for `yeslogic-fontconfig-sys v5.0.0` · Issue #362 · a16z/helios

error: failed to run custom build command for `yeslogic-fontconfig-sys v5.0.0`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

sudo apt install pkg-config libfreetype6-dev libfontconfig1-dev

接下来:

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

此时,rust编译器提示你进行错误“回溯”
一般情况下默认使用的是 bash 命令行,请使用以下命令:
RUST_BACKTRACE=1 cargo run
但是,你最好是把其他的报错解决之后,运行

cargo build --release

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2271908.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

elementui table 表格 分页多选,保持选中状态

elementui多选时分页,解决选中状态无法保留选中项问题: 在el-table标签中加入row-key,row-key的值取当前数据里的唯一key在el-table-column selection 项中加入以下:reserve-selection“true” 完成后,将需要清空的地方 ( 如返回…

《掌握 C/C++ 动态内存管理,让编程更高效灵活》

这里写目录标题 一、回顾C/C内存分布1. 三道基础的练习题2. 内存区域划分图 二、C 语言中动态内存的管理方式(malloc/calloc/realloc/free)1. malloc() 和 calloc() 的区别和注意事项2. realloc() 的用法和注意事项 三、C 中的动态内存管理方式&#xff…

网络安全抓包

#知识点: 1、抓包技术应用意义 //有些应用或者目标是看不到的,这时候就要进行抓包 2、抓包技术应用对象 //app,小程序 3、抓包技术应用协议 //http,socket 4、抓包技术应用支持 5、封包技术应用意义 总结点:学会不同对象采用…

今日头条ip属地根据什么显示?不准确怎么办

在今日头条这样的社交媒体平台上,用户的IP属地信息对于维护网络环境的健康与秩序至关重要。然而,不少用户发现自己的IP属地显示与实际位置不符,这引发了广泛的关注和讨论。本文将深入探讨今日头条IP属地的显示依据,并提供解决IP属…

CSS3——3. 书写格式二

<!DOCTYPE html> <html><head><meta charset"UTF-8"><title></title></head><body><!--css书写&#xff1a;--><!--1. 属性名:属性值--><!--2.属性值是对属性的相关描述--><!--3.属性名必须是…

C# OpenCV机器视觉:双目视觉-深度估计

在一个阳光欢快得仿佛要蹦迪的日子里&#xff0c;阿强像个即将踏上神秘星际旅行的宇航员&#xff0c;雄赳赳气昂昂地坐在实验室那张堆满奇奇怪怪小玩意儿的桌子前。桌上&#xff0c;两台摄像头宛如两个严阵以待的机甲战士&#xff0c;镜头闪烁着冷峻的光&#xff0c;仿佛在向阿…

网络IP协议

IP&#xff08;Internet Protocol&#xff0c;网际协议&#xff09;是TCP/IP协议族中重要的协议&#xff0c;主要负责将数据包发送给目标主机。IP相当于OSI&#xff08;图1&#xff09;的第三层网络层。网络层的主要作用是失陷终端节点之间的通信。这种终端节点之间的通信也叫点…

springboot566健美操评分系统(论文+源码)_kaic

摘 要 健美操评分系统采用B/S架构&#xff0c;数据库是MySQL。系统的搭建与开发采用了先进的JAVA进行编写&#xff0c;使用了springboot框架。该系统从三个对象&#xff1a;由管理员、裁判员和用户来对系统进行设计构建。主要功能包括首页&#xff0c;个人中心&#xff0c;裁…

【深度学习之空洞卷积】空洞卷积和普通卷积的比较包括哪些优势?从感受野、计算复杂度方面分析。

【深度学习之空洞卷积】空洞卷积和普通卷积的比较包括哪些优势&#xff1f;从感受野、计算复杂度方面分析。 【深度学习之空洞卷积】空洞卷积和普通卷积的比较包括哪些优势&#xff1f;从感受野、计算复杂度方面分析。 文章目录 【深度学习之空洞卷积】空洞卷积和普通卷积的比…

【机器遗忘之UNSIR算法】2023年IEEE Trans期刊论文:Fast yet effective machine unlearning

1 介绍 年份&#xff1a;2023 期刊&#xff1a;IEEE Transactions on Neural Networks and Learning Systems 引用量&#xff1a;170 Tarun A K, Chundawat V S, Mandal M, et al. Fast yet effective machine unlearning[J]. IEEE Transactions on Neural Networks and Le…

VSCode 在Windows下开发时使用Cmake Tools时输出Log乱码以及CPP文件乱码的终极解决方案

在Windows11上使用VSCode开发C程序的时候&#xff0c;由于使用到了Cmake Tools插件&#xff0c;在编译运行的时候&#xff0c;会出现输出日志乱码的情况&#xff0c;那么如何解决呢&#xff1f; 这里提供了解决方案&#xff1a; 当Settings里的Cmake: Output Log Encoding里设…

程序的环境(预处理详解)

一.程序的翻译环境和执行环境 在ANSI C&#xff08;标准c&#xff09;的任何一种实现中&#xff0c;存在两个不同的环境。 计算机是能够执行二进制指令的&#xff0c;但是我们写出的c语言代码是文本信息&#xff0c;计算机不能直接理解 第1种是翻译环境&#xff0c;在这个环境…

Kafka 消费者专题

目录 消费者消费者组消费方式消费规则独立消费主题代码示例&#xff08;极简&#xff09;代码示例&#xff08;独立消费分区&#xff09; offset自动提交代码示例&#xff08;自动提交&#xff09;手动提交代码示例&#xff08;同步&#xff09;代码示例&#xff08;异步&#…

解决 :VS code右键没有go to definition选项(转到定义选项)

问题背景&#xff1a; VScode 右键没有“go to definition”选项了&#xff0c;情况如图所示&#xff1a; 问题解决办法&#xff1a; 第一步&#xff1a;先检查没有先安装C/C插件&#xff0c;没有安装就先安装下。 第二步&#xff1a; 打开VS CODE设置界面&#xff1a;文件->…

网络安全的学习与实践经验(附资料合集)

学习资源 在线学习平台&#xff1a; Hack This Site&#xff1a;提供从初学者到高级难度的挑战任务&#xff0c;适合练习各种网络安全技术。XCTF_OJ&#xff1a;由XCTF组委会开发的免费在线网络安全网站&#xff0c;提供丰富的培训材料和资源。SecurityTube&#xff1a;提供丰…

《Rust权威指南》学习笔记(五)

高级特性 1.在Rust中&#xff0c;unsafe是一种允许绕过Rust的安全性保证的机制&#xff0c;用于执行一些Rust默认情况下不允许的操作。unsafe存在的原因是&#xff1a;unsafe 允许执行某些可能被 Rust 的安全性检查阻止的操作&#xff0c;从而可以进行性能优化&#xff0c;如手…

使用R语言绘制标准的中国地图和世界地图

在日常的学习和生活中&#xff0c;有时我们常常需要制作带有国界线的地图。这个时候绘制标准的国家地图就显得很重要。目前国家标准地图服务系统向全社会公布的标准中国地图数据&#xff0c;是最权威的地图数据。 今天介绍的R包“ggmapcn”&#xff0c;就是基于最新公布的地图…

Flutter踩坑记-第三方SDK不兼容Gradle 8.0,需适配namespace

最近需要集成Flutter作为Module&#xff0c;Flutter依赖了第三方库&#xff0c;Gradle是8.0版本。 编译报错&#xff1a; 解决办法是在.android根目录下的build.gradle下新增一行代码&#xff1a; buildscript {ext.kotlin_version "1.8.22"repositories {google()…

golang 编程规范 - 项目目录结构

原文&#xff1a;https://makeoptim.com/golang/standards/project-layout 目录结构 Go 目录 cmdinternalpkgvendor 服务端应用程序目录 api Web 应用程序目录 web 通用应用程序目录 buildconfigsdeploymentsinitscriptstest 其他目录 assetsdocsexamplesgithooksthird_par…

蓝桥杯备赛:C++基础,顺序表和vector(STL)

目录 一.C基础 1.第一个C程序&#xff1a; 2.头文件&#xff1a; 3.cin和cout初识&#xff1a; 4.命名空间&#xff1a; 二.顺序表和vector&#xff08;STL&#xff09; 1.顺序表的基本操作&#xff1a; 2.封装静态顺序表&#xff1a; 3.动态顺序表--vector&#xff1a;…