Click here to Skip to main content
15,910,603 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,

i have a dll that made and im trying to hide the strings or function (like "regopenkey") that i use. hiding it from a winhex or any hex editor

basically when i put my dll into the hex editor i see some strings that i used or function

is there a possible way to hide it ???

thanks in advance
Posted

You should look into Obfuscation[^]. Just google .NET Obfuscation and you'll find enough links to products that will help you achieve your goal.

Regards,

— Manfred
 
Share this answer
 
Comments
Ronni2013 12-Sep-12 10:49am    
yes i know about that ..im using confuser..but it cant obfuscate my dll..runtime /MT

im thinking is there a technique to write the code safe :D
or maybe encrypt it..(dont know hot to encrypt thou)

thanks for the response
Sergey Alexandrovich Kryukov 12-Sep-12 18:34pm    
Who told you cannot? Yes you can, of course.
Yes, you can encrypt it, trivially -- please see my answer.
--SA
Sergey Alexandrovich Kryukov 12-Sep-12 18:35pm    
My 5. The question is: why?
Some more detail in my answer, please see.
--SA
First of all, I would like to discourage this "hiding" activity. It would be to naive to defend your files against real reverse engineering, and most of the rest of the users won't see your strings anyway. However, I must admit that I don't know your goal, maybe you really need such thing. (It's a good idea to start questions with explaining your ultimate goals.)

So, as Manfred already advised, you can use some obfuscation product. As some products are commercial, and we should not promote them, you should find some product by yourself:
http://bit.ly/SdjrxZ[^].

Read the documentation on each product to see how you can use it. Yes, you can obfuscate the DLL (in .NET, there are no real difference between DLLs and other assemblies), but it can be done in coordination with all the assemblies using it, apparently. All obfuscators can do it.

Now, if all you want is to obfuscate only the string data, you can easily self-obfuscate it by yourself. First of all, you should not use hard-coded string data anyway, so you need to have some data structures with string values. You need to separate data from code. Just encrypt the data using any encryption method of your choice (there are enough already implemented in .NET BCL) and create the files with encrypted data. Add this files to some .resx resources. When you need a string during run-time, get its encrypted value from resource, decrypt and use it. This is really easy. Again, the question is: why?

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900