Detection rules › Panther
Root Account Access Key Created
Detects creation of programmatic access keys for the AWS root account, which violates critical security best practices. Root account credentials provide unrestricted access to all AWS resources and cannot be scoped with granular permissions. If compromised, these keys grant attackers complete control over the AWS environment including billing and account closure capabilities.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | T1098 Account Manipulation |
Rules detecting the same action
Other rules on this platform that filter on the same API call or operation.
Rule body yaml
AnalysisType: rule
Filename: aws_root_access_key_created.py
RuleID: "AWS.CloudTrail.RootAccessKeyCreated"
DisplayName: "Root Account Access Key Created"
Enabled: true
LogTypes:
- AWS.CloudTrail
Tags:
- AWS
- Identity and Access Management
- Persistence:Account Manipulation
Reports:
MITRE ATT&CK:
- TA0003:T1098
Severity: Critical
Description: >
Detects creation of programmatic access keys for the AWS root account, which violates critical security best practices. Root account credentials provide unrestricted access to all AWS resources and cannot be scoped with granular permissions. If compromised, these keys grant attackers complete control over the AWS environment including billing and account closure capabilities.
Runbook: |
1. Query CloudTrail for all API calls where userIdentity.accessKeyId matches responseElements.accessKey.accessKeyId in the 24 hours after the key creation to identify all actions taken using the root access key
2. Check if the root account credentials may be compromised by reviewing sourceIPAddress and userAgent against known legitimate access patterns, then verify with the account owner if this creation was authorized
3. Search CloudTrail for IAM policy modifications, user creations, role changes, and resource deletions by userIdentity.type="Root" in the 6 hours around this event to identify unauthorized changes made using root credentials
Reference: https://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html
SummaryAttributes:
- userAgent
- sourceIpAddress
- recipientAccountId
- p_any_aws_arns
Tests:
- Name: Root Access Key Created
ExpectedResult: true
Log:
{
"awsRegion": "us-east-1",
"eventID": "1111",
"eventName": "CreateAccessKey",
"eventSource": "iam.amazonaws.com",
"eventTime": "2019-01-01T00:00:00Z",
"eventType": "AwsApiCall",
"eventVersion": "1.05",
"recipientAccountId": "123456789012",
"requestID": "1111",
"requestParameters": null,
"responseElements":
{
"accessKey":
{
"accessKeyId": "1111",
"createDate": "Jan 01, 2019 0:00:00 PM",
"status": "Active",
},
},
"sourceIPAddress": "111.111.111.111",
"userAgent": "signin.amazonaws.com",
"userIdentity":
{
"accessKeyId": "1111",
"accountId": "123456789012",
"arn": "arn:aws:iam::123456789012:root",
"invokedBy": "signin.amazonaws.com",
"principalId": "123456789012",
"sessionContext":
{
"attributes":
{
"creationDate": "2019-01-01T00:00:00Z",
"mfaAuthenticated": "true",
},
},
"type": "Root",
},
}
- Name: Root Created Access Key For User
ExpectedResult: false
Log:
{
"awsRegion": "us-east-1",
"eventID": "1111",
"eventName": "CreateAccessKey",
"eventSource": "iam.amazonaws.com",
"eventTime": "2019-01-01T00:00:00Z",
"eventType": "AwsApiCall",
"eventVersion": "1.05",
"recipientAccountId": "123456789012",
"requestID": "1111",
"requestParameters": { "userName": "example-user" },
"responseElements":
{
"accessKey":
{
"accessKeyId": "1111",
"createDate": "Jan 01, 2019 0:00:00 PM",
"status": "Active",
"userName": "example-user",
},
},
"sourceIPAddress": "111.111.111.111",
"userAgent": "signin.amazonaws.com",
"userIdentity":
{
"accessKeyId": "1111",
"accountId": "123456789012",
"arn": "arn:aws:iam::123456789012:root",
"invokedBy": "signin.amazonaws.com",
"principalId": "123456789012",
"sessionContext":
{
"attributes":
{
"creationDate": "2019-01-01T00:00:00Z",
"mfaAuthenticated": "true",
},
},
"type": "Root",
},
}
Detection logic
Condition
eventName eq "CreateAccessKey"
userIdentity.type eq "Root"
requestParameters is_null
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 |
|
requestParameters | is_null | |
userIdentity.type | eq |
|
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 |
|---|
eventName |
eventSource |
awsRegion |
recipientAccountId |
sourceIPAddress |
userAgent |
userIdentity |