Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

AWSCloudTrail - SAML update identity provider

Back
Idbce1dcba-4948-414d-8838-6385afb9d496
RulenameAWSCloudTrail - SAML update identity provider
DescriptionDetects updates to AWS SAML identity provider configuration. Unauthorized changes can allow adversaries to

issue trusted federation tokens and gain persistent or privileged access.
SeverityHigh
TacticsPersistence
TechniquesT1078
Required data connectorsAWS
KindScheduled
Query frequency1d
Query period1d
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Amazon Web Services/Analytic Rules/AWS_SAMLUpdateIdentity.yaml
Version1.0.2
Arm templatebce1dcba-4948-414d-8838-6385afb9d496.json
Deploy To Azure
AWSCloudTrail
| where EventName == "UpdateSAMLProvider" and isempty(ErrorCode) and isempty(ErrorMessage)
| extend UserIdentityArn = iif(isempty(UserIdentityArn), tostring(parse_json(Resources)[0].ARN), UserIdentityArn)
| extend UserName = tostring(split(UserIdentityArn, '/')[-1])
| extend AccountName = case( UserIdentityPrincipalid == "Anonymous", "Anonymous", isempty(UserIdentityUserName), UserName, UserIdentityUserName)
| extend AccountName = iif(AccountName contains "@", tostring(split(AccountName, '@', 0)[0]), AccountName),
  AccountUPNSuffix = iif(AccountName contains "@", tostring(split(AccountName, '@', 1)[0]), "")
status: Available
queryFrequency: 1d
queryPeriod: 1d
triggerOperator: gt
query: |
  AWSCloudTrail
  | where EventName == "UpdateSAMLProvider" and isempty(ErrorCode) and isempty(ErrorMessage)
  | extend UserIdentityArn = iif(isempty(UserIdentityArn), tostring(parse_json(Resources)[0].ARN), UserIdentityArn)
  | extend UserName = tostring(split(UserIdentityArn, '/')[-1])
  | extend AccountName = case( UserIdentityPrincipalid == "Anonymous", "Anonymous", isempty(UserIdentityUserName), UserName, UserIdentityUserName)
  | extend AccountName = iif(AccountName contains "@", tostring(split(AccountName, '@', 0)[0]), AccountName),
    AccountUPNSuffix = iif(AccountName contains "@", tostring(split(AccountName, '@', 1)[0]), "")  
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Amazon Web Services/Analytic Rules/AWS_SAMLUpdateIdentity.yaml
tactics:
- Persistence
triggerThreshold: 0
entityMappings:
- entityType: Account
  fieldMappings:
  - identifier: Name
    columnName: AccountName
  - identifier: UPNSuffix
    columnName: AccountUPNSuffix
  - identifier: CloudAppAccountId
    columnName: RecipientAccountId
- entityType: IP
  fieldMappings:
  - identifier: Address
    columnName: SourceIpAddress
requiredDataConnectors:
- connectorId: AWS
  dataTypes:
  - AWSCloudTrail
alertDetailsOverride:
  alertDescriptionFormat: Detected UpdateSAMLProvider from {{SourceIpAddress}} in account {{RecipientAccountId}}.
  alertDisplayNameFormat: AWS SAML identity provider updated by {{AccountName}}
relevantTechniques:
- T1078
customDetails:
  UserIdentityArn: UserIdentityArn
  EventName: EventName
  EventSource: EventSource
  AWSRegion: AWSRegion
description: |
  Detects updates to AWS SAML identity provider configuration. Unauthorized changes can allow adversaries to
  issue trusted federation tokens and gain persistent or privileged access.  
name: AWSCloudTrail - SAML update identity provider
version: 1.0.2
kind: Scheduled
id: bce1dcba-4948-414d-8838-6385afb9d496
severity: High