[New Rule] AWS AssumeRoleWithWebIdentity from unusual source ASN#5903
Closed
terrancedejesus wants to merge 1 commit intomainfrom
Closed
[New Rule] AWS AssumeRoleWithWebIdentity from unusual source ASN#5903terrancedejesus wants to merge 1 commit intomainfrom
AssumeRoleWithWebIdentity from unusual source ASN#5903terrancedejesus wants to merge 1 commit intomainfrom
Conversation
- Detect first-seen pairing of assumed role ARN (aws.cloudtrail.resources.arn) and source.as.number on successful AssumeRoleWithWebIdentity - Investigation guide aligned with Azure-style triage sections; add Identity domain tag - Refs: AWS STS web identity API, IAM OIDC guide, Kudelski Trivy supply-chain analysis Rule ID: 9f8c2532-b959-4915-876a-5f4b80eefd31 Made-with: Cursor
Contributor
Rule: New - GuidelinesThese guidelines serve as a reminder set of considerations when proposing a new rule. Documentation and Context
Rule Metadata Checks
New BBR Rules
Testing and Validation
|
AssumeRoleWithWebIdentity from unusual source ASN
terrancedejesus
commented
Mar 31, 2026
| """ | ||
| New CI regions, new self-hosted runners, corporate network changes, or cloud provider expansions can introduce a | ||
| first-seen ASN for a federated role. Geolocation and ASN enrichment gaps may also suppress or skew results. Tune | ||
| with exceptions on `aws.cloudtrail.resources.arn`, `source.as.organization.name`, or expected ASNs; extend the |
Contributor
Author
There was a problem hiding this comment.
Suggested change
| with exceptions on `aws.cloudtrail.resources.arn`, `source.as.organization.name`, or expected ASNs; extend the | |
| with exceptions on `user.id`, `source.as.organization.name`, or expected ASNs; extend the |
terrancedejesus
commented
Mar 31, 2026
|
|
||
| [rule.new_terms] | ||
| field = "new_terms_fields" | ||
| value = ["aws.cloudtrail.resources.arn", "source.as.number"] |
Contributor
Author
There was a problem hiding this comment.
Suggested change
| value = ["aws.cloudtrail.resources.arn", "source.as.number"] | |
| value = ["user.id", "source.as.number"] |
Contributor
Author
|
Closing this pull request. Choosing not to ship detection as it strays from the main behaviors reported for TeamPCP in that long-term creds were used for post compromise. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds AWS STS AssumeRole with Web Identity from Unusual ASN (
initial_access_sts_assume_role_web_identity_new_source_asn.toml), a New Terms rule on successfulAssumeRoleWithWebIdentitywhenaws.cloudtrail.resources.arn+source.as.numberappear together for the first time within the history window (now-10dlookback,now-6mrule interval). Requires ASN enrichment (source.as.number) and populated role resource ARN.Threat
Gap addressed
Existing rules cover AssumeRole (IAM user/service patterns), role chaining, MFA device novelties, and OIDC provider creation, but not first-time federation ASN surface per assumed role for web identity. This targets post-exfil replay where API calls still succeed and egress ASN diverges from the org’s learned CI/IdP baseline.
Limits
References