Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计异常

test-attack-technique测试攻击技术

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

210

周安装

9

GitHub Stars

2,286

下载量

73
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:test-attack-technique(测试攻击技术)
来源仓库:https://github.com/datadog/stratus-red-team
仓库路径:skills/test-attack-technique
安装命令:
npx skills add https://github.com/datadog/stratus-red-team --skill test-attack-technique
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/datadog/stratus-red-team --skill test-attack-technique

简介

test-attack-technique 用于辅助测试设计、自动化测试和用例整理。

  • 适合编写单元测试、端到端测试或根据失败日志定位问题。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 使用时需确认测试框架、运行命令,并区分模拟环境与生产环境。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Instructions

When this skill is invoked, follow this workflow:

1. Parse Input & Validate Technique Exists

  • Extract the technique ID from arguments
  • Check for --skip-cleanup flag
  • IMPORTANT: Change to the v2/ directory first: cd v2
  • Run go run cmd/stratus/*.go show <technique-id> silently to verify the technique exists
  • If it doesn't exist, show error and list available techniques with go run cmd/stratus/*.go list
  • Store technique metadata (name, platform, MITRE ATT&CK tactic) for later use
  • Do not show verbose output - just confirm it exists or error out

2. Validate Cloud Credentials

Based on the technique platform, validate current credentials and get explicit user confirmation.

See references/credentials.md for detailed validation commands per cloud provider.

Quick reference:

  • AWS: Run aws sts get-caller-identity - show Account, UserId, Arn
  • Azure: Run az account show - show name, id, user, tenantId. CRITICAL: Export AZURE_SUBSCRIPTION_ID and ARM_SUBSCRIPTION_ID environment variables before running stratus commands
  • GCP: Run gcloud config get-value project && gcloud auth list - show project and active account
  • Kubernetes: Run kubectl config current-context && kubectl config view --minify - show cluster and namespace
  • Entra ID: Run az ad signed-in-user show - show userPrincipalName and id

Present credentials to user and ask for explicit confirmation:

Current credentials for <platform>:
<formatted credential info>

These credentials will be used to:
1. Create infrastructure (warmup)
2. Execute the attack technique (detonate)
3. Clean up resources (cleanup)

Do you want to proceed with these credentials?

Use AskUserQuestion to get confirmation. If user declines, stop and provide instructions for changing credentials.

3. Draft Expected Outcomes Plan

Based on the technique documentation, source code analysis, and your understanding of the attack:

Read the technique details:

  • The output from go run cmd/stratus/*.go show <technique-id> provides the description
  • IMPORTANT: Read the attack technique source code to understand the implementation intent and what resources are created. Look for:

- Infrastructure creation logic (warmup phase) - Attack execution logic (detonation phase) - Resource names, types, and configurations - Expected outputs and artifacts

  • Map the source code implementation to expected behaviors
  • Understand the MITRE ATT&CK tactic and technique behavior

Draft a high-level plan including:

  1. Warmup Phase Expectations:

- Infrastructure to be created - Approximate resource count - Special configurations

  1. Detonation Phase Expectations:

- Actions to be performed - Artifacts generated (credentials, tokens, data) - Observable behaviors

  1. Validation Checks:

- What to verify after warmup - What to verify after detonation - Note: Focus only on resource creation, attack output, and artifacts - NOT audit logs or security monitoring

Present the plan to the user:

FIRST, output the complete plan as regular text (not in a tool call):

═══════════════════════════════════════════════════════════════
Test Execution Plan for <technique-name>
═══════════════════════════════════════════════════════════════

WARMUP PHASE - Expected Infrastructure:
• <list of expected resources>

DETONATION PHASE - Expected Attack Behavior:
• <list of expected actions and outcomes>

VALIDATION - What I'll Check:
• After warmup: <validation checks>
• After detonation: <validation checks>

═══════════════════════════════════════════════════════════════

THEN, after displaying the plan, use AskUserQuestion to get user validation:

  • Option 1: "Yes, proceed with this plan"
  • Option 2: "No, I want to modify the plan"

If the user wants to modify, discuss changes and update the plan before proceeding.

4. Execute Attack Lifecycle & Parse Output

Use TodoWrite to track progress through phases.

Copy this checklist and track your progress:

Test Execution Progress:
- [ ] Step 1: Validate technique exists
- [ ] Step 2: Validate and confirm credentials
- [ ] Step 3: Draft and approve execution plan
- [ ] Step 4: Export AZURE_SUBSCRIPTION_ID and ARM_SUBSCRIPTION_ID (Azure only)
- [ ] Step 5: Run warmup and parse output
- [ ] Step 6: Run detonation and parse output
- [ ] Step 7: Validate assumptions against results
- [ ] Step 8: Run cleanup (unless --skip-cleanup)
- [ ] Step 9: Generate HTML report

Warmup Phase

For Azure techniques, first export the subscription IDs:

export AZURE_SUBSCRIPTION_ID=$(az account show --query id -o tsv)
export ARM_SUBSCRIPTION_ID=$AZURE_SUBSCRIPTION_ID

Then run warmup from the v2/ directory:

cd v2 && go run cmd/stratus/*.go warmup <technique-id>

Parse the output to extract:

  • Resource identifiers (bucket names, instance IDs, ARNs)
  • Status messages (success/failure)
  • Warnings or errors

Store for validation. Output is unstructured - intelligently parse based on technique type (e.g., look for "Created S3 bucket stratus-red-team-xxx" patterns).

Detonation Phase

cd v2 && go run cmd/stratus/*.go detonate <technique-id>

Parse the output to extract:

  • Attack execution messages
  • Retrieved credentials, tokens, or exfiltrated data references
  • Success/failure indicators
  • Any error messages

Validation Phase

Compare expected vs. actual outcomes:

  • Resources created match plan (use cloud provider CLI commands to verify when possible)
  • Attack behaviors occurred as expected (validate using stratus output and cloud CLI commands)
  • Document discrepancies
  • Important: Validate using stratus output, cloud CLI commands, and direct resource checks - NOT audit logs or monitoring
  • Capture CLI commands and outputs: For each validation check using CLI commands, store the command and its output for the report
  • If CLI validation isn't feasible, suggest manual validation commands in the report

Example validation approaches:

*aws.credential-access.secretsmanager-retrieve-secrets:*

  • Warmup: Secrets created in Secrets Manager

- Run: aws secretsmanager list-secrets or aws secretsmanager get-secret-value --secret-id <name> - Capture: Command and output showing secrets exist

  • Detonation: Secrets retrieved by attack

- Check: Stratus logs only (no cloud environment changes)

*aws.impact.s3-ransomware-individual-deletion:*

  • Warmup: S3 bucket with versioning enabled and files

- Run: aws s3 ls and aws s3 ls s3://<bucket-name>/ - Capture: Commands and outputs showing bucket and files

  • Detonation: Bucket has only ransom note file remaining

- Run: aws s3 ls s3://<bucket-name>/ - Capture: Command and output showing only ransom note

Store results (including CLI commands and outputs) for report.

Cleanup Phase (runs by default)

cd v2 && go run cmd/stratus/*.go cleanup <technique-id>

Cleanup runs unless --skip-cleanup is set. Verify success and note any failures in report.

5. Generate HTML Report

Generate a comprehensive HTML report saved to the scratchpad directory with filename: test-report-<technique-id>-<timestamp>.html

Use the template file: Read assets/report-template.html and replace placeholders with actual values:

Placeholders to replace:

  • {{TECHNIQUE_ID}}, {{TECHNIQUE_NAME}}, {{PLATFORM}}, {{TACTIC}}, {{TIMESTAMP}}, {{CREDENTIAL_INFO}}
  • {{EXPECTED_WARMUP_RESOURCES}}, {{EXPECTED_DETONATION_BEHAVIORS}}, {{PLANNED_CHECKS}}
  • {{WARMUP_STATUS}}, {{WARMUP_STATUS_CLASS}} (success/failure), {{WARMUP_RESOURCES}}, {{WARMUP_OUTPUT}}
  • {{DETONATION_STATUS}}, {{DETONATION_STATUS_CLASS}}, {{DETONATION_BEHAVIORS}}, {{DETONATION_OUTPUT}}
  • {{VALIDATION_CHECKS}} - Generate HTML for each check including CLI commands and outputs: <div class="check pass"> <strong>Check:</strong> Storage account exists <br><strong>Expected:</strong> stratus-rg-xxxxx created <br><strong>Actual:</strong> stratus-rg-xxxxx found in output <div class="check-command">$ aws s3 ls</div> <div class="check-output">2024-01-15 10:30:45 stratus-red-team-bucket-abc123</div> <strong>Status:</strong> Pass </div> Include CLI commands and outputs when validation involved running commands.
  • {{CLEANUP_STATUS}}, {{CLEANUP_STATUS_CLASS}}, {{CLEANUP_OUTPUT}}
  • {{OVERALL_RESULT}}, {{CHECKS_PASSED}}, {{TOTAL_CHECKS}}, {{ISSUES}}, {{RECOMMENDATIONS}}

After generation: show file path, display summary, suggest opening in browser.

6. Best Practices

  • Use TodoWrite to track phase progress
  • Set appropriate timeouts (cloud ops take minutes)
  • Preserve all command output for report
  • Intelligently parse unstructured output for identifiers, ARNs, names, IDs
  • If parsing fails, include raw output and note manual verification needed
  • Provide clear feedback at each step
  • Always generate report, even on failures

Requirements

  • Go 1.22+
  • Run from v2/ directory
  • Cloud credentials configured for target platform
  • Permissions to create/delete resources
  • Test/development environment only (not production)

Safety

  • Executes real attacks, creates cloud resources
  • Run in dedicated test environment only
  • May incur minimal costs
  • Cleanup runs by default (use --skip-cleanup to preserve)
  • May trigger security alerts (expected)
  • Reports contain account IDs only, never credentials

See Also

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.01%
按下载量换算28

Claude

30.05%
按下载量换算22

Cursor

19.02%
按下载量换算14

Gemini CLI

10.09%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills