2014年12月20日 星期六

彩虹冒險私服編程 (五) - 如何模擬成功登入封包

Format:   [iosocket.CGenericMessage::GetSize] [iosocket.CGenericMessage::GetType]               [iosocket.CGenericMessage::CheckError] [iosocket.CGenericMessage::MakeDigest]
[iosocket.CGenericMessage::GetState][Data]
Packet Content: [Packet length] [Packet type] [Magic header] [Checksum] [Packet State][Data]
Length:    [4 bytes] [4 bytes] [4 bytes] [4 bytes] [4 bytes][N bytes]

分析:
1.編寫初步payload
AA AA AA AA BB BB BB BB CC CC CC CC DD DD DD DD EE EE EE EE FF

AA=最後根據封包長度而填寫(注意16進制)
2.找Packet type(BB)
利用字串 找到Enter Channel字樣
Address: 484DB0

利用CE找  484DB0
找到其中一個結果是00700783 call 484DB0
向上找到700430
這個地址是UDP接收到封包後會根據你的Packet type而去跳到不同的function(做不同的工作)
我們可以發現700430 是其中一個function

0070046F會判斷目前GameState是否等於4(cmp dword ptr ds:[0x7E00D0],0x4)
不是的話就跳到00700507
我們可以發現00700507對接收回來的封包讀到第0x24的內容(4 bytes)
mov eax,dword ptr ds:[esi+0x24]
由於我們不是GameState=4 因此我們可以知道由0x16~0x24內容是對我們沒有用,利用0x00進行填充

目前的Payload:
AA AA AA AA BB BB BB BB CC CC CC CC DD DD DD DD EE EE EE EE 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


而0070050A進行了比較 先將0x24的內容進行讀取,再加上-0x64,最後結果比較是不是0x8
我們向下可以看到位於00700510 (ja 007007F8)比較eax是不是大於8 大於8就跳
007007F8 不是我們想跳的地方 我們要跳回00700783附近地址 讓封包接收後 我們就能call 484DB0(讓遊戲進入選頻)
經過強制修改eax後 我們最後發現eax=0x7 先會跳到007006AB
所以我們只要把0x64+0x7=0x6B
只要我們的封包內容是6B 00 00 00,系統就會判斷跳到007006AB
目前的Payload:
AA AA AA AA BB BB BB BB CC CC CC CC DD DD DD DD EE EE EE EE 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6B 00 00 00

位於007006C9 (repe cmps byte ptr es:[edi],byte ptr ds:[esi])
先把edi寫入"SPEEDHACK"字串
跟esi判斷到底是否跟相同
不相同就跳到00700706

位於00700714 (repe cmps byte ptr es:[edi],byte ptr ds:[esi])
先把edi寫入"prev ping"字串
跟esi判斷到底是否跟相同
相同就不用跳

最後會運行到我們想要到的地址00700783(call 00484DB0)

最後的封包構成:
32 00 00 00 21 11 00 00 1C 2B 00 00 A4 C7 C0 71 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6B 00 00 00 70 72 65 76 20 70 69 6E 67 00
加密後:
32 00 00 00 F6 77 FF FF 1F A6 FF FF DA C1 F9 74 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF A4 FF FF FF 7C 6C D4 4C FE 7C B4 8C C4 FF


2014年12月14日 星期日

彩虹冒險私服編程 (四) - 如何解密封包

加密send fucntion:  
01833B60    57              push edi
01833B61    8B7C24 0C       mov edi,dword ptr ss:[esp+0xC]
01833B65    33C9            xor ecx,ecx
01833B67    85FF            test edi,edi
01833B69    7E 1D           jle Xiosocket.01833B88
01833B6B    56              push esi
01833B6C    8B7424 0C       mov esi,dword ptr ss:[esp+0xC]
01833B70    8A0431          mov al,byte ptr ds:[ecx+esi]
01833B73    F6D0            not al
01833B75    8AD0            mov dl,al
01833B77    C0EA 05         shr dl,0x5
01833B7A    C0E0 03         shl al,0x3
01833B7D    0AD0            or dl,al
01833B7F    881431          mov byte ptr ds:[ecx+esi],dl
01833B82    41              inc ecx
01833B83    3BCF            cmp ecx,edi
01833B85  ^ 7C E9           jl Xiosocket.01833B70
01833B87    5E              pop esi
01833B88    5F              pop edi
解密send fucntion:  
01833B90    57              push edi
01833B91    8B7C24 0C       mov edi,dword ptr ss:[esp+0xC]
01833B95    33C9            xor ecx,ecx
01833B97    85FF            test edi,edi
01833B99    7E 1D           jle Xiosocket.01833BB8
01833B9B    56              push esi
01833B9C    8B7424 0C       mov esi,dword ptr ss:[esp+0xC]
01833BA0    8A0431          mov al,byte ptr ds:[ecx+esi]
01833BA3    8AD0            mov dl,al
01833BA5    C0EA 03         shr dl,0x3
01833BA8    C0E0 05         shl al,0x5
01833BAB    0AD0            or dl,al
01833BAD    F6D2            not dl
01833BAF    881431          mov byte ptr ds:[ecx+esi],dl
01833BB2    41              inc ecx
01833BB3    3BCF            cmp ecx,edi
01833BB5  ^ 7C E9           jl Xiosocket.01833BA0
01833BB7    5E              pop esi
01833BB8    5F              pop edi

加密前send內容:
0012FD0C  88 00 00 00                                                                             ?..
0012FD1C  07 27 00 00 1C 2B 00 00 88 FE 35 C2 FF FF FF FF             '.. +..5?
0012FD2C  8D F8 A1 29 4C 24 A5 8C 4C 6D A5 D6 C6 E2 C2 4E        ?L$?Lm皮齋
0012FD3C  0B 85 73 80 FC 0A 79 D9 CF 7B 21 C0 78 2A 81 FC            €?y棝{!儲*
0012FD4C  3F 38 6E 00 23 16 00 00 61 6C 61 6E 00 85 17 00                 ?8n.# ..alan.?.
0012FD5C  00 00 00 00 FE 31 32 33 00 FF FF FF 00 00 00 C0                ....123....
0012FD6C  14 C7 FB 02 75 1C 00 00 1A 03 38 02 00 04 00 03                u .. 8 . .
0012FD7C  00 F4 70 00 00 00 00 00 E0 FD 12 00 00 00 00 00                .皫.....僣 .....
0012FD8C  E1 82 D2 77 20 0D 81 00 E1 82 D2 77 00 00 00 00               ?烅 .??烅....
0012FD9C  C8 05 00 00                                                                             ?..

加密後send內容:
0012FD0C  88 00 00 00                                                                               ?..
0012FD1C  C7 C6 FF FF 1F A6 FF FF B8 4D A3 D9 00 00 00 00            ?碉?....
0012FD2C  93 38 F2 B6 9D DE D2 9B 9D 94 D2 49 C9 E8 E9 8D           ?繲??洍扢?
0012FD3C  A7 D3 64 FB 18 AF 34 31 81 24 F6 F9 3C AE F3 18            志d??1?穱<氦
0012FD4C  06 3E 8C FF E6 4F FF FF F4 9C F4 8C FF D3 47 FF           >?潗??笉
0012FD5C  FF FF FF FF FF 76 6E 66 FF FF FF FF FF FF FF FF  vnf
0012FD6C  5F C1 20 EF 54 1F FF FF 2F E7 3E EF FF DF FF E7           _?餰 /???
0012FD7C  FF 58 7C FF FF FF FF FF F8 10 6F FF FF FF FF FF           X|?o
0012FD8C  F0 EB 69 44 FE 97 F3 FF F0 EB 69 44 FF FF FF FF            謻iD??謻iD
0012FD9C  B9 D7 FF FF                                                                           塽
 紅字: username
 藍字: password





2014年12月8日 星期一

彩虹冒險私服編程 (三) - 修改Server連接配置

原TCP Server IP: 95.211.178.168
原TCP Server Port: 22002

目測Server端由Web,TCP及UDP組成
TCP會處理登入部份
Web只會顯示當前時間給系統判斷是否進行維護

修改Server IP:
1.增加/config/gng.ini

登入流程:
1.與Server進行TCP連接,成功的話會傳message給WinProc處理跳進選頻道界面
2.TCP不能連接就會跳到004831B0
3.判斷當前時間,如果是0700~0900就會顯示維護中
4.否則會彈錯誤信息

/config/gng.ini:
[Server]
Login Server Port=1234
Login Server IP=你的外網IP

IP限制
1.127.0.0.1

P.S:假設你是使用路由器用戶,建議Login Server IP填寫為192.x.x.x
      假設你是外網IP用戶,建議Login Server IP為你的外網IP







2014年12月7日 星期日

彩虹冒險私服編程 (二) - 如何使用Ollydbg進行調試及繞過遊戲保護

初步資料及工具搜集


1.CE6.3,UCE可以用

P.S:
>>Debug不能及OD不能附加
>>CE必須先開,否則IOProtect會偵測

2.XueTr

未有發現任何inline/ssdt hook

3.利用ollydbg 進行調試
條件:
>>必須強制關掉IOProtect
>>必須nop掉update.exe檢測

利用以下bypass即可使用OD跟CE進行調試
----------bypass IOProtect----------
Credit: alanlei
=>2004年國際版
patch update:
00402CC5 jmp 00402D24
004023FC  jmp 0040251A

=>2011年無殼版
patch update:
00404A1B jmp 00404B18
Remark:RegCreateKeyExA

patch IOProtect detection:
00404346 jmp 00404535

附上教學影片:
https://www.youtube.com/watch?v=srJc5ZXYhL0

2014年11月24日 星期一

出售透視、自瞄、加速源碼

出售透視、自瞄、加速源碼及其他變態功能
有興趣自行加我
skype:alanlei22
RC:    alanlei

源碼適用以下遊戲:

TF2 絕地要塞2
穿越火線
突襲風暴
SF 特種部隊
AVA 戰地之王
SF2
風暴戰區TF 
戰地風雲(1-4)
使命召換
COD4
現代戰爭2 MW(1-3)
黑色行動 BO(1-2)
逆戰


注:因私人理由有關所有cso外掛源碼不會售賣

2014年8月13日 星期三

[Beta] Alanlei LOL Drop Hack

Hello.It 's me again.Today I introduce a new cheat of League of Legends - Drop hack!!!
Are you guys to be excited?
OK! Let's elaborate how to use it.

[+] Steps
      1. Enter a new game in lol.
      2. Start Alanlei drop hack.
      3. Type the number which network card you are using.
      4. Show the Room Server IP and Port.

[+] Attentions
      1. This beta version is suitable for 192.xxx.xxx.xxx.
       If you are external IP,please find the log.txt under my drop hack.
       The log file will log the room ip and port.
       The ip will be formated in 124.xxx.xxx.xxx.
       2. You need to provide VPS or PC to attack the room ip which is called drop hack!!!
       3. You must install wireshark from https://www.wireshark.org/download.html

[+] Hope
      If you have any VPS which can provide me for the final version of drop hack,
      please contact me to my gmail or skype.
      Anyone can provide me VPS,I provide you individual IP drop hack privately :)

[+] Contact
      Skype :alanlei
      Gmail  :alanlei22@gmail.com

[+] Download
     Alanlei Drop Hack : https://www.mediafire.com/?5sos2qr8yada1ft

Thanks for supporting my bloGGer!!
[+] alanlei.blogspot.com
///////////////////////////////////////////////////////////////////////

   


2014年8月7日 星期四

Unpacked & Unvirtualized Ehsvc.dll Version_5.7.6.502 New Updated!!

Credit to LCF -AT & Deathway.

Author: alanlei

Hello,
Welcome to my bloGGer!!

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Usage    : Analyzing HackShield HeartBeat and detection
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

If you guys want to analyze HackShield ,feel free to take it!

( 1.) Unpacking Themdia.
( 2.) Unvirtualized VM code of Ehsvc ordinary #10 and #16.
( 3.) Set the Kernel Fix
( 4.) +reloc addy

Remark:
Ehsvc ordinary#10 Addy (Service Dispatch): 
20bc3020
Ehsvc ordinary#16 Addy (HeartBeat_MakeResponse): 
20bc2650

Download:
http://www.mediafire.com/download/7787vnli2d3ohe1/ehsvc_dumped.rar

2014年8月3日 星期日

Bypass HackShield Heartbeat Source (Injectable DLL)

Credit to Alanlei :)
This bypass is prepared for Tales Runner.

Theory:
1.Hook the Ehsvc.dll ordinary 10(Service Dispatch).
2.When the service is 13(heartbeat),call the Ehsvc.dll ordinary 16(HS_makeResponse) to handle heartbeat between game and HackShield.

Preparation:
1.You need create a new ehsvc.dll without using orginal ehsvc.
2.Or You can disable the fucntion of HS_StartService and start the game.
3.Remember you must call the fucntion of HS_Init which allow system is called the ehsvc.dll.

Source:
https://www.mediafire.com/?htkwbi08xq1319n

2014年7月26日 星期六

How to Update HackShield CRC bypass (Ehsvc.dll)

Author: alanlei.
Date: 27/07/2014
If you have any problems,please feel free to contact me.
my skype id: alanlei

//callback 1
Ehsvc.dll+9DDBD
//55 8B EC 83 EC 28 53 56 57 89 4D D8 E9
new:(void *)"\xC3", 1);
Find:
0x%x,0x%x *** (In a call)
[%08x] [%s]
%d [%s]
Fail For Retrieving Current File Pos

//callback 2
Ehsvc.dll+B0C8
//75 15 55 E8 ?? ?? ?? ?? 83 C4 04 33 C0 5F 5E
old:(void *)"\x74\x15", 2);
new:db 90 90
Find:GetTcpTable
1 %d
2 %d
%s
%s *** (向下找1個空跳轉,即到達)
%ld
%ld
%d\n

//Nanoscan 1
Ehsvc.dll+C1DB1
new:(void *)"\x03\xD2", 2);
Find:
OpenProcess
SeDebugPrivilege
%02X
%s\r\n *** (向下ret x5,找紅字大舊野x5,入第一層call)
           (到左第一層call,找紅字大舊野x5,入第二層call)
  (找add eax,eax,即到達)

//Nanoscan 2
Ehsvc.dll+BE6A2
(void *)"\xB0\x00\x00\x00\x00", 5);
Find:
OpenProcess
SeDebugPrivilege
%02X
%s\r\n *** (向下ret x5,找紅字大舊野x5,入第一層call,即到達)

//Self CRC
Ehsvc.dll+9CF4C
(void *)"\xC2\x04\x00", 3);
Find:
(向下找重複function)
push ebp
mov ebp,esp
call xxx
call xxx
pop ebp
retn
(向下ret x5-6,即到達)
(注意變化一定有2組)
push ebp
mov ebp,esp
sub esp,0x8
push ebx
push esi
push edi
mov dword ptr xxx
jmp xxx

%%%02x
%%%02x
%c ***
0x%x,0x%x
[%08x] [%s]
%d [%s]
Fail For Retrieving Current File Pos

//Detection
Ehsvc.dll+B030
//83 EC 08 53 55 56 57 89 4C 24 10 8B 41 0C 83 F8 0A 0F 8D
new:(void *)"\xC2\x04\x00", 3);
Find:GetTcpTable
1 %d
2 %d
%s
%s *** (向下找超短opcode,即到達)
mov ecx,xxx
        jmp xxx

//Assembly
Ehsvc.dll+39B7D
//75 40 8B 46 0C 8B 7F 04 83 F8 01 53 75 0C
db 90 90
Find:
\StringFileInfo\%04hX%04hX\FileVersion
...
FFFF *** (向上找超上計算)
(向上找一個短opcode)
  call xxx
  mov eax,xxx
retn
         (找75 40,即到達)
FFFF
(%d)
(%d)
(%d)
(%d)

//Anticrash
Ehsvc.dll+4B63E
//85 C0 74 0A 83 7D E0 02 0F 8F E3 00 00 00
db 90 90
Find:
\StringFileInfo\%04hX%04hX\FileVersion
...
SeDebugPrivilege *** (向下找一個短opcode)
    iretd
    pop ebx
                     pop edx
                     lea,dword ptr xxx
                     out 0xD1,al
                     mov ch,0x67
                     retn
                     jmp xxx
                     (找紅字大舊野x2,係第3大舊野上面call,入第一層call)
                     (找test eax,eax x2,即到達)
SeDebugPrivilege
3n.mhe

//Nanocheck 1
Ehsvc.dll+4B5D0
db 90 90 90 90 90 90
Find:
\StringFileInfo\%04hX%04hX\FileVersion
...
SeDebugPrivilege *** (向下找一個短opcode)
    iretd
    pop ebx
                     pop edx
                     lea,dword ptr xxx
                     out 0xD1,al
                     mov ch,0x67
                     retn
                     jmp xxx
                     (找紅字大舊野x2,係第3大舊野上面call,入第一層call)
    (找je第一跳轉位置,即到達)
SeDebugPrivilege
3n.mhe

//Nanocheck 2
Ehsvc.dll+48361
db 90 90 90 90 90 90
Find:
\StringFileInfo\%04hX%04hX\FileVersion
...
SeDebugPrivilege
SeDebugPrivilege *** (向下ret x8,找紅字大舊野x3,入第一層call)
    (找je第二跳轉位置,即到達)
3n.mhe

//Nanocheck 3
Ehsvc.dll+4AA7F
db 90 90
Find:
anticrash開始找紅字大舊野x4 中間,入第一層call
向下找重複opcode
jnz xxx
mov esi,xxx
向下找ret 下面第一個跳轉位置,即到達

HackShield Bypass (EhSvc.dll version 5.7.6.502) for trgame

//2014.7.27 Ehsvc.dll 5.6.7.237 (trgame)
Ehsvc.dll+9DDBD //callback 1   db c3
Ehsvc.dll+B0C8   //callback 2  db 74 15

Ehsvc.dll+C1DB1 //Nanoscan 1   db 03 d2
Ehsvc.dll+BE6A2 //Nanoscan 2   db b0 00 00 00 00

Ehsvc.dll+9CF4C //Self CRC     db c2 04 00
Ehsvc.dll+B030  //Detection    db c2 04 00

Ehsvc.dll+39B7D //Assembly     db 90 90
Ehsvc.dll+4B63E //Anticrash    db 90 90

Ehsvc.dll+4B5D0 //Nanocheck 1  db 90 90 90 90 90 90
Ehsvc.dll+48361 //Nanocheck 2  db 90 90 90 90 90 90
Ehsvc.dll+4AA7F //Nanocheck 3  db 90 90

The HackShield CRC bypass is updated by me. If there are any mistakes,please tell me ;)

2014年6月5日 星期四

彩虹冒險私服編程 (一) - 私服所用到的檔案

彩虹冒險私服編程所需條件
1) 服務端 (c++編寫)
-   建議使用MFC編程
2) 客戶端 (利用官方檔案,要手動修改檔案)
下載點:
https://www.mediafire.com/?gk6fow7080kf18x (2011年無殼版)
http://www.mediafire.com/download/4ppf242rynp93up/SurvivalSetupInter0705.rar (2004年國際版)

2014/06/05 04:42 PM

2014年6月4日 星期三

彩虹冒險私服編程2014大召募

由彩虹結業至今,不斷有很多人說想要架設一個私服,可是一直以來也無國內人能夠實現。
為什麼外國人能夠成功研究出私服?這最大的原因莫過於是他們有我們所沒有的團結精神。
我們一直都欠缺了一個有組織的研究團體,以往的研究團隊多數亦為零零散散的。
而一個人是不可能精通全部領域的,結合各個範疇的人材,才是研究成功之道,
可能你也曾玩過國外的私服,你會發現他們的BUG奇多,穩定性更是不高。
所以在此,我希望大家不要吝惜自己的技術,加入研究,讓彩虹重新出現在大家的面前。

如果你在網絡編程、遊戲編程、組合語言或懂分析封包,而你又想跟我們一起研究編寫服
務端,你可以透過以下方法聯絡我們。

Skype:alanlei22
RC:    alanlei

假設你不懂編程,而你又想玩彩虹冒險,可以把以上的信息轉發到各大論壇、Blog、Facebook等方法宣傳。

alanlei部落格: http://alanlei.blogspot.hk

希望大家能盡一分力,為早日完成彩虹冒險私服踏出第一步。