Detection rules › Sigma
API Key Created
An attacker may have attemped to create an API key for persistence but it failed. Ex: aws appsync create-api-key --api-id ApiId I have seen this in the eventSource of appsync.amazonaws.com and apigateway.amazonaws.com. There are probably other services that can create API keys as well so I am leaving the eventSource open.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | T1098.001 Account Manipulation: Additional Cloud Credentials |
Rules detecting the same action
Other rules on this platform that filter on the same API call or operation.
- Attempt To Create API Key (Sigma)
Rule body yaml
title: API Key Created
id: 3b07ff19-d7b8-44ba-afa5-d2d6fb8cb22f
status: test
description: |
An attacker may have attemped to create an API key for persistence but it failed.
Ex: aws appsync create-api-key --api-id ApiId
I have seen this in the eventSource of `appsync.amazonaws.com` and `apigateway.amazonaws.com`.
There are probably other services that can create API keys as well so I am leaving the eventSource open.
references:
- https://medium.com/@adan.alvarez/distorting-the-sync-how-aws-appsync-can-be-turned-into-an-attackers-backdoor-8c015b8e52b8
- https://traildiscover.cloud/#AppSync-CreateApiKey
author: Zach Mathis (@yamatosecurity)
date: 2025-04-23
modified: 2025-04-23
tags:
- attack.defense-evasion
- attack.persistence
- attack.t1098.001 #Persistence: Additional Cloud Credentials
logsource:
product: aws
service: cloudtrail
detection:
selection:
eventName: 'CreateApiKey'
filter:
errorCode: 'AccessDenied'
condition: selection and not filter
falsepositives:
level: high
Stages and Predicates
Stage 0: condition
selection and not filterStage 1: selection
selection:
eventName: 'CreateApiKey'
Stage 2: not filter
filter:
errorCode: 'AccessDenied'
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
errorCode | eq | AccessDenied |
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
eventName | eq |
|