|
[求助]请教如何跟踪进入sysenter指令?
,,,,用SOFTICE吧,,,, |
|
[讨论]问个很傻的问题,WINDOWS还要用PE格式多少年?
PECOFF,,,,,,, |
|
[讨论]看《加密解密技术内幕》好累啊……
习惯了就好 |
|
|
|
[求助]使用ODscript如何读取一个文本文件
写插件吧,,,,要不找作者加功能或者直接要源代码自己改,,, 你真要ODSCRIPT实现这个功能,也可以,,,你可以申请分配内存,可以写入汇编代码,,,剩下的只是将相关内容放到内存,然后读取,,, |
|
|
|
[求助]请见多识广的大大赐教下
forgXt |
|
|
|
|
|
|
|
[原创] 如何模拟键盘之学习笔记一
讲讲USB端口协议吧~~~~ |
|
[求助]请见多识广的大大赐教下
大概是破了数据包吧 我还真见过大牛不在任何逆向分析的前提下把某杀毒软件的数据包格式破了 不过原理这东西,说出来大家都觉得没什么,既然没有任何人提过,那就是不能说,说不得 告诉你,别人还怎么混饭吃? |
|
[讨论]同样的二进制代码可能对应多条汇编指令吗?
位移操作,有几条是一样的 CPU的OPCODE是从小到多的,先有1字节,然后再有2字节、3字节的表,也就是说,有的指令的存在可能是为了向前兼容 另外由于EAX使用的频率很高,所以有的指令是针对EAX的使用作优化的 |
|
[求助]邪门儿了!在学习异常处理时的出现的问题
我一开始也遇到麻烦了,说说解决的过程,你以后自己尝试解决吧,否则你学逆向就跟没学一样~~ 在程序代码产生异常之后进入系统异常处理函数 7C92EAF0 8B1C24 mov ebx, dword ptr [esp] 7C92EAF3 51 push ecx 7C92EAF4 53 push ebx 7C92EAF5 E8 C78C0200 call 7C9577C1 7C92EAFA 0AC0 or al, al 7C92EAFC 74 0C je short 7C92EB0A 7C92EAFE 5B pop ebx 7C92EAFF 59 pop ecx 7C92EB00 6A 00 push 0 7C92EB02 51 push ecx 7C92EB03 E8 11EBFFFF call ZwContinue 7C92EB08 EB 0B jmp short 7C92EB15 7C92EB0A 5B pop ebx 7C92EB0B 59 pop ecx 7C92EB0C 6A 00 push 0 7C92EB0E 51 push ecx 7C92EB0F 53 push ebx 7C92EB10 E8 3DF7FFFF call ZwRaiseException 这段代码中ZwContinue是恢复环境,返回原来的程序执行流程的,即正常情况下,如果SEH可以顺利解决问题,这里便是系统异常处理的终点了 注意到在它前面的这两行指令 call 7C9577C1 or al, al je short 7C92EB0A 对于只简单返回成功或者失败的函数(即返回值类型为BOOL的),1为成功,而0为失败。先在这里下断点,可以看到它的返回失败。也就是说这个函数出错了。然后可以跟踪进里面看看了~~以同样的方法观察每一个CALL的返回值,哪个CALL失败了,在那个CALL下断点再来~~~直到最后看到下面代码引起我的注意 7C9579C8 8BFF mov edi, edi 7C9579CA 55 push ebp 7C9579CB 8BEC mov ebp, esp 7C9579CD 51 push ecx 7C9579CE FF75 08 push dword ptr [ebp+8] 7C9579D1 E8 738EFDFF call RtlImageNtHeader 7C9579D6 F640 5F 04 test byte ptr [eax+5F], 4 7C9579DA 0F85 CF7C0100 jnz 7C96F6AF 7C9579E0 8D45 FC lea eax, dword ptr [ebp-4] 7C9579E3 50 push eax 7C9579E4 6A 0A push 0A 7C9579E6 6A 01 push 1 7C9579E8 FF75 08 push dword ptr [ebp+8] 7C9579EB E8 668EFDFF call RtlImageDirectoryEntryToData 7C9579F0 85C0 test eax, eax 7C9579F2 0F84 D8010000 je 7C957BD0 7C9579F8 8B4D FC mov ecx, dword ptr [ebp-4] RtlImageNtHeader和RtlImageDirectoryEntryToData都是PE结构相关的函数。我对PE结构不太熟悉,所以觉得SEH跟PE有关联觉得有点奇怪,于是就打开baidu搜索“seh pe结构”。然后是我找到的相关解释: 关于DataDirectory[IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG]的一些介绍 关于LoadConfig的介绍较少,这里简单介绍一下 这个是在winnt.h中的定义 typedef struct { DWORD Size; DWORD TimeDateStamp; WORD MajorVersion; WORD MinorVersion; DWORD GlobalFlagsClear; DWORD GlobalFlagsSet; DWORD CriticalSectionDefaultTimeout; DWORD DeCommitFreeBlockThreshold; DWORD DeCommitTotalFreeThreshold; DWORD LockPrefixTable; // VA DWORD MaximumAllocationSize; DWORD VirtualMemoryThreshold; DWORD ProcessHeapFlags; DWORD ProcessAffinityMask; WORD CSDVersion; WORD Reserved1; DWORD EditList; // VA DWORD SecurityCookie; // VA DWORD SEHandlerTable; // VA DWORD SEHandlerCount; } IMAGE_LOAD_CONFIG_DIRECTORY32, *PIMAGE_LOAD_CONFIG_DIRECTORY32; SEHandlerTable 是指向一个Seh处理函数Rva的表格。SEHandlerCount是这个表格的长度。如果这个表格存在,那么只有该表格中的Seh处理函数才是合法的处理函数。如果异常发生时,顺序查找并执行Fs:[0]中的处理函数时,如果认为当前函数非法,则Seh无法继续执行,程序会中止。而且连UnhandledExceptionFilter都无法执行到。除非PE在被调试,依靠调试器来恢复。 每个PE有一个单独表格。如kernel32.dll和user32.dll有各自的表格。当PE被载入时,PE的基址,大小、SEHandlerTable(表格的地址)、SEHandlerCount(长度)会被存在一个表格中。当一个异常发生时,系统每个PE的基址和大小检查当前seh处理函数属于哪一个PE,然后取出相应的表格地址和长度。由于是载入时就已经取出,载入后SEHandlerTable和SEHandlerCount就没什么用处了,对它进行修改当然也没什么用了。但修改表格内容还是有效的。 如果seh处于动态申请的内存中,因为不处于任何一个PE Image内,所以seh是没有任何限制的,否则如果不在相应表格中,会导致PE中止。visual c++的try..catch等的seh处理函数会自动加入该表格。但如果使用inline asm对fs:[0]进行操作加seh是无效的,如果发生异常只会导致PE中止。 目前基本所有的壳软件都是将loadconfig删除,对该PE基本没什么影响。但如果要保留的话,则需要将Pe Image内的seh处理函数加入到该表格中。微软称这个表格中的处理函数为"safe handler", 关掉safe handler的开关在Liker|CommandLine 加入/SAFESEH:NO 摘自:http://www.crack520.cn/bencandy.php?fid-9-id-362-page-1.htm(鉴于挂马网站太多,我用百度快照看的,如果你直接点链接中毒了,后果自负) 我动态修改内存中的SEHandlerTable,except_handler顺利得到控制权。补充一句,这个东西LORDPE、PETOOL、PEID三个工具都没有标出相应的成员,很恶心 |
|
|
|
[讨论]同样的二进制代码可能对应多条汇编指令吗?
一条汇编码只对应一个二进制串 一个二进制串可以对应多个汇编代码,你从汇编代码的参考可以看到,有的代码是等效的,在编译成OPCODE时是一样的 不算PREFIXS,最多13个字节,算上PREFIXS貌似多长都可以,不过OD会将无效的PREFIX截断,单独显示 |
|
|
|
[原创]有关iat的问题
你看看PE结构里面关于输入表的介绍,然后自己动手调试一下就明白了 |
|
|
|
[原创]学习写的一个PE查看器(附源码)
鼓励一下,,,,,, |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值