1. Resources
  2. Detection rules
  3. New IAM User Created

New IAM User Created detection rules

An attacker with iam:CreateUser adds a new IAM user as a backdoor, then gives it access keys, a console password or administrator policies so that access survives the loss of the original foothold.

Platform
AWS
Severity
Medium
Log source
AWS CloudTrail
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
Credentials for a principal allowed to call iam:CreateUser, and usually permissions to give the new user credentials and policies.
Impact
A durable identity under the attacker's control, whose impact depends on the permissions it is given afterwards, up to full account control.
Response
Deactivate the new user's access keys, delete its console password and attach a policy that denies everything to it, then contain the principal that created it.
Mitigation
Create IAM users only through an approved provisioning pipeline, and deny iam:CreateUser to everyone else with an SCP or permissions boundary.
CloudTrail event
CreateUser
Threat groups
APT29LAPSUS$

How the attack works

IAM users are long-lived identities with their own credentials. Creating one is a common persistence step after an attacker gains IAM permissions: the new user does not depend on the compromised credential, can be named to blend in with existing service users, and can be given programmatic or console access in the following calls.

CreateUser on its own grants nothing; the risk comes from what follows. CloudTrail records the caller in userIdentity and the new user in requestParameters.userName (with optional path, permissionsBoundary and tags). The useful signal is a creation made outside the normal provisioning path, followed within minutes by CreateAccessKey, CreateLoginProfile, AddUserToGroup or Attach*Policy for the same user. Users in IAM Identity Center are created in the Identity Store (identitystore.amazonaws.com, or sso-directory.amazonaws.com for console actions) and are not covered by this rule.

What an attacker needs

  • Credentials for a principal allowed to call iam:CreateUser, and usually permissions to give the new user credentials and policies.

Impact

A durable identity under the attacker's control. Its impact depends on the permissions it is given afterwards, up to full account control.

Detection rules

IAM User Created

Detects CreateUser calls in IAM. Low on its own: raise priority when the caller is not the provisioning role or when credentials and policies are added to requestParameters.userName shortly after. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.

LevelLowStatusExperimentalLog sourceAWS CloudTrail
title: IAM User Created
id: aa3bb807-46d6-4ebb-98d2-006d7f8a0f90
status: experimental
description: >-
  Detects CreateUser calls in IAM. Low on its own: raise priority when the
  caller is not the provisioning role or when credentials and policies are
  added to requestParameters.userName shortly after.
  It also matches attempts that failed (errorCode present): check errorCode,
  because an unauthorized attempt is worth seeing.
references:
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateUser.html
  - https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html
author: Forestall
date: 2026-11-10
tags:
  - attack.persistence
  - attack.t1136.003
logsource:
  product: aws
  service: cloudtrail
detection:
  selection:
    eventSource: iam.amazonaws.com
    eventName: CreateUser
  condition: selection
falsepositives:
  - User provisioning by the identity team or infrastructure-as-code pipelines; allow-list those callers.
level: low

False positives

  • User provisioning by the identity team or infrastructure-as-code pipelines; allow-list those callers.

Detection logic

Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.

IAM user created by a role that Lambda functions or other workloads run as

Detection hypothesisNeeds your own lists

People and provisioning pipelines create IAM users. A session of a workload role that creates one is code doing identity administration. A function that creates users on request gives an attacker a way to get a fresh identity after the stolen key has been revoked, so the creating role matters as much as the user.

  1. Collect CreateUser events from iam.amazonaws.com whose userIdentity.type is AssumedRole, and read the role in userIdentity.sessionContext.sessionIssuer.arn.
  2. Compare the role with your inventory of Lambda execution roles and instance roles, taken from the configuration of your functions and instance profiles.
  3. Alert on a match, and look for CreateAccessKey, CreateLoginProfile and policy attachments for the new user in requestParameters.userName.

EventsCreateUserCreateAccessKeyCreateLoginProfile

LimitsIt needs a current inventory of workload roles. Provisioning automation that runs in Lambda creates users legitimately and has to be excluded by role. A function that uses long-term keys of an IAM user instead of its execution role is not found this way.

Triage

  • Check whether the caller (userIdentity.arn) is the usual provisioning role, and whether the user name follows the naming convention.
  • Look for CreateAccessKey, CreateLoginProfile, AddUserToGroup and Attach*Policy events for requestParameters.userName right after.
  • If the user is not expected, disable its credentials and remove it after reviewing its activity.

Response

Once the attack is confirmed:

  1. Cut the new user off before you delete it. Deactivate its access keys, delete its console password, and attach a policy that denies everything to the user, so that sessions it has already opened stop working too.
  2. Contain the principal that created the user, because it can create another one.
  3. Review everything the new user did and remove what it created, and check whether the same caller created further users, access keys or roles.
  4. Then remove the group memberships and policies of the user and delete it.
  5. Search CloudTrail for the user name after the deletion, to confirm that it has not been created again and that nothing still tries to use its credentials.

Mitigation

  • Create IAM users only through an approved provisioning pipeline, and deny iam:CreateUser to everyone else with an SCP or permissions boundary.
  • Prefer IAM Identity Center for people and roles for workloads, so that new IAM users are rare and easy to review.
  • Review IAM users regularly and remove those without an owner or recent activity.

Frequently asked questions

Why is the rule only at level low if this is a persistence technique?

`CreateUser` on its own grants nothing, and provisioning produces the same event. The useful signal is a creation outside the normal provisioning path, followed within minutes by `CreateAccessKey`, `CreateLoginProfile`, `AddUserToGroup` or an attached policy for the same user. Raise the priority when the caller is not the provisioning role or when those calls follow.

Does the rule see users created in IAM Identity Center?

No. Identity Center users are created in the Identity Store, and CloudTrail records that under `identitystore.amazonaws.com`, or under `sso-directory.amazonaws.com` for console actions. The rule matches `CreateUser` from `iam.amazonaws.com` only.

What should I check about the name of the new user?

Whether it follows your naming convention, and whether it imitates an existing service user. A backdoor user can be named to blend in with what is already there. The event also carries the optional path, permissions boundary and tags of the new user. Compare them with what your provisioning pipeline normally sets.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.