Reputation: 16143
When delivering a DLL (C# project) file to a customer, there are parts of the library which are not part of the interface the customer should be allowed to use. What security mechanims do exist to restrict the access to the public interface?
Of course, one could set the other methods to private
, protected
, internal
, but in the end, with help of some tools, we can always get access to these methods. So is there a real security technique to prevent this?
Upvotes: 1
Views: 203
Reputation: 73564
Since this is tagged "C#" I'm going to have to say "No, there's no real security mechanism to prevent users from accessing the functions." .NET binaries can always be de-compiled, even when obfuscated.
The same goes for all .NET client applications (winforms, windows service, console, etc.) as covered in a similar question I asked a while back.
Quote from the selected answer:
In other words, you must consider the desktop application completely compromised, and if this is a risk, you must extract everything that must be secure (authentication, authorization, validation) to an external (web) service.
Upvotes: 5