|
IAT加密中遇到的诡异问题
哦,14楼果然发现我说错了。这个代码写的比较早了,我刚又看了下处理代码。 我是用ebx与dword ptr[ebx+10h]异或的。而dword ptr[ebx+10h]是0B8h,F1h,2Fh,0BBh,加上后面一个字节7Ch形成一条汇编指令。 mov eax,7CBB2FF1h 是5字节的指令,前4个字节被XOR加密了,我们还原出来指令,还原结果就是mov eax,7C812FADh. 有点乱,马上第二种方法的说明,抱歉,需要重起下机器,等下再贴。 简单说下,这里没有错的。如果需要,我可以给出加壳软件的源代码。以《加密与解密第三版》第16章的那个代码为蓝本,增加IAT加密功能。 |
|
IAT加密中遇到的诡异问题
把Virtualalloc函数的dwSize由17500h取整为20000h后。显示界面和显示错误警告同时出现的情况多了起来,出现了一次应该是错误报告的情况,如图: |
|
IAT加密中遇到的诡异问题
IAT加密简单方法二(更正): Data_2_for_IAT DB 53h, ;push ebx 0E8h,00h,00h,00h,00h, ;call $+4h 5Bh, ;pop ebx 83h,0EBh,06h, ;sub ebx,6h 31h,5Bh,10h ;xor dword ptr[ebx+10h],ebx DB 0ebh,001h,0e8h, ;***花指令 84h,ADh,15h,81h,7Fh, ;(mov eax,7C812FAD) 前4个字节经XOR加密后形成的乱码 31h,5Bh,10h ;xor dword ptr[ebx+10h],ebx DB 5Bh, ;pop ebx 0FFh,0E0h, ;jmp eax 0E8h ;***花指令 假设Data_2_for_IAT在内存地址为003A005C 其中xor dword ptr[ebx+10h],ebx mov eax,7CBB2FF1h xor dword ptr[ebx+10h],ebx jmp eax 就是有用的代码,ebp寄存器只是用来存放本重指向代码内存首地址003A005C 。还原用(84h,ADh,15h,81h) XOR (5Ch,00h,3Ah,00h)加上后面的字节7Fh,形成指令mov eax,7C812FAD,赋值給eax,然后重新加密成乱码,然后跳转到eax继续执行. 方法二与方法一的主要区别在于它虽然修改所申请内存空间的代码,但是它并不读取数据(就是没有mov eax,dword ptr[xxxxxxxx]这样的代码)。另外它其实修改了eax的值,关于修改eax值导致的一系列问题,我们暂时不关心,这个程序修改eax值是不会出错的。 PS:追风貌似很少查看别人再次编辑的内容,而我很喜欢重新编辑。。。悲剧,请看7楼。试过,有作用。 |
|
IAT加密中遇到的诡异问题
【QUOTE】你的错误大概是由Virtualalloc函数引起的吧?你的dwSize参数最好按页的整数倍来申请,防止发生意料;【/QUOTE)】 按照你的办法,我发现正确率提高到15%-20%,出界面同时出错误警告的的情况也提高到15%-20%。真的有效果,我多次统计过。但是这个貌似不是主要原因。 这个还是没引用到啊 |
|
IAT加密中遇到的诡异问题
等下我贴第二种,就是我弄的比较复杂了,一时不好说清楚,郁闷。先请教下如何引用回复里某一句话,半天没弄出来。汗 说明下:我的第一种加密方法正确率10%,第二种是40%-50%,第三种是100%。我贴的是第一种和第三种。 |
|
IAT加密中遇到的诡异问题
回2楼,是我搞错了,我只拿一个IAT来举例,改的有点多,改错了个地方。 这个不复杂,IAT加密相当简单,会手动脱壳的都能看懂。。。。。 另,我本来也怀疑Virtualalloc函数有问题,但是我第三种IAT加密方法不会出错,Virtualalloc函数申请内存空间 在这两条路径前面就调用了。问题核心其实在于: 1、第三种方法为什么不出错,第一种方法为什么大多数错但又必定有正确的几率。第三种比第一种少了把 程序所申请内存地址 的值压入堆栈的操作。 2、“如果我把17D8F38D改为00000000。这样的话异或等同与无操作。在003A007B处就存放系统API的真实地址7C812FAD。这种情况是不会出错的。”的本质就是程序申请的内存空间本身如果有数据被修改,很可能出错;而其他程序没这样的问题。 |
|
明显已经成功脱壳了,为什么还是“乱码”?
回10楼。在这个文件里,call dword ptr [0041D460] 等价于call 7D610EF0. 地址0041D460存放的就是4字节数据7D610EF0。所以0041D460处是数据,7D610EF0是代码。 |
|
明显已经成功脱壳了,为什么还是“乱码”?
6楼说的不错,真相就是这样简单。。。。。 |
|
crackme的源码
《加密与解密第三版》第四章 逆向分析技术 ,这章你先看差不多了。 然后你就可以找到 配套光盘映像文件 中间一些章节,里面有不少是有EXE文件(同时有对应的C源码的小程序),最简单的就是第二章的那个Crackme,你都可以对照C源码用OD看汇编语言代码。 没有办法,汇编语言必须看习惯了才行。 |
|
长期积累下来,一直个人无法较为彻底解决的疑问, 希望看雪论坛是否能出专题,或派专人解决下?
如何解决反调试,建议你搜索下论坛 壳专题,玩命大大写的,里面有个反调试专题,你一个一个看完先。 还有就是第一次摸索跟踪代码时,下的F2断点最好断下来后马上删除,很容易被检测出来的。 第二个问题我也经常遇到,我想应该有人专门整理过,在CrackMe专区搜下吧。 |
|
[讨论]C++中如何在当前代码加入一定量字节的空代码
15楼威武,这办法不错。 |
|
[讨论]C++中如何在当前代码加入一定量字节的空代码
VC++6.0里内嵌ASM汇编文件里用 Value_1 DB 64h dup(90h) 可以做到。我想类似的把汇编代码内嵌到C语言代码里也可以吧。 你可以试试。 |
|
|
|
C语言 解二元一次方程
敬佩 轩辕小聪 ,耐心细致的为我等菜鸟排忧解惑。目前还达不到耐心这一境界。。。。。 |
|
C语言 解二元一次方程
楼主,这个问题也有必要发到论坛上问啊。再看楼主的结贴率,明白了,投机性太强,不如不给你说。 |
|
请问 OD 中 HEX值 和 反汇编的代码 有什么关系
引用: 我认为,应该只能call在0x00401000以后的地址,不知道对不对?(因为0x00401000是.text段的起始位置) 不是这样的。你用Virtualalloc申请内存地址,往往会申请到00401000以前的地址。我经常申请到003A0000。各种跳转都没错。 |
|
求助程序检测中文系统弹出"Korea Version"关闭
怎么实现jnz----------->jmp . 机器码 75 1D 修改为 EB 1D (这些都是短跳转) 怎么实现jmp----------->jnz . 机器码 EB 1D 修改为 75 1D。 你等跳转后,恢复代码就行了。 用OD直接写汇编指令然后恢复原汇编指令。 OD会帮你改写机器码(这是在内存中改写,别保存到磁盘文件中)。 |
|
求助程序检测中文系统弹出"Korea Version"关闭
4楼,果然是你。我不放心再看遍程序,果然我错了。你发现的过于及时。。。。。 |
|
求助程序检测中文系统弹出"Korea Version"关闭
在程序运行到 0040AC80 时,用OD修改EAX值为 非0 . 这样能过内存自效验,出错几率更小。 但是这个EAX值修改后有没有大碍啊,好像后面 0040ACB4 . 0F85 CF010000 jnz 0040AE89 不跳转的话就被清0了。 总的来说就是楼主这里可以采取修改寄存器的办法改变程序流程,这样能过内存自效验。 按2楼的办法修改 jnz----------->jmp ,跳到 short 0040ACA1后,再把 jmp----------->jnz。都占一个字节,这样也能过内存自效验(不知道这个检测不)。 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值