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对象 配置 ...
随机推荐
- phonegap插件加载与使用
有朋友问能不能在CanTK和AppBuilder开发的APP里发送UDP数据,HTML5里只能用HTTPS/HTTP/WebSocket几种通讯方式,要使用UDP需要通过phonegap打包成APK等 ...
- 【NOIP 2016】斗地主
题意 NOIP 2016 斗地主 给你一些牌,按照斗地主的出牌方式,问最少多少次出完所有的牌. 分析 这道题的做法是DFS. 为了体现这道题的锻炼效果,我自己写了好多个代码. Ver1 直接暴力搞,加 ...
- 006-Selenium简介
1.产生背景 Selenium工具诞生的时间已经超过了10年,目前已经在软件开发公司中得到大规模的应用.2004年,在ThoughtWorks公司,一个名为Jason Huggins的测试同行为了减少 ...
- 《基于MVC的Javascript》
var Class = function(){ var klass = function(){ this.init.apply(this,arguments); } klass.prototype.i ...
- arcgis API for javascript 学习笔记
ArcGis Server地图是缓存的,意味着它有服务器管理员简历提示性能的一组预先渲染的切片.由于这个原因地图通过ArcGISTiledMapServiceLayer表示 如果地图服务没有一个可用的 ...
- WCF中Service Configuration Editor的使用方法
1.在App.config文件上右击,选择Edit WCF Configuration.... 或者打开Program Files\Microsoft Visual Studio 8\Common7\ ...
- Python eclipse开发环境搭建
http://jingyan.baidu.com/article/cd4c2979101f02756f6e6064.html http://jingyan.baidu.com/article/1876 ...
- BZOJ2490 Zombie’s Treasure Chest
如果n = lcm(s1, s2),那么就可以直接得到maxV = (v / s1 * v1, v / s2 *v2) 然后还剩下一点体积我们暴力枚举用s1的量,让s1为max(s1, s2)可以减少 ...
- treap codevs 4543普通平衡树
#include<cstdio>#include<ctime>#include<cstdlib>struct shu{ int l,r,sum1,zhi,dui,s ...
- POJ 3522 Slim Span 最小生成树,暴力 难度:0
kruskal思想,排序后暴力枚举从任意边开始能够组成的最小生成树 #include <cstdio> #include <algorithm> using namespace ...