当前位置:网站首页>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 .
边栏推荐
- [MySQL] MySQL error "error 2006 (HY000): MySQL server has gone away"
- 【MySQL从入门到精通】【高级篇】(九)InnoDB的B+树索引的注意事项
- Technology sharing | quick intercom integrated dispatching system
- 在生产环境中每天Oracle监控到的无效对象一般怎么去处理?
- Detailed explanations of%*d,%.*s, etc. of [C language]: "recommended collection"
- [MySQL from introduction to proficiency] [advanced chapter] (IX) precautions for InnoDB's b+ tree index
- Postgres overview
- WPF dependent attribute (WPF dependent attribute)
- 目标检测领域必看的6篇论文
- 融云 IM & RTC 能力上新盘点
猜你喜欢
![Leetcode:981. time based key value storage [trap of iteration for: on]](/img/87/759594104d61bf787693544dd7152d.png)
Leetcode:981. time based key value storage [trap of iteration for: on]

Boutique scheme | Haitai Fangyuan full stack data security management scheme sets a "security lock" for data

Ripro9.0 revised and upgraded version +wp two beautification packages + rare plug-ins

Refresh your understanding of redis cluster

【一知半解】零值拷贝

字节一面:如何用 UDP 实现可靠传输?
![[MySQL from introduction to proficiency] [advanced chapter] (x) MyISAM's indexing scheme & advantages and disadvantages of indexing](/img/f4/e04bf0f8f0866ea9db0615f0e5e1c4.png)
[MySQL from introduction to proficiency] [advanced chapter] (x) MyISAM's indexing scheme & advantages and disadvantages of indexing
Microsoft security team found an Austrian company that used windows Zero Day vulnerability to sell spyware

B2 sub theme / blog b2child sub theme / open source code

使用 Terraform 在 AWS 上快速部署 MQTT 集群
随机推荐
[极客大挑战 2019]BabySQL-1|SQL注入
Function of interface test
[MySQL] MySQL error "error 2006 (HY000): MySQL server has gone away"
Display line number under VIM command [easy to understand]
使用 Terraform 在 AWS 上快速部署 MQTT 集群
1331. 数组序号转换
Encryption defect of icloud Keychain in Apple mobile phone
Outlook suddenly becomes very slow and too laggy. How to solve it
【MySQL从入门到精通】【高级篇】(九)InnoDB的B+树索引的注意事项
CVPR2021 行人重识别/Person Re-identification 论文+开源代码汇总
本地化、低时延、绿色低碳:阿里云正式启用福州数据中心
【MySQL】Got an error reading communication packets
Digital twin rail transit: "intelligent" monitoring to clear the pain points of urban operation
Localization, low latency, green and low carbon: Alibaba cloud officially launched Fuzhou data center
What kind of knowledge payment system functions are more conducive to the development of the platform and lecturers?
开源汇智创未来 | 2022开放原子全球开源峰会OpenAtom openEuler分论坛圆满召开
Object to object mapping -automapper
擦黑板特效表白H5源码+非常浪漫/附BGM
Using C language to compile student achievement management system (C language student achievement management system deleted)
对话庄表伟:开源第一课
