What do you do if you want to dig in .NET app? Of course you use some reflector for that purpose, so do I. But that was the first time when Reflector just threw the meaningless exception when I tried to view the code. When I investigated the application a bit more, I found that it was protected with some tool called CodeVeil.
OK, having a little experience with packers for native code the first thing that I did was getting the memory dump from running application:) Simple? Of course, and you will be probably surprised to know how often it works with number of cheep application packers. And I hoped that it would work in my case because app was created in 2008 by some student which possibly just used the first .NET protector that he have found in the web. It's a pity but it hasn't work. As I investigated later on that version of CodeVeil (probably 1.2) encrypts methods in .NET executable. So when you run application and some method is called, then CodeVeil decrypts method's code, execute it, and encrypt back. That is why straightforward memory dump cannot help here.
So what can be done in this situation?
- Set breakpoint on encryption code and make memory dump then.
- Patch the encryption code in memory with anything so after executing of some method it will be possible to grab the code.
So how has that story finished? Ok, in some cases when you cannot break the code you can use it:) And that was my case)
In general I can say that yes, you can protect your .NET code from such lames as me. Anyway I think that for experienced cracker it is just matter of time to break your protection. So it is your decision if it is worth to pay for some good protection for your code.
so what did you do in the end with that? have you cracked that?
ReplyDeleteAs I wrote I just used that encrypted methods to do what I want. But actually I didn't manage to crack that application. Too much efforts for me)
ReplyDeleteAlso take a look at Crypto Obfuscator (http://www.ssware.com/cryptoobfuscator/obfuscator-net.htm) - it has a specific Anti-Debug protection for protection under debuggers like Olly Debug
ReplyDeleteThanks for the link, but I think that there is a lot of protectors with anti-debugging:)
ReplyDelete