Detection rules › Panther
RoleAssumes by Multiple Useragents
RoleAssumes with multiple Useragents could indicate compromised credentials.
Rules detecting the same action
Other rules on this platform that filter on the same API call or operation.
- AWS STS AssumeRole with New MFA Device (Elastic)
- AWS STS Role Assumption by Service (Elastic)
- AWS STS Role Assumption by User (Elastic)
- AWS STS Role Chaining (Elastic)
Rule body yaml
AnalysisType: scheduled_query
Description: RoleAssumes with multiple Useragents could indicate compromised credentials.
Enabled: false
Query: |
SELECT
requestParameters:roleArn as roleArn,
userIdentity:principalId as principalId,
count(DISTINCT userAgent) as distinctUserAgents
FROM
panther_logs.public.aws_cloudtrail
WHERE
eventSource = 'sts.amazonaws.com'
and eventName = 'AssumeRole'
and p_occurs_since('1 days')
and userIdentity:principalId != 'null'
and userAgent != 'AWS Internal'
and requestParameters:roleArn != 'null'
GROUP BY requestParameters:roleArn, userIdentity:principalId
HAVING count(DISTINCT userAgent) > 1
ORDER BY count(DISTINCT userAgent) DESC
QueryName: "RoleAssumes by Multiple Useragents"
Schedule:
RateMinutes: 1440
TimeoutMinutes: 5
Detection logic
Stage 1: source
panther_logs.public.aws_cloudtrail
Stage 2: filter
eventSource eq "sts.amazonaws.com"
eventName eq "AssumeRole"
userIdentity:principalId ne "null"
userAgent ne "AWS Internal"
requestParameters:roleArn ne "null"
Stage 3: having
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.
| Field | Kind | Values |
|---|---|---|
eventName | eq |
|
eventSource | eq |
|
requestParameters:roleArn | ne |
|
userAgent | ne |
|
userIdentity:principalId | ne |
|
Output fields
Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.
| Field | Source |
|---|---|
roleArn | requestParameters:roleArn |
principalId | userIdentity:principalId |
distinctUserAgents | count ( DISTINCT userAgent ) |