Execryptor 2.2.50

Data

by "Pnluck", "Saturn" e "LittleLuk"

 

11/11/2005

UIC's Home Page

Published by Quequero

Venghino signori, l'é vero, che qui ci sono

Annamo al massimo, annamo a gonfie vele - Pnluck
:/ - Que

<<checosa c'è??>>
Entrino e lo scoprirete (6)

....

Pnluck, #crack-it #pmode #cryptorev #unpacking(su efnet)

....

Difficolt�

(X)NewBies (X)Intermedio ( )Avanzato ( )Master

 

 

Introduzione

In questo articolo decrivo come fare l'unpacking di execryptor 2.2.50
Visitate il sito di Execryptor per le info su questo packer: http://www.strongbit.com/execryptor.asp

Tools usati

Ollydbg, IsDebug&Extra, Olly Invisible, HideDebugger, NtGlobalFlag, OllyDump, AntidetectOllyPatch, RDG

URL o FTP del programma

Crackme

Essay

About EXECryptor
To view somethings about Execryptor visit http://www.strongbit.com/execryptor.asp (most of these techniques are applied through the use of thread)

About Reversing stuff detection
Execryptor uses a lot of tricks to detect ollydbg, and other tools (like softice, filemon, regmon, etc..).This is possible, because Execryptor makes a lot of thread , withus it does a continuous control. For example, isn't possible uses at the same time ollydbg or filemon(not pached) with a software protected by Execryptor.
Those problem is possible resolve with RE-pair 0.6(for regmon, filemon) and AntidetectOllyPatch (for Olly)

About R3 degugger detection
Execryptor uses some trick to verify if he is debugged:

  1. Control of Beingdebug
    004XXXXX   MOV EAX,DWORD PTR FS:[30]   ;fs:[30] return the PEB address
    ...
    004XXXXX   ADD EAX,2         ; PEB+2 is beingdebug memory address
    004XXXXX   MOV EAX,DWORD PTR DS:[EAX]   ; AL maybe 0(not debug) or 1(debug present)
    ...
    004XXXXX   OR AL,AL
    004XXXXX   JE UnPackMe.004F2C67 
        
  2. Control of ProcessHeap
    004XXXXX  MOV EAX,DWORD PTR FS:[18]    ; fs:[18] return the TEB address
    ... after some operation
    004XXXXX  MOV EAX,DWORD PTR [EAX+30]   ;TEB+0x30 return the PEB address
    .... after some operation
    004XXXXX  MOV EAX, DWORD PTR[EAX+18]   ;PEB+0x18 retunr the ProcessHeap address
    004XXXXX  CMP DWORD PTR DS:[EAX+10],0  ;EAX+10  maybe 0(not debug) or other values (debug present)
  3. Controll of NtGlobalFlag
    004XXXXX  MOV EAX,DWORD PTR FS:[30]  ;fs:[30] return the PEB address
    004XXXXX  ADD EAX,8E4180C9
    004XXXXX  ADD EAX,71BE7F9F           ;EAX = PEB+0X68 : address of NtGlobalFlag 
    004XXXXX  MOV EAX,DWORD PTR DS:[EAX] ; NtGlobalFlag maybe 0x70(debug present) or 0
        
  4. Use of Windows apis
    Use CheckRemoteDebuggerPresent and IsDebuggerPresent, look msdn

  5. Use of Seh
    With the use of many exception, Execryptor controls if there are Hardware BreakPoints
    004XXXXX  MOV ECX,ESP
    004XXXXX  ADD ECX,10
    004XXXXX  MOV ECX,DWORD PTR DS:[ECX]   ;point to Context of software
    004XXXXX  MOV DWORD PTR DS:[ECX],10013 ;change the context flags
    ...
    00524C5F  ADD ECX,18                  ;ECX = Debug Register 7
    00524C65  MOV AL,BYTE PTR DS:[ECX]
    00524C67  ADD ECX,9C                  ;ECX = EBP register
    00524C6D  ADD BYTE PTR DS:[ECX],AL
    00524C6F  ADD ECX,4                   ;ECX = EIP register
    00524C75  MOV DWORD PTR DS:[ECX],UnPackMe.00522929   ;Set the eip after the seh handler
    ....
    0052068E  XOR EAX,EAX     ;EAX = 0 : fixed exception 
    00520690  POP ECX
    00520691  RETN
      
    This is the simplest version of seh handler, beacause in other Execryptor controls also the DB register, from 0 to 3 to verify the presence of HD bp and react, therefore use memory bp.

  6. Use of Thread
    Execryptor creates a lot of thread to control the presence of Ollydbg, modification of code like bp, etc; to elude these controls in the simpler way, we can do a code injection into CreateThread:
    7C81082F >MOV EDI,EDI
    7C810831  PUSH EBP
    7C810832  MOV EBP,ESP
    7C810834  PUSH DWORD PTR SS:[EBP+1C]
    7C810837  PUSH DWORD PTR SS:[EBP+18]
    7C81083A  PUSH DWORD PTR SS:[EBP+14]
    7C81083D  PUSH DWORD PTR SS:[EBP+10]
    7C810840  PUSH DWORD PTR SS:[EBP+C]   <-- change with JMP to_empty_space
    7C810843  PUSH DWORD PTR SS:[EBP+8]
    7C810846  PUSH -1
    7C810848  CALL kernel32.CreateRemoteThread
    7C81084D  POP EBP
    7C81084E  RETN 18
      
    At empty space  
    7CXXXXXX  MOV DWORD PTR SS:[EBP+C],4    <-- Set the thread to Suspend mode
    7CXXXXXX  PUSH DWORD PTR SS:[EBP+C] 
    7CXXXXXX  PUSH DWORD PTR SS:[EBP+8] 
    7CXXXXXX  JMP kernel32.7C810846
      
Run software protected with Execryptor on Ollydbg
Ollydbg can debug a software protected with Execryptor only with a path and pluings. After the patching and the installation of plugins, we can run a software, here I show how arrive at OEP and how rebuild the iat.
 
 
                                                                                                           Pnluck, Saturn & LittleLuk

Note finali

Grazie ai forum Uic e Arteam, Ntoskrnl, Quake2, Quequero, AndreaGeddon il primo ad unpackare execryptor, Shub, Silent, SataNik, LonelyWolf, Zairon, Active85k e tutti i membri di Pmode e Uic

Disclaimer

Vorrei ricordare che il software va comprato e  non rubato, ma cmq potete scaricare na demo di trenta giorni: analizzarla, farle delle modifiche a piacere ed usarla quanto pi� vi piace ;)