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

AWS Security Hub - Detect IAM root user Access Key existence

Back
Id171cbece-be87-4467-8754-63d82b3d3dfb
RulenameAWS Security Hub - Detect IAM root user Access Key existence
DescriptionThis query detects AWS Security Hub control IAM.4 findings indicating that an AWS account root user Access Key exists.

A root user Access Key presents a high risk of privilege abuse and should be removed.
SeverityHigh
TacticsPrivilegeEscalation
Persistence
TechniquesT1134.001
T1134.003
T1098.001
Required data connectorsAWSSecurityHub
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/AWS Security Hub/Analytic Rules/IAMRootUserWithAccessKey.yaml
Version1.0.0
Arm template171cbece-be87-4467-8754-63d82b3d3dfb.json
Deploy To Azure
AWSSecurityHubFindings
| where RecordState == "ACTIVE" and ComplianceStatus == "FAILED"
| where tostring(AwsSecurityFindingGeneratorId) == "security-control/IAM.4"
  or tostring(ComplianceSecurityControlId) == "IAM.4"
| extend RootUserARN = tostring(Resources[0].Id)
| summarize TimeGenerated = max(TimeGenerated) by AwsAccountId, AwsRegion, AwsSecurityFindingTitle, AwsSecurityFindingDescription, AwsSecurityFindingId, ComplianceSecurityControlId, RootUserARN
name: AWS Security Hub - Detect IAM root user Access Key existence
alertDetailsOverride:
  alertDisplayNameFormat: AWS Account {{AwsAccountId}} root access key exists
  alertDescriptionFormat: 'AWS Account {{AwsAccountId}} has a root user access key (Resource: {{RootUserARN}}).'
id: 171cbece-be87-4467-8754-63d82b3d3dfb
description: |
  This query detects AWS Security Hub control IAM.4 findings indicating that an AWS account root user Access Key exists.
  A root user Access Key presents a high risk of privilege abuse and should be removed.  
triggerThreshold: 0
entityMappings:
- fieldMappings:
  - columnName: AwsAccountId
    identifier: Name
  - columnName: RootUserARN
    identifier: CloudAppAccountId
  entityType: Account
version: 1.0.0
triggerOperator: gt
query: |
  AWSSecurityHubFindings
  | where RecordState == "ACTIVE" and ComplianceStatus == "FAILED"
  | where tostring(AwsSecurityFindingGeneratorId) == "security-control/IAM.4"
    or tostring(ComplianceSecurityControlId) == "IAM.4"
  | extend RootUserARN = tostring(Resources[0].Id)
  | summarize TimeGenerated = max(TimeGenerated) by AwsAccountId, AwsRegion, AwsSecurityFindingTitle, AwsSecurityFindingDescription, AwsSecurityFindingId, ComplianceSecurityControlId, RootUserARN  
tactics:
- PrivilegeEscalation
- Persistence
kind: Scheduled
queryFrequency: 1h
tags:
- PCI DSS v3.2.1
- NIST 800-53 r5
- CIS AWS Foundations Benchmark v1.4.0
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/AWS Security Hub/Analytic Rules/IAMRootUserWithAccessKey.yaml
severity: High
queryPeriod: 1h
requiredDataConnectors:
- dataTypes:
  - AWSSecurityHubFindings
  connectorId: AWSSecurityHub
status: Available
customDetails:
  RootUserARN: RootUserARN
  FindingId: AwsSecurityFindingId
  ComplianceControlId: ComplianceSecurityControlId
  Region: AwsRegion
relevantTechniques:
- T1134.001
- T1134.003
- T1098.001