📚 OpenRCE is preserved as a read-only archive. Launched at RECon Montreal in 2005. Registration and posting are disabled.








Flag: Tornado! Hurricane!

 Forums >>  Debuggers  >>  Immunity Debugger Plugins

Topic created on: August 21, 2007 13:25 CDT by camill8 .

Is there some sample plugins for Immunity Debugger floating around that folks could use as templates?

  nicowow     August 21, 2007 13:45.57 CDT
The most basic plugin is PyCommands/pycmd.py (Which is an example script that print the arguments).
But you can see a lot of examples in PyCommands/*

  jms     August 21, 2007 19:41.16 CDT
What are you trying to do with ImmLib first, and then we might be able to help. So far I have done some code coverage, hooking, fast hooking (thanks Nico), and a few other things. It's quite powerful but much different than PyDBG.

  camill8     August 22, 2007 20:49.56 CDT
Well, I was wanting to basically intercept all the user commands and do something different.  So that if the user hit "step into", my function would get called and I could report what was going on, color the contents of the screen, check for conditions, and possibly step into or do something else entirely.  

It would seem I would need to overload the debugger.Stepin() function.  It doesn't seem like we have the code for this as it comes in a .pyc, I think.  Is it even possible to do what I want to do?  If this debugger was written on top of pydbg as opposed to the debugger class, I'd know what to do...  Any suggestions?

  jms     August 22, 2007 23:27.57 CDT
Well, if you are looking for an events-driven interface, I mean you could have a pycommand that worked like this:

!yourcommand stepin
(which does all your business)

!yourcommand stepover
(even more business here)

But other than that, I am not sure how to do what you are saying you would like to, Nico I am sure will chime in shortly.

  nicowow     August 23, 2007 07:28.07 CDT
if I didn't missunderstand it, you want to hook on Single Step.

We dont have specials Single Step hooks (Probably something that we are gonna add in the future), although we do have "All Exception Hook", that combined by getEvent it will give you want you want. Let me do some pseudo code for you:

class SingleStepHook(AllExceptHook):
    def __init__(self):
        AllExceptHook.__init__(self)

    def run(self,regs):
        imm = immlib.Debugger()
        v_event = imm.getEvent()
        if v_event.Exception[0].getType() == "SingleStep":
            # SINGLE STEP CODE HERE
            imm.Log("SINGLE STEP!"

def main(args):
    s = SingleStepHook()
    s.add("Hooking_Single_Step")


For more info, check the following info:
Event handling:  http://debugger.immunityinc.com/update/Documentation/ref/libevent-module.html
(You can also check PyCommand/getevent.py)

Hooks:
http://debugger.immunityinc.com/update/Documentation/ref/libhook-module.html

  camill8     August 23, 2007 08:23.15 CDT
Thanks for the excellent advice.  It may be enough fro what I want to do, but its not exactly what I'm looking for.  It would give me the ability to "follow along", i.e. get to run code after any debugging event.  What I really want to do is to run code after any "user event", I guess GUI events.  Suppose I wanted to do something everytime a user set a breakpoint or hit the "continue" button.  For example, maybe I want to open a window showing the code with the breakpoint or analyze the next 100 instructions and set a breakpoint at all the "dangerous" ones coming up.  These are things I want to do before the breakpoint is actually set or the next event occurs.  Is this possible?  Thanks again!

  nicowow     August 23, 2007 08:40.22 CDT
Camill,
  We dont still those kind of GUI hook,  but I added it our TODO. I will let you know once they are implemented

Nico

  0xvoila     February 12, 2011 13:39.01 CST
hey guys ..

can any one tell me ... how can i proceed for fuzzing with immunity debugger ...


thanks in advance ..

  djnemo     February 13, 2011 04:35.13 CST
Depend on target,its better to do fuzzing with fuzzer and check exception with ImmunityDbg

Note: Registration is required to post to the forums.

There are 31,328 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06
Question about memor...
Dec/12


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit