473,790 Members | 2,629 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to protect code

Hi,

Using the .NET reflector tool, i know that a DLL or EXE developed in
..NET platform can be decompiled and therefore code is available for all.

I would like to know if exist a way how to avoid tools like .NET
reflector to decompile your code or at least to avoid people to see
clearly the code of you DLL or EXE ?

thanks a lot,
Al.
Dec 26 '06 #1
7 4400
Using the .NET reflector tool, i know that a DLL or EXE developed in .NET
platform can be decompiled and therefore code is available for all.

I would like to know if exist a way how to avoid tools like .NET reflector
to decompile your code or at least to avoid people to see clearly the code
of you DLL or EXE ?
Do a search for dotNET obfuscator or .NET obfuscator.
The community edition of this tool is included with Visual Studio I think.
The goal of this tool is to make your code as unreadable as possible, for
example by replacing all variable names with variations of a, A, aA, Aa and
doing the same for method names etc.

Of course you have to ask yourself: 'is it necessary?'. If your code does
not contain trade secrets of special algorithms, it might not be worth it.

Being able to decompile assemblies can be useful for developers for finding
out what an assembly is exactly doing. This can be very valuable during a
debugging session.

--

Kind regards,
Bruno van Dooren
br************* *********@hotma il.com
Remove only "_nos_pam"
Dec 26 '06 #2
Bruno van Dooren [MVP VC++] wrote:
Of course you have to ask yourself: 'is it necessary?'. If your code does
not contain trade secrets of special algorithms, it might not be worth it.

Being able to decompile assemblies can be useful for developers for finding
out what an assembly is exactly doing. This can be very valuable during a
debugging session.

Bruno,

I have an assembly that implements the Garmin Protocol. I am planning
on selling this assembly. The protocol can be very complicated. I
would not want someone to reverse engineer my code and just build their
own assembly. Don't you think it is worth obfuscating it?

--
Bruce E. Stemplewski
GarXface OCX and C++ Class Library for the Garmin GPS
www.stempsoft.com
Dec 26 '06 #3
I have an assembly that implements the Garmin Protocol. I am planning on
selling this assembly. The protocol can be very complicated. I would not
want someone to reverse engineer my code and just build their own
assembly. Don't you think it is worth obfuscating it?
Microsoft Research has a non-obfuscated .NET assembly that can be used to
download data from a Garmin device. I'm not sure if it supports uploading
to a Garmin device. It is available here:
http://www.wwmx.org/Download.aspx
After installing the TrackDownload application you will have an assembly
named Microsoft.GPS.G arminDevice.dll in your Program Files. Take a look at
it using Reflector. You might not need to write your own assembly.

Dec 27 '06 #4
>Of course you have to ask yourself: 'is it necessary?'. If your code does
>not contain trade secrets of special algorithms, it might not be worth
it.

Being able to decompile assemblies can be useful for developers for
finding out what an assembly is exactly doing. This can be very valuable
during a debugging session.
I have an assembly that implements the Garmin Protocol. I am planning on
selling this assembly. The protocol can be very complicated. I would not
want someone to reverse engineer my code and just build their own
assembly. Don't you think it is worth obfuscating it?
In this case, yes.
An implementation of a complex algorithm is certainly worth protecting.

But a lot of assemblies do not need it. For example, Using Lutz reflector,
you can view the CLR assemblies in decompiled C# code.
This is extremely useful if you get weird exceptions, or have security
problems etc.
Because it allows you -the developer- to see exactly what's going on.
So there is a case for not obfuscating too.

--

Kind regards,
Bruno van Dooren
br************* *********@hotma il.com
Remove only "_nos_pam"
Dec 27 '06 #5
Hi Bruno,

What about people who develop assemblies and would like to sell them ?
if everybody is able to look into their code, the patents costs have not
value and it becomes more an open source.

I'm very surprised that MS allow open source for developing and by the
way, it means to make the market to open source.

There is really no way to protect my assembly code from being
duplicated/copied ?

Al.

Bruno van Dooren [MVP VC++] wrote:
>Using the .NET reflector tool, i know that a DLL or EXE developed in .NET
platform can be decompiled and therefore code is available for all.

I would like to know if exist a way how to avoid tools like .NET reflector
to decompile your code or at least to avoid people to see clearly the code
of you DLL or EXE ?

Do a search for dotNET obfuscator or .NET obfuscator.
The community edition of this tool is included with Visual Studio I think.
The goal of this tool is to make your code as unreadable as possible, for
example by replacing all variable names with variations of a, A, aA, Aa and
doing the same for method names etc.

Of course you have to ask yourself: 'is it necessary?'. If your code does
not contain trade secrets of special algorithms, it might not be worth it.

Being able to decompile assemblies can be useful for developers for finding
out what an assembly is exactly doing. This can be very valuable during a
debugging session.
Dec 27 '06 #6

"--== Alain ==--" <no****@noemail .comwrote in message
news:ug******** *****@TK2MSFTNG P06.phx.gbl...
Hi Bruno,

What about people who develop assemblies and would like to sell them ?
if everybody is able to look into their code, the patents costs have not
value and it becomes more an open source.
Patents are based on disclosure, not secrecy.
>
I'm very surprised that MS allow open source for developing and by the
way, it means to make the market to open source.

There is really no way to protect my assembly code from being
duplicated/copied ?
Sure... keep it to yourself, load it inside hardware where the user can't
see it, etc. Running on a user's general purpose computer essentially
guarantees them access to the code in some language or other (even optimized
"native" code can still be easily understood with the right tools).
>
Al.

Bruno van Dooren [MVP VC++] wrote:
>>Using the .NET reflector tool, i know that a DLL or EXE developed in
.NET platform can be decompiled and therefore code is available for all.

I would like to know if exist a way how to avoid tools like .NET
reflector to decompile your code or at least to avoid people to see
clearly the code of you DLL or EXE ?

Do a search for dotNET obfuscator or .NET obfuscator.
The community edition of this tool is included with Visual Studio I
think.
The goal of this tool is to make your code as unreadable as possible, for
example by replacing all variable names with variations of a, A, aA, Aa
and doing the same for method names etc.

Of course you have to ask yourself: 'is it necessary?'. If your code does
not contain trade secrets of special algorithms, it might not be worth
it.

Being able to decompile assemblies can be useful for developers for
finding out what an assembly is exactly doing. This can be very valuable
during a debugging session.

Dec 27 '06 #7
What about people who develop assemblies and would like to sell them ?
if everybody is able to look into their code, the patents costs have not
value and it becomes more an open source.
No, because the customer is not allowed to to use your patents..
I'm very surprised that MS allow open source for developing and by the
way, it means to make the market to open source.
This has nothing to do with open source. First of all, open source is about
sharing and distribution of source code.
You distribute a binary. Sure, the end user can decompile it, but it does
not contain any comments. The code is also machine generated, so it might
not look exactly like the original.
And I doubt that you are allowed to distribute the decompiled sources, since
you do not have a license agreement, and it is a direct derivative of the
binary assembly.

For the majority of assemblies, a vendor gains nothing from obfuscating the
assemblies. Don't you think Microsoft would have obfuscated the CLR
assemblies otherwise?
There is really no way to protect my assembly code from being
duplicated/copied ?
Yes there is. Use a .NET obfuscator.
It is not perfect, but native code has the same problem.
It is perfectly possible (though a bit harder) to decompile machine code
from dlls or exes.

--

Kind regards,
Bruno van Dooren
br************* *********@hotma il.com
Remove only "_nos_pam"
Dec 27 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
384
by: YK | last post by:
All, What is the best way to protect IL code? --------------------------------------------------- Typical scenario: Visual Studio .NET 2003 includes Dotfuscator Community Edition, which intends to protect IL code. However, many .NET applications use data binding in UI forms. For example: Employee e = new Employee();
6
4451
by: Bill | last post by:
Hey, is it possible to protect ASP code in some way? Can it be compiled, or otherwise protect the source somehow? Thanks, -Bill.
3
3332
by: Narlen | last post by:
Hi there, I don't know much about web design but I proudly managed to password protect a page on my site. Later I realized that everyone looking at the source in any web browser can see the password. Is there a way to improve this code so that instead of the password people viewing the page source would only see bullets instead of the characters of the password (or hide it alltogether?) Thank you for your help.
1
4563
by: Giganews | last post by:
I have an Access 97 database in which I am running an Excel macro through automation. The macro in Excel is as follows: Worksheets("Sheet1").Protect Password:="****", DrawingObjects:=True, Contents:=True, Scenarios:=True When I call this macro from the database all works fine except when I recorded the macro I deselected the "Select locked cells" option under the "Allow all users of this worksheet to:" section but yet when I access the...
15
5089
by: Fady Anwar | last post by:
Hi while browsing the net i noticed that there is sites publishing some software that claim that it can decompile .net applications i didn't bleave it in fact but after trying it i was surprised that i could retrieve my code from my applications after i compile it so i need to know to prevent this from happening to my applications Thanx in advance
19
3021
by: Peter | last post by:
I wrote a dll and now I want to protect from mass distribution. What is the most COST software for doing this, or can it easily be done in vb.net.
3
4103
by: SpIcH | last post by:
Hi All, This is all about protecting my data in Executable file. I have developed a program in Visual Basic .NET 2002. I have many questions in mind... please help me to complete my project. 1. I have very much data to be incorporated into the executable file. I have to add much data into my developed program into 2 Combo Boxes and 1 List Box control. For that i have created an xml element with all of the
0
1302
by: lanem | last post by:
I am trying to create an excel spreadsheet from my asp.net 2.0(vb.net) code. I can create the file and even protect it, but I cannot protect it with a password. Here's my code: Dim xl As New Spreadsheet xl.ActiveSheet.Protect("testpassword") Thanks for your help.
22
5830
by: teejayem | last post by:
Hi, I am new to programming with databases and was wanting some help. Is there any way to password protect an access database and access sent sql commands to it via vb.net code? Any help would be much appreciated. Thanks in advanced.
4
569
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I protect my javascript code? ----------------------------------------------------------------------- With clientside Javascript you can't as your code is distributed in source form and is easily readable. With JScript, there is the Script Encoder (see MSDN), but this is nothing more than obfuscation. Disabling the right mouse button also does...
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10413
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10145
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9021
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7530
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4094
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3707
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.