Files
splunk-security_content/docs/_posts/2021-03-02-aws_setdefaultpolicyversion.md
2022-07-19 21:35:47 +00:00

5.0 KiB
Raw Permalink Blame History

title, excerpt, categories, last_modified_at, toc, toc_label, tags
title excerpt categories last_modified_at toc toc_label tags
AWS SetDefaultPolicyVersion Cloud Accounts , Valid Accounts
Cloud
2021-03-02 true
Cloud Accounts
Valid Accounts
Defense Evasion
Initial Access
Persistence
Privilege Escalation
Defense Evasion
Initial Access
Persistence
Privilege Escalation
Splunk Enterprise
Splunk Enterprise Security
Splunk Cloud

Try in Splunk Security Cloud{: .btn .btn--success}

Description

This search looks for AWS CloudTrail events where a user has set a default policy versions. Attackers have been know to use this technique for Privilege Escalation in case the previous versions of the policy had permissions to access more resources than the current version of the policy

  • Type: TTP

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

  • Last Updated: 2021-03-02

  • Author: Bhavin Patel, Splunk

  • ID: 2a9b80d3-6340-4345-11ad-212bf3d0dac4

Annotations

ATT&CK
ID Technique Tactic
T1078.004 Cloud Accounts Defense Evasion, Initial Access, Persistence, Privilege Escalation

| T1078 | Valid Accounts | Defense Evasion, Initial Access, Persistence, Privilege Escalation |

Kill Chain Phase
  • Actions on Objectives
NIST
  • PR.DS
  • PR.AC
  • DE.CM
CIS20
  • CIS 13
CVE
`cloudtrail` eventName=SetDefaultPolicyVersion eventSource = iam.amazonaws.com 
| stats count min(_time) as firstTime max(_time) as lastTime values(requestParameters.policyArn) as policy_arn by src requestParameters.versionId eventName eventSource aws_account_id errorCode userAgent eventID awsRegion userIdentity.principalId user_arn 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `aws_setdefaultpolicyversion_filter`

Macros

The SPL above uses the following Macros:

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

Required field

  • _time
  • eventName
  • userAgent
  • errorCode
  • requestParameters.userName
  • eventSource

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 set a default policy to allow a user to access all resources. That said, AWS strongly advises against granting full control to all AWS resources

Associated Analytic story

RBA

Risk Score Impact Confidence Message
30.0 50 60 From IP address sourceIPAddress, user agent userAgent has trigged an event eventName for updating the the default policy version

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: 1