Detection rules › Sigma

Get Federation Token

Status
experimental
Severity
high
Log source
product aws, service cloudtrail
Author
Zach Mathis (@yamatosecurity)
Source
github.com/Yamato-Security/suzaku-rules

Returns a set of temporary security credentials (consisting of an access key ID, a secret access key, and a security token) for a user. Ex: aws sts get-federation-token --name TrailName --policy PolicyName

MITRE ATT&CK coverage

Rules detecting the same action

Other rules on this platform that filter on the same API call or operation.

Rule body yaml

title: Get Federation Token
id: f96305fe-e0ab-4d0f-acb3-bc8ee4f0e098
status: experimental
description: |
    Returns a set of temporary security credentials (consisting of an access key ID, a secret access key, and a security token) for a user.
    Ex: aws sts get-federation-token --name TrailName --policy PolicyName
references:
    - https://www.crowdstrike.com/blog/how-adversaries-persist-with-aws-user-federation/
    - https://reinforce.awsevents.com/content/dam/reinforce/2024/slides/TDR432_New-tactics-and-techniques-for-proactive-threat-detection.pdf
    - https://fwdcloudsec.org/assets/presentations/2024/europe/sebastian-walla-cloud-conscious-tactics-techniques-and-procedures-an-overview.pdf
    - https://securitylabs.datadoghq.com/articles/tales-from-the-cloud-trenches-unwanted-visitor/
    - https://hackingthe.cloud/aws/post_exploitation/create_a_console_session_from_iam_credentials/
    - https://hackingthe.cloud/aws/post_exploitation/survive_access_key_deletion_with_sts_getfederationtoken/
    - https://traildiscover.cloud/#STS-GetFederationToken
author: Zach Mathis (@yamatosecurity)
date: 2025-04-23
modified: 2025-04-23
tags:
    - attack.credential-access
    - attack.t1078.004 # Valid Accounts: Cloud Accounts
logsource:
    product: aws
    service: cloudtrail
detection:
    selection:
        eventName: 'GetFederationToken'
    filter:
        errorCode: 'AccessDenied'
    condition: selection and not filter
falsepositives:
level: high

Stages and Predicates

Stage 0: condition

selection and not filter

Stage 1: selection

selection:
    eventName: 'GetFederationToken'

Stage 2: not filter

filter:
    errorCode: 'AccessDenied'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
errorCodeeqAccessDenied

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
eventNameeq
  • GetFederationToken