Author Topic: Range of hardware breakpoints  (Read 3248 times)

0 Members and 1 Guest are viewing this topic.

Offline sdfg

  • Newbie
  • *
  • Posts: 29
    • View Profile
Range of hardware breakpoints
« on: November 08, 2008, 06:10:46 pm »
Is there any way to set execute hardware breakpoints for every instruction in a certain range of memory in ollydbg?
dey see me trollin'
dey hatin'

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Range of hardware breakpoints
« Reply #1 on: November 08, 2008, 06:31:29 pm »
I'm pretty sure that isn't possible due to hardware limitations.

Offline Skywing

  • Full Member
  • ***
  • Posts: 139
    • View Profile
    • Nynaeve
Re: Range of hardware breakpoints
« Reply #2 on: November 09, 2008, 10:52:08 am »
What are you trying to accomplish?  One thing you could do would be to reprotect pages as noaccess pages (or unset the executable page protection flag, if you have NX enforcement enabled).  However, this gives you page-level granularity, which may be too large to be usable depending on what you're doing.

You are only provided support for up to four instruction fetch breakpoints on x86/x64.

Other than those two options, the other is to replace the first byte of each instruction with an int3, remembering the previous values to restore after the breakpoint exceptions are hit.  If OllyDbg has an extensibility mechanism, perhaps you could do that with a plugin.

(As an aside, I would highly recommend switching to the more full-featured WinDbg, which does absolutely have an extensiblity mechanism capable of writing a plugin to do that, if you really wanted to.)