吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 4727|回复: 1
收起左侧

[Scripts] Execryptor 2.x - 2.41 find VM EP - Stolen OEP v1.1

[复制链接]
mycsy 发表于 2009-8-14 00:51
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//    FileName        :    Execryptor 2.x - 2.41 find VM EP - Stolen OEP v1.1.osc
//    Version            :    1.1
//    Comment            :    modified Bypass anti debug script,just for find Stolen OEP
//    Environment        :    WinXP SP2,OllyICE with Phantom plugin,
//                        ODBGScript V1.64+,
//                        Olly Advanced (Break on TLS Callback),
//                        Check bypass All Exception:00000000 - FFFFFFFF
//    Author            :    Trickyboy
//    WebSite            :    http://www.reaonline.net
//    Date            :    2008-06-19 09:10
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Data:
    var imagebase
    var ecseg
    var vmseg
    var ep
    var oep
    var vmep
    var codeseg
    var sizeheader
    var oriByte
    var temp
    
Init:
    BPHWCALL
    gmi eip, MODULEBASE
    mov imagebase, $RESULT
    mov codeseg, $RESULT
    mov temp, $RESULT
    gmemi imagebase, MEMORYSIZE
    mov sizeheader, $RESULT
    add codeseg, sizeheader
    add temp, 3C
    mov temp, [temp]
    add temp, imagebase
    add temp, 28
    mov temp, [temp]
    add temp, imagebase
    bc temp                                    //Clear memory breakpoint at EP
    mov ep, temp
    gmemi eip, MEMORYBASE
    mov ecseg, $RESULT
    gpa "CreateThread", "kernel32.dll"
    mov oriByte, [$RESULT]                     //Store original byte at CreateThread
    mov [$RESULT], #C3#                        //Patch RETN at CreateThread
    
FindSOEPNotPacked:
    mov temp, eip                            //Store current EIP
    cmp [codeseg], 00000000                //Is section code null?
    je FindVMEP                                
    mov eip, codeseg                        //If section code is not packed
    eval "JMP 0{ep}"
    findcmd eip, $RESULT                    //Find command JMP EP
    cmp $RESULT, 0                            
    jne FoundSOEP                            //Found OEP
    
FindVMEP:
    mov eip, temp                            //Restore last EIP
    bphws ep, "x"
    esto
    bphwc ep
    mov temp, ecseg
    sub temp, 1
    gmemi temp,MEMORYBASE
    mov vmseg,$RESULT
    gmemi temp,MEMORYSIZE
    bprm vmseg,$RESULT
    esto
    bpmc
    mov vmep, eax
    sti
    bprm vmep, 1
    
LoopFind:
    esto
    cmp eip, vmep
    jne LoopFind
    
FoundVMEP:
    bpmc
    mov temp, vmep
    sub temp, imagebase
    eval "VM EP: {vmep} RVA: {temp}"
    log $RESULT
    mov temp, $RESULT
    msg temp
    eval "<== Found VM EP by Trickyboy. {temp}"
    cmt vmep, $RESULT
    gpa "CreateThread","kernel32.dll"
    mov [$RESULT],oriByte                    //Restore CreateThread API
    
FindSOEP:
    mov eip,codeseg
    eval "JMP 0{vmep}"
    findcmd eip,$RESULT
    cmp $RESULT,0
    jnz FoundSOEP
FindSOEP2ndseg:                            //Search on next section
    gmemi codeseg, MEMORYSIZE
    mov temp, codeseg
    add temp, $RESULT
    mov eip, temp
    eval "JMP 0{vmep}"
    findcmd eip,$RESULT
    cmp $RESULT,0
    je notFoundSOEP
    
FoundSOEP:
    mov eip, $RESULT
    mov oep, $RESULT
    mov temp, oep
    sub temp, imagebase
    eval "OEP: {oep} RVA: {temp}"
    log $RESULT
    mov temp, $RESULT
    msg temp
    eval "<== Found Stolen OEP by Trickyboy. {temp}"
    cmt oep, $RESULT
    ret
    
notFoundSOEP:
    mov eip, vmep
    msg "Sorry, not found Stolen OEP !"
    ret

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

NikolayD 发表于 2013-12-20 06:58
Thanks for sharing, mycsy.
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-14 18:21

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表