elastic/cortado

GitHub: elastic/cortado

由 Elastic 开发的红队自动化框架,用于验证 SIEM 和 EDR 检测规则对攻击行为的警报触发能力。

Stars: 15 | Forks: 3

[![支持的 Python 版本](https://img.shields.io/badge/python-3.12+-yellow.svg)](https://www.python.org/downloads/) [![代码检查](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/831295d9a4095908.svg)](https://github.com/elastic/cortado/actions/workflows/code-checks.yaml) # cortado 整合的 RTAs(红队自动化) 该仓库包含用 Python 实现的红队自动化(RTA)。这些 RTA 通过指定展现我们要检测行为的样本哈希来引用二进制样本,或者通过代码模拟攻击者的行为。 RTA 提供了一种简单的方法来验证检测规则是否为 [Elastic](https://www.elastic.co/security) 的开源 [SIEM](https://github.com/elastic/detection-rules) 和 [EDR](https://github.com/elastic/protections-artifacts/tree/main/behavior) 行为检测规则生成预期的警报。 ## 目录 - [cortado](#cortado) - [目录](#table-of-contents) - [运行](#running) - [主 CLI](#main-cli) - [RTA CLI](#rta-cli) - [开发](#development) - [设置](#setup) - [构建并部署到 VM](#build-and-deploy-to-vm) - [如何贡献](#how-to-contribute) - [许可](#licensing) - [有疑问?遇到问题?有建议?](#questions-problems-suggestions) ## 运行 Cortado 注册了脚本入口点(在 `pyproject.toml` 中定义),这些入口点在使用 `poetry` 安装后在环境中变得可用。 ### 主 CLI 该包将 `cortado` 入口点定义为 `cortado` 包的主 CLI 命令: ``` $ cortado --help Usage: cortado [OPTIONS] COMMAND [ARGS]... ╭─ Options ─────────────────────────────────────────────────────────────────────╮ │ --verbose --no-verbose [default: no-verbose] │ │ --logs-as-json --no-logs-as-json [default: no-logs-as-json] │ │ --install-completion Install completion for the │ │ current shell. │ │ --show-completion Show completion for the │ │ current shell, to copy it or │ │ customize the installation. │ │ --help Show this message and exit. │ ╰───────────────────────────────────────────────────────────────────────────────╯ ╭─ Commands ────────────────────────────────────────────────────────────────────╮ │ get-coverage Calculate RTA coverage for the rules with paths that match │ │ provided glob │ │ print-rtas Print information about all available RTAs │ ╰───────────────────────────────────────────────────────────────────────────────╯ ``` 此脚本需要安装 `utils` 额外依赖项。 ### RTA CLI RTA CLI 用于在具有最少依赖项的沙盒环境中执行 RTA。 - `cortado-run-rta` -- 执行特定 RTA 的命令 - `cortado-run-rtas` -- 执行匹配当前操作系统所有 RTA 的命令 这些脚本在没有任何外部依赖项的情况下运行。 ## 开发 ### 设置 确保你已经安装了 `poetry` 并运行以下命令: ``` poetry install --with dev --all-extras ``` 这将安装运行编排代码和开发 `cortado` 所需的完整依赖项集。 ### 构建并部署到 VM Cortado 作为 Python wheel 包部署。要构建 Cortado wheel,请运行 `poetry build` 命令: ``` $ poetry build -f wheel Building cortado (0.1.0) - Building wheel - Built cortado-0.1.0-py3-none-any.whl ``` `cortado-0.1.0-py3-none-any.whl` 文件是一个 Python wheel,可以传送到 VM 并使用 `pip` 安装: ``` $ pip install ./cortado-0.1.0-py3-none-any.whl Processing ./cortado-0.1.0-py3-none-any.whl Installing collected packages: cortado Successfully installed cortado-0.1.0 $ ``` 请注意,该 wheel 不包含任何依赖项,也不会安装编排代码运行所需的任何依赖项。它的主要目的是交付和运行 RTA。 ## 许可 本仓库中的所有内容 — 代码、RTA 等 — 均根据 [Elastic License v2](LICENSE.txt) 授权。 我们要求贡献者在向任何 Elastic 仓库贡献代码之前签署 [贡献者许可协议](https://www.elastic.co/contributor-agreement)。 ## 有疑问?遇到问题?有建议? - 想了解更多关于 Elastic Security Detection Engine 的信息?请查看 Kibana 中的 [概述](https://www.elastic.co/guide/en/security/current/detection-engine-overview.html)。
标签:EDR行为检测, Elastic Security, IP 地址批量处理, Poetry, Python, RTA, SIEM检测规则验证, 安全测试, 插件系统, 攻击性安全, 攻击模拟, 数据包嗅探, 文档结构分析, 无后门, 无线安全, 流量嗅探, 红队自动化, 网络安全, 网络安全审计, 逆向工具, 隐私保护, 驱动签名利用