|
[讨论]对虚拟地址空间和虚拟内存的理解
虚拟内存和缓存的机制还是分清楚为好。 从广义上,不同速度之间的硬件设备都有缓冲区。 -------------------引用 大家想想,我们的硬件系统中能作为存储器并且有很大空间的就只有硬盘,因此我们在硬盘上找到一个足够大的空间再加上我们的物理内存就构造出了这个大于1G的内存,那么我们就把这个内存叫做虚拟内存。 ------------------- 这个加法不对:硬盘上的缓存+物理内存 = 虚拟内存 硬盘上没有缓存文件,程序照样可以运行。 虚拟内存的引入并不是单纯的为了运行大程序,还有很多专家才解释地清楚的原因。 |
|
[求助]汇编bound指令的问题
第一次回答问题时有人如此感谢,特此留言,证明我的世事还经历的不够。 |
|
|
|
[求助]汇编bound指令的问题
cmp ebp, dword ptr [ecx+6Eh] jge GoodBoy cmp ebp, dword ptr [ecx+72h] jle GoodBoy int 05h GoodBoy: ... 对于应用程序:如果BOUND出错,调用SEH Handler;如果直接调用int 05h,也会调用SEH Handler |
|
关于动态获取kernel32.dll基地址的不解
这里有两处预备知识,你需要掌握: (1) 不同的内存模块,内存单元的粒度不一样,很容易搞混了。 对于节是SectionAlignment 对于文件是FileAlignment 对于windows虚拟内存管理器来说,物理内存分配的粒度是4KB或4MB;确实有4MB的内存策略。 对于windows loader来说,装载exe, dll等文件的粒度是64KB。 4KB - 0x00001000 4MB - 0x00400000 64KB - 0x00010000 这个64KB起源于早期的MS-DOS COM,EXE (2) 对于kernel32.dll和ntdll.dll等这些在windows loader眼中另眼相待的特殊的系统DLL:采用Copy-On-Write策略,相对固定的基址,这些基址值在各个不同系统中都满足的条件是>0x70000000。你提到的语句break .if edi < 070000000h,其实是一种停止死循环的条件。但我也见过一些找PE文件基址的代码段,没有这种停止死循环的条件,比如: 25 00 00 FF FF and eax, 0FFFF0000h 05 00 00 01 00 add eax, 000010000h 2D 00 00 01 00 sub eax, 000010000h 66 81 38 4D 5A cmp word ptr [eax], 5A4Dh 75 F4 jnz $-10 虽然有死循环到程序出错的机率,但从通用性方面考虑,还不如不要那个停止循环的条件。因为不可能所有的DLL、EXE都有这种特点,基址大于70000000h Enjoy it. |
|
|
|
|
|
[求助]一个汇编问题,请教[问题解决]
C++中的__declspec(naked)相当于MASM中的 OPTION PROLOGUE:NONE OPTION EPILOGUE:NONE 将其放在函数定义的前面 恢复默认PROLOGUE, EPILOGUE,用 OPTION PROLOGUE:PrologueDef OPTION EPILOGUE:EpilogueDef |
|
[求助]PE文件中最多可有多少个section
多谢demonking提供出处,待我去dig一下,有什么结果跟你汇报. |
|
[原创]自己动手,丰衣足食——做自己的Sig文件
搞不懂,有的人偷东西都偷的这么理直气壮? What the hell a world? 抄得时候别太慌,这个最好不要掉了。要做就要做一个最好的CPer for /F %%i in ('link -lib /list %1.lib') do link -lib /extract:%%i %1.lib\n -> for /F "skip=3" %%i in ('link -lib /list %1.lib') do link -lib /extract:%%i %1.lib\n 钱老师水平高,又热心快肠,应该抽点时间多到到这里,解答一下大家的疑惑呀。 |
|
[求助]非常奇怪的函数
这样,你满意了吧! 确实是如justlovemm所说,是最常见的库函数__alloc_probe(size) 楼主的猜想很正确,向楼主这种求知精神表示敬意。 其函数的作用是分配堆栈空间,对堆栈空间进行安全检查。 算法如下, 当要求分配的堆栈空间小于1000时, neg eax add eax, esp add eax, 4 ; 这三条指令作用是算出正确的堆栈指针,最后加4,是因为在调用此函数时本身往堆栈中压入了4字节的返回地址 test [eax], eax ; 对堆栈桢底部进行非破坏性的读测试,其实源操作数可以是任意寄存器,比如test [eax], ebx 使用eax是效率最高的 ; 读测试时,如果当前堆栈不可存取,便会出错。不用等到caller函数执行时出错。是程序可以采用的内存管理安全措施之一,其它还有Heap Cookie, ... xchg eax, esp ; esp被赋值,与原值的差值是caller函数需要的堆栈桢大小 ; eax被赋值,指向callee的返回地址 mov eax, [eax] push eax retn ; 只要知道eax最后等于返回地址,就不难理解这段代码了吗 当要求分配的堆栈空间大于1000时,以0x1000为分配单位,小心的分配,小心的测试 probepage: sub ecx, 1000h ; ecx是堆栈指针 sub eax, 1000h ; eax是尺寸 test [ecx], eax ; 非破坏性读测试 cmp eax, 1000h jnb short probepage ; 在理解的时候,注意堆栈上的返回地址,堆栈指针的传递,test指令的意图,... 剩下的代码再通过上面的代码举一反三,就知道意思了。 |
|
[求助]retn、retn 4和retn 0C有什么区别??
不考虑其它情况,仅考虑维持堆栈平衡时,不管是C型调用约定、还是stdcall、...,函数原代码是ret n,你就必须是ret n。 |
|
[求助]retn、retn 4和retn 0C有什么区别??
怎么可能不考虑其它。 调用约定为C型时,不用考虑,可以直接使用ret 调用约定为其它时,必须考虑ret n 没想到直接返回有什么用,爆破? 如果是面向对象的程序,这样修改类方法有可能死得很惨。 |
|
[讨论]上榜产品
Incompatible,LdrpCheckNxIncompatibleDllSection 没有函数名字那样危险吧 调用它的函数只是检查后设个信息域,不出错,不警告。 ntdll.dll:7C955D6D push 4 ntdll.dll:7C955D6F lea eax, [ebp+var_4] ntdll.dll:7C955D72 push eax ntdll.dll:7C955D73 push 22h ntdll.dll:7C955D75 push 0FFFFFFFFh ntdll.dll:7C955D77 call ntdll_NtSetInformatProcess |
|
[原创]如何制作vc静态链接库的IDA SIG文件?
[QUOTE=百家拳;442531]好,谢谢了 整理了一下,做了个bat文件,使用格式为 lib2sig.bat [your lib flie name] 但是还是一些人工干预,不知各位有何良策? 非常感谢楼主提供的/extract选项。[/QUOTE] 大家都是地球人,真的是想法一样。我原本也想写脚本,名字和你的一模一样,思路和你的基本一样。为什么没有写出来,因为for命令不支持%1的解析,下面这句解析有问题。 for /F "skip=3" %%i in ('link.exe -lib /list %1') do link.exe -lib /extract:%%i %1 暂时没有想到好办法,或许WSH、JS可能可以实现,不知谁有兴趣写出来。 |
|
[分享]反一段代码发现这段汇编,源代码有分支,而汇编看不到分支
总结: 条件判断语句if ( == )常用sub, neg, sbb的组合,后续指令视情况而定。 如果是if ( == ) { = 0; } else { = !0; },后续指令可以是and 感谢分享 |
|
[求助]Masm32 V9.0版是不是没有make.exe。
你说的是mingw中的make吧。当然可以。 masm32就是一大杂烩,只要你想用,那个程序可以用,你就可以把它复制到masm32\bin目录下随便用。 |
|
[求助]Masm32 V9.0版是不是没有make.exe。
可以直接把VC中的nmake.exe复制到masm\bin中使用。其实masm32v9就是这么东复制一个西复制一个组成的大杂烩。 里面的ml.exe也是比较久的版本了,也可以像前面一样替换掉。 |
|
[求助]如何删除上网取证系统中的上网痕迹
去年夏天你做了什么?? 我承认我的话很刻薄,很尖酸,有悖于pediy社区的精神。 但请把你所谓的上网取证系统软件来出来秀一下。 我只是奇怪:为什么不把使用工具的时间拿来分析一下工具的原理。 你说你格式化了8次,为什么不去弄明白Format到底对你的硬盘做了什么。 世之奇伟,常在于险远。 --王安石 为什么不从二进制的角度分析一下MBS, FAT16, FAT32, NTFS确切的意思,用用PC3000这些磁盘工具? 真正意义上的上网取证系统来自于电信设备、服务器各种软件、硬件的集合,如果严格执行纪律的话,记录保存至少要六个月以上。 关于客户端的上网取证系统: 如果你每次都用所谓的Ghost版装操作系统,如果制作者在封装前上过网,上网痕迹会保留,当然会被检测到。 -------------------- 如果有一部分上网信息存在的位置与分区表类似,那用什么工具或方法可以重写。 -------------------- 能不能告诉我这么古怪的程序叫什么名字:上网信息保存的位置这么怪异。 你很喜欢用病毒上网吗,真是个有性格的男人! 就我所知,有一些有性格的病毒大哥常会利用主分区表所在的扇区,和后面的62个扇区存储数据。 就算是嵌入式环境,把它使用的存储设备用编程器重新Flash或Zero Fill一遍,根本没有什么好担心的。 新的问题又来了——去年夏天你做了什么?值得这么兴师动众,大张旗鼓地要毁灭掉你的上网证据,要知道,只要你上了网,你不可以控制的“老大哥”已经把所有证据都保存下来了。 |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值