Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New attack technique: Persistence through federation #604

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

adanalvarez
Copy link
Contributor

What does this PR do?

  • New attack technique

Motivation

I saw that this was an open and prioritized issue: #313

The current implementation creates an IAM user and a pair of access keys, one enabled and the other disabled. I use the enabled credentials to call the GetFederationToken API. This is not done directly from the credentials used in the Stratus Red Team session because GetFederationToken generates temporary security credentials for a user. If you're using a role to execute Stratus Red Team, this approach likely won't work. Instead, using the credentials of the IAM user created during the warmup phase allows us to successfully reproduce the GetFederationToken step.

Afterward, I only call the sts:GetCallerIdentity API to verify that the session works. I am not re-enabling the disabled access keys, as this requires interaction with the AWS Management Console.

Checklist

  • The attack technique emulates a single attack step, not a full attack chain
  • We have factual evidence & references that the attack technique was used by real malware, pentesters, or attackers
  • The attack technique makes no assumption about the state of the environment prior to warming it up

accessKeyID := params["access_key_id"]
secretAccessKey := params["secret_access_key"]

if accessKeyID == "" || secretAccessKey == "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this is coming from TF, is there any condition where these would be empty? I suspect this check might be unnecessary

@christophetd christophetd self-assigned this Dec 3, 2024
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.

2 participants