473,508 Members | 2,091 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.NET assembly

Hi.
I know that in JAVA it's possible to decompile a .class file to get the
original code. There are applications called obfuscator (or sth similar)
that tries to avoid it.
My question is: Is it the same for .NET? How can I avoid getting the source
code from an exe I compile?

TA
Jul 21 '05 #1
7 1505
George <ge*********@NOSPANgmx.net> wrote:
I know that in JAVA it's possible to decompile a .class file to get the
original code. There are applications called obfuscator (or sth similar)
that tries to avoid it.
My question is: Is it the same for .NET? How can I avoid getting the source
code from an exe I compile?


Yes, it's exactly the same situation.

See http://www.pobox.com/~skeet/csharp/faq/#obfuscation

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2
Hi George,

Yup, the same.
See the link for available obfuscators:
--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"George" <ge*********@NOSPANgmx.net> wrote in message
news:Xn************************@130.206.5.54...
Hi.
I know that in JAVA it's possible to decompile a .class file to get the
original code. There are applications called obfuscator (or sth similar)
that tries to avoid it.
My question is: Is it the same for .NET? How can I avoid getting the source code from an exe I compile?

TA

Jul 21 '05 #3
Link
http://msdn.microsoft.com/vcsharp/te...s/default.aspx

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"George" <ge*********@NOSPANgmx.net> wrote in message
news:Xn************************@130.206.5.54...
Hi.
I know that in JAVA it's possible to decompile a .class file to get the
original code. There are applications called obfuscator (or sth similar)
that tries to avoid it.
My question is: Is it the same for .NET? How can I avoid getting the source code from an exe I compile?

TA

Jul 21 '05 #4
Thanxs for the answers.

But still have one thing to say. I've taking a look to the pages you have
referred, and as you said it's like in Java.

Then if using an obfuscator and a decompiler from the same company,
couldn't it result in having the original code? As the modifications made
on the obfuscation step is known by the decompiler, then it's possible to
get the source back?

I know that that's it's not going to be the general case, but I'm just
thinking aloud ;)
Jul 21 '05 #5
Cor
Hi George,

It will always be possible to decompile, the only question can be how
difficult is it to do that.

As I always write on this answer, in short past there was somebody active in
this newsgroups who said, I do not need an obfuscator, after some weeks I
cannot read my own programs.

Just a thought

Cor
Jul 21 '05 #6
George <ge*********@NOSPANgmx.net> wrote:
Then if using an obfuscator and a decompiler from the same company,
couldn't it result in having the original code? As the modifications made
on the obfuscation step is known by the decompiler, then it's possible to
get the source back?


No, almost certainly not. Obfuscators almost always lose information
(deliberately). They would, for instance, convert several methods with
different names into one hugely overloaded method with a name such as
"A". You might be able to generate a map at obfuscation time so you
know what meant what (a good obfuscator will do this, certainly) but
that information will no longer be present in the assembly.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #7
Hi,

No decompiler could produce original program text. even without protecting
program with obfuscators, all comments, program formatting and local
variable names will be missing from decompiled program.

And obfuscation could be done on many different levels.

Note: I have never worked with any of the obfuscators and so, my knowledge
of obfuscation technologies is pure theoretical - mostly my own musings
about what could be done by obfuscators, so be warned before you read the
rest of this mail :-).

Few years ago I had some thinking about obfuscators as technology got some
ideas. I sent an e-mail to the developmentor's .Net mailing list with idea
for obfuscator. Main idea was an attempt to build analogy between program
execution tree and (parser) grammar tree and I suggested that it should be
possible to use technique similar to one invented with LARL parsers that
flattens the tree into LARL-tables driven function that is analogous with
the original program. I got an answer from Microsoft program manager who was
working with their obfuscator's prototype at the time where he said that it
is a known technique in obfuscator's research. However if you think of that
kind of obfuscation in addition to the standard metadata mangling that is
used in all existing obfuscators, than any attempt to decompile program
would result in code that will be extremely difficult to analyze and
completely different from original (program structure). I believe that
following addition could be done to that obfuscator type that can really
make them being "cryptographically" strong:

if (in simple words) obfuscator would add many more alternative execution
paths to these LARL-tables so that program can randomly choose one of them
depending on some runtime criteria, then debugging of such program will be
made extremely complicated because the same breakpoints could be never hit
on the next program run even with the same program's input data. But that's
just my fantasy...

-Valery

See my blog at:

http://www.harper.no/valery

"George" <ge*********@NOSPANgmx.net> wrote in message
news:Xn************************@130.206.5.54...
Thanxs for the answers.

But still have one thing to say. I've taking a look to the pages you have
referred, and as you said it's like in Java.

Then if using an obfuscator and a decompiler from the same company,
couldn't it result in having the original code? As the modifications made
on the obfuscation step is known by the decompiler, then it's possible to
get the source back?

I know that that's it's not going to be the general case, but I'm just
thinking aloud ;)

Jul 21 '05 #8

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

Similar topics

2
8760
by: Terence Shek | last post by:
Is there a way to set the application binding policy so that it always binds to the latest version of an assembly? I'm hoping there is a way to avoid updating the application's binding...
26
10508
by: nospam | last post by:
Just wondering, What do you think the difference in performance would be between (1.) Compiled C# (2.) Compiled C++ (3.) and Assembly Language And how would the mix be if some if any of...
2
6385
by: Carlos G Benevides | last post by:
I have a ASP.Net web application that has two assemblies that run under com+. Under Windows 2000 the two assemblies are added to com+ automatically when instantiated from the web site. For this...
10
3416
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read...
7
10936
by: R Reyes | last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? I'm trying to manipulate MS Word from my Web Form application and I can't get passed...
3
4384
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
1
2349
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
2
11758
by: Paul | last post by:
Hi, I have experience in Java and C++ but I am rather new to C# and just started learning it. I am using Visual C# 2005 Express Edition and I found that there is a file called "AssemblyInfo.cs",...
1
2238
by: Coaster | last post by:
orig ref here http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/ff29cc370678911d/c0db5b7e3da283b9?lnk=st&q=gac+assembly+new+version&rnum=7#c0db5b7e3da283b9...
14
2642
by: Monty | last post by:
Hello, I have created a solution which has both a web UI and a winform UI, the latter is just for administrators. The Web UI (a Web Application Project) and the winform project both...
0
7225
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,...
0
7124
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7326
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,...
0
7385
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7046
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...
0
5629
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,...
1
5053
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...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.