Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Decompiling obfuscated java bytecode [closed]

I work on a platform which runs Java apps. Those apps are often obfuscated, most of them using ProGuard, which makes debugging issues with our platform very difficult.

Currently I'm using JD (http://java.decompiler.free.fr/ ) to decompile it those apps. JD does a decent job, but sometimes the generated code is too difficult to understand.

This appears to happen mainly because obfuscation tools exploit the less constrained spec of JVM Bytecode to produce valid bytecode which doesn't map back to valid Java code (example: aggressive overloading).

So, my question is: is there a decompiler built especially to deal with obfuscated bytecode?

like image 662
JoaoHornburg Avatar asked Jun 22 '11 17:06

JoaoHornburg


People also ask

Can obfuscated code be decompiled?

Code obfuscation is the process of making applications difficult or impossible to decompile or disassemble, and the retrieved application code more difficult for humans to parse.

Can you decompile Java bytecode?

Abstract. Java virtual machines execute Java bytecode instructions. Since this bytecode is a higher level representation than traditional ob- ject code, it is possible to decompile it back to Java source.

Can you reverse-engineer bytecode?

The compiled Java bytecode can be easily reversed engineered back into source code by a freely available decompilers. Bytecode Obfuscation is the process of modifying Java bytecode (executable or library) so that it is much harder to read and understand for a hacker but remains fully functional.


2 Answers

I doubt any decompilers do that. However you could implement custom bytecode transformation and rename overloaded method and variable names using something like ASM.

like image 187
Eugene Kuleshov Avatar answered Sep 20 '22 08:09

Eugene Kuleshov


There is a decompiler known as Fernflower developed by a member here. It boasts being a decompiler specifically made for decompiled code, however you may want to take its claim with a grain of salt. It's uploaded here: https://github.com/Zidonuke/Bukkit-MinecraftServer/blob/master/tools/fernflower.jar?raw=true

like image 31
obataku Avatar answered Sep 24 '22 08:09

obataku