Skip to content

Add A Policy To A User (aws)

PlatformAuthorLast Update
awsNick Jones2024-12-02

An adversary may attempt to add a policy to a user, in order to escalate the privileges of that user.

MITRE IDs

Required Permissions

  • iam:AttachUserPolicy

Required Parameters

NameTypeDescriptionExample Value
userstrUser to add policy toroot
policyarnstrPolicy to add to userarn:aws:iam::aws:policy/ReadOnlyAccess

Attacker Action

Terminal window
aws iam attach-user-policy --user-name --policy-arn

Detection Case

ELK query

When logs are ingested into ELK, the following Lucene query can be used to identify relevant events.

eventName:AttachUserPolicy AND eventSource:iam.amazonaws.com

Sigma Definition

---
title: Add a policy to a user
id: ca08ef1e-c37a-4a7e-b1a0-670519faacc2
status: experimental
author: Nick Jones
date: 2024-12-02
description: An adversary may attempt to add a policy to a user, in order to escalate the privileges of that user.
logsource:
service: cloudtrail
detection:
selection_source:
- eventSource: "iam.amazonaws.com"
events:
- eventName: "AttachUserPolicy"
condition: selection_source and events
level: low
tags:
- attack.T1098
falsepositives:
- Developers making legitimate changes to the environment. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment.