CreateVirtualMFADevice
AWS
CreateVirtualMFADevice
Event
Creates a virtual MFA device, potentially allowing an attacker to register MFA on a compromised account for persistent access.
Security Context
- Registering an attacker-controlled MFA device on a compromised account locks out the legitimate owner and ensures the adversary maintains access even if the password is reset.
- This technique provides strong persistence by tying account access to a secret the attacker controls, making remediation more complex than simple credential rotation.
Log Source
CloudTrail
Sample Event
Adversarial. Draco creates a virtual MFA device named draco-totp in the production account. He follows up with EnableMFADevice to associate this MFA with his own user — registering an attacker-controlled OTP secret. Now Draco’s user has MFA enabled with a secret only he knows, which (a) hardens his persistence against legitimate-MFA-only-required policies and (b) locks the legitimate account owner out if Draco is impersonating an existing user.
{ "eventVersion": "1.09", "userIdentity": { "type": "IAMUser", "principalId": "AIDADRAC0MALF0YBADGY", "arn": "arn:aws:iam::555123456789:user/draco", "accountId": "555123456789", "accessKeyId": "AKIADRAC0MALF0YEXAMP5", "userName": "draco", "sessionContext": { "attributes": { "creationDate": "2026-04-15T18:51:02Z", "mfaAuthenticated": "false" } } }, "eventTime": "2026-04-16T01:44:21Z", "eventSource": "iam.amazonaws.com", "eventName": "CreateVirtualMFADevice", "awsRegion": "us-east-1", "sourceIPAddress": "203.0.113.66", "userAgent": "aws-cli/1.18.147 Python/3.7.10 Linux/5.4.0-1045-aws botocore/1.18.6", "requestParameters": { "virtualMFADeviceName": "draco-totp" }, "responseElements": { "virtualMFADevice": { "serialNumber": "arn:aws:iam::555123456789:mfa/draco-totp" } }, "requestID": "90000000-0000-4000-8000-000010100110", "eventID": "90000000-0000-4000-8000-000010100111", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "555123456789", "eventCategory": "Management", "tlsDetails": { "tlsVersion": "TLSv1.3", "cipherSuite": "TLS_AES_128_GCM_SHA256", "clientProvidedHostHeader": "iam.amazonaws.com" }}MITRE ATT&CK Mapping
Tactics: Persistence
Techniques:
- T1098 — Account Manipulation — Adversaries may manipulate accounts to maintain and/or elevate access to victim systems. Account manipulation may consist of any action that preserves or modifies adversary access to a compromised account, such as modifying credentials or permission groups. These actions could also include accoun...