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

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

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

[Scripts] NPSE 最小保护 API参考脚本

[复制链接]
mycsy 发表于 2008-12-21 20:57
主程序到达OEP其实很简单。

只要在401000上下个内存写入断点,过几个异常后,再取消内存断点,直接在401000处来个F2就行了





NPSE 1.01 反API 保护脚本

这个脚本的作用就是能把加壳时得到的list文件还原出来,并还原出各个list的原来的API

使用方法:到达OEP后使用

目前只测试了最小保护

脚本再完善一下,最小保护的API就能完全自动解开了
关键是我不知道怎么在脚本里得到内存中的字符串。。汗……要是这个能搞定,单机修复就没问题了
想跨机还得补上LOADLIB和GETPROC……

希望能喜欢,花了我俩小时才搞出来……

(效果对比)
###############################
list文件(加壳后自动生成的文件)
0 01001931
0 01001984
0 010019ef
0 01001a19
0 01001a64
0 01001a74
###############################
log文件:
          CALL地址: 01001931
          实际dll: 010235A5 | ASCII "kernel32.dll"
          实际function: 010235B2 | ASCII "GlobalFree"
          =============================
          CALL地址: 01001984
          实际dll: 01023749 | ASCII "kernel32.dll"
          实际function: 01023756 | ASCII "GetLocaleInfoW"
          =============================
          CALL地址: 010019EF
          实际dll: 010238CE | ASCII "user32.dll"
          实际function: 010238D9 | ASCII "InvalIDAteRect"
          =============================
          CALL地址: 01001A19
          实际dll: 01023A46 | ASCII "user32.dll"
          实际function: 01023A51 | ASCII "MoveWindow"
          =============================
          CALL地址: 01001A64
          实际dll: 01023BBA | ASCII "user32.dll"
          实际function: 01023BC5 | ASCII "SendDlgItemMessageW"
          =============================
          CALL地址: 01001A74
          实际dll: 01023D37 | ASCII "user32.dll"
          实际function: 01023D42 | ASCII "SendDlgItemMessageW"
###############################




var a,b,c,eecx
var CALL地址,实际dll,实际function

    mov eecx,ecx
    gmi eip,MODULEBASE
    mov a,$RESULT
    cmp a,0
    jne nexxt
    gmi eip,CODEBASE
nexxt:
    msgyn "脚本可能长时间运行,继续?"
    cmp $RESULT,0
    je over
start:   
    findop a,#E8????????#
    cmp $RESULT,0
    je over
    mov b,[$RESULT+1]
    add b,$RESULT
    add b,5
    mov c,$RESULT
    cmp ,e89c60
    jne next
    mov CALL地址,$RESULT
    log CALL地址
   
    //xor数据
    var xorbyte,xorlen,xorstart,temp1,temp2
    findop b,#8033??#
    mov temp1,$RESULT
    add temp1,2
    mov xorbyte,[temp1]
    mov ecx,xorbyte
    mov xorbyte,cl
//    and xorbyte,ff
    mov xorstart,b
    add xorstart,2a
   
    add xorstart,1b
    mov temp1,[xorstart+1]
    mov temp2,[xorstart+8]
    xor temp1,xorbyte
    xor temp2,xorbyte
    shl xorbyte,8
    xor temp1,xorbyte
    xor temp2,xorbyte
    shl xorbyte,8
    xor temp1,xorbyte
    xor temp2,xorbyte
    shl xorbyte,8
    xor temp1,xorbyte
    xor temp2,xorbyte
        
    add temp1,temp2
    mov 实际dll,temp1
    log 实际dll
    find temp1,#2e646c6c#
    add $RESULT,5
    mov 实际function,$RESULT
    log 实际function
    log "============================="
//    gpa temp1,$RESULT
//    mov xorlen,xorstart
//    sub xorlen,4
//    mov xorlen,[xorlen]
//    shl xorlen,18
//    shr xorlen,18
//    mov temp1,xorstart
//    add temp1,xorlen
//            rexor:
//        xor [xorstart],xorbyte
//            inc xorstart
//如果改成dec xorstart的方式会导致插件内存泄露           
//            cmp temp1,xorstart
//            jne rexor
   
   
next:
    mov a,c
    add a,5
    jmp start
over:   
    mov ecx,eecx
    msg "请到 查看-》记录中 查看结果"
ret

//......到此一游......

[ 本帖最后由 mycsy 于 2008-12-21 20:59 编辑 ]

npse.rar

122.94 KB, 下载次数: 3, 下载积分: 吾爱币 -1 CB

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

maokecheng 该用户已被删除
maokecheng 发表于 2008-12-22 11:53
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册[Register]

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

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

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

GMT+8, 2024-5-16 01:38

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

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