返回上一页  首页 | cnbeta报时: 20:55:32
WP7越狱源于微软故意留下的漏洞?
发布日期:2011-01-17 07:44:55  稿源:

其实很早之前看到有人说用chevronwp7越狱时会修改系统hosts文件的时候就意识到:chevronwp7 是把自己伪装成微软验证服务器来与手机交互达到官方unlock的效果.今天看到一篇好文章,正好验证了我的想法.但让人惊讶的是,微软的这套验证机制就藏在SDK的Windows Phone Developer Registration工具中,而且代码没有混淆过,这才让chevronwp7 Team能够轻而易举获得越狱方法!
今天突然在Windows Phone 7 SDK中看到了Windows Phone Developer Registration这个工具,索性操起工具对其进行反编译,结果让人出乎意料,反编译后的代码简直可以称得上就是"源代码",微软竟然不采取任何混淆措施... 尔后又看了一下经过简单代码混淆的chevronwp7工具,可以看出,chevronwp7 team正是参考的微软官方解锁程序的代码.

通过TcpClient,利用27077端口和手机进行通讯
  1. this.client = new TcpClient();
  2. this.client.SendTimeout = 2000;
  3. this.client.ReceiveTimeout = 2000;
  4. this.client.LingerState.Enabled = true;
  5. this.client.LingerState.LingerTime = 0;
  6. this.client.NoDelay = true;
  7. this.client.Connect("127.0.0.1", 27077);  

检查手机状态的代码
  1. byte[] buffer = new byte[4];
  2. buffer[0] = 16;
  3. buffer[1] = 1;
  4. this.commandData = buffer;  

unlock手机的代码段
  1. List<byte> list = new List<byte>();
  2. ASCIIEncoding encoding = new ASCIIEncoding();
  3. ushort num = (ushort)(((authToken.Length + 3) + 2) + 3);
  4. list.AddRange(new byte[] { 16, 3 });
  5. list.AddRange(BitConverter.GetBytes(num));
  6. list.Add(1);
  7. list.AddRange(BitConverter.GetBytes((ushort)authToken.Length));
  8. list.AddRange(encoding.GetBytes(authToken));
  9. list.Add(2);
  10. list.AddRange(BitConverter.GetBytes((ushort)2));
  11. ushort num2 = isInt ? ((ushort)0) : ((ushort)1);
  12. list.AddRange(BitConverter.GetBytes(num2));
  13. this.commandData = list.ToArray();  

手机的任何请求都发送到一个http服务器(chevronwp7通过修改hosts文件把所有数据都重定向到本机, 而chevronwp7就把自己伪装成服务器来回应手机发来的请求).
下面是允许解锁的返回数据:
  1. <ResponseOfRegisteredDeviceStatus xmlns="Microsoft.WindowsMobile.Service.Marketplace" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ResponseCode>0x00000000</ResponseCode>
  2. <ResponseMessage i:nil="true"/>
  3. <Entity xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.WindowsMobile.Service.Marketplace.BLLDevPortal.Entities">
  4. <a:DaysLeft>365</a:DaysLeft>
  5. <a:AppsAllowed>10</a:AppsAllowed>
  6. </Entity>

<a:AppsAllowed>10</a:AppsAllowed> 这里代表可以最多安装10个xap包

锁定手机代码段:
  1. internal LockCommand(string authToken)
  2. {
  3.      List<byte> list = new List<byte>();
  4.      ASCIIEncoding encoding = new ASCIIEncoding();
  5.      ushort num = (ushort) (authToken.Length + 3);
  6.      list.AddRange(new byte[] { 16, 2 });
  7.      list.AddRange(BitConverter.GetBytes(num));
  8.      list.Add(1);
  9.      list.AddRange(BitConverter.GetBytes((ushort) authToken.Length));
  10.      list.AddRange(encoding.GetBytes(authToken));
  11.      this.commandData = list.ToArray();
  12. }

不得不佩服chevronwp7 team对越狱所做的贡献,但是微软竟把这些东西毫无保留的"开放"给外界...匪夷所思...
我们在FebBox(https://www.febbox.com/cnbeta) 开通了新的频道,更好阅读体验,更及时更新提醒,欢迎前来阅览和打赏。
查看网友评论   返回完整版观看

返回上一页  首页 | cnbeta报时: 20:55:32

文字版  标准版  电脑端

© 2003-2025