Log in

View Full Version : Tracing Code as it executes


Tom Smith
July 10th, 2004, 02:37
I'm working with Ollydbg to analyze a program, and this is my first time using a debugger.

So I attach debugger to the program(process) I want to analyze, let's call the program I'm attaching to "DogBone".

What I want to do is have Ollydbg trace "DogBone's" assembler code as it executes, always displaying the current line of Assembler code being used by "DogBone".

That is, every time "DogBone" advances or goes backwards, I want Ollydbg to highlight the current corresponding Assembler code line.

Which function in Ollydbg allows me to do this.

Is it Animate? or Trace?

-Thanx
tom_smith3@hotmail.com

psyCK0
July 10th, 2004, 08:35
You could just manually step through the program using the Step into/Step over commands or try the Animate into/Animate over features...

BTW, I've never seen a program go backwards. =))

Tom Smith
July 10th, 2004, 10:01
Tom_Smith3@hotmail.com- Followup:

Let me clarify:

I want Ollydbg to show each Assembler code as it is executed by the "DogBone" program.

So, if I start the "DogBone", as I move around the program, I want Ollydbg to reflect this by moving to the line of Assembler code currently executing.

I don't want to do it manually. That is, the Step command requires you to move thru the program manually, and the Animate command appears to roll thru the code, but does not reflect which line of Assembler code in "DogBone" is being executed currently.

-Tom_Smith3@hotmail.com

blabberer
July 12th, 2004, 00:31
did you try hit trace it puts a little red marker as it executes commands

btw yes programs can run backward forward and diagonally psycko
go get cbj +q article and read

1bitshort
July 12th, 2004, 02:45
oh me anon: Exactly which CodeBreakers journal article are you referring to? URL please? Thanks

blabberer
July 12th, 2004, 05:21
here is the url 1bit
i dunno you gotta register some thing now (the whole university is now kinda queer (old aunti was good )
when i first read it a year or some times back (the very first release of cbj) it was just plain download of a .zip
now everything is in pdf and whatnot
hxxp://www.codebreakers-journal.com/viewarticle.php?id=21&layout=abstr act

well now explore the possibilities of directionless execution or dynamic direction execution

1bitshort
July 12th, 2004, 06:49
Thanks, I read a lot of CBJ articles but had somehow missed that one. It's quite an interesting technique ("The Running Line" but it takes a while to set up and isn't overly practicle - more of a demonstration than anything else. Using it in an application for anti-debugging would be very cumbersome to set up (possibly to the point where it could take less time to crack than it would to implement), not to mention that code executing with the trap flag set executes quite slowly, although that should only be an issue if used with large blocks of code or code with lots of loops. Good read though nonetheless ..