skylot / jadx

Dex to Java decompiler
Apache License 2.0
40.14k stars 4.76k forks source link

Deobfuscation search engine #66

Open Sputuks3 opened 9 years ago

Sputuks3 commented 9 years ago

Congrats in implementing the deob feature, but I have an idea that I like to propose to JADX first. Some sort of java search engine. or signature recognition to identify obfuscated opensource libraries online on either Github or Google code. For example, a quick search revealed the Google gson library was used. If we could automate this thing, wouldn't it be better?

deobfssearch

skylot commented 9 years ago

This is very interesting feature and I saw something similar in JEB decompiler (Sign and Match Third-Party Library Code) and maybe I will implement it in future, but for now there are a lot of questions how to implement it.

Sputuks3 commented 9 years ago

Perhaps in the de-obfuscation toggle button, rename all detected signatures with a comment

/renamed from com.myapp.a.a/

xseregax commented 8 years ago

Sometimes there are names such as IlIIIIIlllIIIIlIllIIIIlllII, IlIIIIIlllIIIIlIllIIllllIII (all printable), can you add regex field in the settings that i could manually add my own patterns of bad names, or dump all the names in the file jobf for possible external processing aliases or some other option if someone is needed. until i editing source code on each case.

nitram84 commented 1 year ago

One of the open questions of this issue is, how can we find the corresponding sources. If jadx knows the dependencies and their exact versions, this would be much easier to implement.

There are different approaches to achieve this e.g.

None of these tools can be used directly in jadx and the results are not good enough.

But during decompilation jadx gains a lot of data, that be used to detect dependencies.

My proposition is a public api in jadx to aggregate dependency data with version ranges, so plugins and script can read, provide detected dependencies or narrow versions.

Some examples

If we have enough dependency data aggregated, it should be possible to fetch the source jars from maven central or google and use javaparser to map clases and method signatures. A complete mapping might be very complex or impossible, but I am sure a lot of classes, methods, annotations and some members can be mapped directly.