AWS CloudTrail CreateAccessKey by Another IAM User (Backdoor Key Creation)

Identifies AWS access key creation where the requester is different from the access key’s target user.

FreeReviewedSigma · Medium · v5
Product
aws
Service
cloudtrail
Author
faloker (SigmaHQ), DRL 1.1
Published
2020-02-12
Updated
2026-07-31
title: AWS CloudTrail CreateAccessKey by Another IAM User (Backdoor Key Creation)
id: 7cb6e3e5-335a-4093-8f3d-95d88e3179cb
status: test
description: This rule flags AWS API calls where an IAM user creates access keys (CreateAccessKey) and the request is attributed to a different user than the access key owner. Such activity can enable persistence by installing long-lived credentials for a backdoored account. It relies on CloudTrail event fields including eventSource, eventName, and the relationship between userIdentity.arn and responseElements.accessKey.userName.
references:
  - https://github.com/RhinoSecurityLabs/pacu/blob/866376cd711666c775bbfcde0524c817f2c5b181/pacu/modules/iam__backdoor_users_keys/main.py
  - https://github.com/SigmaHQ/sigma/blob/master/rules/cloud/aws/cloudtrail/aws_iam_backdoor_users_keys.yml
author: faloker, Huntrule Team
date: 2020-02-12
modified: 2022-10-09
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1098
logsource:
  product: aws
  service: cloudtrail
detection:
  selection_source:
    eventSource: iam.amazonaws.com
    eventName: CreateAccessKey
  filter:
    userIdentity.arn|contains: responseElements.accessKey.userName
  condition: selection_source and not filter
falsepositives:
  - Adding user keys to their own accounts (the filter cannot cover all possible variants of user naming)
  - AWS API keys legitimate exchange workflows
level: medium
license: DRL-1.1
related:
  - id: 0a5177f4-6ca9-44c2-aacf-d3f3d8b6e4d2
    type: derived