1. Resources
  2. Detection rules
  3. API Key, Auth Token or Customer Secret Key Created for an OCI User

API Key, Auth Token or Customer Secret Key Created for an OCI User detection rules

An attacker with manage users rights, or with a stolen session, adds an API signing key, auth token or customer secret key to a user and then acts as that user without the password or MFA.

Platform
Oracle Cloud Infrastructure
Severity
High
Log source
Oracle Cloud Infrastructure Audit
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
A principal with manage users in the tenancy, or control of the target user's own session or key.
Impact
API access as the target user for as long as the credential exists, which on a tenancy administrator is full control of the tenancy through the API.
Response
Delete the API key, auth token or customer secret key that was created, check the target user for other unrecognized credentials, and contain the account that added it.
Mitigation
Keep manage users in the tenancy to a minimum, separate credential management from tenancy administration, and do not keep API keys on tenancy administrator users.
Event types
com.oraclecloud.identityControlPlane.UploadApiKeycom.oraclecloud.identityControlPlane.CreateAuthTokencom.oraclecloud.identityControlPlane.CreateCustomerSecretKeycom.oraclecloud.identityControlPlane.CreateSmtpCredentialcom.oraclecloud.identityControlPlane.CreateSwiftPasswordcom.oraclecloud.identityControlPlane.UpdateUserCapabilities
API operation
CreateOAuthClientCredential
Threat groups
Storm-0501

How the attack works

OCI users can hold several long-lived credentials besides the Console password: up to three API signing keys for signed API calls, auth tokens for services that do not use request signing, and customer secret keys for the Amazon S3 compatible Object Storage API. Every user can manage their own. Managing them for other users needs permission in the tenancy: the manage users verb covers UploadApiKey, CreateAuthToken and CreateSecretKey for any user, which is why Oracle's examples give it to a help desk group and why its security guide shows how to split credential management from tenancy administration.

Attackers use this in two ways. With rights over users they attach their own key to a more privileged account, such as a member of Administrators, and call the API as that account. With a hijacked Console session they add a key to the compromised user so that access survives a password reset. A request signed with an API key does not pass through the Console sign-in, so the MFA enforced there does not apply to it. The Audit log records com.oraclecloud.identityControlPlane.UploadApiKey, CreateAuthToken and CreateCustomerSecretKey; Oracle's reference event carries the user name in data.resourceName and the user OCID in data.additionalDetails.userId. Two further rules read CreateSmtpCredential and CreateSwiftPassword (SMTP credentials for the Email Delivery service, and the earlier name of auth tokens, whose API operation Oracle marks as deprecated) and UpdateUserCapabilities, the operation with which an administrator enables or disables the credential types a user may hold. Enabling a capability again on a user that had it switched off is the step before a credential of that type is created. A last rule matches the API operation name CreateOAuthClientCredential in data.eventName, because Oracle's event list has no event type for OAuth 2.0 client credentials. A user can hold up to ten of them, and each one obtains access tokens for the services that use OAuth 2.0 authorization.

Collection: ship the _Audit log group of the root compartment (subcompartments included) to the SIEM through a service connector and a stream, and include the home region. The rules fire on every creation, because comparing the caller with the target user needs two fields of the same event: do that comparison in triage or in a SIEM-specific filter.

What an attacker needs

  • A principal with manage users in the tenancy (Administrators, a help desk or credential administration group), or control of the target user's own session or key.
  • The target user must be allowed to hold that credential type.

Impact

API access as the target user for as long as the credential exists: auth tokens do not expire, and API keys work until deleted. On a tenancy administrator this is full control of the tenancy through the API, without the Console sign-in and its MFA.

Detection rules

OCI API Signing Key Uploaded for a User

Detects UploadApiKey operations of the OCI IAM control plane, which add an API signing key to a user. Triage by comparing the caller (data.identity.principalName) with the target user (data.resourceName, data.additionalDetails.userId): a key added to another user, above all to a tenancy administrator, is the escalation and persistence pattern.

LevelMediumStatusExperimentalLog sourceOracle Cloud Infrastructure Audit
title: OCI API Signing Key Uploaded for a User
id: 1b8b132a-88d4-47ca-9295-f67d251ea014
status: experimental
description: >-
  Detects UploadApiKey operations of the OCI IAM control plane, which add an
  API signing key to a user. Triage by comparing the caller
  (data.identity.principalName) with the target user (data.resourceName,
  data.additionalDetails.userId): a key added to another user, above all to a
  tenancy administrator, is the escalation and persistence pattern.
references:
  - https://docs.oracle.com/en-us/iaas/Content/Events/Reference/eventsproducers.htm
  - https://docs.oracle.com/en-us/iaas/Content/Identity/access/working-with-console-passwords-and-API-keys.htm
  - https://attack.mitre.org/techniques/T1098/001/
author: Forestall
date: 2026-11-11
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1098.001
logsource:
  product: oci
  service: audit
detection:
  selection:
    eventType: com.oraclecloud.identityControlPlane.UploadApiKey
  condition: selection
falsepositives:
  - Users rotating their own keys and administrators provisioning keys for service users. Allow-list provisioning automation and alert when the target is a member of Administrators.
level: medium

False positives

  • Users rotating their own keys and administrators provisioning keys for service users. Allow-list provisioning automation and alert when the target is a member of Administrators.

OCI Auth Token or Customer Secret Key Created for a User

Detects CreateAuthToken and CreateCustomerSecretKey operations of the OCI IAM control plane. Auth tokens do not expire and customer secret keys open the S3 compatible Object Storage API. Compare the caller (data.identity.principalName) with the target user (data.resourceName).

LevelMediumStatusExperimentalLog sourceOracle Cloud Infrastructure Audit
title: OCI Auth Token or Customer Secret Key Created for a User
id: 9294cf35-7d80-4119-8ae7-339a56225475
status: experimental
description: >-
  Detects CreateAuthToken and CreateCustomerSecretKey operations of the OCI
  IAM control plane. Auth tokens do not expire and customer secret keys open
  the S3 compatible Object Storage API. Compare the caller
  (data.identity.principalName) with the target user (data.resourceName).
references:
  - https://docs.oracle.com/en-us/iaas/Content/Events/Reference/eventsproducers.htm
  - https://docs.oracle.com/en-us/iaas/Content/Identity/access/working-with-auth-tokens.htm
  - https://attack.mitre.org/techniques/T1098/001/
author: Forestall
date: 2026-11-11
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1098.001
logsource:
  product: oci
  service: audit
detection:
  selection:
    eventType:
      - com.oraclecloud.identityControlPlane.CreateAuthToken
      - com.oraclecloud.identityControlPlane.CreateCustomerSecretKey
  condition: selection
falsepositives:
  - Developers creating tokens for the container registry, database backups or S3 compatible tools. Expect regular volume for service users; alert when the target user is privileged or the caller is not the target.
level: medium

False positives

  • Developers creating tokens for the container registry, database backups or S3 compatible tools. Expect regular volume for service users; alert when the target user is privileged or the caller is not the target.

OCI OAuth 2.0 Client Credential Created for a User

Detects Audit log events whose data.eventName is CreateOAuthClientCredential. Oracle documents OAuth 2.0 client credentials as the credential a user needs to interact programmatically with the services that use the OAuth 2.0 authorization protocol: the credential's OCID and secret are exchanged for an access token at the OAuth2 token service. Oracle's policy reference lists the operation under manage users, so an administrator can create one for another user. Oracle's list of event types has no entry for this credential type, so the rule matches the operation name, which Oracle's Audit reference defines as the content of data.eventName, and its level is low until you have confirmed with one test credential that your events carry this name. Compare the caller (data.identity.principalName) with the target user. Oracle's Cloud Guard has an activity rule for the same operation, named IAM OAuth 2.0 credentials created.

LevelLowStatusExperimentalLog sourceOracle Cloud Infrastructure Audit
title: OCI OAuth 2.0 Client Credential Created for a User
id: e379bac1-b1bb-4e70-8ad5-d4fd8552fa99
status: experimental
description: >-
  Detects Audit log events whose data.eventName is CreateOAuthClientCredential.
  Oracle documents OAuth 2.0 client credentials as the credential a user
  needs to interact programmatically with the services that use the OAuth 2.0
  authorization protocol: the credential's OCID and secret are exchanged for
  an access token at the OAuth2 token service. Oracle's policy reference
  lists the operation under manage users, so an administrator can create one
  for another user. Oracle's list of event types has no entry for this
  credential type, so the rule matches the operation name, which Oracle's
  Audit reference defines as the content of data.eventName, and its level is
  low until you have confirmed with one test credential that your events
  carry this name. Compare the caller (data.identity.principalName) with the
  target user. Oracle's Cloud Guard has an activity rule for the same
  operation, named IAM OAuth 2.0 credentials created.
references:
  - https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm
  - https://docs.oracle.com/en-us/iaas/Content/Identity/policyreference/iampolicyreference.htm
  - https://docs.oracle.com/en-us/iaas/Content/Audit/Reference/logeventreference.htm
  - https://docs.oracle.com/en-us/iaas/cloud-guard/using/detect-recipes.htm
  - https://attack.mitre.org/techniques/T1098/001/
author: Forestall
date: 2026-11-18
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1098.001
logsource:
  product: oci
  service: audit
detection:
  selection:
    data.eventName: CreateOAuthClientCredential
  condition: selection
falsepositives:
  - Users and integrations of the services that authenticate with OAuth 2.0 tokens, whose owners create these credentials for themselves or for a service user. Expect few events. Alert when the target user is privileged or the caller is not the target.
level: low

False positives

  • Users and integrations of the services that authenticate with OAuth 2.0 tokens, whose owners create these credentials for themselves or for a service user. Expect few events. Alert when the target user is privileged or the caller is not the target.

OCI SMTP Credential or Swift Password Created for a User

Detects CreateSmtpCredential and CreateSwiftPassword operations of the OCI IAM control plane. SMTP credentials let their holder send email through the Email Delivery service and do not expire. Swift password is the earlier name of an auth token: Oracle marks the CreateSwiftPassword operation as deprecated in favour of CreateAuthToken, so new use of it comes from old tooling or from someone who avoids the usual operation. Oracle's reference event for credentials carries the user name in data.resourceName and the user OCID in data.additionalDetails.userId. Compare the caller (data.identity.principalName) with that user.

LevelMediumStatusExperimentalLog sourceOracle Cloud Infrastructure Audit
title: OCI SMTP Credential or Swift Password Created for a User
id: df0f9ce5-7e2d-436d-a79d-830b63f440a9
status: experimental
description: >-
  Detects CreateSmtpCredential and CreateSwiftPassword operations of the OCI
  IAM control plane. SMTP credentials let their holder send email through the
  Email Delivery service and do not expire. Swift password is the earlier name
  of an auth token: Oracle marks the CreateSwiftPassword operation as
  deprecated in favour of CreateAuthToken, so new use of it comes from old
  tooling or from someone who avoids the usual operation. Oracle's reference
  event for credentials carries the user name in data.resourceName and the
  user OCID in data.additionalDetails.userId. Compare the caller
  (data.identity.principalName) with that user.
references:
  - https://docs.oracle.com/en-us/iaas/Content/Events/Reference/eventsproducers.htm
  - https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm
  - https://docs.oracle.com/en-us/iaas/api/#/en/identity/20160918/SwiftPassword/CreateSwiftPassword
  - https://attack.mitre.org/techniques/T1098/001/
author: Forestall
date: 2026-11-18
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1098.001
logsource:
  product: oci
  service: audit
detection:
  selection:
    eventType:
      - com.oraclecloud.identityControlPlane.CreateSmtpCredential
      - com.oraclecloud.identityControlPlane.CreateSwiftPassword
  condition: selection
falsepositives:
  - Applications that send email through the Email Delivery service, whose owners create SMTP credentials for a service user. Allow-list those service users and alert when the target is a person or a privileged user.
  - Old scripts and SDK versions that still call the Swift password operation. Move them to auth tokens instead of excluding them.
level: medium

False positives

  • Applications that send email through the Email Delivery service, whose owners create SMTP credentials for a service user. Allow-list those service users and alert when the target is a person or a privileged user.
  • Old scripts and SDK versions that still call the Swift password operation. Move them to auth tokens instead of excluding them.

OCI User Capabilities Updated

Detects UpdateUserCapabilities operations of the OCI IAM control plane. Capabilities decide which credential types a user may hold: Console password, API keys, auth tokens, SMTP credentials, customer secret keys, OAuth 2.0 client credentials and database passwords. Oracle's user guide says that capabilities are enabled by default when a user is created and that only an administrator can enable or disable them, so tenancies that switch them off for administrators or service users see this event rarely. Enabling a capability again is the step before a credential of that type is created. The event does not say which capability changed: Oracle's reference event for users carries the user name in data.resourceName and no capability values, so read the user's current capabilities.

LevelMediumStatusExperimentalLog sourceOracle Cloud Infrastructure Audit
title: OCI User Capabilities Updated
id: 38d4033a-d20a-45e0-8df5-642f255f4378
status: experimental
description: >-
  Detects UpdateUserCapabilities operations of the OCI IAM control plane.
  Capabilities decide which credential types a user may hold: Console
  password, API keys, auth tokens, SMTP credentials, customer secret keys,
  OAuth 2.0 client credentials and database passwords. Oracle's user guide
  says that capabilities are enabled by default when a user is created and
  that only an administrator can enable or disable them, so tenancies that
  switch them off for administrators or service users see this event rarely.
  Enabling a capability again is the step
  before a credential of that type is created. The event does not say which
  capability changed: Oracle's reference event for users carries the user name
  in data.resourceName and no capability values, so read the user's current
  capabilities.
references:
  - https://docs.oracle.com/en-us/iaas/Content/Events/Reference/eventsproducers.htm
  - https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingusers.htm
  - https://docs.oracle.com/en-us/iaas/Content/Identity/users/edit-users-capabilities.htm
  - https://attack.mitre.org/techniques/T1098/001/
author: Forestall
date: 2026-11-18
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1098.001
logsource:
  product: oci
  service: audit
detection:
  selection:
    eventType: com.oraclecloud.identityControlPlane.UpdateUserCapabilities
  condition: selection
falsepositives:
  - Hardening work that switches capabilities off, which uses the same operation as switching them on. Read the user's capabilities after the event to see the direction.
  - Onboarding of a service user that needs one more credential type. Confirm with the administrator in data.identity.principalName.
level: medium

False positives

  • Hardening work that switches capabilities off, which uses the same operation as switching them on. Read the user's capabilities after the event to see the direction.
  • Onboarding of a service user that needs one more credential type. Confirm with the administrator in data.identity.principalName.

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.

User capabilities updated and a credential created for the same user shortly after

Detection hypothesisSequence of events

A tenancy that switches credential capabilities off for administrators and service users forces an attacker to switch one on again before a key or token can be added. A capability update followed within a short time by a new credential for the same user is that two-step pattern, and it is stronger evidence than either event alone.

  1. The Audit log records com.oraclecloud.identityControlPlane.UpdateUserCapabilities. Oracle's reference event for users carries the user name in data.resourceName and the user OCID in data.resourceId.
  2. Within 24 hours the Audit log records UploadApiKey, CreateAuthToken, CreateCustomerSecretKey, CreateSmtpCredential or CreateSwiftPassword for the same user: the same name in data.resourceName, or the same OCID in data.additionalDetails.userId.
  3. Compare the caller of both events in data.identity.principalName. The same caller on both, and a caller that is not the target user, is the pattern to act on.

EventsUpdateUserCapabilitiesUploadApiKeyCreateAuthTokenCreateCustomerSecretKeyCreateSmtpCredentialCreateSwiftPassword

LimitsOnboarding a service user produces the same pair of events, so exclude the callers that provision users. The capability event does not say which capability changed or in which direction. The 24 hours are a starting point. In a tenancy that leaves every capability enabled the first event never occurs and the rules on this page are all there is.

Credential created for a user, then API calls as that user from an address it has not used before

Detection hypothesisSequence of eventsNeeds a baseline

A credential added for later use is used from wherever the attacker works, not from the user's usual hosts. API calls made as the target user after the creation, without a Console session and from a source address the user has not used in the previous month, separate a planted or stolen key from a user's own new key.

  1. The Audit log records com.oraclecloud.identityControlPlane.UploadApiKey, CreateAuthToken or CreateCustomerSecretKey. Keep the target user's OCID from data.additionalDetails.userId and the time.
  2. In the following 7 days, collect the events whose data.identity.principalId is that OCID and whose data.identity.consoleSessionId is empty. Oracle documents that field as the one that identifies a Console session associated with the request.
  3. Keep the events whose data.identity.ipAddress the same principal did not use in the 30 days before the creation, and read data.identity.userAgent and data.eventName of the first of them.
  4. Give priority to members of Administrators and to calls that change policies, groups, users or credentials.

EventsUploadApiKeyCreateAuthTokenCreateCustomerSecretKey

LimitsA user who starts scripting from a new host, a new build runner or a cloud shell produces the same pattern. Oracle documents data.identity.credentials as the credential ID of the user, but its example event leaves it empty, so the address and not the key is the link unless your events carry it. A key used from an address the user also uses is not seen. The 7 and 30 days are starting points.

Triage

  • Compare the caller (data.identity.principalName, data.identity.principalId) with the target user (data.resourceName, data.additionalDetails.userId). A credential created for someone else is the escalation pattern.
  • Check whether the target user is a member of Administrators or holds an administrator role.
  • Check the caller's source (data.identity.ipAddress) and how the caller authenticated shortly before, including sign-ins without MFA.
  • Search Audit events for API calls by the target user from new IP addresses or user agents after the creation time.
  • If not approved, delete the credential, reset the target user's other credentials and review what the user did since the event.

Response

Once the attack is confirmed:

  1. Delete the API key, auth token or customer secret key that was created, and check the target user for other credentials its owner does not recognize.
  2. If the credential was added through the target user's own Console session, reset the password of that user and enroll its MFA factor again, because the session was the way in.
  3. If the caller was a different account, contain it. Reset its credentials and remove its manage users right until its owner is verified.
  4. Review the Audit events for API calls made as the target user since the creation time and undo what they changed, with priority on policies, groups, dynamic groups and further credentials.
  5. Check whether the same caller created credentials for other users, and confirm that no new credential appears on the target user.

Mitigation

  • Keep manage users in the tenancy to a minimum and separate credential management from tenancy administration, as Oracle's security policy examples show with request.operation conditions.
  • Do not keep API keys on tenancy administrator users (CIS OCI Foundations Benchmark), and rotate keys, auth tokens and customer secret keys within 90 days.
  • Use instance principals or resource principals for workloads instead of user credentials.
  • Review the credentials of privileged users on a schedule and delete what is not in use.

Frequently asked questions

Does MFA on the Console protect a user against a new API key?

No. A request signed with an API key does not pass through the Console sign-in, so the MFA enforced there does not apply to it. Whoever holds the key can call the API as that user for as long as the key exists. On a tenancy administrator that is full control of the tenancy through the API.

Does resetting the user's password remove the attacker's access?

Not if a credential was added. API signing keys, auth tokens and customer secret keys are separate from the Console password. Auth tokens do not expire and API keys work until they are deleted, so access through them survives a password reset. Delete the credential itself.

Why do the rules fire when users create their own keys?

Telling a self-service creation from one made for another user needs a comparison of two fields of the same event, the caller and the target user. The rules do not make that comparison and fire on every creation. Compare `data.identity.principalName` with `data.resourceName` in triage or in a SIEM-specific filter.

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.