首页
社区
课程
招聘
Memory Patcher for Aspr Source.
发表于: 2005-4-20 17:12 2945

Memory Patcher for Aspr Source.

2005-4-20 17:12
2945
;Memory Patcher for Asprotected programs by +DzA kRAker (Regele Piratilor)
;I made this shit because of asprotect.
;this is my simple solution to  bypass asprotect anti-loading
;procedures.
;Well,this is kinda slow because it won't wait for input idle after it executes target,
;it uses a lame method,based on FindWindowExA...i could have used that CreateToolhelpSnapshot
;api,but if i use that one,it will be kindu complicated ,because the patch won't
;be done at the right time...i mean when the packed exe is completly unpacked in memory(!)
;so,FindWindowsExA  turned out to be the best solution...i think you can figure out
;why.
;This should probably work with other packers too (Aspack,UPX,Petite...etc)

.586P                                            
locals
jumps
.model flat,StdCall

Extrn CreateProcessA          :PROC
Extrn FindWindowExA           :PROC
Extrn GetWindowThreadProcessId:PROC   
Extrn OpenProcess             :PROC        
Extrn WriteProcessMemory      :PROC                        
Extrn ExitProcess             :PROC
Extrn MessageBoxA             :PROC

.data
window          db 'LOADME',0   ;the window name of the target
exename         db 'sample.exe',0 ;the executable name of the target                       
pid             dd 0                  ;Process Id                 
Buffer1         dd 0                  ;patch buffer
tit             db 'TNT Memory Patcher v1.0 de +DzA kRAker (Regele Piratilor)',0  
exenfmsg        db 'Target does not seem to be here!',0
msg          db 'sHit HapPEns',0      
StartupInfo     db 48h dup (0)   
ProcessInfo     dd 4 dup (0)      

OFS              = 0040101Ah ;here you enter the address to patch   
                             ;btw,this is not the right offset where the arpr crack
                             ;must be done...go find it by yourself dude!

                             
BytesNumber_1_1 = 1       ;how many bytes do we want to patch?                           
Buffer_1_1   db 075h       ;first byte,second,blahblahblah

.code

Main:
    push    offset tit                  
    mov     dword ptr [StartupInfo],44h
    push    offset ProcessInfo         
    push    offset StartupInfo         
    push    0
    push    0
    push    20h                              
    push    0
    push    0
    push    0
    push    0
    push    offset exename      
    call    CreateProcessA
    test    eax,eax
    jz      exenotfound
   
search:
Call FindWindowExA,0,0,0,offset window            
test eax,eax                                       
jz search ;if a correct window name is not found,we loop
  
Call GetWindowThreadProcessId,eax,offset pid ;we take the PID        
test eax,eax                                      
jz error                                     ; jump to error message                                          
call OpenProcess,0C0h,0,[pid]                ;open the process                  
test eax,eax                                       
jz error   ;same error message                                         

call WriteProcessMemory,EAX,OFS,OFFSET Buffer_1_1,BytesNumber_1_1 ,OFFSET Buffer1
jmp Exit
ret

               
error:                                             
call MessageBoxA,0,offset msg,offset tit,0  
jmp Exit               

exenotfound:
Call MessageBoxA,0,offset exenfmsg,offset tit,0
jmp Exit

Exit:
Call ExitProcess,0     ;time to leave:'(                             
END Main

[课程]FART 脱壳王!加量不加价!FART作者讲授!

收藏
免费 0
支持
分享
最新回复 (4)
雪    币: 4833
活跃值: (2218)
能力值: ( LV9,RANK:170 )
在线值:
发帖
回帖
粉丝
2
看上去象keymaker 的原理
2005-4-20 22:20
0
雪    币: 416
活跃值: (29)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
这个只能用于老版本吧
2005-4-20 22:39
0
雪    币: 202
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
看不懂得说
2005-4-21 01:07
0
雪    币: 427
活跃值: (412)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
其实DUP有一个通用的加密壳LOADER,只需要找到这个壳的效验内存地址以及正确效验值即可
2005-4-21 15:16
0
游客
登录 | 注册 方可回帖
返回
//