【脱壳】【申请邀请码】研究HASP HL Envelope的脱壳
近在研究HASP HL Envelope的脱壳,搜索到一个好用的HASP HL Envelope IAT Fixer,已经成功用于修复我的程序的IAT。原作者为s0cpy。
lostdongle在网上发了一个hasp srm的脱壳视频,里面用的hasp srm Envelope iat fixer和这个一样,仅仅将“find prtc_sec, #FFFF82D18BE55DC3#”,修改为:"find prtc_sec, #66C1E7??5E5B8BE566C1E6??5DC3#",这个需要根据hasp srm Envelope 的版本来修改。这段代码对应一个retn的位置(.protect 区段),在这里esp中有需恢复的API函数的地址。
代码:
/*
/////////////////////////////////////////////////////////////////////////////////
HASP_HL Envelop 1.2x/1.3x import resolver script v0.1a
Author: s0cpy
Email : s0cpy.store@gmail.com
OS : WinXP SP2, Ollydbg 1.1, ODbgScript 1.65.4
Date : 2008-01-12
Action: Fix IAT, but not fix emulated functions.
Config: Ignore all exceptions, start from OEP.
Some emulated functions need to be resolved manually:
GetCommandLineA
GetProcAddress
GetCurrentProcess
GetStartupInfoA
GetCurrentProcessId
GetCurrentThreadId
/////////////////////////////////////////////////////////////////////////////////
*/
var prtc_sec
var iat_cell
var ss
var es
var gtc
var endp
var iatstart
var iatend
var gtc_c
var sysmod
gpa "GetTickCount", "kernel32.dll"
mov gtc, $RESULT
ask "Enter start code section address"
cmp $RESULT, 0
je @halt
mov ss, $RESULT
mov es, $RESULT
ask "Enter start address of IAT"
cmp $RESULT, 0
je @halt
mov iatstart, $RESULT
ask "Enter end address of IAT"
cmp $RESULT, 0
je @halt
mov iatend, $RESULT
ask "Enter start address of `.protect` section"
cmp $RESULT, 0
je @halt
mov prtc_sec, $RESULT
ask "Enter start address of system modules memory"
cmp $RESULT, 0
je @halt
mov sysmod, $RESULT
@end_point:
find prtc_sec, #66C1E7??5E5B8BE566C1E6??5DC3#
mov endp, $RESULT
add endp, 4
bphws endp, "x"
@search:
cmp iat_cell, iatend
je @halt
mov iat_cell, iatstart
cmp [iatstart], 00000000
add iatstart, 4
je @search
cmp [iat_cell], sysmod
ja @search
@scan:
mov eip, [iat_cell]
jmp @run
@count:
inc gtc_c
cmp gtc_c, 2
je @fix
@run:
run
sti
sti
sti
cmp eip, gtc
je @count
cmp gtc_c, 0
je @search
@zero_c:
mov gtc_c, 0
@fix:
mov [iat_cell], eip
cmp iat_cell, iatend
je @halt
jmp @search
@halt:
bphwc endp
mov eip, oep
an eip
pause
ret
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课