
Crack.NET is a runtime debugging and scripting tool I made that gives you access to the internals of any .NET desktop application running on your computer. If you love Snoop and Mole for Visual Studio, you’ll love Crack.NET, too. Crack.NET allows you to “walk” the managed heap of another .NET application, inspect all kinds of values on objects, and even manipulate those objects via IronPython scripts. There is so much to say about Crack.NET that I wrote an article about it. I highly suggest you read the article if you are interested in using Crack.NET. You can download that document here:
Read the Crack.NET Article (Microsoft Word document)
Version 1.2 News
On November 2nd, 2008, I released Crack.NET v1.2 on the CodePlex site. In addition to several small bug fixes, I added one big-ticket item. Crack.NET is now fully integrated with Red Gate’s .NET Reflector tool. In the Memory Explorer workspace, right-click on any Type in the TreeView or any Member Name in the ListView. A context menu will appear, allowing you to open Reflector directly to that type/member. Click on the following images to view them at full size.
Open Reflector directly to a type:
Open Reflector directly to a property or field:
Version 1.1 News
On October 25th, 2008, I released Crack.NET v1.1 on the CodePlex site. This new release contains a lot of bug fixes and minor new features. This is a significantly more user-friendly and stable release than v1.0, so I recommend you go get it. I spent a lot of time improving the responsiveness of the UI, making navigation to any object or type in Memory Explorer consistently fast. For more details about what this new version includes, you can read my check-in comments on the Source Code page.
I have rounded up some great talent to help make Crack.NET even better. I have dubbed this team “The Cartel” because we manufacture and distribute Crack!
As seen on the People page, The Cartel now consists of:
Josh Smith – The founder of this project and, so far, the sole contributor.
Dr. WPF – The guru’s guru, who needs no introduction, will soon be developing on the project.
Grant Hinkson – The master Visual Designer, with whom I work at Infragistics, who built (amongst many things) a profoundly attractive and usable skin for Podder. Grant is Director of the Experience Design Group at Infragistics, and is a Microsoft MVP in the Expression space. Grant will be reworking the user interfaces in Crack.NET, applying his visual design magic in ways that most developers can hardly imagine.
Ed Blankenship – The Release Engineering Team Lead at Infragistics, who is a Microsoft MVP in the TFS space. Ed kindly agreed to build an installer for Crack.NET.
Photo Gallery
Here are some screenshots of the application. Click on each image to view it at a larger size.
Launcher App
Annotated Launcher App
Annotated Memory Explorer (Selected Assembly)
Annotated Memory Explorer (Selected Object)
System Requirements
Crack.NET requires that you have the .NET Framework version 3.5 with Service Pack 1 installed. The application was written and compiled in Visual Studio 2008 with Service Pack 1. If you need to install either of these requirements, they are freely available from Microsoft here.
The managed injector portion of Crack.NET, which was written in managed C++, came from Snoop, with Pete Blois’ permission. Snoop does not work on 64-bit machines, but a temporary solution has been implemented in Crack.NET which allows you to run the application on 64-bit machines. Regardless of the operating system, you can only crack open 32-bit apps. If you need to target 64-bit apps, you will need to build Crack.NET on your system with the x64 Target Platform compiler setting.
Installation Instructions
Due to the way that Crack.NET works, you must put the IronPython DLLs into the Global Assembly Cache before running it. If you do not put those DLLs into the GAC, an exception will be thrown when Crack.NET is injected into a .NET application. The source code and binary downloads, at the top of this article, include those two assemblies. Crack.NET was built against version 1.1.2 of IronPython.DLL and IronMath.DLL.
The easiest way to put those assemblies into your GAC is to open Windows Explorer, navigate to c:\windows\assembly, and then drag-and-drop in the two DLL files. For more information about adding assemblies to the GAC, refer to this help topic from Microsoft.
A Word of Warning
Crack.NET is intended to be used for troubleshooting applications in a non-production environment. I strongly suggest that you do not use Crack.NET in a production environment, because powerful tools like this can, if used inappropriately, significantly destabilize the application under observation.
Downloads
You can get the binaries and source code from the Crack.NET project on CodePlex. The latest version can be found on the Releases tab. The source code can be downloaded from the Source Code tab.









October 20, 2008 at 3:25 am
WOW. What an inspired piece of work. I am a little frightened by the ManagedInjector code, but I guess this is all standard stuff that came straight from Microsoft as is the technique of working with the global variables and IronPython scripts.
So I guess it is all a great success really. Well done Josh, yet again you are the man. I really admire some of your crazy code. Its so pretty. And I love the way, if you have read all your past posts you see those things in use, such as RelayCommand, the CollectionView filtering using all the nice Func/Action goodness.
Love it. MUCHO-RESPECT.
October 20, 2008 at 3:39 am
PS : I also like the use of Daniel Vaughan excellent Alien from his Alien Sokoban app. I liked his aliens also.
October 20, 2008 at 4:08 am
I have a pretty simple WPF app, that doesn’t appear in the application list, any idea as to why? (It’s has a borderless window, and doesn’t appear in the taskbar, does that make any difference?)
October 20, 2008 at 6:29 am
Amazing stuff Josh – could you keep the bar a bit lower for us mere mortals mate?
October 20, 2008 at 6:52 am
Since the x64 stuff doesn’t work you’ll have to build the project as x86 instead of Any CPU, that fixed it for me on my 64bit Vista machine.
October 20, 2008 at 9:54 am
@ Sacha: Thanks a lot!
@ Norman: I think you just pointed out a limitation of the tool. The application must have a top-level window, and it sounds like it must also be in the taskbar. I’ll look into that.
@ Pete: Thanks!
@ Steve: You are the MAN! Thanks for pointing out the fix of the 64-bit problem. I’ll update the downloads after work today.
October 20, 2008 at 1:16 pm
Wow. Another piece of Josh Smith’s programming mastery. Nice job man. I’m gonna play with this and see if I can make use of it here at work. Thanks for this tool.
October 20, 2008 at 1:55 pm
I hope you find it useful, Judah. Please let me know how it works out for you.
October 20, 2008 at 2:26 pm
[...] can read more about this crazy tool over at Josh Smiths blog, using the Crack .NET homepage where you will find a full run down of what this does by the master himself. Don’t take my [...]
October 20, 2008 at 11:00 pm
So, if I have a networking app, this could theoretically allow savy users to ‘crack’ into it and, via IronPython, send their own stuff through my networking object model – or am I not overestimating the ability of the tool?
I can’t say I’d be happy about that – not that there’s anything I can do about it now, I suppose. If it wasn’t so late I’d test it out before whining =(
On an abstract level, though, this is a very neat and ingenious piece of software. Kudos.
October 21, 2008 at 3:18 am
the fix for 64 bit applications works, but it only works on programs built as x86 aswell. that is just something to keep in mind. (it is like this with snoop also)
October 21, 2008 at 3:35 am
[...] About Cracking .NET Tuesday, October 21st, 2008 | Author: Wim Josh smith released a new tool. Crack.Net is the name! Crack.NET is a runtime debugging and scripting tool I made that gives you access to the internals of any .NET desktop application running on your computer. If you love Snoop and Mole for Visual Studio, you’ll love Crack.NET, too. Crack.NET allows you to “walk” the managed heap of another .NET application, inspect all kinds of values on objects, and even manipulate those objects via IronPython scripts. (link) [...]
October 21, 2008 at 8:41 am
This looks awesome! I can’t wait to try it.
Why did you go with IronPython 1.1.2? Have you tried IronPython 2.0? If not, I will give it a whirl and let you know how it goes.
October 21, 2008 at 8:44 am
Ryan,
I chose IronPython 1.1.2 because the CodePlex home page for IronPython said that’s the latest *stable* release. I didn’t want to work with potentially unstable bits while developing my own potentially unstable bits.
Josh
October 21, 2008 at 8:47 am
i seem to only see static fields/members… am i missing something?
October 21, 2008 at 8:50 am
jy,
That’s expected behavior. I suggest you read the article I wrote about Crack.NET to better understand how to use it. That article is available for download on this page.
When you crack an app, Crack.NET has no references to objects on the managed heap of the cracked application. So, you must navigate to object instances by static properties and fields of some class. Once you click on the value of a static property/field, you can then navigate an object graph.
Josh
October 21, 2008 at 3:35 pm
This is great, I’ll test it out right away tomorrow morning. There have been occasions that I would have liked to look inside a running application because it was not behaving correctly and I couldn’t reproduce it on the development machine.
p.s. I have read the warning, I am of course talking about the test environment.
-Mark
October 21, 2008 at 3:38 pm
Mark,
Please let me know how your experience with the tool goes. I’m curious to see how and why people use it, and what they like/dislike about it.
Thanks,
Josh
October 21, 2008 at 4:11 pm
ok… i’m and idiot.. that makes perfect sense. thanks for the tool
October 21, 2008 at 4:18 pm
Just gave it a go. Sweet!
October 21, 2008 at 4:20 pm
Thanks Mike!
October 21, 2008 at 6:36 pm
[...] Crack.NET 21 Oct 2008 Posted by ramsonit in Introduction, Tools. trackback Crack.NET is a runtime debugging and scripting tool that gives you access to the internals of a WPF or Windows Forms application running on your computer. If you love Snoop and Mole for Visual Studio, you’ll love Crack.NET, too. Crack.NET allows you to “walk” the managed heap of another .NET application, inspect all kinds of values on objects. Read Josh intro here. [...]
October 22, 2008 at 4:17 am
good tool, thx
October 22, 2008 at 2:30 pm
So it certainly won’t even start without having VS2008 installed?
It just crashed on the first try..
October 22, 2008 at 2:32 pm
tux,
You don’t need VS2008, but you do need .NET 3.5 with Service Pack 1.
Josh
October 23, 2008 at 2:09 pm
[...] Josh Smith and Crack.Net – Josh Smith has a release of a free developer tool for .Net applications. Wildly popular around the office. [...]
October 26, 2008 at 11:48 am
Nice work!
Would it be possible to include support for .NET windows services?
October 26, 2008 at 1:09 pm
I’m having some problems with this app. When I highlight the app I want in the dropdown bar, and then press Crack it, nothing happens.
I’m running Windows Vista Ultimate SP1
October 27, 2008 at 12:39 pm
Horst,
It is possible, but would require changing the way that the app locates .NET apps. It’s definitely something on the TODO list, but other features are higher priority at the moment. Thanks for the feedback.
bball1081,
What type of app are you trying to crack? If it’s a Console App, it won’t work, because Crack.NET does not have a chance to open up in a Console. If not, please explain.
Thanks,
Josh
November 2, 2008 at 7:46 pm
[...] Crack.NET [...]
November 6, 2008 at 3:40 pm
[...] Smith is the author, and has a nice introductory page for the [...]
November 8, 2008 at 3:44 pm
[...] the best and clearest example of WPF M-V-VM I’ve seen is in Josh’s latest achievement, Crack.NET. If you want to learn M-V-VM from and expert, download Crack.NET source and study [...]
November 12, 2008 at 1:00 am
[...] doubt, the best and clearest example of WPF M-V-VM I’ve seen is in Josh’s latest achievement, Crack.NET. If you want to learn M-V-VM from and expert, download Crack.NET source and study Josh’s [...]
November 13, 2008 at 1:59 pm
Hello Josh.
Thanks for the great tool.
The ElementTreeExplorer area has a problem, which it inherited from the Snoop. The tree cannot display more than 56 levels deep hierarchy. Indeed, the root node is located on level 25 in the overall visual tree of the Crack.NET application. Each node contributes another 4 levels. Hence we have 25 + 56 * 4 = 255, which is the maximum allowed nesting of WPF framework elements. Trying to surpass that brings down Crack.NET (Snoop) along with the application being cracked (snooped at).
Although it is possible to work around this issue in Snoop by using the filter, still we crashed too often when working with it.
I took the liberty of fixing this problem both in Snoop and in Crack.NET. The fix is to define an implicit filter, which I call reduce depth filter. It is automatically set when the tree is going too deep.
I would like to e-mail you the fixed source code, if you do not mind. I have killed two full days at it and it will be a shame if someone else will have to do the same again.
BTW, Mole does not have the problem, because it is written in Windows Forms, where TreeView is one atomic control.
I think, that Crack.NET has the potential to become the most useful .NET tool ever, second to the .NET Reflector, of course.
Thank you.
November 13, 2008 at 2:03 pm
Hi Mark,
Thanks a lot! I must say, though, that the Element Tree Explorer is still in the preliminary stages of development, so it is still quite buggy and lacking all necessary features. I’ll send you an email, so that you can send me your fix. Much appreciated!!
Josh
November 18, 2008 at 12:07 pm
Hi Josh.
I apologize for spamming you about Snoop, I just can’t find Pete Blois’ blog
.
Anyway, have you or anyone else used the new version of Snoop? Because in addition to suffering from the deep recursion bug (I have fixed it there exactly the same way I have done it in Crack.NET) it has two regression bugs, which diminish its usefulness greatly:
1. It fails to update property values in the snooped application. Adding the following line in the PropertyInformation constructor fixed the issue for me:
binding.Mode = property.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay;
2. It fails to retreat back from the delved in context. It looks like there was last minute commit in PropertyInspector.xaml.cs and nobody cared to verify it. The fix is easy, but nevertheless required.
I am wondering whether I am the only one who is actually using Snoop and have noticed this stuff or there is “the right” version out there and everyone is using it instead?
Anyway, I would like to share the bug fixes, if still relevant, but I have no idea how to contact Pete. Any suggestions?
Thanks again.
November 18, 2008 at 1:20 pm
Hi Mark,
I’m not sure how Pete has people contact him. I believe he mentioned the property editing bug when releasing the new version of Snoop, but I’m not familiar with the other one. If we encounter those issues with Crack, I’ll hit you up.
Thanks,
Josh