用wireshark来捕获虚拟机WINXP上面酷我音乐盒的歌词获取网络数据,分析其歌词获取的流程是这样的:
1、发送歌词获取请求到服务器,如下面这样的形式URL:
http://newlyric.koowo.com/newlyric.lrc?DBYAHlRXVkFdXVRRV0I0MDYlKjBcV1dLXUdfMSk9SdOIobyrkaW6079cV1dLXUdfQBwdAEAiGCMMFgwPTx0LCBAAHx0KHEQJCg8IAwYWFhFKHRYeHFgWBQRJHBwUWF9PHAEXAgsNBApTu7vVtdXFSBgXEQUaG1MQRQgFGhxOAAoQ
2、服务器收到客户端的歌词获取请求后,返回压缩过的歌词文件和一些其它的歌曲相关信息。
数据如下:
!!!酷我音乐盒!!!
未加密过的歌词获取URL参数:
user=88888888,MUSIC_2.2.1.0_PX,酷我音乐盒2.2.1.0.exe,KwMusic&requester=localhost&type=sim&req=3&songname=罗百吉&artist=i miss you
客户端发送的歌词请求:
http://newlyric.koowo.com/newlyric.lrc?DBYAHlRXVkFdXVRRV0I0MDYlKjBcV1dLXUdfMSk9SdOIobyrkaW6079cV1dLXUdfQBwdAEAiGCMMFgwPTx0LCBAAHx0KHEQJCg8IAwYWFhFKHRYeHFgWBQRJHBwUWF9PHAEXAgsNBApTu7vVtdXFSBgXEQUaG1MQRQgFGhxOAAoQ
歌词服务器返回数据 :
HITFROM=tag
ZIPSIG=1568180347,3357133508
Path=10/6/1837755805
TP=content
show=0
PK(注:歌词等歌曲相关信息数据,PK表示使用ZIP方式来压缩。)
看起来歌词获取URL的参数是BASE64编码过,但使用BASE64工具解码后,发现不是字符串,得到的是乱码。
话不多说,PERDR反汇编后:
来到下面歌词获取代码:
* Possible string reference 627B1Ch "yeelion"
|
004DFF57 push 00627B1Ch
004DFF5C push edx
004DFF5D mov ecx, edi
* Reference to MSVCP71.?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ
|
004DFF5F call dword ptr [00618090h]
004DFF65 push eax
004DFF66 push esi
004DFF67 call 004194D0h // encode_url
//url加密函数:
004194D0 push ebx
004194D1 mov ebx, [esp+10h]
004194D5 push ebp
004194D6 push esi
004194D7 push edi
004194D8 push ebx
* Reference to MFC71.762
|
004194D9 call 005A83D6h
004194DE mov esi, [esp+1Ch]
004194E2 mov ebp, eax
004194E4 mov ecx, ebx
004194E6 mov eax, ecx
004194E8 shr ecx, 02h
004194EB mov edi, ebp
004194ED rep movsd
004194EF mov ecx, eax
004194F1 add esp, 04h
004194F4 and ecx, 03h
004194F7 rep movsb
004194F9 mov edi, [esp+20h]
004194FD mov eax, edi
004194FF lea edx, [eax+01h]
-1>-----
00419502 mov cl, [eax]
00419504 inc eax
00419505 test cl, cl
00419507 jnz 00419502h
00419509 sub eax, edx
0041950B mov esi, eax
0041950D xor eax, eax
0041950F test ebx, ebx
00419511 jle 00419534h
-1>-----
00419513 xor ecx, ecx
00419515 test esi, esi
00419517 jle 00419530h
00419519 lea esp, [esp+00000000h]
-1>-----
00419520 cmp eax, ebx
00419522 jge 00419534h
00419524 mov dl, [ecx+edi]
00419527 xor [eax+ebp], dl //将原明文URL与“YEELION”异或加密,怪不得BASE64解码后会是乱码而不是URL字符串
0041952A inc eax
0041952B inc ecx
0041952C cmp ecx, esi
0041952E jl 00419520h
-1<-----
00419530 cmp eax, ebx
00419532 jl 00419513h
-2<-----
00419534 mov eax, [esp+14h]
00419538 push ebx
00419539 push ebp
0041953A push eax
0041953B call 00419260h //Base64加密
00419540 push ebp
00419541 mov esi, eax
* Reference to MFC71.764
|
00419543 call 005A8298h
00419548 add esp, 10h
0041954B pop edi
0041954C mov eax, esi
0041954E pop esi
0041954F pop ebp
00419550 pop ebx
00419551 ret
___阅读全文___