CybercentreCanada/assemblyline-service-extract

GitHub: CybercentreCanada/assemblyline-service-extract

Assemblyline 平台的文件提取服务,用于从各类压缩包和容器中逐层提取嵌入式文件以便进一步分析。

Stars: 8 | Forks: 11

[![Discord](https://img.shields.io/badge/chat-on%20discord-7289da.svg?sanitize=true)](https://discord.gg/GUAy9wErNu) [![](https://img.shields.io/discord/908084610158714900)](https://discord.gg/GUAy9wErNu) [![Static Badge](https://img.shields.io/badge/github-assemblyline-blue?logo=github)](https://github.com/CybercentreCanada/assemblyline) [![Static Badge](https://img.shields.io/badge/github-assemblyline\_service\_extract-blue?logo=github)](https://github.com/CybercentreCanada/assemblyline-service-extract) [![GitHub Issues or Pull Requests by label](https://img.shields.io/github/issues/CybercentreCanada/assemblyline/service-extract)](https://github.com/CybercentreCanada/assemblyline/issues?q=is:issue+is:open+label:service-extract) [![License](https://img.shields.io/github/license/CybercentreCanada/assemblyline-service-extract)](./LICENSE) # Extract 服务 该服务从文件容器(如 ZIP, RAR, 7z 等)中提取嵌入式文件。 ## 执行 该服务使用 7zip 库从容器中提取文件,然后重新提交它们进行分析。 它还将: - 使用 python tnefparse 库解析 tnef 文件; - 使用 xxxswf 库提取压缩的 swf 文件; - 使用 unace 提取 winace 压缩文件; - 使用 mstools 和 msoffcrypto 尝试解码 MSOffice 文件; - 从 .eml 文件中提取附件; - 尝试使用以下方式进行自动解码: - 默认密码列表(见下文) - 可选的用户提供的密码(见下文) - .eml 文件的正文 - 使用 poppler-utils 中的 pdfdetach 从 pdf 样本中提取附件; - 使用 NSIS Reversing Suite 恢复原始 Setup.nsi 的预览; - 对膨胀文件进行去膨胀处理: - Windows 可执行文件:[debloat](https://github.com/Squiblydoo/debloat) 和自定义脚本 - Windows 安装程序 - 其他所有文件,通过使用基于熵的通用计算器 - 整合已归档的 [AutoItRipper 服务](https://github.com/CybercentreCanada/assemblyline-service-autoit-ripper)的功能; 此服务完成处理后,它将阻止样本继续发送到其他服务,除非它们被识别为以下文件类型: ``` - Executables - Java files - Android/APK packages - Document files (i.e. Microsoft Office and PDF) - Apple/IPA packages ``` ## 提交参数与配置 ### 参数: - `password`:在提交时可以向服务提供额外的密码以解码容器。 - `extract_executable_sections`:使用 7zip 库,服务将从可执行文件中提取各个节(section)。 - `continue_after_extract`:当为 true 时,无论文件类型如何,Assemblyline 都将继续使用其他服务处理所有样本。 - `use_custom_safelisting`:在从 IPA 和 JAR 容器中提取文件时使用自定义安全列表。 - `score_failed_password`:当因密码未知导致提取失败时,评分为 500 分。 - `heur_13_16_supression`:从结果中移除该启发式规则,降低潜在分数。 - `extraction_glob_pattern`:筛选匹配 glob 模式的文件结果。建议在开头使用 **/。 ### 配置(由管理员设置): - `default_pw_list`:尝试从受保护的存档中提取时使用的密码列表。 ## 镜像变体和标签 Assemblyline 服务构建自 [Assemblyline service base image](https://hub.docker.com/r/cccs/assemblyline-v4-service-base), 该镜像基于带有 Python 3.11 的 Debian 11。 Assemblyline 服务使用以下标签定义: | **标签类型** | **描述** | **示例标签** | | :----------: | :----------------------------------------------------------------------------------------------- | :------------------------: | | latest | 最新的构建(可能不稳定)。 | `latest` | | build_type | 使用的构建类型。`dev` 是最新的不稳定构建。`stable` 是最新的稳定构建。 | `stable` 或 `dev` | | series | 完整的构建详情,包括版本和构建类型:`version.buildType`。 | `4.5.stable`, `4.5.1.dev3` | ## 运行此服务 这是一个 Assemblyline 服务。它被设计为 Assemblyline 框架的一部分运行。 如果您想在本地测试此服务,可以直接从 shell 运行 Docker 镜像: ``` docker run \ --name Extract \ --env SERVICE_API_HOST=http://`ip addr show docker0 | grep "inet " | awk '{print $2}' | cut -f1 -d"/"`:5003 \ --network=host \ cccs/assemblyline-service-extract ``` 要将此服务添加到您的 Assemblyline 部署中,请遵循此 [指南](https://cybercentrecanada.github.io/assemblyline4_docs/developer_manual/services/run_your_service/#add-the-container-to-your-deployment)。 ## 文档 Assemblyline 通用文档可在以下地址找到:https://cybercentrecanada.github.io/assemblyline4_docs/ # 服务 Extract 本服务用于从其他存档(如 ZIP, RAR, 7z 等)中提取文件。 ## 执行 本服务使用 7zip 从存档中提取文件以便重新提交进行分析。 本服务还会尝试以下方法: - 使用 python tnefparse 库来读取 tnef 文件; - 使用 xxxswf 库从 swf 存档中提取压缩文件; - 使用 unace 从 winace 存档中提取压缩文件; - 使用 mstools 和 msoffcrypto 尝试读取和解码 Microsoft Office 文件; - 从 .eml 文件中提取附件; - 使用以下元素解码文件: - 默认密码(见下文) - 用户提交的密码(见下文) - .eml 文件的内容 - 使用 poppler-utils 中的 pdfdetach 库从 pdf 文件中提取附件; - 使用 NSIS Reversing Suite 重建原始 Setup.nsi 文件; - 缩减人为膨胀的文件: - Windows 可执行文件:[debloat](https://github.com/Squiblydoo/debloat) 和自定义脚本 - Windows 安装程序 - 任何可以通过基于熵的通用计算器检测到的文件类型 - 整合旧版 [AutoItRipper 服务](https://github.com/CybercentreCanada/assemblyline-service-autoit-ripper)的功能 分析完成后,Extract 将阻止其他服务分析该文件,除非该文件属于以下文件类型之一: ``` - Exécutables - Fichiers Java - Applications Android/APK - Fichier de bureautique (i.e. Microsoft Office and PDF) - Applications Apple/IPA ``` ## 提交参数与配置 ### 参数: - `password`:用户可在提交时指定一个密码,用于提取受保护的存档。 - `extract_executable_sections`:使用 7zip 时,服务将提取可执行文件的各个节(section)。 - `continue_after_extract`:当为 `true` 时,无论文件类型如何,Assemblyline 都将继续使用其他服务分析文件。 ### 配置(由管理员配置): - `default_pw_list`:从受保护文件中提取文件时默认使用的密码列表。 ## 镜像变体和标签 Assemblyline 服务构建自 [Assemblyline service](https://hub.docker.com/r/cccs/assemblyline-v4-service-base) 基础镜像, 该镜像基于带有 Python 3.11 的 Debian 11。 Assemblyline 服务使用以下标签定义: | **标签类型** | **描述** | **示例标签** | | :------------------: | :------------------------------------------------------------------------------------------------------------- | :------------------------: | | 最新版本 | 最新的版本(可能不稳定)。 | `latest` | | build_type | 使用的构建类型。`dev` 是最新的不稳定版本。`stable` 是最新的稳定版本。 | `stable` 或 `dev` | | 系列 | 完整的构建详情,包括版本和构建类型:`version.buildType`。 | `4.5.stable`, `4.5.1.dev3` | ## 运行此服务 本服务专门优化用于在 Assemblyline 部署环境中运行。 如果您希望在本地测试此服务,可以直接通过终端运行 Docker 镜像: ``` docker run \ --name Extract \ --env SERVICE_API_HOST=http://`ip addr show docker0 | grep "inet " | awk '{print $2}' | cut -f1 -d"/"`:5003 \ --network=host \ cccs/assemblyline-service-extract ``` 要将此服务添加到您的 Assemblyline 部署中,请遵循此 [指南](https://cybercentrecanada.github.io/assemblyline4_docs/fr/developer_manual/services/run_your_service/#add-the-container-to-your-deployment)。 ## 文档 Assemblyline 通用文档可在以下地址查阅:https://cybercentrecanada.github.io/assemblyline4_docs/
标签:7z, 7-Zip, Archive, Assemblyline, CCCS, DAST, Debloat, DevSecOps, EML, Entropy, MSI, Naabu, NSIS, Office加密, PDF附件, Python, RAR, SWF提取, TNEF解析, ZIP, 上游代理, 内容安全, 加拿大网络中心, 反混淆, 威胁情报, 嵌入式文件, 开发者工具, 恶意软件分析, 文件提取, 文件瘦身, 无后门, 沙箱, 脱壳, 自动化处理, 解压缩, 解密, 请求拦截, 逆向工具, 逆向工程辅助