Hack Forums
Obfuscating/"Crypting" Java Files Guide (Free) With Pictures - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Blackhat • Red Team • Offensive Security (https://hackforums.net/forumdisplay.php?fid=447)
+---- Forum: Cryptography, Encryption, and Decryption (https://hackforums.net/forumdisplay.php?fid=126)
+---- Thread: Obfuscating/"Crypting" Java Files Guide (Free) With Pictures (/showthread.php?tid=4241881)

Pages: Pages 1 2 3 4


Obfuscating/"Crypting" Java Files Guide (Free) With Pictures - Benjamin Franklin - May 21, 2014

Hello Hack Forums!
Today, I am posting this guide on how to obfuscate .jar files!
This can be used on just about any .jar file!

So, first off, you'll need to download and install a few things.
Proguard: http://sourceforge.net/projects/proguard/files/ (latest)
Java: https://www.java.com/en/download/
Java JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Now, for the actual guide.

1: Extract proguard(version number).zip, and open the folder.

2: Inside of the proguard folder, find proguardgui.bat (inside of bin folder). Open proguardgui.bat

3: Input/output tap, Click "add input" and add your stub/file.

4: In the output, put the output into a different folder. This is where you the newly obfuscated file will go when proguard has obfuscated it.

5: In library, add the following:
(assuming you're running a 64 bit OS, using the default installation locations)
C:\Program Files\Java\jre\lib\rt.jar
C:\Program Files (x86)\Java\jre7\lib\jce.jar
C:\Program Files\Java\jdk1.70_25\jre\lib\jce.jar

6: Go to the Shrinking tab.
Now, make sure only Applications, Enumerations, Database Drivers, and Swing UI L&F are checked. Nothing else.
Picture
Spoiler (Click to View)

7: Now, make sure Obfuscate, Obfuscation dictionary, Class obfuscation dictionary, Package obfuscation dictionary, Overload Aggressively, Use unique class member names, Use mixed-case class names, and at the bottom, Native method names are checked.
Picture
Spoiler (Click to View)

NOTE: With the dictionary's, you MUST use your own word dictionary. This makes your stub more unique, so your files can't be detected/deobfuscated easily.

8: Now, go to the Optimization tab.
Check the following: Optimize, Merge interfaces aggressively, and finally everything in the remove section.
Picture
Spoiler (Click to View)

9: Now, to the information tab.
Make sure in the entire section, Note potential mistakes in the configuration, Warn about possibly erroneous input, and Skip non-public library class members are checked.
Picture
Spoiler (Click to View)

10: Go to the process tab tab, and process the file. You are now done.

Now test, and scan your stub/file with a non-distributing scanning site. I recommend using RazorScanner!

Make sure to save your configuration, so you don't need to do this all over again.

If you have any questions or need any help, feel free to PM me or post on this thread! 🤝


* - Coton Pker - May 21, 2014

the only problem I had with proguard, is that if it runs into an error it will just quit and won't tell you what the problem is.
but if there isn't a problem, it works really well.

I used to hide a really simple dropper block in my main class of an RSPS and a proguard runover made it FUD.


* - Benjamin Franklin - May 21, 2014

(May 21, 2014 06:43 PM)Coton Pker Wrote:  the only problem I had with proguard, is that if it runs into an error it will just quit and won't tell you what the problem is.
but if there isn't a problem, it works really well.

I used to hide a really simple dropper block in my main class of an RSPS and a proguard runover made it FUD.

Yeah, that is pretty annoying. But, like you said, when it works it is great!
Thanks for the input.


* - Bitcoin Man - May 24, 2014

Hey man, thanks for this, your zee best :D


* - Spoof3r - May 24, 2014

Hello ! Nice Method ! Thanks Man : )


* - davydekwakel - May 25, 2014

Thank you for the guide! your the best


* - Ortek - Jun 14, 2014

Thanks for the share OP, comes in handy for me. Have a nice day !


* - QU⚡CKSILVER - Jul 11, 2014

Does this work for a Java Drive-By Project?


* - Benjamin Franklin - Jul 11, 2014

(Jul 11, 2014 08:44 PM)DJPunisher Wrote:  Does this work for a Java Drive-By Project?

I have not tried it, but it might. Go ahead and try it out, and let me know if it works!


* - kent0o - Sep 24, 2014

That's a very nice tutorial you shared here bro, but unfortunately I could not get it in working order. It either says "error or result too large"


* - Benjamin Franklin - Sep 25, 2014

(Sep 24, 2014 07:57 AM)kent0o Wrote:  That's a very nice tutorial you shared here bro, but unfortunately I could not get it in working order. It either says "error or result too large"

PM me and I can try to help you out.


* - hacker_PC - Sep 28, 2014

I did not understand the guide, I went here: http://www.oracle.com/technetwork/java/j...80260.html and I downloaded the file jdk-7u67-windows-x64.exe because I have windows 7 ultimate 64 bit operating system, however, missing files in the folder "Proguard" is missing and I can not find the file "proguardgui.bat" can anyone help me?


* - Benjamin Franklin - Sep 28, 2014

(Sep 28, 2014 02:12 AM)hacker_PC Wrote:  I did not understand the guide, I went here: http://www.oracle.com/technetwork/java/j...80260.html and I downloaded the file jdk-7u67-windows-x64.exe because I have windows 7 ultimate 64 bit operating system, however, missing files in the folder "Proguard" is missing and I can not find the file "proguardgui.bat" can anyone help me?

Have you downloaded proguard itself?


* - hacker_PC - Sep 29, 2014

I managed to download the file proguard but there is something wrong because it gives me this error?

see the image with the error here: http://www.imagestime.com/show.php/976905_Error.PNG.html


* - Benjamin Franklin - Sep 29, 2014

(Sep 29, 2014 01:11 AM)hacker_PC Wrote:  I managed to download the file proguard but there is something wrong because it gives me this error?

see the image with the error here: http://www.imagestime.com/show.php/976905_Error.PNG.html

What happens when you click "OK"? Does it close or does it still run?