volexity/donut-decryptor

GitHub: volexity/donut-decryptor

用于从 Donut 混淆样本中提取配置信息和解密内嵌载荷的专用分析工具。

Stars: 121 | Forks: 10

# donut_decryptor 一款用于 [donut binary obfuscator](https://github.com/TheWover/donut) 的配置和模块提取器 ## 描述 `donut-decryptor` 会在文件中检查 donut 混淆器加载器 shellcode 的已知特征。如果定位成功,它将解析 shellcode 以定位、解密并提取嵌入在二进制文件中的 `DONUT_INSTANCE` 结构,并报告相关配置数据。如果二进制文件中存在 `DONUT_MODULE`,它将被解密并转储到磁盘。 ## 安装 你可以导航到项目的根目录并使用 pip 安装 `donut-decryptor` 以供使用: ``` cd /path/to/donut-decryptor python -m pip install . ``` 安装完成后,将提供一个命令行脚本。如需使用说明,请使用: ``` donut-decryptor --help ``` ## 开发 本项目使用 [Hatch](https://hatch.pypa.io/) 进行项目管理,使用 [Ruff](https://docs.astral.sh/ruff/) 进行代码检查和格式化,并使用 [mypy](https://mypy-lang.org/) 进行类型检查。 ### 设置 安装 Hatch: ``` pip install hatch ``` ### 运行测试 ``` hatch run test hatch run test-cov # with coverage ``` ### 代码检查与格式化 ``` hatch run lint:style # check style hatch run lint:fmt # format code and fix issues hatch run lint:typing # run mypy type checking hatch run lint:all # run all checks ``` ## 示例 `samples` 目录中存在的文件是使用密码 `infected` 保护的 7z 文件,所有文件均包含可以使用此脚本解码的 donut。 ## 待办事项列表 * 更新检测规则和实例解析以支持替代输出格式: * Hex * C-String/Ruby * Python * C# * Powershell * 考虑将加载器/实例映射移至 YAML 配置文件。
标签:DAST, DNS 反向解析, Donut, EDR, Payload 提取, pdftotext, Python, SecList, Shellcode 解密, 二进制分析, 云安全监控, 云安全运维, 云资产清单, 代码混淆, 内存取证, 威胁情报, 安全研究员, 开发者工具, 恶意软件分析, 恶意软件研究, 无后门, 系统运维工具, 网络信息收集, 脆弱性评估, 逆向工具, 逆向工程, 配置提取, 静态分析