473,387 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

.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 1503
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
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
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
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
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
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
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
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
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
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
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
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.