Possibility to decompile a code that was complied with Application Compiler

37 visualizaciones (últimos 30 días)
I developed a code with Matlab, and converted it into an EXE code using the Application Compiler under APPs. What kind of code the EXE is? Is it possible for it to be decompiled or reverse engineered? If yes, what need to be taken to accomplish this.
  1 comentario
Rik
Rik el 6 de Oct. de 2021
Editada: Rik el 6 de Oct. de 2021
Just like any exe it is possible to reverse engineer how it works. It may be extremely difficult and/or illegal.
If you're after obfuscation, you might be interested in both p-code and my minify function.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 6 de Oct. de 2021
At compile time, the source files that made up the APP are pre-parsed into a more compact form, creating data structures. The MATLAB code is not translated into machine language (at least not at that stage.) The data structures are then AES encrypted into stored together in an archive, together with a self-extracting executable.
At run-time the exe that is produced first acts like a self-extracting archive, unpacking the stored data into a series of files. The exe then starts the MATLAB Component Runtime (MCR). MCR is effectively a copy of the MATLAB Execution Engine -- the same one that is used to execute MATLAB itself.
MCR knows the AES encryption key and uses it to read the encrypted data structures that are the the more compact versions of the original source code. MCR runs through the data structures exactly the same way that interactive MATLAB does.
To emphasize: when you build an APP, the .m code becomes data structures, not x64 code.
To decompile or reverse engineer, you need to obtain the AES encryption key, and you need to reverse the data structures into code (possibly losing comments as it goes.) These things are known to be possible, but they are not intended to be easy.

Categorías

Más información sobre MATLAB Compiler en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by