PIVTR-D
ROracle Cloud playbook · Identity and access

Stolen API signing key or auth token used to change permissions

The attacker signs API requests with a user's private API key taken from a laptop, repository or continuous integration (CI) secret, or uses the user's auth token or customer secret key. A typical run adds the user to an administrator group, writes a new policy, or uploads a second API key to keep access. Block the user's key-based credentials first, which stops their use and keeps the keys as evidence.

Look here

LogSearch for
Audit, home region, root compartment and every compartment that contains policiesCredential, user, group, policy and dynamic group changes by data.eventName: UploadApiKey, CreateAuthToken, CreateCustomerSecretKey, CreateOAuthClientCredential, CreateUser, AddUserToGroup, CreatePolicy, UpdatePolicy, CreateDynamicGroup, UpdateDynamicGroup. A query covers the named compartment only, without its children, so repeat it per compartment or choose Include subcompartments in Logging Search
Audit export from the CLIThe same changes with time, principal and source address: oci audit event list -c <tenancy-ocid> --start-time <utc> --end-time <utc> --all | jq '.data[] | select(.data."event-name" | IN("UploadApiKey","AddUserToGroup","CreatePolicy","UpdatePolicy")) | [."event-time", .data."event-name", .data.identity."principal-name", .data.identity."ip-address"]'
Logging Search, last 14 daysSource addresses and user agents the owner does not use: search "<tenancy-ocid>/_Audit" | where data.identity.principalName = '<user>' | sort by datetime desc
Audit, identity domain eventsUsers, group members, grants and apps created in the identity domain, by data.additionalDetails.eventId: admin.user.create.success, admin.group.add.member.success, admin.grant.create.success, admin.app.create.success
Object Storage read and write logsObject access with a customer secret key, by data.principalName and data.clientIpAddress. Check data.apiType to separate S3 compatibility calls from native ones

Contain

#Item
1Block the user's key-based credentials and keep the keys as evidence: oci iam user update-user-capabilities --user-id <user-ocid> --can-use-api-keys false --can-use-auth-tokens false --can-use-customer-secret-keys false --can-use-o-auth2-client-credentials false --can-use-smtp-credentials false --can-use-db-credentials false
2List the user's API keys and record their fingerprints: oci iam user api-key list --user-id <user-ocid>
3List the user's auth tokens and record their IDs: oci iam auth-token list --user-id <user-ocid>
4List the user's customer secret keys and record their IDs: oci iam customer-secret-key list --user-id <user-ocid>
5Remove group memberships the attacker added: oci iam group remove-user --user-id <user-ocid> --group-id <group-ocid>
6Restore each changed policy. Save it first with oci iam policy get --policy-id <ocid>, then restore it: oci iam policy update --policy-id <ocid> --statements file://known-good.json
7Delete the stolen API key destructive: oci iam user api-key delete --user-id <user-ocid> --fingerprint <fingerprint>
8Delete the auth tokens the attacker created destructive: oci iam auth-token delete --user-id <user-ocid> --auth-token-id <ocid>
9Delete the customer secret keys the attacker created destructive: oci iam customer-secret-key delete --user-id <user-ocid> --customer-secret-key-id <id>

Eradicate and recover

#Item
1Compare the API key fingerprints of every user with the key inventory. List the users with: oci iam user list -c <tenancy-ocid> --all
2Delete unknown policies after saving them destructive. Compare the policies in every compartment with the infrastructure-as-code baseline first: oci iam policy list -c <compartment-ocid> --all
3Review dynamic group matching rules for new instance or resource matches
4List pre-authenticated requests on buckets the user could reach, and delete unknown ones. See Object Storage exposure
5Issue a new API key to the owner. Move workloads on OCI compute to instance or resource principals
6Restore user capabilities to the minimum the owner needs
Watch out
  • The oci iam user, group and dynamic group commands act on the Default identity domain. For users and groups in other domains, use oci identity-domains user patch, group patch and dynamic-resource-group patch with --endpoint <domain-url>.
  • Auth tokens, customer secret keys and SMTP credentials do not expire. A user can have three API keys, two auth tokens, two customer secret keys, two SMTP credentials and up to 10 OAuth 2.0 client credentials. Check every slot. OAuth 2.0 access tokens already issued stay valid for up to one hour.
  • A pre-authenticated request is not tied to its creator's credentials, so deleting their keys does not stop it. It stops when it expires or is deleted, when the creating user is deleted, or when the creator's permissions change.

OCI CLI 3.94.2 help for audit event list, iam user, iam auth-token, iam customer-secret-key, iam group, iam policy and identity-domains. Oracle documentation: contents of an Audit log event. Checked October 2026.

Adapts material from Dynamic Incident Response: A Framework for Security Teams by Joshua Wright, © 2026 The Escal Institute of Advanced Technologies, Inc. d/b/a SANS Institute, licensed under CC BY 4.0. Figures reproduced under that license. Changes were made. Not published by, endorsed by, or affiliated with the SANS Institute.