java-deobfuscator / deobfuscator

The real deal
https://javadeobfuscator.com
Apache License 2.0
1.56k stars 290 forks source link

Having trouble with BOZAR obfuscator #748

Open LazyCoder73 opened 3 years ago

LazyCoder73 commented 3 years ago

Hi, I'm trying to deobfuscate a file I am 99% sure has been obfuscated using this:

https://github.com/vimasig/Bozar

and am having some issues (not sure if my user error or lack of support for this obfuscator).

A standard decompilation attempt results in obfuscated variable names such as:

    public static String[] llIlIll;
    public static Class[] llIllII;
    public static String[] lIIllIlI;
    public static String[] lIIllIll;
    public static int[] lIIlllII;
    public static long \u13e9;

and method names such as:

public void \u0152\u00eb\u00e7¶\u203a\u00c7¶\u201e\u00e8¹\u00fe\u0161¡°\u00e6\u00edª\u00c7\u00cd\u00e6(final ConfigButtonClicked lllIIIllIllIlIl) {

The obfuscation detect step indicated to try this transformer: com.javadeobfuscator.deobfuscator.transformers.normalizer.SourceFileClassNormalizer

Attempted that which seemed to have some success:

[main] INFO com.javadeobfuscator.deobfuscator.Deobfuscator - Loading input
[main] INFO com.javadeobfuscator.deobfuscator.Deobfuscator - Computing callers
[main] INFO com.javadeobfuscator.deobfuscator.Deobfuscator - Transforming
[main] INFO com.javadeobfuscator.deobfuscator.Deobfuscator - Running com.javadeobfuscator.deobfuscator.transformers.normalizer.SourceFileClassNormalizer
[SourceFileClassNormalizer] Recovered 30 source filenames

Followed by this error

java.lang.StackOverflowError
        at com.javadeobfuscator.deobfuscator.transformers.normalizer.CustomRemapper.mapPackage(CustomRemapper.java:157)
        at com.javadeobfuscator.deobfuscator.transformers.normalizer.CustomRemapper.mapPackage(CustomRemapper.java:157)
        at com.javadeobfuscator.deobfuscator.transformers.normalizer.CustomRemapper.mapPackage(CustomRemapper.java:157)
        at com.javadeobfuscator.deobfuscator.transformers.normalizer.CustomRemapper.mapPackage(CustomRemapper.java:157)
        at com.javadeobfuscator.deobfuscator.transformers.normalizer.CustomRemapper.mapPackage(CustomRemapper.java:157)
        at com.javadeobfuscator.deobfuscator.transformers.normalizer.CustomRemapper.mapPackage(CustomRemapper.java:157)
        at com.javadeobfuscator.deobfuscator.transformers.normalizer.CustomRemapper.mapPackage(CustomRemapper.java:157)
        at com.javadeobfuscator.deobfuscator.transformers.normalizer.CustomRemapper.mapPackage(CustomRemapper.java:157)
        at com.javadeobfuscator.deobfuscator.transformers.normalizer.CustomRemapper.mapPackage(CustomRemapper.java:157)

Google drive link to the file I am trying to deobfuscate - https://drive.google.com/file/d/1DEDdfFkwq6awz80iTj4goRKAU7eyHjiO/view?usp=sharing

Any assistance would be greatly appreciated! Thank you

gsquaredxc commented 3 years ago

https://github.com/vimasig/Bozar/blob/master/src/main/java/com/vimasig/bozar/obfuscator/transformer/impl/CrasherTransformer.java may be helpful.

ItzSomebody commented 3 years ago

Interesting, this crashes Recaf as well (@Col-E, plz fix :pray:). I'll trust in the meantime that this is compliant with #653 and check back on this as soon as possible.

Janmm14 commented 3 years ago

SourceFileClassNormalizer will not be any help for this. Do NOT use it. I created #750 to suggest SourceFileClassNormalizer less often wrongly.

For the other crash stuff its enough to open the jar with 7zip and delete the BOZAR folder as well as NAUGHTY NAUGHTY.class

xxDark commented 3 years ago

Interesting, this crashes Recaf as well (@Col-E, plz fix 🙏). I'll trust in the meantime that this is compliant with #653 and check back on this as soon as possible.

recaf Recaf is crashing due to an issue with JavaFX, remove crash entry and everything will open as expected P.S: it crashes because there are 1024 folders in one tree, causing javafx event chain to rebuild, causing StackOverflowError @Col-E

Col-E commented 3 years ago

Fixed the crash in Recaf 2.19.6, I added directory truncating.

Janmm14 commented 2 years ago

I took a deper look at the provided sample and it maybe is not bozar only.

There is some obfuscation at work which creates a new class per virtual method call if its target is within the classes to be obfuscated. Well maybe that was also done manually.