Reverse Engineering RET Homepage RET Members Reverse Engineering Projects Reverse Engineering Papers Reversing Challenges Reverser Tools RET Re-Search Engine Reverse Engineering Forum Reverse Engineering Links

Go Back   Reverse Engineering Team Board > Reverse Engineering Board > .NET Reverse Engineering
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-07-2008, 07:37 AM
ender ender is offline
Member
 
Join Date: Oct 2008
Posts: 9
Question Can a string object be created in place

First off, I just wanted to thank everyone who has taken time to contribute to this board. This is really one of the best (and definitely most active) resources on .net reversing I've been able to find.

All ass kissing aside , I had a quick (noobish) question.

I've been studying the protection scheme of a certain .net app, and it looks like the license key is encrypted using public-key cryptography. However, at the end of the day, the program ultimately uses some very simple checks against hard coded int values to see if the program is registered. The catch is, the "decoded" value that the program is constantly checking against is supposed to be a string (that holds the value "3" if the prog is registered).

I've searched through the CLI specification docs to see if there is anyway I can patch a certain method with a hard coded string value (which in this case would always be "3"), but it seems that strings can only be pushed onto the stack by reference. I tried to use the "box" instruction in conjunction with the ldc.i4.3 instruction, but that doesn't seem to work. I get an "object reference not set to instance of object" error.

So if anyone happens to know a way that I could push a string object with the value "3" onto the evaluation stack without having to mess around with the metadata tables, I'd be much obliged.

If it's not possible, any guidance on how to actually modify the metadata tables (without mucking everything up), so I can insert a string with the value "3" and then access it via reference would be equally appreciated.
__________________
if you build a man a fire he will be warm for a day; if you set a man on fire he will be warm for the rest of his life. :rolleyes:

Last edited by ender : 10-07-2008 at 08:20 AM.
Reply With Quote
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump





Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.