How the attack works
OCI IAM supports a time-based one-time password (TOTP) as the second factor of a Console sign-in. The user scans a QR code that IAM shows in the Console, and the code shares a secret key with the authenticator app. Oracle's API has four operations for this device: CreateMfaTotpDevice creates the device for the user, ActivateMfaTotpDevice activates it, GenerateTotpSeed generates the seed for the device and DeleteMfaTotpDevice removes it. Oracle states that a user can have one MFA TOTP device, and for tenancies without identity domains that only the user can enable MFA for their own account, while members of Administrators can disable it for others.
One device per user changes how the abuse looks compared with other clouds. An attacker cannot quietly add a second device next to the owner's. They register the first device on an account that had none, typically from a stolen password or a hijacked Console session, or they register a new one after the owner's device was deleted. From then on the attacker holds the only valid factor. The account shows MFA as enabled, the owner can no longer complete a sign-in, and the attacker's sessions satisfy policies that require request.user.mfaTotpVerified='true'. No public incident report describes this at the audit event level for OCI. The page follows what Oracle documents about the device and its events, and mirrors the library's AWS page for MFA device registration.
The Audit log records the operations as com.oraclecloud.identityControlPlane.CreateMfaTotpDevice, ActivateMfaTotpDevice and GenerateTotpSeed. Oracle's reference event for TOTP devices carries the user name in data.resourceName, the user OCID in data.additionalDetails.userId and the acting user in data.additionalDetails.actorName. The deletion of a device has its own rule on the page about sign-on policies and MFA. Collection is the same as for the other OCI pages. Ship the _Audit log group of the root compartment (subcompartments included) to the SIEM through a service connector and a stream.
What an attacker needs
- The user's Console session, or the user's password on an account that has no MFA device yet.
- Alternatively a principal with
manage users, which Oracle's policy reference maps to the create, activate and delete operations for TOTP devices. Activation needs manual interaction with the Console according to Oracle.
Impact
The attacker holds the only second factor of the account. With the password they complete Console sign-ins that count as MFA-verified, and the owner cannot sign in until an administrator removes the device. On a member of Administrators this turns a stolen password into durable control of the tenancy that looks protected in every MFA report.
Detection rules
OCI MFA TOTP Device Created or Activated for a User
Detects the IAM control plane operations CreateMfaTotpDevice and ActivateMfaTotpDevice. Oracle describes the first as creating a new MFA TOTP device for the user and states that a user can have one such device. The second activates the device and, according to Oracle, needs manual interaction with the Console. Together they give the account its second factor. Oracle's reference event for TOTP devices carries the user name in data.resourceName, the user OCID in data.additionalDetails.userId and the acting user in data.additionalDetails.actorName. Compare the actor with the user, and check whether a DeleteMfaTotpDevice event for the same user came shortly before.
title: OCI MFA TOTP Device Created or Activated for a User
id: aa11f22b-8014-4d79-86fa-0e791c20b40a
status: experimental
description: >-
Detects the IAM control plane operations CreateMfaTotpDevice and
ActivateMfaTotpDevice. Oracle describes the first as creating a new MFA TOTP
device for the user and states that a user can have one such device. The
second activates the device and, according to Oracle, needs manual
interaction with the Console. Together they give the account its second
factor. Oracle's reference event for TOTP devices carries the user name in
data.resourceName, the user OCID in data.additionalDetails.userId and the
acting user in data.additionalDetails.actorName. Compare the actor with the
user, and check whether a DeleteMfaTotpDevice event for the same user came
shortly before.
references:
- https://docs.oracle.com/en-us/iaas/Content/Events/Reference/eventsproducers.htm
- https://docs.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/iam/mfa-totp-device/create.html
- https://docs.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/iam/mfa-totp-device/activate.html
- https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/usingmfa.htm
- https://attack.mitre.org/techniques/T1098/005/
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.005
logsource:
product: oci
service: audit
detection:
selection:
eventType:
- com.oraclecloud.identityControlPlane.CreateMfaTotpDevice
- com.oraclecloud.identityControlPlane.ActivateMfaTotpDevice
condition: selection
falsepositives:
- Users who enroll MFA for the first time or replace a phone, which is the common case. Expect a wave of events during an MFA rollout. Alert without exception when the user is a member of Administrators, and confirm with the owner when a device deletion by another account came first.
level: medium
False positives
- Users who enroll MFA for the first time or replace a phone, which is the common case. Expect a wave of events during an MFA rollout. Alert without exception when the user is a member of Administrators, and confirm with the owner when a device deletion by another account came first.
OCI MFA TOTP Device Seed Generated
Detects the IAM control plane operation GenerateTotpSeed. Oracle describes it only as generating the seed for the MFA TOTP device. The seed is the secret key that the authenticator app uses to compute its codes, so the caller of this operation receives what is needed to produce valid codes for the device. The rule matches on the event type alone: Oracle's event list names the event and gives one reference event for all TOTP device operations, with the user name in data.resourceName, and does not document when the Console itself calls this operation during a normal enrollment. The level is low for that reason. Compare the actor (data.additionalDetails.actorName) with the user and with the enrollment events around it.
title: OCI MFA TOTP Device Seed Generated
id: 3e0b0640-55da-4182-9b7a-54fc5f0e9de2
status: experimental
description: >-
Detects the IAM control plane operation GenerateTotpSeed. Oracle describes
it only as generating the seed for the MFA TOTP device. The seed is the
secret key that the authenticator app uses to compute its codes, so the
caller of this operation receives what is needed to produce valid codes for
the device. The rule matches on the event type alone: Oracle's event list
names the event and gives one reference event for all TOTP device
operations, with the user name in data.resourceName, and does not document
when the Console itself calls this operation during a normal enrollment.
The level is low for that reason. Compare the actor
(data.additionalDetails.actorName) with the user and with the enrollment
events around it.
references:
- https://docs.oracle.com/en-us/iaas/Content/Events/Reference/eventsproducers.htm
- https://docs.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/iam/mfa-totp-device/generate-totp-seed.html
- https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/usingmfa.htm
- https://attack.mitre.org/techniques/T1098/005/
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.005
logsource:
product: oci
service: audit
detection:
selection:
eventType: com.oraclecloud.identityControlPlane.GenerateTotpSeed
condition: selection
falsepositives:
- Enrollment of a device by its owner, if the Console calls this operation while it shows the QR code. Measure how often the event appears next to CreateMfaTotpDevice in your tenancy and review the cases where it appears alone or from another account.
level: low
False positives
- Enrollment of a device by its owner, if the Console calls this operation while it shows the QR code. Measure how often the event appears next to CreateMfaTotpDevice in your tenancy and review the cases where it appears alone or from another account.
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.
TOTP device deleted and a new one registered for the same user shortly after
A user can have one TOTP device, so replacing the owner's device takes two steps: the old device is deleted and a new one is created and activated. When someone other than the user deletes the device and a registration follows within hours, the second factor of the account has changed hands.
- The Audit log records
com.oraclecloud.identityControlPlane.DeleteMfaTotpDevice. Oracle's reference event for TOTP devices carries the user name indata.resourceNameand the user OCID indata.additionalDetails.userId. - Within 24 hours the Audit log records
CreateMfaTotpDeviceorActivateMfaTotpDevicewith the samedata.additionalDetails.userId. - Compare
data.additionalDetails.actorNameanddata.identity.ipAddressof the deletion and of the registration. A deletion by another account, or a registration from an address the user has not used before, is the pattern to act on.
EventsDeleteMfaTotpDeviceCreateMfaTotpDeviceActivateMfaTotpDevice
LimitsA user who lost or replaced a phone produces the same sequence with the help desk as the deleting actor, so the owner has to confirm it. The 24 hours are a starting point. The events do not identify the physical device, so the logic cannot tell whose authenticator app holds the new secret.
Triage
- Compare the actor (data.additionalDetails.actorName, data.identity.principalName) with the user the device belongs to (data.resourceName, data.additionalDetails.userId). A device registered by someone else is the first thing to rule out.
- Check whether the user had a device before. Search for DeleteMfaTotpDevice for the same user in the days before the registration and see who deleted it.
- Look at the session that made the call, with its source address (data.identity.ipAddress) and user agent (data.identity.userAgent), and at the sign-in that preceded it.
- Search for a password reset, a new API key or a new auth token for the same user around the same time.
- Confirm with the owner, through a channel other than the account itself, whether they registered the device.
Response
Once the attack is confirmed:
- Delete the TOTP device that the owner does not hold, which an administrator can do for another user.
- Reset the user's password and delete API keys, auth tokens and customer secret keys that were created around the registration.
- Let the verified owner enroll a new device, since Oracle states that an administrator cannot enable MFA for another user.
- Contain the account that registered the device if it was not the user, and review what both accounts did since the registration.
- Confirm afterwards that the user signs in with the new device and that no policy or group changed while the attacker held the factor.
Mitigation
- Enroll MFA for every user that has a Console password, administrators first, so that no account is left for someone else to enroll.
- In tenancies with identity domains, keep the Console sign-on policy at Oracle's security defaults and prefer phishing-resistant factors for administrators.
- Keep
manage usersin the tenancy to a minimum, because it covers the TOTP device operations for other users. - Tell users to report at once when a sign-in asks for a code they never set up, and review the MFA status of privileged users on a schedule.
Frequently asked questions
How does a new MFA device help an attacker when MFA is meant to protect the account?
MFA proves that the person signing in holds the registered device. It does not prove who registered it. Oracle states that a user can have one MFA TOTP device, so a device the attacker registers is the only valid factor of the account. The account shows MFA as enabled, the attacker passes every MFA check, and the owner cannot sign in.
Can an administrator register a TOTP device for another user?
Oracle's MFA page for tenancies without identity domains says that only the user can enable MFA for their own account and that members of Administrators can only disable it for others. Its policy reference lists the create and activate operations under `manage users`. Because the two statements do not line up, the rule does not assume who may call the operations. Compare the actor with the user in triage.
Do the rules see factors that users enroll in an identity domain's own profile page?
Not reliably. The rules read the IAM control plane event types for TOTP devices. Oracle's audit log report for identity domains lists an event described as "MFA factor enrolled", but the Oracle pages that list identity domain event ids do not give an id for it. Enrollments made in the identity domain interface may therefore not match.
What does the seed generation event mean?
Oracle describes `GenerateTotpSeed` only as generating the seed for the MFA TOTP device. The seed is the secret key from which an authenticator app computes its codes, so whoever receives a new seed can produce valid codes for that device. The second rule on this page matches the event alone, at a low level, because Oracle does not document its fields.
References
- MITRE ATT&CK T1098.005: Account Manipulation: Device Registration
- Oracle Cloud Infrastructure: Services that produce events, MFA TOTP device event types
- Oracle Cloud Infrastructure: Managing multifactor authentication (tenancies without identity domains)
- OCI CLI reference: iam mfa-totp-device create (CreateMfaTotpDevice)
- OCI CLI reference: iam mfa-totp-device activate (ActivateMfaTotpDevice)
- OCI CLI reference: iam mfa-totp-device generate-totp-seed (GenerateTotpSeed)
- Oracle Cloud Infrastructure: Details for IAM with Identity Domains (permissions of manage users)
- Oracle Cloud Infrastructure: Audit log report of an identity domain (MFA factor enrolled)