Skip to content

Conversation

@0x-JP
Copy link

@0x-JP 0x-JP commented Oct 10, 2025

What does this PR do?

This PR adds an optional mode to the aws.credential-access.secretsmanager-batch-retrieve-secrets attack technique that allows retrieving all accessible secrets in a region (not just Stratus-created ones) using a negative filter.

Changes:

  • Adds environment variable STRATUS_BATCH_RETRIEVE_ALL_SECRETS to enable retrieving all secrets using a negative filter !tagKeyThatWillNeverExist
  • Default behavior remains unchanged: only retrieves Stratus-created secrets (tagged with StratusRedTeam)
  • Updates documentation to explain both modes with usage examples

Motivation

I wanted to have both "attack modes" available at run time (specified secrets vs all secrets) without requiring code modifications. Previously, the negative filter version was commented out in the code, requiring manual modification and building.

Environment variables is already established pattern for runtime configuration (similar to STRATUS_RED_TEAM_ATTACKER_EMAIL).

The Detonation command for the alternate mode will be:

STRATUS_BATCH_RETRIEVE_ALL_SECRETS=true stratus detonate aws.credential-access.secretsmanager-batch-retrieve-secrets

Checklist

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant