Win7之家( afsion.com.cn):Windows Phone 7越獄乃是微軟留后門
其實(shí)很早之前看到有人說用chevronwp7越獄時(shí)會(huì)修改系統(tǒng)hosts文件的時(shí)候就意識(shí)到:chevronwp7 是把自己偽裝成微軟驗(yàn)證服務(wù)器來與手機(jī)交互達(dá)到官方unlock的效果。今天看到一篇好文章,正好驗(yàn)證了我的想法。但讓人驚訝的是,微軟的這套驗(yàn)證機(jī)制就藏在SDK的Windows Phone Developer Registration工具中,而且代碼沒有混淆過,這才讓chevronwp7 Team能夠輕而易舉獲得越獄方法!
今天突然在Windows Phone 7 SDK中看到了Windows Phone Developer Registration這個(gè)工具,索性操起工具對其進(jìn)行反編譯,結(jié)果讓人出乎意料,反編譯后的代碼簡直可以稱得上就是“源代碼”,微軟竟然不采取任何混淆措施... 爾后又看了一下經(jīng)過簡單代碼混淆的chevronwp7工具,可以看出,chevronwp7 team正是參考的微軟官方解鎖程序的代碼。
通過TcpClient,用27077端口和手機(jī)進(jìn)行通訊
this.client = new TcpClient();
this.client.SendTimeout = 2000;
this.client.ReceiveTimeout = 2000;
this.client.LingerState.Enabled = true;
this.client.LingerState.LingerTime = 0;
this.client.NoDelay = true;
this.client.Connect("127.0.0.1", 27077);
檢查手機(jī)狀態(tài)的代碼
byte[] buffer = new byte[4];
buffer[0] = 16;
buffer[1] = 1;
this.commandData = buffer;
unlock手機(jī)的代碼段
List<byte> list = new List<byte>();
ASCIIEncoding encoding = new ASCIIEncoding();
ushort num = (ushort)(((authToken.Length + 3) + 2) + 3);
list.AddRange(new byte[] { 16, 3 });
list.AddRange(BitConverter.GetBytes(num));
list.Add(1);
list.AddRange(BitConverter.GetBytes((ushort)authToken.Length));
list.AddRange(encoding.GetBytes(authToken));
list.Add(2);
list.AddRange(BitConverter.GetBytes((ushort)2));
ushort num2 = isInt ? ((ushort)0) : ((ushort)1);
list.AddRange(BitConverter.GetBytes(num2));
this.commandData = list.ToArray();
手機(jī)的任何請求都發(fā)送到一個(gè)http服務(wù)器(chevronwp7通過修改hosts文件把所有數(shù)據(jù)都重定向到本機(jī),,而chevronwp7就把自己偽裝成服務(wù)器來回應(yīng)手機(jī)發(fā)來的請求)。
下面是允許解鎖的返回?cái)?shù)據(jù):
<ResponseOfRegisteredDeviceStatus xmlns="Microsoft.WindowsMobile.Service.Marketplace" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ResponseCode>0x00000000</ResponseCode>
<ResponseMessage i:nil="true"/>
<Entity xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.WindowsMobile.Service.Marketplace.BLLDevPortal.Entities">
<a:DaysLeft>365</a:DaysLeft>
<a:AppsAllowed>10</a:AppsAllowed>
</Entity>
<a:AppsAllowed>10</a:AppsAllowed> 這里代表可以最多安裝10個(gè)xap包
鎖定手機(jī)代碼段:
internal LockCommand(string authToken)
{
List<byte> list = new List<byte>();
ASCIIEncoding encoding = new ASCIIEncoding();
ushort num = (ushort) (authToken.Length + 3);
list.AddRange(new byte[] { 16, 2 });
list.AddRange(BitConverter.GetBytes(num));
list.Add(1);
list.AddRange(BitConverter.GetBytes((ushort) authToken.Length));
list.AddRange(encoding.GetBytes(authToken));
this.commandData = list.ToArray();
}
不得不佩服chevronwp7 team對越獄所做的貢獻(xiàn),但是微軟竟把這些東西毫無保留的“開放”給外界...匪夷所思...
評論列表
查看所有 條評論