How to Securing .NET Assembly code

Posted By  kirtan007 On 21 Sep 2010 09:09:17
emailbookmarkadd commentsprint
No of Views:969
Bookmarked:0 times
Votes:0 times

Introduction

I want to present some ideas for how you can secure your coded .net application..net assemblies /executable contain instruction codes and some data about data that is contained in them that is relatively easy to de-compile with tools available in market like Dot Net reflector.

Tools like Dot net Reflector can de-compile the assembly and it shows the code that is nearly the same as the original code of the .net assembly. If our Application contains some critical code/secret code that we don't want the user to see then we can do that using tools like reflector.

what we can do to protect our .net code?

We can do following things.

  • Implement Server based solution like Web Service or Asp.net application when you implement this type of solution your solution can be accessible by browser so there is no chance that user can see the code of assemblies.
  • When you feel that it's not possible to use Server based solution, use obfuscator that is  shipped with Visual Studio 2010 that can rewrite your code such that it's hard to understand and follow by reverse engineering.
  • If your application contain some secret code then put that secret code in Native DLL and call that methods that contain secrete code with P/Invoke .

Note: - approach 2 and 3 can still can be decoded by application cracker who is much better in skill.

Details of Implmentation

  1. Implement Server based solution like Web Service or Asp.net application when you implement this type of solution your solution can be accessible by browser so there is no chance that user can see the code of assemblies.
  2. When you feel that it's not possible to use Server based solution, use obfuscator that is  shipped with Visual Studio 2010 that can rewrite your code such that it's hard to understand and follow by reverse engineering.
  3. If your application contain some secret code then put that secret code in Native DLL and call that methods that contain secrete code with P/Invoke .

i hope help this, Thank you for reading.

Sign Up to vote for this article
Other popular Tips/Tricks
Comments
By:tanmoyDate Of Posted:11/22/2010 2:19:24 AM
tanmoy
its very useful tips. thanks..
By:RRaveenDate Of Posted:5/31/2010 8:36:21 AM
Namespace
Hi, The CG.CS.Data.Sql is my own namespce name to dataaccess code of the "ReadImageFromDB" this method, so you just add your namespace name. instead to that.
By:Display image in crystal reporDate Of Posted:5/31/2010 7:09:08 AM
Display image in crystal report from database in ASP.NET
I have error in namespace using CG.CS.Data.Sql; please Rectifier that error and send me to mail. as early as possible
By:Display image in crystal reporDate Of Posted:5/31/2010 7:06:24 AM
Display image in crystal report from database in ASP.NET
I have error in namespace using using CG.CS.Data.Sql; Rectifier that error...
By:RRaveenDate Of Posted:5/29/2010 4:06:07 AM
The Same Way
Hi Meena, You can use the same idea, what i have used in asp.net web application.becauase both are same idea, but just you change the image folder or byte of the image from database and set to crystal report picture control. if still you are unable to do, please post the question in messageboard, we will give the sample code to there. thank you
By:MeenaDate Of Posted:5/29/2010 1:48:36 AM
How to display image in crystal report from database in only C#.Net(Windows Application)
How to display image in Crystal report from database in windows Application.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top