ItzSomebody / radon

[Abandoned] Scuffed java bytecode obfuscator
GNU General Public License v3.0
361 stars 74 forks source link

🥝Add FakeTryCatch [Unmerged for using -noverify] #60

Closed ghost closed 5 years ago

ghost commented 5 years ago

http://prntscr.com/ms5ozb Krakatau Has bug with it.It can't deal with any class using FakeTryCatch.

http://prntscr.com/ms5nzt

FakeTryCatch spells wrong in Case(FakeTryCatch and FAKETRYCATCH) Maybe don't matter

ConfigurationSettings ExclusionType

ghost commented 5 years ago

http://prntscr.com/ms5riq

emm.So need to remove unused imports?

ItzSomebody commented 5 years ago

This would cause ClassNotFoundException to happen.

ItzSomebody commented 5 years ago

My sample says otherwise.

C:\Users\ItzSomebody\Desktop>java -jar Counter-OBF.jar
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: LneRL9WXtnDwuooRfOuyz97K8WUmNrqJP2XqPnfPowPvtAoBgPcDGNTimnjcSQTVwZrhVIH;
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.privateGetMethodRecursive(Unknown Source)
        at java.lang.Class.getMethod0(Unknown Source)
        at java.lang.Class.getMethod(Unknown Source)
        at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: neRL9WXtnDwuooRfOuyz97K8WUmNrqJP2XqPnfPowPvtAoBgPcDGNTimnjcSQTVwZrhVIH
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 7 more

C:\Users\ItzSomebody\Desktop>java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

C:\Users\ItzSomebody\Desktop>

Counter-OBF.zip

ghost commented 5 years ago

@ItzSomebody Fixed

ghost commented 5 years ago

Finished. It seems no problems. http://prntscr.com/msit86 http://prntscr.com/msiqk6

and it' surprise that Jbyte can't edit it. http://prntscr.com/msiwc5

ghost commented 5 years ago

if there are any problems,i will solve it next week.

ItzSomebody commented 5 years ago

Doesn't run on Java 11 or Java 8 without turning the verifier off.

ItzSomebody commented 5 years ago

@ItzSomebody error log pls. I fixed it already. and see line 27. 5d3c727 boolean Crasher = false; and genHandler()

It create a fake temp class to handler it.

FAKE_Handler

Never said it was the same error.

C:\Users\ItzSomebody\Desktop>java -jar Counter-OBF.jar
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.ClassFormatError: Field "////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////;//)//goto//break//META-INF//public//static//throw//throw//new////)};j1PlfWyZkHFA " in class me/itzsomebody/counter/Counter has illegal signature "L////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////;//)//goto//break//META-INF//public//static//throw//throw//new////)};j1PlfWyZkHFA ;"
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

C:\Users\ItzSomebody\Desktop>java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

C:\Users\ItzSomebody\Desktop>"C:\Program Files\Java\jdk-11.0.2\bin\java.exe" -jar Counter-OBF.jar
Error: LinkageError occurred while loading main class me.itzsomebody.counter.Counter
        java.lang.ClassFormatError: Illegal class name "////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////;//)//goto//break//META-INF//public//static//throw//throw//new////)};j1PlfWyZkHFA " in class file me/itzsomebody/counter/Counter

C:\Users\ItzSomebody\Desktop>"C:\Program Files\Java\jdk-11.0.2\bin\java.exe" -version
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)

C:\Users\ItzSomebody\Desktop>

Counter-OBF.zip

ItzSomebody commented 5 years ago

Might something changed since 1.8.0_200+.I will on Fri. day(I'm using 1.8.0_171)

Also happens on 1.8.0_171.

itzsomebody@kalipc:/home$ java -jar Counter-OBF.jar
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.ClassFormatError: Field "////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////;//)//goto//break//META-INF//public//static//throw//throw//new////)};PMOJvW9iMmTo " in class me/itzsomebody/counter/Counter has illegal signature "L////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////;//)//goto//break//META-INF//public//static//throw//throw//new////)};PMOJvW9iMmTo ;"
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
itzsomebody@kalipc:/home$ java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-2-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)
itzsomebody@kalipc:/home$
ItzSomebody commented 5 years ago

Cntr.zip

ghost commented 5 years ago

@ItzSomebody Finished.Caused by '\u0000' char which means end of a ANSI String Like: Te'\u0000'st Print > Te http://prntscr.com/mv1fjt

ItzSomebody commented 5 years ago

While this works on Java 8, this still causes issues with Java 11.

C:\Users\ItzSomebody\Desktop>"C:\Program Files\Java\jdk-11.0.2\bin\java.exe" -jar Counter-OBF.jar
Error: LinkageError occurred while loading main class me.itzsomebody.counter.Counter
        java.lang.ClassFormatError: Illegal class name "////////////////////////////////////////////////////////////31" in class file me/itzsomebody/counter/Counter
ghost commented 5 years ago

@ItzSomebody Java11 checks the class name

could bypass by -noverify but anyway,the best way to fix it is to edit the handler's class name but this will turn this feature very weak.

So I prefer this feature for Java8 only. (Just add a tip for Users.They will judge it.)

ItzSomebody commented 5 years ago

could bypass by -noverify

If I was going to plan to let this repository to get away with "turn the verifier off", I would have done it already.

Edit: This PR was unmerged.

ghost commented 5 years ago

@ItzSomebody emm.Just set it Java8 only. and add a tip.