|
[已解决]保护模式与DS
关于保护模式的内存模型和寻址模式,对操作系统而言是必要的,对用户应用程序,操作系统都已经给设置好了,应用程序完全不用关心CS、DS等东西,只是在Windows下,FS有特殊作用,也仅仅是汇编程序员以及编译器和库例程开发人员才需要涉及,普通的高级语言开发的应用程序不用去顾及这些。 在Windows及其它大部分的现代操作系统中,是不使用Intel的“段”保护机制的,或仅使用极其有限的保护(比如特权级检查,而不是地址有效性检查),所使用的内存模型被称为flat模型(过去16位时代由于分段的使用,内存模型有TINY、SMALL、LARGE等多种模型)。现代的体系结构趋向于使用纯粹的“页”保护。 自从计算机进入32位时代,程序有了4G线性地址空间,分段内存这种体系就逐渐被淘汰,很少使用的。运行在intel平台上的各种操作系统,几乎全部选择“绕过”段保护这个机制,使用flat内存模型。 在flat模式,CS、DS、ES、SS的基都为0,限都是FFFFFFFF,互相之间完全重叠。所以程序中,mov eax, ds:[0x12345678]和mov eax,cs:[0x12345678]所访问到的是同一个内存单元。 至于PE文件的section、BaseOfCode等,完全是在线性地址(或虚拟地址)空间里进行描述的,是逻辑上的概念,与intel的段基址没有关系。 |
|
[求助]对GetWindowTextA设断,还没按“注册”就被断下怎么办?
试一试: 方法1.在GetWindowTextA下条件断点,对hWnd参数设置条件,使其仅在获取指令窗口的文字时才中断。 方法2.消息断点要在按钮的你窗口(通常就是程序的界面窗口)下WM_COMMAND消息,而不是按钮的WM_LBUTTONUP消息。 |
|
[求助]exe如何做到右键菜单?
你的程序需要对命令行参数做出解析。 |
|
[求助].text段映射到内存中的起始地址计算,请各位指点下
从你的描述还是不知道你的问题出在哪了。你最好把你所说的资料上的例子全部拿出来,好看清楚。 内存对齐粒度是对连接器的硬性指标,模块的基址必须以64K边界对齐,section的基址必须以页面的边界对齐,加载器只是检测其是否满足,如不满足刚直接报告非法PE文件,而不需要进行处理。 按你的描述,猜测最后的0x00100000应该指的是section的加载虚拟地址VA,但你没有给出相应的RAV值和ImageBase值,所以无法说明。 IMAGE_SECTION_HEADER中的VirtualAddress的值表示相应的section起始地址的RVA。 要得到它的加载后的虚拟地址VA,只需要再加上IMAGE_OPTIONAL_HEADER中的ImageBase值就是了。这个ImageBase,通常叫做默认加载基址或优先加载基址,可以通过链接器参数来改变其默认值。 ImageBase的默认值在NT内核的平台上,对exe文件是0x00400000,对dll文件是0x10000000。其它平台可能会有其它规定。 还有,同一个问题还是不要另开新贴地好。我给合并了。 |
|
[求助].text段映射到内存中的起始地址计算,请各位指点下
我也看不懂的说 |
|
|
|
|
|
[求助]Ring3 下关于Hook非消息机制的程序
HOOK不只是对消息机制的。比如还有API的HOOK,还有页面文件HOOK等。 关于控制台键盘输入,还真没搞过这方面的东西,不知道WH_KEYBOARD_LL类型的钩子有没有效果。(仅是猜测,一会测试一下再做结论)。 |
|
[求助]VC的启动文件按 Crt0.c之类的在什么地方呀
你在安装时需要指定详细地安装选项,将CRT sourced一项钩上,才会安装。默认选项里是不安装的。 |
|
[感谢]感谢书呆彭版主的热心帮助[其他大大们来看看新的问题]
我想说几句不中听的,不过完全是好意,看了莫生气:修改个标题,显示个自己的名字,这是很没意义的工作,甚至有点“小儿科”。 我不是打击你的积极性,只是觉得你的学习方向有点偏了,没有明白逆向应该是干什么。 你做这种工作,完全是出力不讨好。大家都在使用中文的版本了,而且你做的也不是开创性地把英文版本翻译成中文,只是重复别人做过的。 你发布这种东西,未必有几个人会对你的东西感兴趣,觉得你干的活没什么技术含量(虽然不好听,但事实上就是)。 真正对大家有用的,不是修改标题的“美化”版,是修复BUG的(如OutputDebugString)、增加anti-anti能力的(如畸形导入表)、增强稳定性的(如修正CPU占用100%)“增强”版,以及以“插件”形式发布的增强功能(如Advanced,以及强大的StrongOD等)。 你所说的,有几十个版本,确实不假,实际上远比这多得多。但这些修改版,都是修改者自己用的。因为他们都知道,发布出去也没有价值。而真正发布的、广泛使用的版本,无非就那么几个,国内的主要是基于ICE的修改版本,我在国外看到很多人用dark的修改版本。 从你提的问题,可以看出你的基础还是不足,所以,有时间多提高一下基础知识,没必要做这些“华而不实”的事情,没意思,很没意思。 你这种“敢于着手去做”的精神很好,那为什么为把这种精神用在更意义地事情上呢? 如果你只是对“汉化”、“美化”感兴趣,不对软件调试技术感兴趣,但“汉化”、“美化”也是需要足够的软件设计和软件逆向的基本能力的。 如果你觉得做现在这个工作就很困难了,那么我要告诉你,那是因为你逆向的基础不够好,否则,这些都是非常简单的工作。想想,你提问题,有人回答,你为什么看不懂? 希望对你有些帮助。 |
|
[求助]OllyDBG的标题汉化问题[附带目前网上很少的非标汉化工具破解版]
你这只小木鱼是真的不懂编程还是怎么的,不知道灵活应用吗? 既然这样 00475BA5 |. 890D 785A4D00 mov dword ptr ds:[4D5A78],ecx 00475BAB |. E8 687AFBFF call OD加强版._Setcpu 00475BB0 |. 83C4 14 add esp,14 00475BB3 |. E8 54830100 call OD加强版.0048DF0C 00475BB8 |. A1 7C3B4D00 mov eax,dword ptr ds:[4D3B7C] 00475BBD |. 85C0 test eax,eax 00475BBF |. 74 0B je short OD加强版.00475BCC 00475BC1 |. 68 911A4C00 push OD加强版.[COLOR="Red"]004C1A91 [/COLOR] ; /[COLOR="Red"]Text = "终结Θ者"[/COLOR] 00475BC6 |. 50 push eax ; |hWnd => 006E03D2 ('☆终结者☆ - [PYG]',class='1212121') 00475BC7 E8 F2990300 call <jmp.&USER32.SetWindowTextA> 00475BCC |> 6A 00 push 0 很明显这个修改者也是patch过代码的,你就利用它的代码,把4c1a91这个值给它替换成自己的标题的地址不就行了? 还有这个: 004AF5BE $- FF25 6CD95000 jmp dword ptr ds:[<&USER32.SetWindowText>; USER32.SetWindowTextA 这是jmp到API入口,不是真正的API函数代码,你要找堆栈平衡,得看真正的函数的返回指令! |
|
[求助]masm32的一个小exe,使用OD打开看到的汇编代码,有些地方不明白,请教请教:
遇到没见过的指令查指令手册,既权威又省事,发到论坛上,还不如自己去查来得快来得准确。 这里有手册的下载:http://www.intel.com/products/processor/manuals/ 上面贴出来的部分,前半部分 00401050 D4 03 AAM 3 ;AAM 3啥意思? 00401057 D87B 11 FDIVR DWORD PTR DS:[EBX+11] ;FDIVR啥意思? 0040105E DC00 FADD QWORD PTR DS:[EAX] ;FADD啥意思? 00401065 E0 00 LOOPDNE SHORT generic.00401067 ;LOOPDNE啥意思? 00401177 C9 LEAVE ;LEAVE啥意思? 00401178 C2 1000 RETN 10 ;10啥意思,为什么要加一个10? 有可能是一个函数的一部分代码,不过看起来怪怪的。 而后面的部分 004011BB 65:6D INS DWORD PTR ES:[EDI],DX ;INS啥意思? 004011BD 626C65 72 BOUND EBP,QWORD PTR SS:[EBP+72] ;BOUND啥意思? 004011CD 70 6C JO SHORT generic.0040123B ;JO啥意思? 004011F9 65:61 POPAD ;POPAD啥意思? 00401200 6E OUTS DX,BYTE PTR ES:[EDI] ;OUTS啥意思? 00401201 66:6972 6D 2045 IMUL SI,WORD PTR DS:[EDX+6D],4520 ;IMUL啥意思? 00401207 78 69 JS SHORT generic.00401272 ;JS啥意思? 根本不是代码,或者是加了密的代码。 后面的00401270 - FF25 48204000 JMP DWORD PTR DS:[<&user32.CreateWindowE>; jmp到一个函数入口,没有什么特殊的意义,作用是可以把这个401270当作CreateWindowExA函数的入口来call。至于编译器为什么生成这样的代码,对不起,我也不清楚。我只知道有些情况编译器是直接call到IAT中的指针的,有些时候会call到这样一个jmp指令。 |
|
[原创]一个小软件的详细分析
好深的潜水功力。。。 |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值