Possibility to decompile a code that was complied with Application Compiler

37 ビュー (過去 30 日間)
Wu Zhang
Wu Zhang 2021 年 10 月 6 日
回答済み: Walter Roberson 2021 年 10 月 6 日
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 件のコメント
Rik
Rik 2021 年 10 月 6 日
編集済み: Rik 2021 年 10 月 6 日
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.

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2021 年 10 月 6 日
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.

カテゴリ

Help Center および File ExchangeMATLAB Compiler についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by