?
Solved

Obfuscation in .NET

Posted on 2004-08-11
11
Medium Priority
?
515 Views
Last Modified: 2011-02-25
How effective is Obfuscation?  How much are better are professional obfuscators than free ones?  How long would it take a hacker to decompile and understand obfuscated code?

Oh, and something completely off topic (sorry)... if I have unlimited points to spare is it wrong to make all my questions worth 500 pts?
0
Comment
Question by:davidastle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 37

Assisted Solution

by:gregoryyoung
gregoryyoung earned 1600 total points
ID: 11775245
not really, its up to you ...

as for obfusication, it will make it more difficult for someone to lookat ..

example

public class foo() {
    public void bar() { ReadSerialPort(); }
}

would decompile as
public class 46asdf12331 {
    public void 12d() { 3912mds2(); }
}

now I am sure you can imagine how fun your stack traces will be when you get them :) ...

luckily this is one of the features thats covered in the payed versions ... http://preemptive.com/products/dotfuscator/Editions.html :)
0
 
LVL 2

Author Comment

by:davidastle
ID: 11777328
Yeah i read through everything on the dotfuscator website, as well as all of its competitors.  I have a reasonable idea of what it does (no idea of how i would write code to make an obfuscator).  But what i want to know is how effective it is; how much time would it take a hacker to understand?
For example, as is, the code sample you showed would be impossible to discern since the code for ReadSerialPort is not shown.  But i assume that you can look at the read the obfuscated serial port code... could a hacker familiar with serial port code recognize that the function call reads a serial port?  How hard would this be?
0
 
LVL 2

Author Comment

by:davidastle
ID: 11777337
Raising point value!
0
A new era in Cloud training has arrived.

A day that will go down in Cloud history.. But are you ready for it? Will you accept this Cloud challenge?

 
LVL 8

Assisted Solution

by:gregasm
gregasm earned 160 total points
ID: 11778552
The point is: everything is possible, but would one even want to invest the time to understand the obfuscated code?

If the government had a good reason to suspect that your obfuscated code was hiding the whearabouts of Osama Bin Laden, then I am sure it would be de-obfuscated in time and with enough talent. Otherwise, it is good as safe.
0
 
LVL 2

Author Comment

by:davidastle
ID: 11778814
Well lets say that someone made Doom 4 (skipping some versions of doom) in C# and obfuscated it with a free obfuscation program.  Now this doom version is so advanced that learning the source code is $$$.  So a new company wants to make Quake 4 (for some reason that have no affiliation with the doom company).  Would it be easier for them to reverse engineer the obfuscated code and change enough things to not get sued and then call it Quake 4 or would it be easier for them to write Quake from scratch?
Now, that same company that made Doom 4 decides to make Doom 5.  For some strange reason, the quake company wants to make Quake 5!  This time, the doom company obfuscates the code with a $1500 program (dotfuscator).  Now would it be worth it for the quake company to reverse engineer the doom company's code?
0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 1600 total points
ID: 11779185
it would nearly be the equivalent of disassembling x86 code ...
0
 
LVL 2

Author Comment

by:davidastle
ID: 11779832
So noone on earth knows how long it would take?
0
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 240 total points
ID: 11794166
There are times when obfuscation can cause problems, but, unless you are using Reflection or some other fancy technology, then I don't think that you have anything to worry about.

It's like car theft--you can protect your vehicle with as much gadgets as you can, but if somebody really wants in bad enough, they'll find a way.

Bob
0
 
LVL 37

Assisted Solution

by:gregoryyoung
gregoryyoung earned 1600 total points
ID: 11794384
one really needs to ask the question of how valuable is your information ? reverse engineering code is generally a difficult task, especially if you have a large application. Getting the source code to an app and understanding that source code are two very different things (especially when you consider that all your method names will be mangled so the person would actually have to look at the code to figure out what every method did. It is a possibility that this could be done, but then again it is possible that someone could just ngen your code to native code and use a classical disassembler to get into your code. There is always a level that a persistant person can pass. Look at SSL, with local access to the machine you could feasably find the private key in memory.
0
 
LVL 37

Assisted Solution

by:gregoryyoung
gregoryyoung earned 1600 total points
ID: 11794462
Also in your doom example there is another level of security there ... Generally speaking not all of your code is sent out in a release. In the example of doom, you would have your level editors etc that they would need to rewrite. They would also then have to do a full new set of data (which is actually the majority of the work).
0
 
LVL 2

Author Comment

by:davidastle
ID: 11794503
Well, this thread was fun.  
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question