Try in Splunk Security Cloud

Description

This search looks for AWS CloudTrail events where a user created a policy version that allows them to access any resource in their account.

  • Type: TTP
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2022-05-17
  • Author: Bhavin Patel, Splunk
  • ID: 2a9b80d3-6340-4345-b5ad-212bf3d0dac4

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1078.004 Cloud Accounts Defense Evasion, Persistence, Privilege Escalation, Initial Access
T1078 Valid Accounts Defense Evasion, Persistence, Privilege Escalation, Initial Access
Kill Chain Phase
  • Exploitation
  • Installation
  • Delivery
NIST
  • DE.CM
CIS20
  • CIS 13
CVE
1
2
3
4
5
6
7
8
9
`cloudtrail` eventName=CreatePolicyVersion eventSource = iam.amazonaws.com errorCode = success 
| spath input=requestParameters.policyDocument output=key_policy_statements path=Statement{} 
| mvexpand key_policy_statements 
| spath input=key_policy_statements output=key_policy_action_1 path=Action 
| where key_policy_action_1 = "*" 
| stats count min(_time) as firstTime max(_time) as lastTime values(key_policy_statements) as policy_added by eventName eventSource aws_account_id errorCode userAgent eventID awsRegion user user_arn 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
|`aws_create_policy_version_to_allow_all_resources_filter`

Macros

The SPL above uses the following Macros:

:information_source: aws_create_policy_version_to_allow_all_resources_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time
  • eventName
  • userAgent
  • errorCode
  • eventSource
  • requestParameters.userName
  • requestParameters.policyDocument
  • aws_account_id
  • awsRegion
  • eventID

How To Implement

You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.

Known False Positives

While this search has no known false positives, it is possible that an AWS admin has legitimately created a policy to allow a user to access all resources. That said, AWS strongly advises against granting full control to all AWS resources and you must verify this activity.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
49.0 70 70 User $user$ created a policy version that allows them to access any resource in their account.

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

Reference

Test Dataset

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range

source | version: 3