Back to MCP directory
publicPublicdnsLocal runtime

Hallucina

Hallucina是一个强大的混淆工具,旨在干扰和迷惑用于Ghidra和IDA PRO等反汇编器的自定义MCP服务器的LLM客户端,迫使逆向工程必须由人工完成。

article

README

🚀 幻觉混淆器

幻觉混淆器 是一款强大的混淆工具,它专为迷惑用于反编译器(如 Ghidra 和 IDA PRO)的自定义 MCP 服务器而设计,能够有效增加 LLM 客户端的困惑。

🚀 快速开始

💻 使用示例

基础用法

混淆单个文件

要通过生成的 clang(LLVM 17)混淆单个源文件,可使用以下命令:

path_to_build/bin/clang -mllvm -irobf -mllvm --irobf-indbr test.c -o test_obfuscated

此命令使用标志 -mllvm -irobf-mllvm --irobf-indbrtest.c 文件进行混淆,并生成名为 test_obfuscated 的混淆输出文件。

以下是原始代码和混淆后代码的区别: 差异

高级用法

混淆项目

对于较大的项目,可将幻觉混淆器集成到构建系统中,具体操作如下:

CC=path_to_build/bin/clang
CFLAGS+="-mllvm -irobf -mllvm --irobf-indbr"
./configure
make

🔧 可用的混淆标志

  • 相关性混淆:在混淆过程中引入相关性。
  • 间接跳转:加密跳跃目标地址(-mllvm -irobf-indbr)。
  • 间接函数调用:加密目标函数地址(-mllvm -irobf-icall)。
  • 间接全局变量引用:加密变量地址(-mllvm -irobf-indgv)。
  • C 字符串加密-mllvm -irobf-cse)。
  • 与过程相关控制流扁平化混淆-mllvm -irobf-cff)。
  • 全面应用上述所有功能-mllvm -irobf-indbr -mllvm -irobf-icall -mllvm -irobf-indgv -mllvm -irobf-cse -mllvm -irobf-cff)。

📦 安装指南

构建幻觉混淆器

幻觉混淆器支持使用 LLVM 17 进行构建。请按照以下说明设置构建环境。

先决条件

Windows
  • 安装 LLVM
  • 确保系统已安装 C++ 编译器(如 Visual Studio)。
Linux/MacOS
  • 使用系统包管理器安装 LLVM 和 Clang:
    • 在 Debian/Ubuntu 上:sudo apt-get install llvm clang
    • 在 MacOS 上:使用 Homebrew 安装 brew install llvm

构建步骤

  1. 克隆幻觉混淆器仓库:
    git clone https://github.com/your-username/hallucination-obfuscator.git
    cd hallucination-obfuscator
    
  2. 下载 LLVM 源码并构建:
  3. 在项目根目录下运行构建脚本:
    ./build.sh
    

📚 详细文档

注意事项

⚠️ 重要提示

  • 如果在编译过程中遇到错误,请检查日志文件以获取更多信息。
  • 对于大型项目,建议增加内存分配以避免构建过程中的内存不足问题。

许可证

此项目 licensed under the GNU v3 License。有关详细信息,请参阅 LICENSE 文件。

参考文献

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client