473,396 Members | 2,121 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,396 software developers and data experts.

Obfuscation

HI All,

I am now seeking tools on javascript obfuscation. I have searched for
several like stunnix, . But the interface is not really neat and sounds
complicated. Is there any open source project doing this ? I need to encrypt
several js and jsp files using javascript. If not an open source, which
other obfuscator you will recommend ?

Thanks.

Perseus
Jul 23 '05 #1
5 2158
> I am now seeking tools on javascript obfuscation. I have searched for
several like stunnix, . But the interface is not really neat and sounds
complicated. Is there any open source project doing this ? I need to encrypt
several js and jsp files using javascript. If not an open source, which
other obfuscator you will recommend ?


I recommend that you not waste your time with obfuscation.
Here is a free minimizer: http://www.crockford.com/javascript/jsmin.html
Jul 23 '05 #2
"centaur" <pe************@hotmail.com> writes:
I am now seeking tools on javascript obfuscation. .... I need to encrypt several js and jsp files using javascript.
(If I'm not mistaken, jsp stands for Java Server Pages, and is a
server side thing. No reason to obfuscate them at all.)

*Why* do you think you need to obfuscate (which is *not* encryption)
Javascript?

You are talking about security - secrecy in particular. Before taking
any security measure, one should construct a threat model:
What are you trying to prevent?
Who are you trying to prevent from it?
What are their capabilities?
What will it cost you if the security fails?

When you have determined yor security needs, you can evaluate a given
security measure (e.g., obfuscating Javascript) to see how it helps
you counter the threats, *and* whether it is worth it.
If not an open source, which other obfuscator you will recommend ?


None. The way web pages work is such that anything worth protecting
should not be published. If anybody can have any significant gain from
getting access to your code, then they *can* get access cheap enough
to make it worth it. Adding obfuscation won't cost them enough to stop
them, unless the gain is so insignificant that you shouldn't care
either.
In security, it is widely accepted that security through obscurity is
false security. In other settings, obscurity can *add* an extra layer
of defense on an otherwise secured attack path, and a delay there
might help you respond before the protection is breached in depth.

For a web page that is downloaded and manipulated off-line, extra
delay means fairly little. Also, since the browser must be able to
read the scripts without interaction, there is no way to implement
security in depth, so the obfuscation becomes the only security
measure. It is simply not the right tool for that. Sadly, that means
that there isn't any.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #3
Thanks for your reply.

Actually, I am using some javascript "technique" and my product is selling
to some technology company. They could easily figure out how I do this and
we would lose our competitiveness. I know they could still figure out what
we use if they study closely because they are able to download it. But I
just want to make it difficult. I saw script in gmail is turned into code
like function skdh() {...}, so it's not readable and it make reverse
engineer difficult. I just want to seek tools like this.

Thanks.

Perseus
"Lasse Reichstein Nielsen" <lr*@hotpop.com> wrote in message
news:ek**********@hotpop.com...
"centaur" <pe************@hotmail.com> writes:
I am now seeking tools on javascript obfuscation.

...
I need to encrypt several js and jsp files using javascript.


(If I'm not mistaken, jsp stands for Java Server Pages, and is a
server side thing. No reason to obfuscate them at all.)

*Why* do you think you need to obfuscate (which is *not* encryption)
Javascript?

You are talking about security - secrecy in particular. Before taking
any security measure, one should construct a threat model:
What are you trying to prevent?
Who are you trying to prevent from it?
What are their capabilities?
What will it cost you if the security fails?

When you have determined yor security needs, you can evaluate a given
security measure (e.g., obfuscating Javascript) to see how it helps
you counter the threats, *and* whether it is worth it.
If not an open source, which other obfuscator you will recommend ?


None. The way web pages work is such that anything worth protecting
should not be published. If anybody can have any significant gain from
getting access to your code, then they *can* get access cheap enough
to make it worth it. Adding obfuscation won't cost them enough to stop
them, unless the gain is so insignificant that you shouldn't care
either.
In security, it is widely accepted that security through obscurity is
false security. In other settings, obscurity can *add* an extra layer
of defense on an otherwise secured attack path, and a delay there
might help you respond before the protection is breached in depth.

For a web page that is downloaded and manipulated off-line, extra
delay means fairly little. Also, since the browser must be able to
read the scripts without interaction, there is no way to implement
security in depth, so the obfuscation becomes the only security
measure. It is simply not the right tool for that. Sadly, that means
that there isn't any.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors:
<URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'

Jul 23 '05 #4
Lee
centaur said:

Thanks for your reply.

Actually, I am using some javascript "technique" and my product is selling
to some technology company. They could easily figure out how I do this and
we would lose our competitiveness.


If they're a technology company, they probably already know
how to do it, but management decided to buy vs make to avoid
the support burden.

If you're really such a good developer that you've invented
an algorithm that's worth hiding, you should be able to write
your own obfuscator in less time than you've spent asking for
one. Beware though, that some people who wouldn't otherwise
be interested in your code may take obfuscated code as a
personal challenge.

If you're serious about hiding your code, run it on the server.

Jul 23 '05 #5
centaur wrote:
[...]
Actually, I am using some javascript "technique" and my product is selling
to some technology company. They could easily figure out how I do this and
we would lose our competitiveness. I know they could still figure out what
we use if they study closely because they are able to download it. But I
just want to make it difficult. I saw script in gmail is turned into code
like function skdh() {...}, so it's not readable and it make reverse
engineer difficult. I just want to seek tools like this.


While this will make it more difficult, it will only make it a little bit
more difficult, and the benefit will be so small that it's probably not
worth the effort --- the amount you'd spend trying to obfuscate your code
will be vastly more than the amount you'd gain. I'd recommend you don't
even try.

What is worth doing is minimising your code; run it through a cruncher that
will make it as small as possible. This will make it much faster to
download (and will also make it fairly difficult to read).

--
+- David Given --McQ-+ "Turning, pages turning in the widening bath,
| dg@cowlark.com | The spine cannot bear the humidity.
| (dg@tao-group.com) | Books fall apart; the binding cannot hold.
+- www.cowlark.com --+ Page 129 is loosed upon the world." --- Zarf

Jul 23 '05 #6

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

Similar topics

159
by: petantik | last post by:
Are there any commercial, or otherwise obfuscators for python source code or byte code and what are their relative advantages or disadvantages. I wonder because there are some byte code protection...
13
by: vincent | last post by:
I made the suggestion "Need built in obfuscation support in C# compiler" to Microsoft. Anyone here agree with me? If yes, please cast your vote on this suggestion to raise its priority.
3
by: ..:: Kevin ::.. | last post by:
Is it possible to perform obfuscation on code automatically as part of a build in Visual Studio 2003? For example, instead of building code in release mode, is it possible to create a custom...
10
by: John T. | last post by:
Hi all Figure this scenario: - My Company develops an assembly (a controls DLL) - Since an obfuscation software is too expensive, my Company engages a consultant and delegates him the...
32
by: GK | last post by:
Hello, Can anybody suggest a best code obfuscation tool based on their exeperience ? (e.g.: testing effort after obfuscation is 0) thanks, GK
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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
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...
0
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...

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.