Kevin said:
IMHO, obfuscation is a waste of time. First, even native machine code
can be decompiled. Yes, it's more difficult, but who are you trying
to protect yourself against? If it's the average user, obfuscation is
unnecessary. If it's the shade-tree developer, it is possible that a
shade-tree developer could use the tools to get at your code, but
what kind of a threat is a shade-tree developer to you? If it's a
professional, a good developer could, in time, decompile anything you
write in any manner. There are a lot of ways to get at the inner
workings of software without decompiling as well. But this is
something that takes a good investment of time, and unless your
software is very attractive and/or innovative, noboby's going to
bother with it.
I don't agree with the fact that it's a waste of time. Ok, you can't
protect your code against a person who has unlimited time. However,
that group is so incredibly small.
Back in the days when I was still a member of the demoscene, a Finnish
group called Komplex made a java XM music player for their java demos.
As that gave them a big advantage over competing groups in
competitions, the competing groups tried to re-use their XM player.
However it was obfuscated, with their own obfuscator. It was hardly
readable. For fun we tried for 2 days to get it cut out but failed
simply because it was too tiresome, even with countless renames and our
own tools to rework the obfuscation.
So I know from a fact that it's not a waste of time. Of course, this
was an experiment and when I asked Saviour, who wrote the routine, if
we could use it in our javademos, I got it in a heartbeat, but it did
proof obfuscation COULD work, however it has to be done properly.
I think your question: who are you protecting against, is actually
about: "WHat are you protecting?".
If it's all code in your application, it will also give a problem,
e.g. with customers reporting exceptions and weird stacktraces.
If it's protecting your application's copy protection method, it can
very well be worth the effort: as it keeps off the 'office hacker' as I
call them: the 'clever' guy of the team who volunteers to give the
protection a try during lunch.
Especially with trial versions it can be very well worth it: to
protect a trial version, you have to go an extra mile as it is time
limited, which is the weak spot, and trust me, NOTHING is more
frustrating than when you receive an email 2 days after you released
your hard work and it says "I managed to crack your app's protection in
1 minute, you might want to harden it a bit".
Perhaps you don't sell your own software, I don't know. But in case
you do, I fully recommend using obfuscation, at least in the trial
version.
Also to make obfuscation really work do:
- make all forms/classes in your .exe project internal
- make all methods of these classes at least internal
- if unsure, use ndepend to check which methods you can make
protected/private/internal. This will greatly enhance the obfuscation
output. You can then even achieve great results with the community
edition of dotfuscator.
Now, if you work for a large corporation, with a large team of
developers creating some highly-popular commerical software with
innovative technologies, it might be worth your while. On the other
hand, you can get a Patent for any new technologies you come up with.
1) Software patents suck. I can't believe someone who is writing
software for a living could ever advocate software patents.
2) Getting a patent is hard, costly and a gamble
3) Software patents are not legal in a lot of countries, like the EU,
india etc. Just because the US has a wacky patent system doesn't mean
the rest of the world has.
4) If I might add: patents in general don't really increase innovation.
That's not because of the core definition of a 'patent' but more of the
system who protects them: winner takes all is silly. For example there
are multiple companies who have a patent on O/R mapping (Firestar and
Microsoft to name a few)
And if someone copies your code, and they are big enough to notice,
it isn't hard to identify them and sue them for patent infrigement.
oh? A lawsuit is always uncertain: you might lose. And sueing a large
company with big pockets and expensive lawyers will bury you with
paperwork till doomsday. It will likely make you go belly up. Also,
this is curing symptoms, not the cause: you could perhaps solve this
after 10 years, but in those 10 years you have spend a lot of energy on
useless things: better spend that energy on writing good software.
Finally, the best way to compete is to stay ahead of the competition.
It takes months or even years to write software. By the time you
release it, you can move on to the next thing, and anyone copying you
is already behind. But if you waste too much time trying to make
your software hard to copy, that's time that could be spent moving
ahead. In other words, we have limited time resources. We should
invest our time in activities that will be the most profitable.
exactly. However if you could make it your competition even more
difficult by clicking a few buttons and spending 10 minutes of your
time in an obfuscator, what's lost? at most, 10 minutes.
FB, who uses an obfuscator to protect trial protection code.
--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website:
http://www.llblgen.com
My .NET blog:
http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------