Linksys WRT120N路由器备份文件解析
Perusing the release notes for the latest Linksys WRT120N firmware, one of the more interesting comments reads:
Firmware 1.0.07 (Build 01)
- Encrypts the configuration file.
Having previouslyreversedtheir firmware obfuscation andpatchedtheir code to re-enable JTAG debugging, I thought that surely I would be able to use this access to reverse this new encryption algorithm used to secure their backup configuration files.
Boy was I giving them way too much credit.
Here’s a diff of two backup configuration files from the WRT120N. The only change made between backups was that the administrator password was changed from “admin” in backup_config_1.bin to “aa” in backup_config_2.bin:
OFFSET backup_config_1.bin backup_config_2.bin
----------------------------------------------------------------------------------------
0x00001468 9E 9B 92 96 91 FF FF FF |........| / 9E 9E FF FF FF FF FF FF |........|
Two things to note here:
- The first letter of each password (“a”) is encrypted to the same value (0x9E)
- The same letter (“a”) is encrypted to the same value (0x9E), regardless of its position in the password
I immediately suspected some sort of simple single-byte XOR encryption. If true, then XORing the known plain text (“a”, aka, 0×61) with the known cipher text (0x9E) should produce the XOR key:
0x61 ^ 0x9E = 0xFF
Applying the XOR key of 0xFF to the other characters in the password gives us:
0x9E ^ 0xFF = a
0x9B ^ 0xFF = d
0x92 ^ 0xFF = m
0x96 ^ 0xFF = i
0x91 ^ 0xFF = n
And XORing every byte in the config file with 0xFF gives us a decrypted config file:
00000000 33 34 35 36 00 01 df 60 00 00 46 ec 76 31 2e 30 |3456...`..F.v1.0|
00000010 2e 30 37 00 00 00 00 00 00 00 00 00 00 00 00 00 |.07.............|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 57 52 54 31 |............WRT1|
00000030 32 30 4e 00 00 00 00 00 00 00 00 00 00 00 00 00 |20N.............|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000080 61 64 6d 69 6e 00 00 00 00 00 00 00 00 00 00 00 |admin...........|
00000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000a0 00 00 00 00 00 00 00 00 61 64 6d 69 6e 00 00 00 |........admin...|
000000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000100 00 00 00 00 00 00 00 00 30 2e 30 2e 30 2e 30 00 |........0.0.0.0.|
00000110 00 00 00 00 00 00 00 00 01 01 01 00 00 00 00 01 |................|
00000120 00 00 00 01 00 00 00 00 00 00 00 08 32 39 34 38 |............2948|
00000130 33 31 30 35 00 01 00 00 00 31 39 32 2e 31 36 38 |3105.....192.168|
00000140 2e 31 2e 31 00 00 00 00 00 32 35 35 2e 32 35 35 |.1.1.....255.255|
00000150 2e 32 35 35 2e 30 00 00 00 00 00 00 04 00 02 00 |.255.0..........|
00000160 01 00 00 00 00 00 00 00 00 00 00 00 00 00 4c 4f |..............LO|
00000170 4f 50 42 41 43 4b 00 00 00 00 31 32 37 2e 30 2e |OPBACK....127.0.|
00000180 30 2e 31 00 00 00 00 00 00 00 32 35 35 2e 32 35 |0.1.......255.25|
00000190 35 2e 32 35 35 2e 32 35 35 00 00 00 00 00 00 00 |5.255.255.......|
000001a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001b0 00 00 00 00 49 52 51 3d 30 20 50 4f 52 54 3d 30 |....IRQ=0 PORT=0|
000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
...
This is truly atrocious. Given that “encrypting” the backup configuration files is done presumably to protect end users, expecting this to thwart any attacker and touting it as a product feature is unforgivable.
OK, I don’t really care that much. I’m just disappointed that it took longer to write this blog post than it did to break their “crypto”.
原文 http://www.devttys0.com/2014/02/cracking-linksys-crypto/
Linksys WRT120N路由器备份文件解析的更多相关文章
- itunes备份文件解析入门
itunes提供给设备备份的功能,不知道怎么备份的话可以戳一下这个看一下:http://jingyan.baidu.com/article/92255446ea8f46851648f4a4.html ...
- 思科模拟器之路由器-RIP-DNS解析server
思科三层交换机之下的局域网搭建,请看这. 接下来将解说怎样通过路由器的RIP协议来连接多个局域网. 并设置DNSserver. 1.路由器RIP配置 RIP协议有个非常致命的缺点:就是它是依据路径长短 ...
- TPLink 备份文件bin文件解析
TPLink 路由器备份文件bin文件 测试路由器 WR885,备份文件加密方式DES,密钥:478DA50BF9E3D2CF linux端: openssl enc -d -des-ecb -nop ...
- NAT原理简介、各种 ADSL Modem 及路由器的端口映射方法
NAT原理简介 NAT英文全称是“Network Address Translation”,中文意思是“网络地址转换”,它是一个IETF(Internet Engineering Task Force ...
- CISCO实验记录二:路由器基本操作
一.路由器基本操作要求 1.设置路由器本地时间 2.启用光标跟随 3.设置路由器标语信息和描述信息 4.为接口配置描述信息 5.快速恢复接口到出厂设置 二.路由器基本操作命令 1.设置路由器本地时间 ...
- 网速慢?NO可能是路由器的原因?
先排除DNS的问题:看这个! 为什么我家300M的网,而且wifi信号满格,还是网速很慢? 这时候不排除是路由器的原因! 第一步首先我们要知道自己家的网关IP: 什么是网关? 网关(Gateway)又 ...
- 浅入ARP
1.ARP的工作原理 IP层协议ARP的核心功能就是通过目的主机IP地址得到主机的硬件地址,然后通过硬件地址进行通信.和计算机网络中的很多技术一样,ARP协议也是使用了建立一个缓存表的思想.它规定每个 ...
- TCP/IP协议栈 --- 网络层(IP 首部 和分片)
IP 是TCP/IP协议栈中重要的层次, TCP UDP ICMP IGMP都是依赖IP层进行传输的.首先它是一种不可靠,无连接的协议.不可靠:它不保证IP包能正确到达目的地,无连接:表示IP并不会维 ...
- Angular路由——路由基础
一.路由相关对象 Router和RouterLink作用一样,都是导航.Router是在Controller中用的,RouterLink是在模版中用到. 二.路由对象的位置 1.Routes对象 配置 ...
随机推荐
- 美国半个互联网瘫痪对开发者使用DNS的启发
版权声明:本文由腾讯云DNSPod团队原创文章,转载请注明出处: 文章原文链接:https://www.qcloud.com/community/article/174 来源:腾云阁 https:// ...
- Unity的HTC VIVE SDK研究(手柄按键功能的研究,比较详细)
http://blog.csdn.net/ystistheking/article/details/51553237 想交流的朋友我们可以微博互粉,我的微博黑石铸造厂厂长 ,缺粉丝啊 .....求粉求 ...
- Javascript脚本应该放在哪里?
1.<head> <srcipt>在被调用的时候才执行(页面加载前执行)</script> </head> 2. <srcipt>在被调用的 ...
- javaWeb学习之运用myeclipse结合tomcat开发一些简单的jsp和service
servlet是什么? servlet是java服务器端编程.不同于我们之前写的一般的java应用程序,Servlet程序是运行在服务器上的,服务器有很多种.....现在只是用过 tomcat ...
- android - anim translate中 fromXDelta、toXDelta、fromYDelta、toXDelta属性
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http:// ...
- 转:Struts2<s:iterator value="" var="lst">中var的使用和一些标签的使用体会
比如<s:iterator value="pmOperateList" var="lst"> <!-- iterator加上var 等价于重新 ...
- SAP smartforms之Zebra print control language
因为在做个小标签的时候需要将部分字符旋转180度,在scn上找了很久也发布了自己的提问,不过最终的结果却不尽人意.Rotated text in smartforms need use the PCL ...
- Codeforces Round #308 (Div. 2)----C. Vanya and Scales
C. Vanya and Scales time limit per test 1 second memory limit per test 256 megabytes input standard ...
- E-Eating Together(POJ 3670)
Eating Together Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5579 Accepted: 2713 D ...
- BZOJ3238 [Ahoi2013]差异
首先把后缀数组和height数组都搞出来... 然后用两个单调栈维护$[l, r]$表示对于一个点$x$,满足$height[x] \le height[l..x] \ \&\&\ ...