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








Flag: Tornado! Hurricane!

 Forums >>  Debuggers  >>  debugging a process that is creating another process to debug

Topic created on: September 24, 2009 06:27 CDT by ronnie291983 .

A certain process is being opened in olly, this process is creating another with CreateProcess with debug privilleges, the old process is using the TLS startup routines, the CreateProcess as well as all other activities required to open a exe for debugging in done in the startup routine, including the Debug Event loop. so it never comes out of the startup routine.

Once the new process is started i can't access the process memory of the new process using olly, is there any way this can be done using olly?

This is a self debugging process,new process and old process has the same exe.

  Nadya   September 30, 2009 15:13.48 CDT
I have similar problem on AMD64, seems your only hope is to use good old SoftIce (alternatively Syser)

  jumpzero     September 30, 2009 19:52.12 CDT
well you have two choices.

1. debug your first process's debug loop, and if you wanna see second process's memory, you can write a memory viewer or use tools like cheatengine. it has fine memory viewer.

2. don't let the first one create the second one, but instead, run another olly to create/debug the second process. and see what the first process does in the debug loop, and do the same thing in the second olly.

  ronnie291983     October 1, 2009 01:43.32 CDT
@jumpzero: the second process has int 3 in a routine, that generates exception the first process catches these exception and performs some action, actually the total task to be performed when a user clicks a button is shared by the two processes using the method above, so as you mentioned i wud have implement that debug loop in the olly, so i guess at the event of an exception like int 3, i shd tell olly to perform the same task as in debug loop,i was thinking on the lines on patching in code for SEH by finding a free unused memory area, but that seems a little crude, i was wondering whether any easier way to do this exists?

  jumpzero     October 1, 2009 02:33.18 CDT
@ronnie291983
well, both way would work, i think.
if you take method 2, olly would catch the int3 exception and will ask you what to do. then you can do what the first process does, whatever it may be. it would be tricky if both processes use time difference between events. but other than that, i think it would work fine.

  DelightedZuk     October 1, 2009 03:57.02 CDT
just attach to the second process yourself so olly would be using the CreateProcessA with debug privileges (and then OpenProcess,DebugActiveProcess,...).
beware if there are any checks for the debugee.
After that, you're the debugger of both processes using 2 instances of olly.
In the first process though, fill the opcodes with nops without (make sure you don't ruin the stack) near the createfile [specific] call.

p.s, does that process does anything else with the handle? if so you'll have to implement more stuff yourself.


I hope I could help, post more info if you need any more help.

Sincerely,
Itzhak [for Citadel Technologies (www.citadel.co.il)]

  zeph97     October 2, 2009 12:57.06 CDT
http://www.woodmann.com/forum/showthread.php?t=11437 EBFE, CREATE_SUSPENDED, olly advance plugin

  ronnie291983     October 5, 2009 01:41.43 CDT
@zeph97: Thanks for pointing me to the thread, this was exactly what i was looking for :)

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