views:

238

answers:

4

I was thinking about a tool to inspect objects at runtime, primarily for reverse-engineering and I'm wondering if such a thing exists.

The way I was thinking about it was that you had two views, a graph of objects and a class list. From the class list, you can select a class and see the instances of it, either in a list or in the graph. In the graph, you can see the connections between objects, annotated appropriately, e.g. keys in a hash table could be labels on the edges between the hash table object and the value.

You could also pull up a list of object properties and see/manipulate the values inside. The metadata provided in .NET would make this fairly trivial.

Does anyone know of a tool that can do this? It seems like an immensely useful tool for debugging and reverse-engineering.

Edit: Also, another useful feature would be the ability to set name mappings while looking at a binary. That is, if you have an obfuscated binary, you'd be able to exchange the obfuscated names for placeholders or real names. This wouldn't affect the actual binary, just the view in the inspector.

Edit part 2: The tool should be able to run on Vista and XP and have support for x64.

A: 

If you have a running process, then you have the binary somewhere on your machine.

You can load this binary in Reflector.

Or if you have Visual Studio installed, you can attach the Visual Studio Debugger to the running process.

Alan
Reflector has no real support for debugging (it has a debugger plugin but it's useless) and the VS debugger has very limited support for digging through all the objects in the process. Thanks, though.
Cody Brocious
+1  A: 

There is a program called Hawkeye which can let you look at UI elements in a .NET app.

I have also found a program called .NET Component Inspector I'm not sure how good it is (trying it now).

Nathan W
This only seems to allow you to look at GUI elements -- am I mistaken?
Cody Brocious
Yeah I does sorry about that :(
Nathan W
Thanks anyway, it's good to see people are doing things at least near this -- gives me hope that the whole tool exists :)
Cody Brocious
.NET Component Inspector looks very nice, but alas it's <=XP only :(
Cody Brocious
what are you running? Vista?
Nathan W
Ah hah, I'm wrong. That notice was on the ActiveX inspector. Installing this now :)
Cody Brocious
Server 2008, so Vista effectively.
Cody Brocious
Hmm, I tried to open a few assemblies and it threw up bad format errors on every one. Could it be my running x64? I should probably add a note on my question about that.
Cody Brocious
I'm trying the program with some of my stuff, It does some strange stuff sometimes. I'm not really sure how to use it properly yet. Good luck :)
Nathan W
Thanks :) Might want to take a look at the Crack.NET tool that SealedSun posted -- it looks damn nice.
Cody Brocious
+1  A: 

You could always get a minidump from the application in question and inspect it with WinDBG and SOS.

MSN
I've played around with this, but I'd really like a GUI tool like I described. Thanks for the input :)
Cody Brocious
+7  A: 

There is a tool called Crack.NET, specifically for analyzing the managed heap.

http://joshsmithonwpf.wordpress.com/cracknet/

http://www.codeplex.com/cracknetproject

SealedSun
Ah hah, this looks great. Thanks!
Cody Brocious
No problem. Glad I could help!
SealedSun
@Cody Did you get this app working, I can't seem to run it, crashes every time :(
Nathan W
@Cody NM didn't have .NET 3.5 SP1 installed.
Nathan W
Yep, working perfectly here. Using it to dig through an obfuscated app quite successfully -- this rocks!
Cody Brocious