本仓库包含 Leonidas,一个用于在云中执行攻击者行为的框架。它提供了一种基于 YAML 的格式,用于定义云攻击者的战术、技术和过程(TTP)及其相关的检测属性。这些定义可以编译为:
该项目最初设计用于 AWS 环境,其架构如下:
2024 年,Leonidas 扩展为支持 Kubernetes 环境。其资源可以部署到目标集群中,架构如下:

API 通过 AWS 原生的 CI/CD 管道部署到 AWS 账户中,并通过自动生成的 YAML 清单部署到 Kubernetes 集群中。 两种环境的指南可在 部署 Leonidas 中找到。
API 通过由 API 密钥保护的 Web 请求调用。关于使用 API 的详细信息可在 使用 Leonidas 中找到。
要构建文档或 Sigma 规则,您需要在本地安装生成器。可以通过以下方式完成:
cd generatorpoetry installSigma 规则可以通过以下方式生成:
poetry run ./generator.py sigma规则将出现在 ./output/sigma 目录下。
文档通过以下方式生成:
poetry run ./generator.py docs这将生成位于 output/docs 的 Markdown 版本文档。这些文档可以上传到现有的基于 Markdown 的文档系统,或者使用以下命令创建格式更美观的 HTML 版本:
cd ../outputmkdocs build这将创建一个包含 HTML 站点的 output/site 文件夹。也可以通过在相同文件夹中运行 mkdocs serve 在本地查看。
定义采用基于 YAML 的格式编写,下方提供了一个示例。关于如何编写的文档可在 编写定义 中找到。
---
name: Enumerate Cloudtrails for a Given Region
author: Nick Jones
description: |
An adversary may attempt to enumerate the configured trails, to identify what actions will be logged and where they will be logged to. In AWS, this may start with a single call to enumerate the trails applicable to the default region.
category: Discovery
mitre_ids:
- T1526
platform: aws
permissions:
- cloudtrail:DescribeTrails
input_arguments:
executors:
sh:
code: |
aws cloudtrail describe-trails
leonidas_aws:
implemented: True
clients:
- cloudtrail
code: |
result = clients["cloudtrail"].describe_trails()
detection:
sigma_id: 48653a63-085a-4a3b-88be-9680e9adb449
status: experimental
level: low
sources:
- name: "cloudtrail"
attributes:
eventName: "DescribeTrails"
eventSource: "*.cloudtrail.amazonaws.com"
项目由 Nick Jones ( NJonesUK / @nojonesuk) 构建和维护。
Kubernetes 支持由 Leo Tsaousis ( @laripping ) 添加。
特别感谢 Mohit Gupta ( @Skybound1 ) 的宝贵贡献。
该项目从多个来源汲取了想法和灵感,包括: