|
[原创]算法分析实战篇和应用篇之提高(二)动态调试和静态汇编(IDA ABC)
其实我说的都是常识性的东西。 结合具体的例子对需要掌握的知识点进行简要的介绍。类似于现场解说。 你有这种感觉,说明你的基础不扎实,要补课的太多。 |
|
[原创]算法分析实战篇和应用篇之提高(二)动态调试和静态汇编(IDA ABC)
其实很简单: 破解的基础知识也掌握得八九 不离十了。但拿到了具体的软件,为什么还是不知如何下手呢?最根本的原因是:初学 者的脑中没有系统的破解思路。我们要对软件进行算法分析,就必须解答算法分析的三个 基本问题: 1.注册判断的关键位置在哪?具体又分为两部分: A.注册成功与失败的关键位置。 B.注册判断的关键CALL。 判断方法:确定关键变量,按照就近原则顺藤摸瓜。 2.注册判断的关键变量是谁? 3.注册判断的程序流程。具体又分为两部分: A.注册正确的程序流程。 B.注册正确的程序流程所要求的一些条件。 我说过:程序流程的把握能力是算法分析的核心。怎样培养 程序流程的把握能力?个人的经验认为有三种方法可行: one: 阅读程序段,手工画出流程图。初学者推荐此法。 two: 学会编程。 老手建议用此法。 three:使用IDA。 逆向大工程和密码学推荐。 平时练习时,建议前两种方法。IDA可以做为答案帮助自己理解 程序流程。从上可以看出,科班生学破解在此处很轻松。 破解到一定的水平和层次,要求多看多想少调试。即要求提高自己的 静态汇编破解能力。IDA的流程图功能在程序流程的把握上具有巨大的优势。 提高静态汇编理解能力有助于提高IDA的使用效率。 这里详细说明的原因,是因为对程序功能段的功能理解是破解 水平和效率的表现,是初学算法分析的难点,也是众多破文根本 不重视的地方。对程序功能段的功能的研判能力如何进行提高? 我个人的建议: 1.初学者注意记忆和积累一些经典的功能段。如上述的判断是否为 数字和写入注册信息的功能段,都是最常用和最基本的。在高手的 破文中,有许多这方面的精彩,可以借鉴记忆。《加密和解密II》 中有较全面而系统的基本和常用的汇编功能段的阐述,熟读并理解 记忆后,你再多做练习和总结,相信士别三日当刮目相看。 小写转大写的程序段: 00401126 |. 0FBE8C05 44FF>movsx ecx, byte ptr [ebp+eax-BC] ; 用户名 0040112E |. 83F9 61 cmp ecx, 61 00401131 |. 7C 07 jl short 0040113A ; 不是大写就转换成大写 00401133 |. 90 nop 00401134 |. 90 nop 00401135 |. 90 nop 00401136 |. 90 nop 00401137 |. 83E9 20 sub ecx, 20 0040113A |> 8BF1 mov esi, ecx 2.人门者最好学一门编程语言。自己编程一段单一的功能,自己反汇编研究, 不断的总结、记忆和积累。 推荐一位破解模范的痴情之作: { 【原创】菜鸟看懂算法以后之一:头痛的64次左移 -------------------------------------------------------------------------------- 标 题: 【原创】菜鸟看懂算法以后之一:头痛的64次左移 作 者: jney2 时 间: 2005-04-22,13:07 链 接: http://bbs.pediy.com/showthread.php?t=13072 菜鸟看懂算法以后之一:头痛的64次左移 } 以上是核心。 下面三条辅线交替: 1.破解的一些实用小技巧汇总,穿插于破解过程中。 2.IDA的常用基本功能介绍。运用和OD的对比法进行介绍。 3.介绍相关知识点更高要求的好文章和OD的更高要求(快捷键和插件编写)。 A.脱壳。 B.IDA的使用 ...... 强调: 本文不是破文,只是对破解的算法分析进行系统的理论阐述。 文中的例子是说明、理解这个系统的理论的。 为了说明问题,而不想麻烦读者用OD,引用的代码多了。 扣除引用的代码,没多少内容。 接受你的建议,将“3.介绍相关知识点更高要求的好文章和OD的更高要求(快捷键和插件编写)。”的内容单列如下: 我也是只知道点常识性的IDA知识。满瓶的不说,我这半调子就献丑了。希望仙剑奇侠们 对IDA的插件编写等关键功能多多指教,增加我的感性认识。 { 【翻译】编写IDA插件 -------------------------------------------------------------------------------- 标 题: 【翻译】编写IDA插件 作 者: 月中人 时 间: 2006-08-29,08:48 链 接: http://bbs.pediy.com/showthread.php?t=31185 } { 两篇已翻译好的有关IDA插件开发的文章 -------------------------------------------------------------------------------- 标 题: 两篇已翻译好的有关IDA插件开发的文章 作 者: jhlqb 时 间: 2006-09-02,12:00 链 接: http://bbs.pediy.com/showthread.php?t=31384 } 有关IDA的手工脱壳,推荐一篇: { 【翻译】用IDA的调试器来手工脱壳(PE格式文件) -------------------------------------------------------------------------------- 标 题: 【翻译】用IDA的调试器来手工脱壳(PE格式文件) 作 者: 4nil 时 间: 2005-01-14,09:35 链 接: http://bbs.pediy.com/showthread.php?t=9811 【转帖】[翻译]IDA Plugin 编写基础 http://bbs.pediy.com/showthread.php?t=42209 } 介绍一篇IDA的ABC文章: { IDA简易教程: http://www.pediy.com/practise/IDA.htm } OD的脚本编写: { 标 题: 调试好帮手ODbgScript 入门系列(一)-认识ODbgScript【原创】 作 者: hnhuqiong 时 间: 2006-05-21,21:16 链 接: http://bbs.pediy.com/showthread.php?t=26029 } 附Ollydbg常用快捷键: Alt+E → Modules窗口,查找输入函数 Ctrl+N → 查找名称标志,选择你要下断的内容 Shift+F9 → 强制继续执行跟踪或称拦截信息步进跟踪 F12 → 暂时停止 F10 → 打开反汇编选项菜单 F9 → 运行键 F8 → 单步跟踪结束 F7 → 单步跟踪 F3 → 打开快捷键 F2 → 下断点快捷键 Ctrl+F9 → 返回到跟踪 Ctrl+F8 → 自动步进扫描,按F12可停止 Ctrl+F7 → 同上,功能略有不同 Ctrl+F6 → 回到OL主窗口 Ctrl+F2 → 重新开始 Art+F2 → 结束跟踪 Enter → 进制转换计算 Art+L → 打开日志窗口 Art+C → 快速回到程序入口 Ctrl+S → 打开查找命令次序窗口 Shift+F2 → 打开附加选项窗口 Shift+F4 → 打开条件对话窗 Ctrl+E → 编辑机器码 Ctrl+G → 输入跟随地址 Space → 填充或修改汇编内容(NOP修改) ----------------------------------------------------------------------------------- OD的支持的命令 表达式 CALC 表达式 -------------计算表达式的值 ? 表达式 --------------同上 表达式 ---------------(第一个字符不能是字母) 同上 WATCH表达式------------- 添加监视 W 表达式 ---------------同上 反汇编器 AT 表达式------------- 在反汇编中跟随 FOLLOW--------------- 表达式 同上 ORIG ----------------前往实际的 EIP * ------------------同上 转存和堆栈 D 表达式----------- ---在转存中跟随 DUMP 表达式 -------------同上 DA [表达式]------- ------转存为汇编格式 DB [表达式] -------------转存为十六进制(hex)字节格式 DC [表达式] -------------作为ASCII 文本转存 DD [表达式] -------------作为地址(堆栈格式)转存 DU [表达式] -------------作为 UNICODE 文本转存 DW [表达式]------------- 转存为十六进制(hex)字格式 STK 表达式-------------- 在堆栈中跟随 汇编 A 表达式 [,命令]----------- 在地址处汇编 标号和注释 L 表达式, 标号 ------------为地址指派符号标号 C 表达式, 注释 ------------在地址处作注释 断点命令 BP 表达式 [,条件] -----------在地址处设置 INT3 断点 BPX 标号 ----------------在当前模块内部的每个调用外部'标号'处设置断点 BC 表达式 ---------------删除地址处的断点 MR 表达式1 [,表达式2] ---------设置访问范围的内存断点 MW 表达式1 [,表达式2] ---------设置写入范围的内存断点 MD -------------------移除内存断点 HR 表达式 ---------------在访问地址处设置一个字节的硬件断点 HW 表达式 ---------------在写入地址处设置一个字节的的硬件断点 HE 表达式 ---------------在执行地址处设置硬件断点 HD [表达式] --------------移除地址处的硬件断点 跟踪命令 STOP -----------------暂停执行 PAUSE -----------------同上 RUN ------------------运行程序 G [表达式] ---------------运行到地址处 GE [表达式] --------------跳过意外的句柄并运行到地址处 S -------------------单步进入 SI------------------- 同上 SO -------------------单步跳过 T [表达式] ---------------跟踪进入到地址处 TI [表达式] ---------------同上 TO [表达式] ---------------跟踪跳过到地址处 TC 条件 -----------------跟踪进入到条件处 TOC 条件 -----------------跟踪跳过到条件处 TR --------------------执行到返回 TU --------------------执行到用户代码 OllyDbg 窗口 LOG -------------------查看日志窗口 MOD -------------------查看可执行模块 MEM -------------------查看内存窗口 CPU -------------------查看 CPU 窗口 CS --------------------查看调用堆栈 BRK --------------------查看断点窗口 OPT --------------------编辑选项 杂项命令 EXIT -------------------关闭 OllyDbg QUIT -------------------同上 OPEN [文件名] --------------打开待调试的可执行文件 CLOSE ------------------关闭调试的程序 RST -------------------重新载入当前程序 HELP -------------------显示本帮助 HELP OllyDbg ---------------显示 OllyDbg 帮助 HELP API函数帮助完整文件名 --------显示 API WinDbg ABC知识 引用如下(以前的破解笔记上的,和现在网址可能有出入): { WinDbg配置和使用基础 WinDbg是微软发布的一款相当优秀的源码级(source-level)调试工具,可以用于Kernel模式调试和用户模式调试,还可以调试Dump文件。 1. WinDbg介绍: Debugging Tools and Symbols: Getting Started http://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx A word for WinDbg http://mtaulty.com/communityserver/blogs/mike_taultys_blog/archive/2004/08/03/4656.aspx 2. WinDbg下载: Install Debugging Tools for Windows 32-bit Version http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx Install Debugging Tools for Windows 64-bit Versions http://www.microsoft.com/whdc/devtools/debugging/install64bit.mspx 3. 配置WinDbg: 运行WinDbg->菜单->File->Symbol File Path->按照下面的方法设置_NT_SYMBOL_PATH变量: 在弹出的框中输入“C:\MyCodesSymbols; SRV*C:\MyLocalSymbols*http://msdl.microsoft.com/download/symbols”(按照这样设置,WinDbg将先从本地文件夹C:\MyCodesSymbols中查找Symbol,如果找不到,则自动从MS的Symbol Server上下载Symbols)。另一种做法是从这个Symbol下载地址中http://www.microsoft.com/whdc/devtools/debugging/symbolpkg.mspx,下载相应操作系统所需要的完整的Symbol安装包,并进行安装,例如我将其安装在D:\WINDOWS\Symbols,在该框中输入“D:\WINDOWS\Symbols”。(这里要注意下载的Symbols的版本一定要正确,在我的Win2003+Sp1上,我曾经以为安装Win2003+Sp2的Symbols可能会牛×点,但结果证明我错了,用WinDbg打开可执行文件时,提示“PDB symbol for mscorwks.dll not loaded;Defaulted to export symbols for ntdll.dll”的错误,我有重新装上Win2003+Sp1的Symbols, 现在一切运行正常^_^) 4. 使用WinDbg: WinDbg提供了图形界面和命令行两种运行方式。这里介绍使用图形界面的WinDbg来调试应用程序: File->OpenExecutable->可以选择一个可执行文件进行调试; File->Attache to a Process->可以选择一个运行中的进程,并对其进行调试; { 【原创】从Ollydbg说起-----WinDbg用户态调试教程{看雪学院2006金秋读书季} -------------------------------------------------------------------------------- 标 题: 【原创】从Ollydbg说起-----WinDbg用户态调试教程{看雪学院2006金秋读书季} 作 者: 笨笨雄 时 间: 2006-11-05,11:23 链 接: http://bbs.pediy.com/showthread.php?t=34379 } { 翻译:通往WinDbg的捷径(一) -------------------------------------------------------------------------------- 标 题: 翻译:通往WinDbg的捷径(一) 作 者: arhat 时 间: 2006-04-13,21:11 链 接: http://bbs.pediy.com/showthread.php?t=24077 翻译:通往WinDbg的捷径(二) -------------------------------------------------------------------------------- 标 题: 翻译:通往WinDbg的捷径(二) 作 者: arhat 时 间: 2006-04-14,22:54 链 接: http://bbs.pediy.com/showthread.php?t=24119 } { Windbg基本调试技术 -------------------------------------------------------------------------------- 标 题: Windbg基本调试技术 作 者: 月中人 时 间: 2006-11-15,17:07 链 接: http://bbs.pediy.com/showthread.php?t=34958 } 5.Windows应用程序调试必备的--符号文件(Symbols): http://www.oneedu.cn/xxyd/jzjs/aspnet/200703/15051.html 6.Windows调试器及不同平台符号包下载地址(收集) : http://www.cnblogs.com/flying_bat/archive/2006/10/27/541665.html 7.WinDbg学习资料整理下载 : http://www.cnblogs.com/end/archive/2007/04/12 /710951.html 8.WinDBG调试技巧: http://www.shamuma.net/attachment/WinDBG调试技巧.ppt 9.WinDBG调试实例: 标 题: 【原创】WINDBG+IDA对某木马手脱nSPACK+LOADER部分分析 作 者: 笨笨雄 时 间: 2006-10-20,14:17 链 接: http://bbs.pediy.com/showthread.php?t=33577 } { 【翻译】翻译的几篇IDA小教程 -------------------------------------------------------------------------------- 标 题: 【翻译】翻译的几篇IDA小教程 作 者: wangdell 时 间: 2007-09-28,00:11 链 接: http://bbs.pediy.com/showthread.php?t=52445 } |
|
[原创]算法分析实战篇和应用篇之提高(二)动态调试和静态汇编(IDA ABC)
没有你附件管理器上说的按钮确定键,也没看到左右选择键: { 将光标定位到文章中合适位置处,在编辑器中的单击按钮,选择刚上传的图片,如下图: } 是没有权限? |
|
|
|
[下载]驱动程序设计基础专题(chm版)
学习收藏,感谢万分 |
|
[原创] 算法分析入门教程实战篇及应用篇---NBA2005新春大奉送
感谢朋友的抬爱!! 说实话,提高篇不好写。最近挺忙的,资料正准备中。 总结了入门篇受欢迎的原因,应该是提供了一套较全面的方法和相关实战知识,用夹叙夹议的手法。断点篇有些不满意,可能许多内容不是自己写的。去年我参加了一个培训,领悟了一个管理者应该着眼于全篇的构思,不应该事必躬亲,而以达到目的为要求。那些引用的文章比我自己写肯定要好很多,只是全篇的呼应较差些。IDA的入门文章很少,所以自己肯定全面准备写了。 【原创】算法分析实战篇和应用篇之提高(一)我的常用断点系统 -------------------------------------------------------------------------------- 【文章标题】: 算法分析实战篇和应用篇之提高(一)我的常用断点系统 【文章作者】: NBA2005 http://bbs.pediy.com/showthread.php?t=62305 |
|
|
|
[求助]想从程序里扣出大量汇编代码如何操作?
标 题: 从IDA中提取代码做汇编注册机之C/C++篇 作 者: laomms 时 间: 2006-12-22 23:22 链 接: http://bbs.pediy.com/showthread.php?threadid=36799 详细信息: |
|
[翻译]WinXP 关于POINT-H万能断点 的教程
结合我最近详细看的几篇外文,试验总结了一套便捷的 神奇操作。相信会引发许多人对XP 万能断点的思考。 具体如下: 1。关闭XP系统所有的前台程序。 2。打开OD,注意看一下窗口选项的“总在最前选项”,一定要使它没有打勾。 3。载入小蜜蜂,运行。小蜜蜂浮在OD前,输入用户名和注册码(9A9B7C6D5E), 将9A9B7C6D5E复制后,点OD任意位置,回到OD界面。 4。右键查看-->选USER32模块-->再右键查找当前模块中的名称(标签)-->寻找Translatemessage。 5。右键Translatemessage-->选条件记录断点--> 6。在条件记录断点设置界面,填好下面的内容点确定: 条件项中填:MSG==201; 201这个值有时会失效,到不了XP万能断点。这时我就填入:MSG==202。 表达式填:MSG, 解码表达式的值为:通过表达式假定。 暂停程序选:按条件。 记录表达数值和记录函数参数:都选从不(NEVER)。条件满足次数没提,取默认值零。 7。ALT+TAB键切换到小蜜蜂注册界面,点注册。我的XP机器停在: 77D18BF6 > 8BFF mov edi, edi ; krnln.100EDB40 77D18BF8 55 push ebp 77D18BF9 8BEC mov ebp, esp 8。ALT+M,在出现的内存镜像中,CTAL+B,粘贴入注册码:9A9B7C6D5E,搜索: 0014C5B0 39 41 38 42 37 43 36 44 35 45 00 00 00 9A8B7C6D5E... 9。在上述内存中的注册码设内存访问断点。运行程序,断在: 77D3352D F3:A5 rep movs dword ptr es:[edi], dword p> 77D3352F 8BC8 mov ecx, eax 77D33531 83E1 03 and ecx, 3 77D33534 F3:A4 rep movs byte ptr es:[edi], byte ptr> 77D33536 E8 E3FBFFFF call 77D3311E 10。似真亦幻疑梦中,故国神游添情趣。真神奇啊!!! |
|
[翻译]WinXP 关于POINT-H万能断点 的教程
具体的例子看我的文章: 算法分析实战篇和应用篇之提高(一)我的常用断点系统: http://bbs.pediy.com/showthread.php?t=62305 |
|
[原创] 算法分析入门教程实战篇及应用篇---NBA2005新春大奉送
打算另列一篇,拟算法分析提高篇。下笔就感觉很吃力,能力有限啊。 入门篇的内容很简单,所以信手写来不觉得什么。这提高篇下笔就心虚啊,总觉得说不太明白,许多东西一知半解。知道和了解是一回事,完全说明白是另一回事。我现在暂抽不出时间,不过正在准备素材和相关内容。 初步构思是: 1.重点增加两种常用的断点法。对其中的细节印象不深了,原来的心得笔记被朋友弄丢了。 2.程序流程把握的三种常用方法。重点是IDA的某一方面应用,如何讲得通俗易懂我正在构思。 3.程序结构的解说。 4.寻找一个合适的例子,既能对入门篇的内容有所照应,又能对上述三点兼顾。暂时还没遇到。 5.看情况加一些内容。 上述每一点都让我感到力不从心。抱歉,让朋友久等了。 |
|
[原创] 算法分析入门教程实战篇及应用篇---NBA2005新春大奉送
我没有想到,自己的这篇长篇之作受到这么多朋友捧场,感动......!!! 是我以一个业余的角度写的缘故? 还是从实战的角度夹叙夹议的原因? 破解是我的爱好,而我的爱好很多:下棋,冰峰王座,溜冰,文学,跳舞,电脑,NBA系列游戏等,泡妞。样样半掉子。所以我始终能够抽出时间以一个陌生的角度面对破解。我是求变的人,不喜欢墨守成规。最近破解了一些实用软件,但都是国产的,所以也不好拿出手。而且最近工作上很忙,没有时间静下心来写作。许多人不愿写破文,因为写的时间远比破的时间长太多。四月初我争取连休,到时找个好的例子感谢大家的厚爱。 到时是另列题目还是接着这个系列呢? 希望欣赏我文章的朋友可以给我添加声望,也希望给你喜欢的破文作者添加声望。就是右上角的红五星。我百忙中写了这么多,只混了一个精,想想都冤。网上老是看到有人暗恋Petnt,就是没有人通过添加声望表白。 其实我很菜, 其实我很忙, 其实我很懒, 其实我业余。 |
|
|
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值