IamUser with Admin or wide permissions without MFA enabled

This rule will fail once an IamUser is detected with high permissions but without MFA enabled

Risk Level: Critical
Cloud Entity: IAM User
CloudGuard Rule ID: D9.AWS.IAM.1019
Category: Security, Identity, & Compliance


IamUser where combinedPolicies contain [ name regexMatch /admin|fullaccess/i ] or combinedPolicies contain [ policyDocument.Statement contain[  (Effect='Allow') and  (Action='*' and Resource='*') ]] should not have mfaActive=false


From Portal
We recommend enabling MFA for all IamUsers in the account, especially users with high permissions. Perform the following steps to enable MFA:

  1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/
  2. In the navigation pane, choose Users.
  3. In the User Name list, choose the name of the intended MFA user.
  4. Choose the Security Credentials tab, and then choose Manage MFA Device.
  5. In the Manage MFA Device wizard, choose A virtual MFA device, and then choose Next Step.
    Note: IAM generates and displays configuration information for the virtual MFA device, including a QR code graphic. The graphic is a representation of the 'secret configuration key' that is available for manual entry on devices that do not support QR codes.
  6. Open your virtual MFA application. (For a list of apps that you can use for hosting virtual MFA devices, see Virtual MFA Applications.) If the virtual MFA application supports multiple accounts (multiple virtual MFA devices), choose the option to create a new account (a new virtual MFA device).
  7. Determine whether the MFA app supports QR codes, and then do one of the following:
    7.1 Use the app to scan the QR code. For example, you might choose the camera icon or choose an option similar to Scan code, and then use the device's camera to scan the code.
    7.2 In the Manage MFA Device wizard, choose Show secret key for manual configuration, and then type the secret configuration key into your MFA application. When you are finished, the virtual MFA device starts generating one-time passwords.
  8. In the Manage MFA Device wizard, in the Authentication Code 1 box, type the one-time password that currently appears in the virtual MFA device. Wait up to 30 seconds for the device to generate a new one-time password. Then type the second one-time password into the Authentication Code 2 box. Choose Active Virtual MFA.

From Command Line

  1. First of all we need to create the virtual MFA device.
aws iam create-virtual-mfa-device --virtual-mfa-device-name MFA_DEVICE_NAME --outfile FILENAME.PNG --bootstrap-method QRCodePNG
  1. Sync your mobile device with the desired MFA authenticator.
    Note: You need to open Authenticator app and scan the QRCode generated from above step.

  2. Generate two authentication codes with the MFA authenticator, Note down the codes and use those in below command.

  3. Next step is to enable the virtual MFA device for user using the two MFA codes generated in previous step.

aws iam enable-mfa-device --user-name USER_NAME --serial-number MFA_DEVICE_ARN --authentication-code1 ENTER CODE1 --authentication-code2 ENTER CODE2


  1. http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
  2. https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#enable-mfa-for-privileged-users
  3. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable_virtual.html

IAM User

An IAM user is an entity that you create in AWS to represent the person or service that uses it to interact with AWS. A user in AWS consists of a name and credentials.

Compliance Frameworks

  • AWS CloudGuard SOC2 based on AICPA TSC 2017
  • AWS Dashboard System Ruleset
  • AWS HITRUST v11.0.0
  • AWS MITRE ATT&CK Framework v10
  • AWS MITRE ATT&CK Framework v11.3
  • AWS NIST 800-53 Rev 5
  • AWS PCI-DSS 4.0
  • AWS Security Risk Management