百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

limba

> 编程语言
开源

使用 MBA 进行编译时控制流混淆

199 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

使用 MBA 进行编译时控制流混淆

limba

Compile-time control flow obfuscation using MBA (Mixed Boolean-Arithmetic). This project is derived from another project I am working on named limbo, which is why the project files use this name. Keep in mind that this is more of a proof-of-concept rather than something ready to use in production code.

Description

Control flow between function calls is fairly easy to trace in normal binaries.

Pre-obfuscation pictures

limba will generate boilerplate code that obfuscates the actual jump address using MBA. The MBA rewrite rules and address offset is randomized each compilation to hinder analysis. It is important to note the actual function body is NOT obfuscated and is still present in the binary, only function calls will be obfuscated.

Post-obfuscation pictures

Support

  • The project has been developed using Clang(-CL) so this is the recommended compiler, GCC isn't actively supported and may (or may not) work. MSVC is not supported as I found no way to make it not emit a direct pointer to the original function
  • The codebase requires C++20 to compile. Compile time is a major constraint so I used a some C++20 features that reduced compilation time in my testing. The code can be modified to support C++17 (see emulation.h)

Usage

The included example uses premake for project configuration. You can generate the project files by running premake5 vs2022 in the root folder. Alternatively, the relevant header files can be copied into your own project.

Sample usage:

cpp
LIMBO_OBFUSCATED_FUNC(, , )
{
	// function body

	return 
}

Limitations

  • Only a small set of MBA rules have been included
  • Opaque predicates are needed to avoid trivial optimization
  • Since a protected function will only have one "wrapper" function, it's easy to figure out and patch the protection with dynamic analysis and scripting
  • Compilation time may be negatively impacted if the protection is used on a large number of functions

Acknowledgements

Great open-source projects that were a great help during development

  • https://github.com/JustasMasiulis/xorstr
  • https://github.com/llxiaoyuan/oxorany
  • https://github.com/Deniskore/nand_nor

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言