首页
社区
课程
招聘
[下载]Hit Tracing in OllyDbg ( 07.30.2008 )
2008-8-2 09:14 7171

[下载]Hit Tracing in OllyDbg ( 07.30.2008 )

2008-8-2 09:14
7171
Hit Tracing in OllyDbg ( 07.30.2008 )

Today's blog entry is based on the recent Tipping Point DVLabs blog entry "Hit Tracing in WinDbg" by Cody Pierce.
The DvLabs posting demonstrates how to dynamically analyze a 32-bit Windows binary file in WinDbg using hit tracing. Hit tracing is the process of dynamically tracking execution flow in order to narrow your field of focus when reverse engineering a binary file. This saves you from wasting time looking at uninteresting parts of the code.

While Cody Pierce focused on using WinDbg for hit tracing, we're going to show you how to use OllyDbg.

Implementing hit tracing in OllyDbg is rather straightforward.

Set an INT3 breakpoint on every command within the region of interest.
When a command with a breakpoint executes, OllyDbg removes the breakpoint and marks the instruction as a hit.

When dynamically reverse engineering a binary file, one problem with logging executed regions of code is that a lot of the code that gets logged (contains hits), we don't really care about, like GUI events. We'll call this UNINTERESTING CODE. The code we do want to focus on is INTERESTING CODE.

To solve the problem of highlighting only INTERESTING CODE we'll use a plugin that Moti wrote for OllyDbg "back in the day," called "OllySnake." This plugin overlays the built-in OllyDbg hit trace feature to filter out UNINTERESTING CODE.

So, how does the plugin work?

As an example, let's say that we want to narrow our focus to the notepad.exe code that handles the "About" command.

First, we instruct OllyDbg to trace all events that occur when we execute notepad.exe (including the "uninteresting events," such as GUI events like mouse movements, etc.).
Next, we save the hit trace snapshot.
Now that we have a snapshot of the UNINTERESTING CODE, we click on the "About" menu item to trigger and log the INTERESTING CODE.
Finally, we save a hit trace snapshot that includes both the UNINTERESTING CODE and the INTERESTING CODE.

Can you guess what we do next? We diff the two snapshots to find just the INTERESTING CODE!


http://www.openrce.org/downloads/details/188/OllySnake
http://securitylabs.websense.com/content/Assets/BlogMedia/hit_trace.mov

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
点赞1
打赏
分享
最新回复 (4)
雪    币: 391
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
thebesths 2008-8-2 22:39
2
0
什么东东啊,给点中文解释吧
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
魔化雪鹰 2008-8-3 09:46
3
0
看不太明白!!想来是个好用的插件吧?
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
roomcn 2008-9-13 18:16
4
0
谢谢,比较运行代码的.
雪    币: 205
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
xuyiming 2008-9-13 18:32
5
0
晕,看不明白英文
游客
登录 | 注册 方可回帖
返回