Matlab-Code-Obfuscation

所属分类:matlab编程
开发工具:Java
文件大小:0KB
下载次数:2
上传日期:2022-11-28 01:17:36
上 传 者sh-1993
说明:  Matlab代码混淆,,
(Matlab-Code-Obfuscation,,)

文件列表:
demo/ (0, 2022-11-27)
demo/code_example_normal.png (134987, 2022-11-27)
demo/code_example_obfuscated.png (187422, 2022-11-27)
src/ (0, 2022-11-27)
src/tangent65536/ (0, 2022-11-27)
src/tangent65536/obfuscator/ (0, 2022-11-27)
src/tangent65536/obfuscator/matlab/ (0, 2022-11-27)
src/tangent65536/obfuscator/matlab/AbstractCodeBlock.java (2168, 2022-11-27)
src/tangent65536/obfuscator/matlab/AbstractCodeBlockClassMembers.java (474, 2022-11-27)
src/tangent65536/obfuscator/matlab/AbstractCodeBlockControl.java (937, 2022-11-27)
src/tangent65536/obfuscator/matlab/AbstractCodeBlockTransformed.java (1257, 2022-11-27)
src/tangent65536/obfuscator/matlab/AbstractCodeBlockTransformedControl.java (1114, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlock.java (2227, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockBreak.java (356, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockCatch.java (201, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockClassDef.java (1731, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockClassMethods.java (870, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockClassProperties.java (237, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockElse.java (520, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockFor.java (2911, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockFunction.java (1693, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockIf.java (1729, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockPseudoLoopback.java (1557, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockScript.java (2440, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockTransformedBlank.java (1346, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockTransformedDispatcher.java (2554, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockTransformedFunction.java (814, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockTransformedIf.java (2192, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockTransformedTry.java (2181, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockTry.java (1366, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeBlockWhile.java (1277, 2022-11-27)
src/tangent65536/obfuscator/matlab/CodeParser.java (9562, 2022-11-27)
src/tangent65536/obfuscator/matlab/IBranchingBlock.java (123, 2022-11-27)
src/tangent65536/obfuscator/matlab/IDefinitionBlock.java (86, 2022-11-27)
src/tangent65536/obfuscator/matlab/IDelegateBlock.java (120, 2022-11-27)
src/tangent65536/obfuscator/matlab/IIndexableBlock.java (561, 2022-11-27)
src/tangent65536/obfuscator/matlab/ILoopBlock.java (218, 2022-11-27)
src/tangent65536/obfuscator/matlab/Statement.java (1407, 2022-11-27)
src/tangent65536/test/ (0, 2022-11-27)
... ...

# Matlab Code Obfuscator Copyright (c) 2022, *Tangent65536*. **All rights reserved.** --- *MATLAB(R) is the property of The MathWorks, Inc.* *We are not affiliated, associated, authorized, endorsed by,* *or in any way officially connected with The MathWorks, Inc.* --- ## Intro The main goal of this tool is to provide a more robust way to obfuscate Matlab codes. As it turns out, the official tools provided in the Matlab Compiler SDK, `pcode` and `mcc`, do not actually compile or even obfuscate the input codes. Alternatively, `mcc` only encrypts the code using a 256-bit AES key, while `pcode` is just a tool to encode input code into a specific format before applying a trivial cyclic XOR operation. None of them remove key information such as variable names to further protect the packaged codes. Unfortunately, both `mcc` and `pcode` has been successfully reverse-engineered and one can find open-source tools online to do the job. Hence, relying on merely the official SDK is not a secure way to protect one's codes. Luckily, multiple techniques have been developed by researchers and programmers to transform original source code into hardly readable forms. One of them is *control flow flattening*. The key concept is to turn input code into a mess by abusing branching/jumping statements, such as `goto` or `switch`/`case` to reproduce the behavior flow. Such transformation removes all the nested conditional and loop blocks ("flattening") as they can be achieved by only using the branching/jumping statements. --- ## Functionality and Limitations This program performs **control flow flattening** against the input `.m` script file. That's **all** it does. Currently, no renaming and string/constant obfuscation is implemented. I do plan to have constants obfuscation supported in the future. Also, the `switch/case` keywords are not supported, and `try/catch` will not obfuscate the `try` block. The program is not yet optimized either and the code is a bit messy. The largest script I have run my program against is only around 50 KiB in size, so use it at your own risk. Below is an example of the transformation made by this tool. --- Original code:

--- Obfuscated code:


近期下载者

相关文件


收藏者