|
[求助]监视eip并记录特定eip时寄存器或进程内存的内容
用Debug API。 用带有DEBUG_PROCESS的dwCreateFlags参数调用CreatProcess,使创建的子进程被父进程调试。 假设子进程不进行调试器检测。 如果程序本身不使用DebugRegister,那么最简单的办法就是在收到第一个DebugEvent时,用SetThreadContext,修改DebugRegister,设置硬件断点。 如果程序本身会使用DebugRegister(虽然这种情况很少见),那就用软件断点,即先ReadProcessMemory,读取原来的指令的第一个字节,然后WriteProcessMemory,写入一个0xCC。 然后就在DebugLoop中等待断点被触发,也就是dwDebugEventCode为EXCEPTION_DEBUG_EVENT并且u.Exception.ExceptionRecord.ExceptionCode为EXCEPTION_BREAKPOINT,并且ExceptionAddress正是所要下断的地址。 此时,就可以GetThreadContext来获取寄存器的内容,或ReadProcessMemory来获取内存的内容了。 记住,在ContinueDebugEvent时,除断点异常用DBG_CONTINUE外,其它所有的调试事件都用DBG_EXCEPTION_NOT_HANDLED,并且软件断点被触发时,要恢复原始指令字节。 如果断点只要触发一次,以上方法就够了。如果断点需要能够重复触发,那么对于使用0xCC软件断点的情况,在ContinueDebugEvent时,要恢复原始指令字节,并设置CPU的T位,让程序单步走一下,然后下一次调试事件处理时,再写回0xCC,并清除T位,恢复程序正常运行。 |
|
|
|
[求助]OD破解遇阻?????
“破解”不是这么简单的。 对这方面感兴趣,就从简单的学起,比如看雪的主页上就有链接,有解密入门的教程,或者到书店,习一本《加密与解密》来看。 另外,一定要明白,逆向工程和调试技术,归根结底是为软件服务的,以“破解”为目的,你可能学不到什么有用的东西的。 |
|
[求助](新手)求脱搜狗拼音的壳
不知道拼音输入法是不是一样,我的搜狗五笔输入法是VC8写的。 |
|
[求助]一个C++加密函数的转换
[QUOTE=dayang;585514] 其中的Dst[i] = Dest[i] - 8; 不明白,字符也可以减8吗? [/QUOTE] “字符”只是对人类语言而言的,对机器而言,“字符”类型是没有特殊语义的。在C/C++中,char这个类型,完全等价于一个*8-bit integer*,至于默认是signed还是unsigned,在C++标准中没有定义,由编译器决定(通常可以通过编译器选项来设定),而这个8-bit整数的值,是对人类语言的“字符”的*编码*,采用美国制定的ASCII编码标准。 所以,这里的减8,就是对“字符”的ASCII编码值减8。这个函数的算法,就是类似于凯撒密码的移位算法(唯一区别就是待加密的值空间不同) [QUOTE=dayang;585514] Function crypt(src:string):string; var i:Integer; dst:string; begin for i:=0 to Length(src) do begin Dst[i]:= char(strtoint(src[i]) - 8); end; Result := Dst; end; 刚自己改了下,不好用,郁闷[/QUOTE] 如果理解了“字符”型,这段代码中的错误就应该明白了。 直接用src[i]去减8,结果再赋给dst[i]就行了。不用strtoint。 |
|
学习在C\MSDN
亿万大叔说得很好,我十分赞同。 所有的资料都是“参考”资料,要学什么,每个人都不同,要自己来。 MSDN当字典来用,CSDN上的文章也就是有时间随便看看,看到自己感兴趣的就细看,不感兴趣就忽略吧。 “技巧”有一定的作用,当不可以去“追求”技巧。 |
|
[求助]被断下的指令应该是还没有被执行的吧!
这句话有点问题,改了。我要表达的是,断点触发,调试器接管后,用户进行完必要的处理,然后输入continue命令让程序继续运行。 F2时,那一行指令的首字节被替换成了0xCC,调试器将记录下原来的指令。断点触发时,修改过的指令0xCC执行完了,但原来的指令没有执行。 |
|
[求助]高人进来解决一下!!!急!!!!
试试SendMessage(hEdit,WM_SETTEXT,...)将文本发送到程序的文本框内,再SendMessage(hwnd,WM_COMMAND,IDOK,...)来模拟用户的“确认”的操作将文字写入数据库。 |
|
[求助]VB如何终止某一进程中的线程?
关于API的详细说明,你应该去查帮助文档。你不可能每遇到不懂的API就发贴问别人。 如何判断是否有消息循环,结论是没有好的办法。如果线程创建了GUI对象,那么就应该有消息循环。如果没有创建GUI对象,那通常情况下是没有消息循环的。 |
|
[求助]被断下的指令应该是还没有被执行的吧!
调试器的软件断点是将原来的指令替换成int3指令,而Int3指令是陷阱指令,产生异常,从而让调试器接管。 int3指令是陷阱,所以调试器获得控制权时,int3指令已经执行完毕, 但是,int3指令的执行效果除了产生一个调试异常,并使处理器进入异常处理流程之外,不对处理器其它状态进行修改。所以,异常处理代码保存的ring3的程序状态与int3前一条指令执行完成后的处理器状态是一致的。所以,逻辑上,断点异常发生时,int3指令执行完毕了,但本来的指令(被int3替换掉了)还没有执行。 在int3指令执行并将控制权转移到调试器后,用户输入命令,要求程序继续执行(比如gdb的continue命令,或OD中是F9),调试器通常的处理方式是,写回被int3替换的指令的第一个字节,并置CPU的T位,然后恢复程序运行,程序会执行一条指令,然后产生单步异常,调试器重新恢复int3断点,并清除T位,然后正式恢复程序的执行。 |
|
[求助]怎么用C语言实现左右逻辑移位
什么是“左右逻辑”??? 如果你指的是逻辑移位的话,C中的移位操作符 << 和 >> 就是执行逻辑移位的。 比如,unsigned bit_mask = ( 0x01 << 15 ); bit_mask的值是 0x8000。 |
|
[求助]int 21h中断40h号功能,那个bx的值不知是干什么的?
file handle,通常也译为句柄,就是open系统调用所返回的值。 |
|
[求助]请问区段节是格式是什么
补充一句,注意对齐。 |
|
[求助]请问区段节是格式是什么
论坛里有PECOFF_V8的文档,自己搜索一下。 看文档有点枯燥,结合这个图,一目了然。你想要实现的功能并不复杂。 http://www.pediy.com/document/PE.rar |
|
[求助]下面的代码,可以在emu8086模拟器可以运行,请问怎么才能在masm32或者masmplus运行?
忘了重要的SetConsoleTextAttribute |
|
[求助]下面的代码,可以在emu8086模拟器可以运行,请问怎么才能在masm32或者masmplus运行?
32位程序使用Windows的系统服务,16位代码使用DOS的系统服务,是完全不同的。 DOS的系统调用是int 0x21,而Windows的系统服务主要是通过命名的API接口提供的。 所以,这里不是简单地改写的问题,而是完全重写的问题。 32位控制台输出字串,使用msvcrt中上printf比较方便。至于颜色控制,则是个比较复杂的过程。简单地说,涉及到GetStdHandle、SetConsoleScreenBufferInfoEx等API函数。 |
|
[求助]错误提示跟成功提示调用同一个CALL的该怎么下手?
原来如此。。。 |
|
[求助]请教关于对象的封装问题
PE文件与C++类的信息之间没有关系。 所谓对象的创建,或构造,在代码中,无非就是对构造器函数的调用而已。 而且,我们在构造器中是可以引用this指针的,说明对象的构造过程,实际上是先分配内存,再用这个指针作this指针来调用构造函数。这里,构造函数和一般成员函数的地位实际上是相同的(当然在语义上不同,但在生成的代码一级来看是相同的) C++是静态类型语言(新标准加入了运行时类型信息),所谓类型安全,主要是指通过C++的合法手段无法访问“不可见”的成员,但是使用一些不合法的手段,仍然可以绕过这些限制,比如嵌入汇编,比如reinterpret_cast,前提是你知道对象的内存布局、虚表结构等相关的信息。 而在逆向工程面前,public或pirvate是没有一丁点意义的。只要知道一个对象的内存布局,知道了虚表的顺序,那么就可以对这个对象做任何想做的事。 |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值