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








Flag: Tornado! Hurricane!

daeken's Repository

Name Size Uploaded On
debugtrick.py 2 KB Oct 17 2005
What it is:
This is a small python script that will allow you to attach your debugger nearly anywhere.  It is currently Windows-only, and has only been tested on Windows XP.  It depends on my 'process' module.

How to use it:
All you need is the PID or executable name of the program to attach in, the address at which you wish you attach and the address of a byte of data which you can modify (it will be restored to its original (at the time this script is run) value after the code you're attaching to is run.

Follow the instructions given.

How it works:
This script modifies the code at the address you wish to attach to and inserts an infinite loop that modifies the data byte you specified to a fixed byte, then a MOV that sets that data byte to the original.  Once this infinite loop is hit (the point you wish to attach to is run) the data byte is changed and the script picks up on this.  It will then ask you to attach your debugger and jump to the MOV after the infinite loop, which tells the script you're attached, and execute nothing after this.  Once the script detects you're attached, it replaces the original instructions, and you can jump back to the address you want to attach to and step through.

Limitations:
If the code you want to attach to is self-modifying, the patches could be overwritten.
If the code you want to attach to is checksummed while running, the patches could be detected.
You have to have a data byte you can modify at will.

Todo:
Add functionality to allow injecting a DLL containing the data byte to modify.
Make it work on platforms other than Windows (Mac OS X will be my next target, if I can ever figure out how to pull it off)
process.py 13 KB Oct 17 2005
What it is:
This is a simple python module that allows you to work with Windows processes.

How to use it:
The file is commented fairly heavily, so any Python hacker should be able to jump in and work with it, in theory.  You can also reference my debugtrick.py file for a reference as to how to use it.

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