当前位置:网站首页>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 .
边栏推荐
- C language uses double pointer to realize simple factory mode (polymorphism)
- Top ten application development trends from 2022 to 2023
- 不用Swagger,那我用啥?
- B2 sub theme / blog b2child sub theme / open source code
- 保障邮箱安全,验证码四个优势
- 【MySQL从入门到精通】【高级篇】(九)InnoDB的B+树索引的注意事项
- Outlook suddenly becomes very slow and too laggy. How to solve it
- 1331. Array sequence number conversion
- 用c语言编写学生成绩管理系统(c语言学生成绩管理系统删除)
- 万字详解 Google Play 上架应用标准包格式 AAB
猜你喜欢

Good use explosion! The idea version of postman has been released, and its functions are really powerful
![[half understood] zero value copy](/img/4b/c8140bf7ee4baa094ca3011108d686.gif)
[half understood] zero value copy

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

苹果手机iCloud钥匙串的加密缺陷

What functions does MySQL have? Don't look everywhere. Just look at this.

【MySQL从入门到精通】【高级篇】(九)InnoDB的B+树索引的注意事项

对话庄表伟:开源第一课

保障邮箱安全,验证码四个优势
![Two point, three point, 01 point plan [bullet I]](/img/12/5cc55b5f4f0bbcd5b89a9601eed824.png)
Two point, three point, 01 point plan [bullet I]
JWT login authentication + token automatic renewal scheme, well written!
随机推荐
Refresh your understanding of redis cluster
Digital twin rail transit: "intelligent" monitoring to clear the pain points of urban operation
Full version of H5 social chat platform source code [complete database + complete document tutorial]
What functions does MySQL have? Don't look everywhere. Just look at this.
Two point, three point, 01 point plan [bullet III]
Using C language to realize bidirectional linked list
Machine learning strong foundation plan 0-5: why is the essence of learning generalization ability?
DHCP experiment demonstration (Huawei switch device configuration)
Google Earth engine - use geetool to download single scene images in batches and retrieve NDSI results with Landsat 8
GIS数据漫谈(五)— 地理坐标系统
「学习笔记」树状数组
Leetcode:981. time based key value storage [trap of iteration for: on]
Introduction to web security RADIUS protocol application
目标检测领域必看的6篇论文
Microsoft security team found an Austrian company that used windows Zero Day vulnerability to sell spyware
Object to object mapping -automapper
Design a system that supports millions of users
Jupiter、spyder、Anaconda Prompt 、navigator 快捷键消失的解决办法
[MySQL] query multiple IDs and return string splicing
echo -ne(echo line)
