作者归档:raywill

如何OllyDebug调试Win32汇编程序[原创]

使用OllyDebug来调试Win32汇编程序一般可以分三不走:定位,下断点,跟踪

定位的目的是找到感兴趣的代码段,断点的作用是让程序自动执行到感兴趣的部分后停止执行,跟踪的目的是分析这段代码的具体数据变化情况。

下面就各个步骤详细讲解:

1.怎样定位程序的某一段?
如已知有这么一段程序:
   mov ecx,eax
   xor edx,edx
   mov ebx,3
   div ebx
   sub ecx,eax  
   shr ecx,1 ;ecx conttains real count
按下Ctrl+F ,输入  "mov ecx,eax" ,确定,便可以定位到该段程序了.
一般在一个程序里面会出现多处"mov ecx,eax",第一次找到的不一定是你的目标。继续按Ctrl+L,就可以定位到下一个"mov ecx,eax"处.
显然,这种方法一般很难实现一次定位.因为一条指令的特征并不明显.
幸好,我们可以用Ctrl+S来实现多条连续指令序列得查找.
按下Ctrl+S ,输入 
   mov ebx,3
   div ebx
   sub ecx,eax 
一般只需一次就可以找到目标代码段.

2.怎样下断点?
然后按下F2下断点.下断点处会变红.取消断点只要再次按下F2

3.跟踪
然后用菜单点"运行"(或按F9),程序运行到断点处会自动停下,此时可以按F8一步一步跟踪。
如果不需要步步跟踪,可以点继续运行.

就这么简单.

当然了,OllyDebug得功能远不止这些,这就需要你自己去看帮助咯~

最近的追求

发现自己最近没什么特别的追求了,只是想把汇编课程设计做的让自己点点头,J5跳好每一个FinishMove,完了去长江看看。好久没在大桥上走走了,甚是怀念。

10dbf6304c1.jpg

老子


  天长地久。天地所以能长且久者,以其不自生,故能长生。

  是以圣人后其身而身先;外其身而身存。非以其无私邪?故能成其私。

写汇编的心得5 层次结构

虽然知道将一个大的系统分层很重要,但真在自己的系统里面实施的时候就会发现,没有足够的经验和知识,合理分层很难实现.

一个结构清晰的系统必须是具备良好的逻辑结构.这样一个结构可以是层次结构,可以是网状结构,也可以是树状结构.其中,个人感觉层次结构的实现和维护最为方便.

对分层带来的副面效应也应该有清醒的认识:一定程度上降低了效率.
但与它带来的可维护性,可扩展性来说,这个效应是微不足道的.

[PS]课程设计中遇到数据同步问题,效率问题.放在心里转了几天,未果.
解决方案又是早上的迷糊梦中得到的.A ZA Fighting!
现在心里美美的,哈哈~

Just keep going

Take no action = takes reall action.

No hurry , no hesitate , Just keep going.
No Leap no stop , Just keep going.
No wonder , no recall , Just keep going.
No pride , no frastration , Just keep going.

Keep going , keep going , Just keep going.

Listening Homework.

It’s a good habit to record something after a nice movie ,itn’t it?~

Oh..Maybe it’s like what you said ,we should just both go our seperate ways and … and we are just doing fine

What if fine isn’t good enough.?
what if I want extraordinnary?

Nothing is that thing.

I am just as scared as you are ,Sara.
But I am right here ,and our time is right now.

Oh yeah?what about before?

Sara,I am a guy.Since when do we get …

…

Click STRAT to Play:

  You Can Get It If You Really Want

You can get it if you really want
You can get it if you really want
You can get it if you really want
But you must try, try and try
Try and try, you’ll succeed at last

Persecution you must bear
Win or lose you’ve got to get your share
Got your mind set on a dream
You can get it, though harder them seem now

You can get it if you really want
You can get it if you really want
You can get it if you really want
But you must try, try and try
Try and try, you’ll succeed at last
I know it, listen

Rome was not built in a day
Opposition will come your way
But the hotter the battle you see
It’s the sweeter the victory, now

You can get it if you really want
You can get it if you really want
You can get it if you really want
But you must try, try and try
Try and try, you’ll succeed at last

You can get it if you really want
You can get it if you really want
You can get it if you really want
But you must try, try and try
Try and try, you’ll succeed at last

You can get it if you really want – I know it
You can get it if you really want – though I show it
You can get it if you really want
– so don’t give up now

 

Artist: Jimmy Cliff Lyrics