yocontra / JMD

Java bytecode analysis/deobfuscation tool
MIT License
199 stars 50 forks source link

dasho transformation leads to negative array size exception... #12

Open jartester opened 8 years ago

jartester commented 8 years ago

UPDATE: Decryption solved (found old sources on the net and corrected dasho class in them) BUT JAR is not updated correctly - classes are buggy and still with encrypted strings

SOLVED: cannot rebuild (the rebuilt jar is completely silent) from source despite the fact you used gradle. The dasho transformer source here is MUCH different from the jar class in JMD 1.61-stable compiled version floating around the net and which output I quoted below. I noted that transforming function is different from the one you implemented (probably due to different dasho versions) so I wanted to change/correct it. Therefore I needed to rebuild the project/class properly, but ,alas, I am unable to do this so far.

yocontra commented 8 years ago

@jartester Not building? I haven't worked on this project in a while, but I merged a PR that switched everything over to gradle to modernize it a while back. That person might be able to help you out with it, otherwise let me know if you're still having trouble and maybe I can try to get this running again.

Just curious: do people still use this often? I don't get many tickets so I assumed no, not sure if the java reversing community still exists. I made this when I was 15 lol.

jartester commented 8 years ago

I managed to recompile with necessary changes concerning dasho encryption algo with javac this transformer: http://www.programcreek.com/java-api-examples/index.php?source_dir=JMD-master/src/net/contra/jmd/transformers/dasho/DashOTransformer.java I placed it back to jar from the following archive which has almost nothing in common related to dasho transformer with the latest sources: https://cloud.github.com/downloads/contra/JMD/JMD-1.61-STABLE.zip

I am new to java and it looks very complicated and I can't figure out why classes are not updated after string decryption properly in the deob jar. Anyway I gave up since my goal is a bit different, I had a look at the strings, I know how they are encrypted/decrypted, that's enough for now. If you need some files for testing your deobfuscator just let me know...

The reason for negative array size is a bug that incorrectly subtracts 1 from (initial value of the) array counter. int length = inputChars.length - 1;

kidoz commented 8 years ago

@jartester please, send me your decrypt file for debug

jartester commented 8 years ago

@kidoz OK, how can I do that? Any contacts, or?

kidoz commented 8 years ago

@jartester kidoz dot github at gmail dot com

jartester commented 8 years ago

As usually gmail sucks and didn't allow me to send you an attachment (even rar-red with pass). How do you use this ugly gmail I don't know...