CybercentreCanada/assemblyline-service-configextractor
GitHub: CybercentreCanada/assemblyline-service-configextractor
Assemblyline 4 的恶意软件配置提取服务,集成多种解析框架自动从样本中提取 C2 通信地址等关键 IOC 信息。
Stars: 6 | Forks: 4
[](https://discord.gg/GUAy9wErNu)
[](https://discord.gg/GUAy9wErNu)
[](https://github.com/CybercentreCanada/assemblyline)
[](https://github.com/CybercentreCanada/assemblyline-service-configextractor)
[](https://github.com/CybercentreCanada/assemblyline/issues?q=is:issue+is:open+label:service-configextractor)
[](./LICENSE)
# ConfigExtractor 服务
该服务运行解析器以提取恶意软件的配置数据。
## 服务详情
该 Assemblyline 服务利用 [ConfigExtractor Python 库](https://github.com/CybercentreCanada/configextractor-py) 进行分析,从而提取各种恶意软件家族的恶意软件配置(例如 IP、URL 和域名)。
### 更新器
#### 来源
该服务的更新器需要与包含解析器的目录进行匹配。
例如,CAPE 来源的匹配模式为 `^\/tmp\/w+\/CAPE\/$`,在此模式中,我们仅尝试定位根目录中的解析器。
##### 来源配置
您可以为来源设置以下配置:
```
{
// Set the deployment status of extractors
"deployment_status": {
// Set all extractor classes in this list to NOISY on update
"NOISY": ["extractor_class", ...],
"DISABLED": ["broken_extractor_class", ...]
},
// Disable extractors that don't contain a YARA rule for filtering
"disable_yaraless_extractors": false
}
```
#### 持久化
更新器假定您已挂载了存储卷以存储来源集合。与其他服务不同,此更新器依赖存储卷来维持持久化,而不是 Assemblyline 的 datastore。
#### Python 包
更新器能够扫描包含解析器的根目录,查找 `requirements.txt` 文件,并将 Python 包安装到一个应传递给服务实例的目录中。
如果您在安装包时需要代理连接,请将环境变量 `PIP_PROXY` 添加到容器配置中。
### [ConfigExtractor Python 库](https://github.com/CybercentreCanada/configextractor-py)(现已在 [PyPI](https://pypi.org/project/configextractor-py/) 上提供)
所有能够与该库配合使用的解析器目录也应与该服务兼容。
在撰写本文时,我们正式支持以下框架:
- [MWCP](https://github.com/dod-cyber-crime-center/DC3-MWCP)
- [CAPE](https://github.com/CAPESandbox/CAPE-parsers)
- [MACO](https://github.com/CybercentreCanada/Maco)
## 镜像变体和标签
Assemblyline 服务基于 [Assemblyline 服务基础镜像](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 Configextractor \
--env SERVICE_API_HOST=http://`ip addr show docker0 | grep "inet " | awk '{print $2}' | cut -f1 -d"/"`:5003 \
--network=host \
cccs/assemblyline-service-configextractor
```
要将此服务添加到您的 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/
# ConfigExtractor 服务
该服务运行解析器以提取恶意软件的配置数据。
## 服务详情
该 Assemblyline 服务利用 [ConfigExtractor Python 库](https://github.com/CybercentreCanada/configextractor-py) 进行分析,从而提取各种恶意软件家族的恶意软件配置(例如 IP、URL 和域名)。
### 更新器
#### 来源
该服务的更新器需要与包含解析器的目录进行匹配。
例如,CAPE 来源的匹配模式为 `^\/tmp\/w\+/CAPE\/$`,在此模式中,我们仅尝试定位根目录中的解析器。
##### 来源配置
您可以为来源设置以下配置:
```
{
// Définir l'état de déploiement des extracteurs
"deployment_status" : {
// Définit toutes les classes d'extracteurs de cette liste comme NOISY lors de la mise à jour
"NOISY" : ["extractor_class", ...],
"DISABLED" : ["broken_extractor_class", ...]
},
// Désactiver les extracteurs qui ne contiennent pas de règle YARA pour le filtrage
"disable_yaraless_extractors": false
}
```
#### 持久化
更新器假定您已挂载了存储卷以存储来源集合。与其他服务不同,此更新器依赖存储卷来维持持久化,而不是 Assemblyline 的 datastore。
#### Python 包
更新器能够扫描包含解析器的根目录,查找 `requirements.txt` 文件,并将 Python 包安装到一个应传递给服务实例的目录中。
如果您在安装包时需要代理连接,请将环境变量 `PIP_PROXY` 添加到容器配置中。
### [ConfigExtractor Python 库](https://github.com/CybercentreCanada/configextractor-py)(现已在 [PyPI](https://pypi.org/project/configextractor-py/) 上提供)
所有能够与该库配合使用的解析器目录也应与该服务兼容。
在撰写本文时,我们正式支持以下框架:
- [MWCP](https://github.com/dod-cyber-crime-center/DC3-MWCP)
- [CAPE w/ MACO output](https://github.com/kevoreilly/CAPEv2)
- [MACO](https://github.com/CybercentreCanada/Maco)
## 镜像变体和标签
Assemblyline 服务基于 [Assemblyline 服务基础镜像](https://hub.docker.com/r/cccs/assemblyline-v4-service-base) 构建,
该基础镜像基于附带 Python 3.11 的 Debian 11。
Assemblyline 服务使用以下标签定义:
| **标签类型** | **描述** | **示例标签** |
| :------------------: | :------------------------------------------------------------------------------------------------------------- | :------------------------: |
| 最新版本 | 最近的构建版本(可能不稳定)。 | `latest` |
| build_type | 所使用的构建类型。`dev` 是最新的不稳定构建。`stable` 是最新的稳定构建。 | `stable` 或 `dev` |
| series | 完整的构建详情,包括版本和构建类型:`version.buildType`。 | `4.5.stable`, `4.5.1.dev3` |
## 运行此服务
此服务经过专门优化,设计为在 Assemblyline 部署环境中运行。
如果您想在本地测试此服务,可以直接从终端运行 Docker 镜像:
```
docker run \
--name Configextractor \
--env SERVICE_API_HOST=http://`ip addr show docker0 | grep "inet " | awk '{print $2}' | cut -f1 -d"/"`:5003 \
--network=host \
cccs/assemblyline-service-configextractor
```
要将此服务添加到您的 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/
# 贡献 ✨
感谢所有为本项目做出贡献的人:
| 贡献者 | 贡献 | 许可证 |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------: |
|
| 在以下项目中添加了 MACO 提取器:
[rat_king_parser](https://github.com/jeFF0Falltrades/rat_king_parser) | [](https://github.com/jeFF0Falltrades/rat_king_parser/blob/master/LICENSE) | |
| 在以下项目中添加了 MACO 提取器:
[CAPESandbox community](https://github.com/CAPESandbox/community) | [](https://github.com/kevoreilly/CAPEv2/blob/master/LICENSE) |
| 在以下项目中添加了 MACO 提取器:[rat_king_parser](https://github.com/jeFF0Falltrades/rat_king_parser) | [](https://github.com/jeFF0Falltrades/rat_king_parser/blob/master/LICENSE) | |
| 在以下项目中添加了 MACO 提取器:[CAPESandbox community](https://github.com/CAPESandbox/community) | [](https://github.com/kevoreilly/CAPEv2/blob/master/LICENSE) |
标签:Assemblyline, CybercentreCanada, DAST, DNS信息、DNS暴力破解, DNS 反向解析, IOC提取, IP 地址批量处理, IP提取, Python, URL提取, YARA规则, 反编译, 域名提取, 威胁情报, 安全服务, 开发者工具, 恶意软件分析, 恶意软件家族, 恶意软件配置, 无后门, 沙箱, 网络安全, 自动化分析, 请求拦截, 跨站脚本, 逆向工具, 配置提取, 配置解析器, 隐私保护