工具
oletools Office 文档与 OLE 文件分析工具集
Philippe Lagadec 开发的 Python 工具包,用于分析 Microsoft OLE2(复合文件二进制格式)文件,如 Office 97–2003 文档、MSI 文件和 Outlook 邮件,也支持 RTF 与 OpenXML 文档,主要面向恶意软件分析、取证和调试。其命令行工具可检测并提取 VBA 与 Excel 4(XLM)宏、嵌入的 OLE 和 Flash 对象以及 DDE 链接(olevba、MacroRaptor、oleobj、rtfobj、pyxswf、msodde),用 oleid 和 ftguess 标记恶意文件中常见的特征,并通过 oledir、olemeta、oletimes 和 olemap 查看目录项、元数据、时间戳和扇区布局。它基于同一作者的 olefile 解析器。
使用条件与局限
- 审阅时最新版本为 v0.60.2,于 2024-07-02 在 GitHub 和 PyPI 发布。所审阅的 master 提交(2026-01-26)已将版本设为 0.60.3,README 的更新记录也在 2025-05-22 下列出 0.60.3,其中包括修复 olevba 命令行输出中 ANSI 转义码导致的安全问题;但审阅时并不存在 0.60.3 标签或 PyPI 上传。SECURITY.md 将 0.60.x 及之后版本列为受支持版本。
- 通过 pip 安装 oletools,或安装 oletools[full] 以加入可选的 XLMMacroDeobfuscator。依赖 pyparsing、olefile、easygui、colorclass 和 pcodedmp,并依赖 msoffcrypto-tool 处理加密文档(在 Windows、macOS 或 Python 2 上使用 PyPy 时除外)。setup.py 的分类标签列出 Python 2.7 及 3.4 至 3.12;GitHub 工作流在 Linux、Windows 和 macOS 上用当前 CPython 3 与 PyPy 3.9 运行 pylint -E 和单元测试,较旧的 Travis 配置则针对 Python 2.7 至 3.8 及 PyPy。
- 输入为使用者提供的文档,在恶意软件分析中可能是恶意文件;单元测试使用 tests/test-data 下提交的示例文档。README 称 oleid 用于检测恶意文件中常见的特征、MacroRaptor 用于检测恶意 VBA 宏,因此结果只是需要分析者复核的迹象。本次未分析任何文档。
- LICENSE.md 对该工具包采用两条款 BSD 许可证(版权 2012–2025 Philippe Lagadec);olevba 包含来自 officeparser 的 MIT 许可代码,thirdparty 目录保留各自条款,其中 xxxswf 为 GPL-3.0,oledump 插件代码为公有领域。README 说明 python-oletools 与 BeCubed Software 的 OLETools 无关。
关于此条目
- 类型
- 工具
- 类别
- 原生分析工具
- 关联
- 基础工具
- 目标
- 二进制
来源复核于
说明已依据一手来源复核;这不代表已运行验证、经过安全审计或确认兼容。
一手来源
- README.md GitHub · decalage2/oletools · 修订 ec10260
- setup.py GitHub · decalage2/oletools · 修订 ec10260
- requirements.txt GitHub · decalage2/oletools · 修订 ec10260
- SECURITY.md GitHub · decalage2/oletools · 修订 ec10260
- .github/workflows/unittests.yml GitHub · decalage2/oletools · 修订 ec10260
- .travis.yml GitHub · decalage2/oletools · 修订 ec10260
- tests/test-data GitHub · decalage2/oletools · 修订 ec10260
- LICENSE.md GitHub · decalage2/oletools · 修订 ec10260
- oletools/thirdparty/xxxswf/LICENSE.txt GitHub · decalage2/oletools · 修订 ec10260
- https://github.com/decalage2/oletools/releases/tag/v0.60.2
- https://pypi.org/project/oletools/0.60.2/