Leonidas 项目使用教程

Leonidas 项目使用教程

leonidas Automated Attack Simulation in the Cloud, complete with detection use cases. leonidas 项目地址: https://gitcode.com/gh_mirrors/le/leonidas

1. 项目目录结构及介绍

Leonidas 项目采用以下目录结构:

  • .github/: 存放与 GitHub 相关的模板文件,如 Issue 模板。
  • aws-pipeline/: 包含 AWS 云服务的 CI/CD 流水线定义。
  • definitions/: 定义云攻击者的战术、技术和程序(TTPs)及其相关检测属性的 YAML 文件。
  • docs/: 项目文档的源文件。
  • generator/: 用于生成 Sigma 规则和文档的脚本。
  • jupyter/: 存放 Jupyter 笔记本相关文件。
  • leo/: 可能包含与 Kubernetes 集成相关的代码和配置。
  • output/: 输出生成的文档和 Sigma 规则。
  • .gitignore: 指定 Git 忽略的文件和目录。
  • LICENSE: 项目使用的 MIT 许可证文件。
  • Makefile: 编译和构建项目的 Makefile 脚本。
  • README.md: 项目描述和基本信息。
  • buildspec.yml: AWS CodeBuild 的构建规范文件。
  • runtime.txt: 项目运行时依赖的环境和库。
  • sigma-pipeline-kubernetes-to-elk.yml: Sigma 规则的 Kubernetes 到 ELK 的管道配置。
  • template-definition.yml: 模板定义文件。

每个目录和文件都有其特定的用途,共同构成了 Leonidas 项目。

2. 项目的启动文件介绍

项目的启动文件主要集中在 generator/ 目录下。要安装和运行生成器,需要执行以下步骤:

cd generator
poetry install

安装完成后,可以使用以下命令生成 Sigma 规则:

poetry run ./generator.py sigma

生成的规则会出现在 ./output/sigma 目录中。

3. 项目的配置文件介绍

Leonidas 项目的配置主要通过 YAML 格式的定义文件进行。这些文件位于 definitions/ 目录下。以下是一个配置文件的例子:

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
detection:
  sigma_id: 48653a63-085a-4a3b-88be-9680e9adb449
  status: experimental
  level: low
  sources:
    - name: "cloudtrail"
      attributes:
        eventName: "DescribeTrails"
        eventSource: "*.cloudtrail.amazonaws.com"

这个文件定义了一个 AWS 环境下的云攻击动作,包括其名称、描述、类别、MITRE ATT&CK ID、平台、权限、输入参数、执行器、客户端和检测规则。这些定义用于生成 API 端点、Sigma 规则和文档。

leonidas Automated Attack Simulation in the Cloud, complete with detection use cases. leonidas 项目地址: https://gitcode.com/gh_mirrors/le/leonidas

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

龚翔林Shannon

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值