当前位置:网站首页>Router firmware decryption idea
Router firmware decryption idea
2022-07-28 11:35:00 【biyusr】
Early contact iot The firmware we encounter is basically binwalk A shuttle , But sometimes we will encounter the confusion of firmware information , Or analyze a pile zlma The file of , No... Was found rtos Or the flag of the file system .
At this time, we will consider whether to encrypt , Internet search will find useful binwalk Of -E Parameters to determine .
Then what is the principle of this judgment ?
The principle is information entropy .
entropy : A measure of the state of some material systems , The extent to which certain physical system states may occur .
I should have studied in junior high school , The greater the entropy , It shows that the more chaotic the system .
Information entropy :1948 year C.E.Shannon( Shannon ) A concept borrowed from thermodynamics , It solves the problem of quantitative measurement of information
In information , The more you repeat , The more stable the system , The more information you can get .
For binary files without encryption , The frequency of some instructions is usually very high ( As the preface 、nop Sequence, etc ), And the data structure has almost no randomness . The probability of repetition is very high
therefore , Entropy is generally low for unencrypted data .
For encrypted files , Will try to hide their information , Which leads to little repetition , This leads to low repetition probability
therefore , The entropy value of encryption is generally high .
The above is to judge whether to encrypt by information entropy ,binwalk Use relevant algorithms to sort out information entropy

Generally speaking, there are three types of firmware encryption :
The initial version is not encrypted , A subsequent version is encrypted Between the encryption and the initial version, a version comes with a decryption program

Get intermediate version , Analyze the decryption program .
The old version has encryption , Change the encryption method later , Intermediate release of unencrypted interim firmware

And 1 similar , It is also the same to obtain the transitional firmware analysis and extraction decryption program with the decryption program
The old version has encryption , Change the encryption method later , A new unencrypted decryption program has been replaced in the middle

If you know the early encryption method , Or have an early decryption program , You can analyze and replace the intermediate version of the decryption program , To get the decryption program .
If there is no early relevant decryption information , You cannot use the above method , More is to buy equipment , Extract unencrypted firmware directly from hardware .
Theoretically , You can use binary comparative analysis tools , To analyze attempts to extract recovery decryption programs .
Case study :
This is to choose a certain router firmware for analysis :
From firmware time sequence to early inspection


Find out DIR882A1_FW104B02_Middle_FW_Unencrypt.bin It is what we call the transitional version .
extract , analysis , To find the decryption program through it .
Or the recurrence can be found according to the upgrade path .
We are lucky to find it in bin Under the imgdecrypt, But I'm not sure he must be the right decryption program
Try to execute him .



Compare with the above , Can be correctly identified uImage.
Try to test other firmware


The above is a kind of relatively standardized naming , Some names are not standardized. You may need to find the corresponding file name according to the front-end upgrade .
The example uses only one , After encountering relevant problems, it will continue to update , You can focus on that .
边栏推荐
- Why should coding and modulation be carried out before transmission
- 接口测试的作用
- Tiktok programmer confession special code tutorial (how to play Tiktok)
- [MySQL from introduction to proficiency] [advanced chapter] (IX) precautions for InnoDB's b+ tree index
- go status.go 状态码定义
- PHP检测url网址链接是否正常可访问
- Refresh your understanding of redis cluster
- 什么样的知识付费系统功能,更有利于平台与讲师发展?
- What's the secret of creating a popular short video?
- Display line number under VIM command [easy to understand]
猜你喜欢

什么是WordPress

「以云为核,无感极速」第五代验证码重磅来袭

Game theory 1. Introduction (basic concepts of combination games, confrontation search, bash games, Nim games)
![[JS advanced] JS functions, overloads, anonymous functions, scopes and scope chains_ 03](/img/50/754f7915ee4b2e04fdd21ae68130c6.png)
[JS advanced] JS functions, overloads, anonymous functions, scopes and scope chains_ 03

接口测试的作用

Byte side: how to realize reliable transmission with UDP?

Sirius network verification source code / official genuine / included building tutorial

A lock faster than read-write lock. Don't get to know it quickly

精品方案|海泰方圆全栈式数据安全治理方案 为数据设一把“安全锁”

Install SSL Certificate in Litespeed web server
随机推荐
echo -ne(echo line)
Object to object mapping -automapper
重新刷新你对Redis集群的理解
Related concepts of several databases
JWT login authentication + token automatic renewal scheme, well written!
WPF依赖属性(wpf 依赖属性)
【cesium】entity属性和时许绑定:SampledProperty方法简单使用
b2子主题/博客b2child子主题/开源源码
大三下学期总结
Google Earth Engine——使用geetool批量下载单景影像以Landsat 8 反演后的NDSI结果
Outlook suddenly becomes very slow and too laggy. How to solve it
Boutique scheme | Haitai Fangyuan full stack data security management scheme sets a "security lock" for data
CVPR2020 best paper:对称可变形三维物体的无监督学习
Installing sqlmap on win10 (Windows 7)
Why should coding and modulation be carried out before transmission
苹果手机iCloud钥匙串的加密缺陷
18张图,直观理解神经网络、流形和拓扑
Iterative method for determinant (linear algebraic formula)
PHP detects whether the URL URL link is normally accessible
PKG packaging node project
