首页
社区
课程
招聘
0816-kuangtudazuo-任务完成,待整理
发表于: 2004-8-16 09:01 4874

0816-kuangtudazuo-任务完成,待整理

2004-8-16 09:01
4874
Object扫描器[Object scanner]
Object scanner takes specified object files or libraries (both in OMF and COFF formats), extracts code segments and then tries to locate these segments in the code section of the current module. If segment is located, Scanner adds names from the object file to debugging information (the so-called library labels). This greatly improves the understandability of both code and data.

Scanner doesn't try to match labels from the object file with recognized names, so it can't recognize very small or similar procedures (i.e. procedures that differ only in relocations). Always check the list of warnings that scanner writes to log window!

See also: Analysis, Implib scanner

执行到返回[Execute till return]
You may want to skip some routine and return to caller. OllyDbg can trace program execution over all encountered calls and stop on the first encountered return (RET, RETF or IRET). From the main menu, select 'Debug|Execute till return' or press Ctrl+F9. Step-by step execution is relatively slow, only up to 5000 commands per second on Pentium/500 under Windows NT. If tracing takes too much time, press Esc or F12 to stop execution till return.

If you want to execute return command and pause program on the next command after corresponding call, activate option "After execution till RET, step over RET" in Trace options.

See also: Execute till user code, Execute till condition

$#K执行到用户代码[Execute till user code]
Sometimes your application stops somewhere deep in the system code. To return back to the program you are debugging, you can press Ctrl+F9 (Execute till return) several times, each time checking where you are. There is, however, another, faster way of doing this. If you press Alt+F9 or select "Debug|Execute till user code" from the main menu, OllyDbg will step over the code as long as it reaches the first command that is not in system DLL. (From the OllyDbg's point of view, any DLL that resides in system or Windows directory is system). Step-by step execution is relatively slow, only up to 5000 commands per second on Pentium/500 under Windows NT. If tracing takes too much time, press Esc or F12 to stop execution till user code.

Caveat: if system DLL calls user callback function, it will be stepped over. To avoid this, you can set single-shot break on access on the user code (available only for Windows NT 4.0, 2000 and XP).

See also: Execute till condition

自解压文件[Self-extracting (SFX) files]
自解压文件由提取程序和压缩的原程序两部分组成。当遇到自解压文件(SFX)文件时,我们通常希望跳过解压部分,而直接跳到原始程序的入口(真正的入口)。OllyDbg提供了一些便于完成这一目的的一些函数。情况事的Self-extracting file consists of extracting routine and packed original program. When troubleshooting SFX, you usually want to skip extractor and stop on the entry point of original program ("real entry"). OllyDbg contains several functions that facilitate this task.

通常提取器的加载地址都在执行代码Usually extractor loads to address that is outside the executable section of the original program. In this case OllyDbg recognizes file as SFX.

When SFX options request tracing of real entry, OllyDbg sets memory breakpoint on the whole code section. Initialy this is empty or contains compressed data. When program attempts to execute some command within protected area which is neither RET nor JMP, OllyDbg reports real entry. This is how bytewise extraction works.

This method is very slow. There is another, much faster method. Each time exception on data read occurs, OllyDbg enables reading from this 4-K memory block and disables previous read window. On each data write exception it enables writing to this block and disables previous write window. When program executes command within remaining protected area, OllyDbg reports real entry. However, when real entry is inside read or write window, its location will be reported incorrectly.

You can correct entry position. Select new entry and from Disassembler popup menu choose 'Breakpoint|Set real SFX entry here'. If corresponding SFX option is enabled, next time OllyDbg skips extractor quickly and reliably.

Notice that OllyDbg usually fails to trace extracting routine that implements protection or anti-debugging techniques.

寄存器窗口[Registers window]
Registers window displays and interpretes the contents of CPU registers for currently selected thread. It also allows to modify registers and follow addresses in other CPU panes. Pop-up menus associated with each register are self-explanatory, and I will not describe them here.

Following EFL are the suffixes of conditional commands that satisfy current flags. If, for example, you see:

EFL 00000A86 (O,NB,NE,A,S,PE,GE,G),

this means that JO and JNE will be taken whereas JB and JPO not.

In the same manner, following FST is the decoding of FPU flags C0, C2 and C3 as if the last FPU operation were a comparison.

When debugged program pauses execution, OllyDbg highlights all differences since previous pause. If you modify any item, OllyDbg highlights all modified items.

To toggle value of some flag, doubleclick it, or select and press return. Doubleclicking on register invokes dialog where you can modify its contents. To change integer or FPU registers, start typing new contents. Keys Plus (+) and Minus (-) increment and decrement selected integer registers.

You can choose either floating-point, MMX or 3DNow! decoding of FPU registers. If window contains bar, pressing the bar will loop through these three formats. You can also let OllyDbg change this presentation automatically, based on the type of the command where last break occured. Alternatively, register window can display debug registers DR0..DR3, DR6 and DR7. However, you can't modify debug registers.

If you are debugging SSE code, activate option "Decode SSE registers" to view 128-bit SSE registers. Notice that this option is slow and sometimes dangerous (especially when application is multithread), don't use it unless absolutely necessary.

If you backtrace the run trace log, Registers window gets grayed to emphasize that displayed registers are not actual but taken from the trace data. Run trace does not save contents of memory, SSE and debug registers and reads actual memory of debugged process to decode memory pointers.

You can display last error detected by a thread (as returned by call to API function GetLastError). This feature is controlled by option "Show last error". If activated, last error is saved to run race log, but may significantly (up to 20%) slow down the tracing speed.

You can scroll regiser pane by pressing left mouse button somewhere in the window and moving mouse.

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费 1
支持
分享
最新回复 (1)
雪    币: 241
活跃值: (145)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
2
译文:
          注:【 】是有问题或者译者加的说明

Object扫描器[Object scanner]
扫描器将特定的目标文件或者库(OMF和COFF格式),提取出代码段,然后将这些段定位在当前模块的代码快中.如果段定位好了,扫描器从目标文件中给调试信息增加名字(也就是所谓的库标识).这极大的增加了代码与数据的可理解性.

扫描器并不按照表示符在目标文件中进行匹配,所以它不能识别非常小的,相似的过程(procedure)(比如:过程只是在重定位有区别)。经常检查扫描器发送到登陆窗口的警告列表。

参照:分析器,implib扫描器

执行到返回[Execute till return]
你可以跳过一些过程而返回到调用者,OllyDbg可以跟踪程序执行过程中遇到的所有调用(call)并且终止在遇到的第一个(RET,RETF或者IRET).从主菜单选择"调试|执行直到返回"(debug|Ececute till return)或者按 Ctrl+F9.单步调试相对较慢,在Windows NT,奔腾/500下,最高为每秒5000条指令。如果追踪用了很多时间,按Esc或者F12停止执行,直接返回。

如果你想执行返回指令并且停止在相应调用的下一条指令,点击"After execution till RET,step over RET"在trace选项中。

参见:execute till uers code(执行到用户代码),Execute till condition(执行到条件设置)

$#K执行到用户代码[Execute till user code
有时你的应用程序终止在系统代码很深的地方,为了返回到你所调试的应用程序中,你可以按Ctrl+F9(执行直到返回)若干次,并每次检查所处的位置.但是,有更快的一种方法.如果你按Alt+F9或者从主菜单中选择"调试|执行到用户代码"("Debug|execute till user code"),OD将会单步执行直到到达第一个不在系统DLL中的指令为止.(从DO的角度来看,任何在驻留在系统或windows目录下的DLL都属于系统).单步的调试相对较慢,在Windows NT,奔腾/500下,最高为每秒5000条指令。如果追踪用了很多时间,按Esc或者F12停止执行,直接返回。

警告:如果系统DLL调用了用户的回调函数,它会直接结束.为了避免这样的情况,你可以在访问用户代码时设置单一断点【原文single-shot】(仅适用与window NT4.0 ,2000和XP).

参见:执行到条件设置

自解压文件[Self-extracting (SFX) files]
自解压文件由提取程序和压缩的原程序两部分组成。当遇到自解压文件(SFX)文件时,我们通常希望跳过解压部分,而直接跳到原始程序的入口(真正的入口)。OllyDbg提供了一些便于完成这一目的的一些函数。
通常提取器的加载地址都在原程序的执行代码之外.在这种情况下,OD将文件作为自解压文件(SFX).

当自解压文件(SFX)选项要求跟踪真正入口时,OD在整个代码块设置内存断点,最初这是空的或者包含压缩数据。当程序试图执行一些在保护区域的命令,而这些命令不是RET和JMP时,OD会报告真正的入口.这就是提取工作的过程.

这种方法非常慢.有另外一种比较快的方法。每次读取数据发生异常时,OD使这个4K内存区域变得可读,而使原先的读窗口变得无效.而每次发生写数据异常时,OD让这块变得可写,而使原先的写窗口变得无效.当程序执行在保留的保护区域中的指令时,OD报告真正的入口。但是,当真正的入口点在读或写窗口内部时,报告的地址可能有误.

你可以纠正入口位置,选择新的入口,从反汇编弹出菜单中选择"断点|设置真正的自解压文件入口".如果相应的SFX选项是可用的,OD下次可以迅速而可靠的跳过
提取器.

注意:OD经常在跟踪采取了保护或者反调试技术的解压程序时失败.

寄存器窗口[Registers window]

寄存器窗口为目前选择的线程显示和翻译CPU寄存器中的内容.它也允许在其它CPU面板修改寄存器和后面的地址。与每个寄存器相关的弹出菜单不加以说明,我不在这里描述它.

接下来的EFL是满足当前标志的条件指令的后缀。比如:
EFL 00000A86(O,NB,NE,A,S,PE,GE,G),

这意味着在非JB和JPO的地方用JO和JNE代替.

同样的方式,接下来的FST是对FPU标志 C0,C1,C2,C3的解码,只要上一次FPU操作是一个比较.

当被调试程序停止执行时,OD将对所有上次停止以来不同的地方进行加亮.如果你修改了某一项,OD则会高亮所修改的项目.

为了切换一些标志的值,双击它,或者选择并且按返回.双击寄存器将会弹出窗口,你可以修改它的内容.输入新内容可以改变寄存器或者FPU寄存器。
+号和-号可以增加和减少寄存器中的整数.【译者加:试了一下,好像不行???,我用1.09版,版主看一下.】

你现在可以选择floating-point,MMX或者3DNow!解码FPU寄存器.如果window包含工具条,你可以点击工具条在这三种格式之间进行转换. 【译者加:就是在寄存器窗口里面,显示有Registers(FPU)的工具条】你也可以让OD自动改变这些表示,只要在上次中断发生的地方输入命令.寄存器窗口也可以显示调试寄存器DR0,...DR7.但是你不能修改这些寄存器.

如果你要调试SSE(Streaming SIMD Extentions)代码,选中"Decode SSE registers"查看128位SSE寄存器.【译者加:在主菜单上option->debugging options,在registers选项卡中选中"Decode SSE registers",OD1.09版】要注意的是这个功能有点慢并且有时很危险.(尤其当应用程序是多线程的时候),所以万不得已不要用它.

如果你查看"run trace"记录,寄存器窗口变灰,来说明显示的寄存器不是当前的,而是来自追踪的数据."run trace"不保存内存中的内容,SSE和调试寄存器读取被调试的进程的内存区域来解码内存指针.

你可以显示被一个线程所检测到的最后一个错误(也就是API 函数GetLastError返回的值).这一功能是有"Show last error"控制的.【译者加:在主菜单上option->debugging options,在registers选项卡中选中"Show last error",OD1.09版】最后一个错误保存在"run trace"记录中. 但是会很大程度上降低追踪速度(最高可降低20%).

你可以按下鼠标左键,移动鼠标来滚动寄存器窗口.
2004-8-17 10:47
0
游客
登录 | 注册 方可回帖
返回