Cisco-Talos/Xfiletrator

GitHub: Cisco-Talos/Xfiletrator

一个记录和分析被攻击者滥用于数据渗出的合法工具的结构化知识库,为威胁狩猎、检测工程和事后取证提供系统化参考。

Stars: 6 | Forks: 0

# Xfiletrator:数据渗出映射框架 一个用于记录和分析被滥用于数据渗出的合法工具的结构化框架。 该框架重点突出了与检测相关的特征、隐蔽技术以及取证痕迹,以支持威胁狩猎、检测工程和事后分析。 ## 目的 本项目提供了一个集中化的知识库,涵盖了那些已被观察到——或具有潜力——在攻击者行动中被用于数据渗出的合法工具。 虽然这些工具本质上并非恶意,但它们常被威胁行为者重新利用,从受损环境中渗出敏感信息。本项目的目标是以一致的格式记录这些工具,使数据易于被防御性用途访问。 ## YAML Lint 与质量检查 本项目使用自动化验证来确保 YAML 文件格式正确并包含所有必需字段。 ### 双层验证 1. **通用 YAML Lint** ([yamllint](https://github.com/adrienverge/yamllint)) - 强制执行一致的 YAML 格式 - 捕获语法错误和常见问题 - 配置位于 `.yamllint` 2. **自定义 Schema 验证** (`scripts/validate_yml.py`) - 验证必需的顶级字段(Name、Description、Category 等) - 确保 Forensics 部分包含所有必需字段 - 根据项目特定的 JSON schema 进行验证 ### 设置 安装 Python 依赖: ``` pip install -r requirements.txt ``` 启用 pre-commit 钩子: ``` pre-commit install ``` ### 运行验证 **Pre-commit(自动):** yamllint 和自定义验证会在每次提交前自动运行。 **手动测试:** ``` # 运行所有验证检查 ./scripts/test-validation.sh # 或单独运行: yamllint . python scripts/validate_yml.py ``` **GitHub Actions:** 每次推送和 Pull Request 都会自动运行这两项验证检查,以确保质量标准。 ### 配置 - **yamllint 规则:** `.yamllint`(已禁用 document-start、line-length 和 comments spacing) - **自定义验证:** `scripts/validate_yml.py` 和 `YML-Schema.yml` ## 框架结构 每个工具都记录在位于 `/yml/` 目录下的独立 YAML 文件中。这些条目包含: - 工具元数据(名称、类别、平台、执行方式) - 与渗出相关的能力 - 用于规避检测的隐蔽技术 - 留在磁盘或内存中的取证痕迹 - 威胁行为者的使用情况和外部参考 - 用于支持过滤和分组的标签 此格式旨在支持人工审查和程序化消费(例如自动化、检测生成或 AI 项目)。 ## 仓库布局 ``` exfiltration-framework/ ├── yml/ # One YAML file per tool, structured for parsing │ ├── awscli.yml │ ├── pscp.yml │ ├── restic.yml │ ├── rclone.yml │ ├── dropboxapi.yml │ ├── syncthing.yml │ ├── curl.yml │ ├── powershell.yml │ ├── azcopy.yml │ └── s3browser.yml │ ├── LICENSE # Apache License 2.0 ├── README.md # Project overview and usage ├── CONTRIBUTING.md # Contribution guidelines ``` ## 标签 工具可以包含标签,以便按行为、用途或上下文进行分类。示例包括: **按来源:** - `native` - `third-party` - `cloud-based` **按执行类型:** - `cli` - `gui` - `api` **按检测相关行为:** - `masquerading` - `encrypted-transfer` - `scheduled-task` - `background-execution` **按威胁上下文:** - `ransomware` - `apt` - `no-documented-use-found` ## 贡献 欢迎贡献。 如果您想提议新工具、改进现有条目或建议新字段或标签,请参阅贡献指南(即将推出)。 ## YAML 验证 为确保一致性并避免错误,`yml/` 文件夹中的所有工具条目都应根据 `YML-Schema.yml` 中定义的 schema 进行验证。 ### 安装要求 在运行验证脚本之前,请安装所需的 Python 库: ``` pip install pyyaml jsonschema ``` ### 运行验证器 在仓库根目录下运行: ``` python validate_yml.py ``` 这将检查 yml/ 目录中的所有 .yml 文件(不包括模板和 meta 文件)并打印验证结果。 如果文件缺少必需字段、包含不支持的标签或不符合 schema,则被视为无效。 ## 许可证 本项目采用 Apache License 2.0 许可。 有关详细信息,请参阅 [LICENSE](LICENSE) 文件。 ## 免责声明 本框架仅用于教育和防御目的。 列出的所有工具均为合法工具,本质上并非恶意。 收录它们是基于公开记录的威胁行为者滥用情况。 ## 允许的标签和类别 ``` # ========================= # 分类:工具来源或部署模式的一般分类 # ========================= categories: - native # Built into the OS (e.g., PowerShell, certutil) - third-party # Tools developed independently from the OS (e.g., rclone, curl) - cloud-based # Tools designed for use with cloud services or platforms (e.g., AWS CLI, Dropbox API) # ========================= # 平台:工具支持的操作系统 # ========================= platforms: - windows # Microsoft Windows - linux # Linux distributions - macos # Apple macOS # ========================= # 执行:工具的典型执行或交互方式 # ========================= execution: - cli # Command-line interface - gui # Graphical user interface # ========================= # 能力:与数据渗出相关的功能特性 # ========================= capabilities: - file-sync # Continuous synchronization between folders or systems (e.g., rclone, Syncthing). - cloud-sync # Sync or upload to cloud storage platforms like S3, Azure Blob, Dropbox. - api-transfer # Upload via official or custom APIs (e.g., Dropbox API, AWS SDK). - direct-to-cloud # Exfiltrates data directly to cloud endpoints without local staging. - selective-upload # Allows filtering or targeting specific file types or directories. - recursive-upload # Recursively uploads entire folder trees. - credentialed-upload # Requires or supports authenticated uploads (e.g., tokens, IAM keys). - anonymous-upload # Supports unauthenticated uploads (e.g., pre-signed URLs or public buckets). - proxy-aware # Can route traffic through proxies to mask destination. - silent-execution # Executes without user interaction or visible output (used in scripts or automation). - portable-execution # Runs from non-standard paths or without installation (portable binaries). - service-identity # Supports managed identities or service principals (e.g., AzCopy with Azure roles). - user-agent-spoofing # Can spoof or customize the user-agent string in HTTP requests. - endpoint-override # Allows setting custom or attacker-controlled endpoints (e.g., `--endpoint-url`). - ftp-upload # Can exfiltrate via FTP protocol to external servers. - header-exfiltration # Exfiltrates data inside HTTP headers (e.g., `X-Data:`). - multipart-upload # Simulates browser-style form uploads (e.g., using `curl -F`). # ========================= # 取证:可能出现在被入侵系统上的工件和指标 # ========================= forensics: - binary-location # Known install or execution paths, especially outside standard directories. - config-file-path # Presence of tool-specific configuration or credential files. - command-line-flags # Flags or arguments used by attackers to trigger upload, sync, or stealth behavior. - registry-entry # Registry keys used to auto-launch or persist the tool (Windows only). - scheduled-task-created # Use of task scheduler or cron to automate tool execution. - log-file-location # Logs written by the tool that may reveal execution or errors. - network-indicator # Domain or API patterns associated with this tool’s upload behavior. # ========================= # 威胁行为者:已知滥用该工具的行为者类型 # ========================= threat-actors: - apt # Advanced Persistent Threat groups - ransomware # Ransomware gangs or affiliates ```
标签:Python, Ruby, YAML, 威胁情报, 安全库, 工具映射, 库, 应急响应, 开发者工具, 数据渗出, 无后门, 滥用检测, 白利用, 知识库, 网络安全, 逆向工具, 防御方法, 隐私保护, 隐蔽通信