T
T
Tyrion Lannister2017-04-15 00:52:11
Java
Tyrion Lannister, 2017-04-15 00:52:11

How to prevent the client program from being decompiled?

There are a lot of Java class decompilers, but what if there is a task to prevent users from digging up the source code? I understand that in theory this is basically impossible, because if a person really wants to, then even the most secure system on his machine will be bypassed. The question is how to prevent this as thoughtfully as possible? We are talking about client applications.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nikita, 2017-04-15
@jkotkot

1) Nagovnokodit
2) Turn off the debug mode when compiling.
3) Use some kind of obfuscator like ProGuard
There is no point in bothering anymore.

N
nirvimel, 2017-04-15
@nirvimel

Depending on what goal is pursued:
1. Prevent your code from being used to create another similar product.
2. Hide some little "twist" that can be used for cheating if you unearth it in the code.
The first is quite real. The cost of refining your code without source codes will far exceed the cost of creating a similar product from scratch.
The second is basically unrealistic. Don't waste time on this. The need to hide "highlights" usually arises due to erroneous architectural decisions (for example, checking on the client what should normally be checked on the server) or erroneous business models.

X
xappymah, 2017-04-21
@xappymah

You might want to look at the Excelsior JET project.
It allows you to statically compile a Java application from bytecode into optimized native (machine) code.
In other words, at the input you submit your Java application, at the output you get a binary, as if you were compiling some C code.
At the same time, class files are no longer needed for the compiled application to work (with the exception of some cases), so there is nothing to decompile.
Of course, the binary can be disassembled and understand the logic of some local pieces, but restoring the source code from this is an impossible task.
Actually, I will not give direct links, so as not to be impudent at all, given that I am one of the engineers working on this project :)
Instead, I will give a link to the report of my colleague at JavaZone on the topic of JET and AOT compilation of Java applications in general:
https://vimeo.com/181905276

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question