[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Preventing Jar file from decompilation

Posted on 2005-04-06
21
Medium Priority
?
481 Views
Last Modified: 2012-06-27
Hi ,

Could you suggest a way to prevent the decompilation os jar file,

regards,
alpjose
0
Comment
Question by:alpjose
  • 5
  • 4
  • 4
  • +2
18 Comments
 
LVL 92

Accepted Solution

by:
objects earned 300 total points
ID: 13714971
you can obfuscate your code to make it harder but you cannot prevent it
0
 
LVL 37

Assisted Solution

by:zzynx
zzynx earned 300 total points
ID: 13714972
0
 
LVL 35

Assisted Solution

by:TimYates
TimYates earned 300 total points
ID: 13714979
Here's a recent article on obfuscation:

http://today.java.net/pub/a/today/2004/10/22/obfuscation.html
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 92

Expert Comment

by:objects
ID: 13714981
0
 
LVL 37

Expert Comment

by:zzynx
ID: 13714992
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13714996
lol
0
 
LVL 92

Expert Comment

by:objects
ID: 13715001
too slow :D
0
 
LVL 37

Expert Comment

by:zzynx
ID: 13715009
:°D
0
 

Author Comment

by:alpjose
ID: 13715054
Thanks for the response, i will go through these sites and check out . But i downloaded a tool called Excelsior JET which converts jar into and .exe so that i becomes decompilation as difficult as c/c++.
Any inputs on this tool will be welcomed.
0
 
LVL 37

Expert Comment

by:zzynx
ID: 13715092
Since it is nominated for the 2005 Java Developer's Journal Readers' Choice Awards, it can't be that bad.
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13715185
>> so that i becomes decompilation as difficult as c/c++.

And only runs on Windows :-(

;-)
0
 
LVL 9

Expert Comment

by:doronb
ID: 13716266
>> so that i becomes decompilation as difficult as c/c++.

Oh, right, and of course there are no crackers who can crack the C/C++ wrapper and get to the JAR inside, right? ;)
Why not build your OWN obfuscator? that way, at least it'd be something new on the market that the crackers don't yet know how to break >;)
0
 

Author Comment

by:alpjose
ID: 13723853
Is there any way of adding hash to the jar and so provide password for it. I have heard of this.
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13724774
>>  Is there any way of adding hash to the jar and so provide password for it. I have heard of this.

Not that I know of...
0
 
LVL 9

Expert Comment

by:doronb
ID: 14323558
>> Is there any way of adding hash to the jar and so provide password for it. I have heard of this.

I don't know where you've heard of this, or what you've heard, but the ZIP support in Java does not include the ability to work with password-protected JAR/ZIP files.
0
 
LVL 9

Assisted Solution

by:doronb
doronb earned 300 total points
ID: 14323619
Java actually has a design-flaw of sorts enabling a hacker to "steal" your decrypted class-bytes right before they're converted into classes by the JVM.  You can read about this at this link:

[ http://www.javaworld.com/javaworld/javaqa/2003-05/01-qa-0509-jcrypt.html ]

I still went through the whole process of developing my own obfuscation/protection for JAR files, the results of which can be checked by downloading this file:

[ http://www.codeproject.com/useritems/KeyGuard/KeyGuard.zip ]

The file is a self-executable JAR file and it contains some bootstraping code that decryptes and assembles the actual classes and executes the main-class.  An added bonus is that my protection method actually decreases the size of the JAR by about 9% even after ZIP compression!
0
 
LVL 35

Expert Comment

by:TimYates
ID: 14586466
Split between all 4 of us I reckon...  We covered all the bases with this question (afaics)

Tim
0
 
LVL 9

Expert Comment

by:doronb
ID: 14612396
Indeed we did, Tim.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month18 days, 4 hours left to enroll

830 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