Introducing BCE

BCE is a java jar/war/class encrypt tools,it can leave your code avoid decompile; support format:jar,springbootjar,war; support spring and tomcat classfile scan before classes are loaded; support embedded jar encryption and prevent any program dump decrypted class.

jar war springbootjar tomcat

Test environment

test with tomcat7/8/9 jdk1.8_64bit springcore5.1.x; support OS:mac os_x84_64(dylib) linux_x86_64(so)

jdk1.8_64bit tomcat7/8/9 mac os_x84_64(dylib) linux_x86_64(so) springcore5.1.x

Build environment

build environment: jdk1.8_64bit, Apple clang version 12.0.5 (clang-1205.0.22.9) Target: x86_64-apple-darwin20.5.0, gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) Target: x86_64-redhat-linux

jdk1.8_64bit Apple clang version 12.0.5 (clang-1205.0.22.9) Target: x86_64-apple-darwin20.5.0 gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) Target: x86_64-redhat-linux

Your Encryption

File:jar/war file
Profile:download bce.properties and make yours then upload.(do not change file name).

have trouble? try to clean local cache or mail me

Task No File Status Message Start time Finish time Encrypted file

Task queue

Task No File Size(byte) Status Start time Finish time

How to use

Common

1. Download libbce: macOSlinux

2. Download libbkey: macOSlinux

3. Download sek: macOSlinux

4. Download tomcat_shutdown.sh: tomcat_shutdown.sh

5. Download and unzip your encrypted file then get bce.properties and encrypted jar|war.

Tomcat

1. Copy libbce.(so|dylib),libbkey.(so|dylib),bce.properties,encryptjar.jar,sek|sek_macos,tomcat_shutdown.sh to $TOMCAT_HOME/lib/ and chmod +x $TOMCAT_HOME/lib/sek|sek_macos $TOMCAT_HOME/lib/tomcat_shutdown.sh

2. Modify $TOMCAT_HOME/bin/catalina.sh add JAVA_OPTS="-Djava.library.path=$TOMCAT_HOME/lib/libbce.(so|dylib) -agentpath:$TOMCAT_HOME/lib/libbkey.(so|dylib)=$TOMCAT_HOME/lib/"

3. Run tomcat with root

4. Stop tomcat:sh $TOMCAT_HOME/bin/shutdown.sh maybe work not properly, use /$TOMCAT_HOME/lib/tomcat_shutdown.sh instead of it.

Run jar

1. Copy libbce.(so|dylib),libbkey.(so|dylib),sek|sek_macos,bce.properties to the same folder with encrypted jar($JAR_LOCATION)

2. sudo java -agentpath:$JAR_LOCATION/libbkey.(so|dylib)=$JAR_LOCATION -cp $JAR_LOCATION/xxx.jar com.xxx.xxx.Mainclass or sudo java -agentpath:$JAR_LOCATION/libbkey.(so|dylib)=$JAR_LOCATION -jar $JAR_LOCATION/xxx.jar

Run springboot jar

1. Copy libbce.(so|dylib),libbkey.(so|dylib),sek|sek_macos,bce.properties to the same folder with encrypted springboot jar($SPRINGBOOT_JAR_LOCATION)

2. sudo java -Djava.library.path=$SPRINGBOOT_JAR_LOCATION/libbce.(so|dylib) -agentpath:$SPRINGBOOT_JAR_LOCATION/libbkey.(so|dylib)=$SPRINGBOOT_JAR_LOCATION -jar $SPRINGBOOT_JAR_LOCATION/xxx.jar --spring.profiles.active=xxx

Input decrypt key

1. see output log in console follow the indicator to input decrypt key

2. run ./sek in command line and input decrypt key(you configed in bce.properties which uploaded)

3. may be you need input key more than one times

One more thing

Only one jvm can be run at the same time.