1. Resources
  2. Detection rules
  3. MFA Device Deactivated for an IAM User or the Root User

MFA Device Deactivated for an IAM User or the Root User detection rules

An attacker removes the MFA device from an IAM user or the root user, so that a stolen or reset password is enough to sign in, or so that they can register a device of their own in its place.

Platform
AWS
Severity
Medium
Log source
AWS CloudTrail
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
Permission to call iam:DeactivateMFADevice on the target user, or a session of the user or the root user itself, plus the identity's password or the right to reset it.
Impact
The identity signs in with a password alone or with a device the attacker holds, which for an administrator or the root user is full account control.
Response
Reset the identity's console password, revoke its active console sessions, and deactivate every MFA device registered after the removal that its owner does not hold.
Mitigation
Restrict deactivating and deleting MFA devices of other users to identity administrators, and let users manage only their own device from an MFA-authenticated session.
CloudTrail events
DeactivateMFADeviceDeleteVirtualMFADevice
Threat groups
Scattered Spider

How the attack works

IAM users and the root user can each have up to eight MFA devices: passkeys and security keys, authenticator apps (virtual devices) and hardware tokens. DeactivateMFADevice removes a device from the identity it protects; DeleteVirtualMFADevice then deletes a virtual device, which IAM allows only after the device has been deactivated. A principal allowed to call iam:DeactivateMFADevice on other users can take the second factor away from any of them.

Attackers do this after they gain IAM write access or a console session. With the device gone, a password they know or set with UpdateLoginProfile is enough to sign in as the user, and they can register their own device (EnableMFADevice) so that the identity still looks protected and still satisfies policies that require MFA. CloudTrail records the call under iam.amazonaws.com with the caller in userIdentity and the device in requestParameters.serialNumber; requestParameters.userName names the user, and when it is absent the call applies to the caller. A third rule reads DeleteVirtualMFADevice, the separate call that deletes a virtual device once it has been deactivated.

What an attacker needs

  • Credentials for a principal allowed to call iam:DeactivateMFADevice on the target user, or a session of the user or the root user itself.
  • To benefit from it, the identity's password, or the right to reset it.

Impact

The identity signs in with a password alone, or with a device the attacker holds. For an administrator or the root user this turns one stolen password into full account control, and an attacker-registered device makes the takeover durable.

Detection rules

MFA Device Deactivated for an IAM Identity

Detects DeactivateMFADevice calls, which remove an MFA device from an IAM user or the root user. Triage by comparing the caller (userIdentity.arn) with requestParameters.userName and by looking for a new device, a password reset or a sign-in without MFA for the same identity afterwards. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.

LevelMediumStatusExperimentalLog sourceAWS CloudTrail
title: MFA Device Deactivated for an IAM Identity
id: ed0c1e5f-9680-452f-8c0a-a4603b6ed58e
status: experimental
description: >-
  Detects DeactivateMFADevice calls, which remove an MFA device from an IAM
  user or the root user. Triage by comparing the caller (userIdentity.arn)
  with requestParameters.userName and by looking for a new device, a password
  reset or a sign-in without MFA for the same identity afterwards.
  It also matches attempts that failed (errorCode present): check errorCode,
  because an unauthorized attempt is worth seeing.
references:
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeactivateMFADevice.html
  - https://attack.mitre.org/techniques/T1556/006/
author: Forestall
date: 2026-11-11
tags:
  - attack.defense-impairment
  - attack.persistence
  - attack.t1556.006
logsource:
  product: aws
  service: cloudtrail
detection:
  selection:
    eventSource: iam.amazonaws.com
    eventName: DeactivateMFADevice
  condition: selection
falsepositives:
  - Users replacing a lost or old device, and offboarding by the identity team; confirm with the device owner and expect a new device to be registered by the same person.
level: medium

False positives

  • Users replacing a lost or old device, and offboarding by the identity team; confirm with the device owner and expect a new device to be registered by the same person.

Root User MFA Device Deactivated

Detects DeactivateMFADevice calls made as the account root user (userIdentity.type Root), which remove an MFA device from the root user. Unless the organization is deleting member root credentials through centralized root access, this should be rare and planned. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.

LevelHighStatusExperimentalLog sourceAWS CloudTrail
title: Root User MFA Device Deactivated
id: ed39f5df-7b43-458e-91e5-4433c013e630
status: experimental
description: >-
  Detects DeactivateMFADevice calls made as the account root user
  (userIdentity.type Root), which remove an MFA device from the root user.
  Unless the organization is deleting member root credentials through
  centralized root access, this should be rare and planned.
  It also matches attempts that failed (errorCode present): check errorCode,
  because an unauthorized attempt is worth seeing.
references:
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeactivateMFADevice.html
  - https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-track-privileged-tasks.html
  - https://attack.mitre.org/techniques/T1556/006/
author: Forestall
date: 2026-11-11
tags:
  - attack.defense-impairment
  - attack.persistence
  - attack.t1556.006
logsource:
  product: aws
  service: cloudtrail
detection:
  selection:
    eventSource: iam.amazonaws.com
    eventName: DeactivateMFADevice
    userIdentity.type: Root
  condition: selection
falsepositives:
  - Planned replacement of the root MFA device, and deletion of member account root credentials through an sts:AssumeRoot session from the management account or the IAM delegated administrator account; match the session to its AssumeRoot call.
level: high

False positives

  • Planned replacement of the root MFA device, and deletion of member account root credentials through an sts:AssumeRoot session from the management account or the IAM delegated administrator account; match the session to its AssumeRoot call.

Virtual MFA Device Deleted

Detects DeleteVirtualMFADevice calls, which delete a virtual MFA device from the account. IAM requires a user's virtual device to be deactivated before it can be deleted, so for a device that was in use this event follows a DeactivateMFADevice call and completes the removal. The event carries the device in requestParameters.serialNumber and no user name: match the serial number to the earlier deactivation to see whose device it was. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.

LevelLowStatusExperimentalLog sourceAWS CloudTrail
title: Virtual MFA Device Deleted
id: 7822f982-235c-4477-a8b5-0db4d4ea747d
status: experimental
description: >-
  Detects DeleteVirtualMFADevice calls, which delete a virtual MFA device from
  the account. IAM requires a user's virtual device to be deactivated before
  it can be deleted, so for a device that was in use this event follows a
  DeactivateMFADevice call and completes the removal. The event carries the
  device in requestParameters.serialNumber and no user name: match the serial
  number to the earlier deactivation to see whose device it was.
  It also matches attempts that failed (errorCode present): check errorCode,
  because an unauthorized attempt is worth seeing.
references:
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteVirtualMFADevice.html
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeactivateMFADevice.html
  - https://attack.mitre.org/techniques/T1556/006/
author: Forestall
date: 2026-11-16
tags:
  - attack.defense-impairment
  - attack.persistence
  - attack.t1556.006
logsource:
  product: aws
  service: cloudtrail
detection:
  selection:
    eventSource: iam.amazonaws.com
    eventName: DeleteVirtualMFADevice
  condition: selection
falsepositives:
  - Users and administrators who replace an authenticator app, offboarding, and cleanup of virtual devices that were created and never enabled; confirm with the device owner.
level: low

False positives

  • Users and administrators who replace an authenticator app, offboarding, and cleanup of virtual devices that were created and never enabled; confirm with the device owner.

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.

MFA device removed, then a sign-in without MFA or a new device for the same identity

Detection hypothesisSequence of eventsNeeds a baseline

Removing a device is only useful to an attacker when something follows it: a console sign-in with the password alone, or a device of their own registered in its place. Both leave events for the same identity within a short time, and both are rarer than the removal itself.

  1. A DeactivateMFADevice event from iam.amazonaws.com. Note the identity in requestParameters.userName, the device in requestParameters.serialNumber, the caller in userIdentity.arn and the sourceIPAddress.
  2. Within 24 hours, a ConsoleLogin event from signin.amazonaws.com for the same identity with responseElements.ConsoleLogin Success and additionalEventData.MFAUsed No. For an IAM user match userIdentity.userName, for the root user userIdentity.type Root in the same account.
  3. Or, in the same window, an EnableMFADevice event for the same identity whose requestParameters.serialNumber differs from the removed device.
  4. Raise the priority when the caller of the removal is not the identity itself, or when the sign-in or the new device comes from an address the identity did not use before.

EventsDeactivateMFADeviceConsoleLoginEnableMFADevice

LimitsA user who replaces a lost device produces the same sequence, usually from the usual address and with the owner's confirmation. The root user carries no user name when the account has no alias, so match it by type and account. Sign-ins through IAM Identity Center or another identity provider are not IAM user ConsoleLogin events. The 24 hour window is a starting point.

Triage

  • Compare the caller (userIdentity.arn) with requestParameters.userName; a device removed from someone else's user, or from the root user, is the key signal.
  • Look for EnableMFADevice with a different serial number, UpdateLoginProfile or CreateAccessKey for the same user, and a ConsoleLogin with MFAUsed No shortly after.
  • Confirm with the device owner whether the device was lost or replaced. If not, reset the password, register MFA again with the owner and review the caller's activity.

Response

Once the attack is confirmed:

  1. Lock the identity before you restore anything. Reset its console password, revoke its active console sessions and deactivate access keys that were created around the change.
  2. Deactivate every MFA device that was registered for the identity after the removal and that its owner does not hold.
  3. Register a new device together with the owner, after you have verified the owner through a channel other than the account itself.
  4. Contain the principal that removed the device by deactivating its access keys or revoking its role sessions, and review what it and the affected identity did afterwards.
  5. If the root user was affected, also check its access keys and the contact details of the account, and confirm that the next root sign-in shows MFA.

Mitigation

  • Restrict iam:DeactivateMFADevice and iam:DeleteVirtualMFADevice on other users to identity administrators, and let users manage only their own device from an MFA-authenticated session.
  • Move people to IAM Identity Center or federation, so that few IAM users have a password and MFA device to tamper with.
  • In AWS Organizations, centralize root access and delete member account root credentials, and keep the management account's root user on phishing-resistant MFA.

Frequently asked questions

Does the rule also see a new device being registered in place of the old one?

No. The rules on this page match the removal of a device (`DeactivateMFADevice`, and `DeleteVirtualMFADevice` for a virtual device). A device that the attacker registers appears as `EnableMFADevice` with a different serial number, which a separate page of this library covers. An identity that still shows an MFA device after the alert is therefore no proof that nothing happened.

What does the rule for the deletion of a virtual MFA device add?

Little on its own. IAM allows `DeleteVirtualMFADevice` only after the device has been deactivated, so the deactivation always comes first, and it is the step that takes the second factor away. The deletion rule is low level. It completes the picture, and it shows an attempt that failed, which the deactivation rules for IAM users and the root user do not.

What is the usual harmless cause of this alert?

Users who replace a lost or old device, and offboarding by the identity team. In the harmless case the owner confirms it and the same person registers a new device shortly after. A device removed by someone else, followed by a password reset, a new access key or a sign-in without MFA, does not fit that pattern.

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.