Answer the question
In order to leave comments, you need to log in
How to hide algorithm from disassembler?
In a nutshell about the task.
There is an application in the Play Market and its main part is a regular application and its code does not contain any valuable information. Also in this application there is an interface:
public interface IEncoder {
byte [] encode(int id1, int id2, Context context) throws Exception;
}
Answer the question
In order to leave comments, you need to log in
Security through obscurity, especially unprofessionally done, will not lead to anything good.
Move part of the logic to the server, do not trust the client.
Security through obscurity usually leads to the fact that someone straight-forward, with a lot of time and desire (the ideal intruder is motivated, prepared, provided with time :) ) hacks this algorithm of yours and then laughs all over ...
If you want to "hide" the implementation of the algorithm, it's best to do it on the server. In this case, you will need to send only one request with a minimum amount of data (via a secure channel).
As an alternative transport option, you can use SMS: the application will send an encrypted SMS to a specific number, and at the other end, the server will process the SMS and send back the same encrypted SMS, which will contain the key.
If none of these options are suitable, it is best to write an implementation of the algorithm in C (as already advised above), but C can also be decompiled if you really want to. Software like IDA Pro solves such problems with a bang.
The only way to somehow hide and complicate disassembly is to use various binary code obfuscation techniques. This topic is especially popular among virus writers. They use the so-called. "cryptors", one of the varieties of which is a polymorphic cryptor. In a polymorphic cryptor, virtualization
is often used to protect the code from analysis by an antivirus. In other words, you must write a virtual machine under which you will compile your algorithm. In this case, the code will be executed by a virtual machine and the source code of the algorithm cannot be decompiled without knowledge of the VM device.
In order not to write everything yourself from scratch, look at these links and google about virtualization obfuscation : vmpsoft.com
- software that does exactly what you need
https://oreans.com/codevirtualizer.php - similar software
https://www.reddit .com/r/ReverseEngineering/commen...
https://github.com/fritzone/obfy - small C++ framework for code obfuscation.
In general, all these options (except for the option with requests to the server) will not provide 100% protection against code decompilation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question