| 
TA的每日心情|  | 开心 2019-3-14 10:36
 | 
|---|
 签到天数: 44 天 [LV.5]常住居民I | 
 
| 網上已經放出 The Enigma Protector 1.66 正式版了. 希望大家參考網上的教程, 自已動手破解.
 
 這裡送個小禮物給大家玩玩.
 順便介紹一下, Enigma 的另一種修改法.
 
 用法:
 
 把 Zenix_Enigma.DLL 放到 Enigma verion 1.66 的 Plugins 文件夾底下.再啟動 Enigma
 
 這個例子只破解 Enigma 主程序的注冊檢查.
 其它的地方, 留給你們自已練習.
 
 ZeNiX  2009-06-09
 源碼在這裡...
 中間放了點防小人山寨的簡單加減法標記 ZeNiX.
 相信這裡的朋友都看得懂.
 追加一些說明:复制代码    .386
    .model flat, stdcall
    option casemap :none   ; case sensitive
    include \masm32\include\windows.inc
.code
LibMain proc hInstDLL:DWORD, reason:DWORD, unused:DWORD
        .if reason == DLL_PROCESS_ATTACH
            mov Eax, TRUE
        .elseif reason == DLL_PROCESS_DETACH
        .elseif reason == DLL_THREAD_ATTACH
        .elseif reason == DLL_THREAD_DETACH
            
        .endif
           
        _exit:
        ret
LibMain Endp
Enigma_Plugin_About proc      
            push ebx
            push eax
            mov  ebx, dword ptr Zenix
            mov  eax, dword ptr Zenix+1
            sub  ebx, 689F4CEDh 
            add  eax, 6d771ceh                    
            mov dword ptr [ebx], eax 
            pop  eax
            pop ebx      
            ret
  Zenix     db 'ZeNiX'          
Enigma_Plugin_About endp
Enigma_Plugin_Description proc
            ret
Enigma_Plugin_Description endp
Enigma_Plugin_OnInit proc
            ret
Enigma_Plugin_OnInit endp
End LibMain
給新手說說如何找到這個修改點的思路吧!
 首先, 拿出 Enigma 的 API 來看看, 我注意到這個 API.
 EP_RegLoadAndCheckKey 用来读取和验证注册信息,包含两个函数 EP_RegLoadKey 和 EP_RegCheckKey 。
 
 代碼不長, 人肉 F5 一下, 大概是這個樣子.复制代码
008EF614 >/$  53            push    ebx
008EF615  |.  83C4 F8       add     esp, -8
008EF618  |.  33DB          xor     ebx, ebx
008EF61A  |.  8D4424 04     lea     eax, dword ptr [esp+4]
008EF61E  |.  50            push    eax                              ; /Arg2
008EF61F  |.  8D4424 04     lea     eax, dword ptr [esp+4]           ; |
008EF623  |.  50            push    eax                              ; |Arg1
008EF624  |.  E8 23FCFFFF   call    EP_RegLoadKey                    ; \EP_RegLoadKey
008EF629  |.  83F8 01       cmp     eax, 1
008EF62C  |.  75 11         jnz     short 008EF63F
008EF62E  |.  8B4424 04     mov     eax, dword ptr [esp+4]
008EF632  |.  50            push    eax                              ; /Arg2
008EF633  |.  8B4424 04     mov     eax, dword ptr [esp+4]           ; |
008EF637  |.  50            push    eax                              ; |Arg1
008EF638  |.  E8 3FF2FFFF   call    EP_RegCheckKey                   ; \EP_RegCheckKey
008EF63D  |.  8BD8          mov     ebx, eax
008EF63F  |>  8BC3          mov     eax, ebx
008EF641  |.  59            pop     ecx
008EF642  |.  5A            pop     edx
008EF643  |.  5B            pop     ebx
008EF644  \.  C3            retn
也就是說, 注冊判斷的傳回值在 EP_RegCheckKey, 所以我們就來看看 EP_RegCheckKey()复制代码BOOL EP_RegLoadAndCheckKey()
{
  if (EP_RegLoadKey( char** Name, char** Key )) 
      return EP_RegCheckKey( char* Name, char* Key );
  else
      return FALSE;
}
 我們看到注冊標志由 EP_RegCheckKeyEx() 傳回來的 al 來決定的.复制代码008EE87C >/$  55            push    ebp
008EE87D  |.  8BEC          mov     ebp, esp
008EE87F  |.  53            push    ebx
008EE880  |.  56            push    esi
008EE881  |.  8B75 0C       mov     esi, dword ptr [ebp+C]
008EE884  |.  8B5D 08       mov     ebx, dword ptr [ebp+8]
008EE887  |.  8BC6          mov     eax, esi
008EE889  |.  E8 CAA9F8FF   call    00879258
008EE88E  |.  50            push    eax
008EE88F  |.  56            push    esi
008EE890  |.  8BC3          mov     eax, ebx
008EE892  |.  E8 C1A9F8FF   call    00879258
008EE897  |.  50            push    eax
008EE898  |.  53            push    ebx
008EE899  |.  E8 6AFDFFFF   call    EP_RegCheckKeyEx
008EE89E  |.  8B15 A01B9200 mov     edx, dword ptr [921BA0]          ;  DLL_Load.0092A164
008EE8A4  |.  8802          mov     byte ptr [edx], al
008EE8A6  |.  5E            pop     esi
008EE8A7  |.  5B            pop     ebx
008EE8A8  |.  5D            pop     ebp
008EE8A9  \.  C2 0800       retn    8
所以我們只要讓它返回時, al=1 就好了.
 al=0 (未注冊)
 al=1 (已注冊)
 | 
 
x本帖子中包含更多资源您需要 登录 才可以下载或查看,没有账号?加入我们 
  |