Profile Applicability: Level 2


Description:

Multi-Factor Authentication (MFA) helps to protect your AWS resources. You can enable MFA for IAM users or the AWS account root user. When you enable MFA for the root user, it affects only the root user credentials and does not affect the IAM user, IAM users contain their own credentials means each identity has its own MFA configuration. This Multi-Factor Authentication works as an extra layer of protection on top of a user name and password and we know that the root account is the most privileged user in an AWS account. This extra layer protection enabled, when a user signs in to an AWS website, they will be prompted for their user name and password as well as for an authentication code from their AWS MFA device. For Level 2, it is recommended that the root account be protected with a hardware MFA.

Note: When virtual MFA is used for root accounts, it is recommended that the device used is NOT a personal device, but rather a dedicated mobile device(tablet or phone) that is managed to be kept charged and secured independently of any individual personal devices. (“non-personal virtual MFA”) This lessens the risks of losing access to the MFA due to device loss, device trade-in, or if the individual owning the device is no longer employed at the company.


Rationale:

A hardware MFA has a smaller attack surface than a virtual MFA. e.g., a hardware MFA does not suffer the attack surface introduced by the mobile smartphone on which a virtual MFA resides. It increases security which helps to protect AWS resources, it requires the authenticating principal to possess a device that emits a time-sensitive key and have knowledge of credential.

Note: Using hardware MFA for many AWS accounts may create a logistical device management issue. If this is the case, consider implementing this Level 2 recommendation selectively to the highest security AWS accounts and the Level 1 recommendation applied to the remaining accounts.


Impact:

The root account is protected with a Level 2 hardware MFA,  Hardware MFA devices entail additional fees. Hardware MFA devices have fewer potential points of vulnerability than virtual MFA devices and make your root user account more secure.


Default Value:

By default, MFA is not activated for any users if you want to activate MFA for the root user you need to login into the root user account.

 

Audit:

Perform the following to determine if the root account has an MFA setup:

  1. Sign in to AWS console as the root user

  2. Click on <user_account_name> top of the right side.

  3. Click on My Security Credential

  4. Check if MFA is activated or not.


Via CLI

Perform the following to determine if the root account has a hardware MFA setup

  1. Run the following command to determine if the root account has an MFA setup

    aws iam get-account-summary | grep “AccountMFAEnabled”
    
    The AccountMFAEnabled property is set to 1 will ensure that the root account has MFA (Virtual or Hardware) Enabled. If the AccountMFAEnabled property is set to 0 the account is not compliant with this recommendation.

  2. If the AccountMFAEnabled property is set to 1, determine root account has Hardware MFA enabled. 
    Run the following command to list all virtual MFA devices
    aws iam list-virtual-mfa-devices

    If the output contains one MFA with the following Serial Number, it means the MFA is virtual, not hardware and the account is not compliant with this recommendation

    "SerialNumber": "arn:aws:iam::<aws_account_number>:mfa/root-account-mfa-device"


Remediation:

Pre-Requisite

  1. If you want to activate MFA in the root account you need to log in as a root user.

  2. Before the implementation of the below steps, you need a hardware  MFA device

Implementation Plan

  1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/
    Note: to manage MFA devices for the root AWS account, you must use your root account credentials to sign in to AWS. You cannot manage MFA devices for the root account using other credentials.

  2.  In the Identity and Access Management under security alerts click on “Enable MFA”

  3. We are in the “Your Security Credentials “ click on Activate MFA in Multi-Factor Authentication

  4. In the wizard “Manage MFA device” we have three options Virtual(software-based) MFA device, U2F security key (USB device-based), the last one is another hardware MFA device.  Here I choose other hardware MFA device options (you can choose any one Hardware MFA device option as per your requirement) and click on continue.

  5. In the Serial Number box, enter the serial number that is found on the back of the MFA device. (below diagram is used for example)

  6. In the Authentication code 1 box, enter the six-digit number displayed by the MFA device. You might need to press the button on the front of the device to display the number.

  7. Wait 30 seconds while the device refreshes the code, and then enter the next six-digit number into the Authentication Code 2 box. You might need to press the button on the front of the device again to display the second number.

  8. Choose Next Step. The MFA device is now associated with the AWS account. The next time you use your AWS account credentials to sign in, you must type a coded from the hardware MFA device.


Backout Plan

If your AWS account root user MFA device is lost, damaged, or not working, you can recover access to your account by following the below steps.

Recovering a root user MFA device:

  1. Sign in to the AWS Management Console ( https://console.aws.amazon.com/console/home?nc2=h_ct&src=header-signin ) and select root user and entering your AWS account email address. On the next page, fill in the captcha and then enter the password after the captcha page.
  2.  Click on Troubleshoot MFA 
  3.  In the Troubleshoot your authentication device page you click on Sign in using alternative factors
  4.  To authenticate your account by verifying the email address, and click on Send verification email. 
  5.  Check the email that is associated with your AWS account for a message from AWS([email protected]). Follow the direction in the email.

    If you don’t see the email in your account, check your spam folder, or return to your browser and choose to resend the email


  6. After verifying your email address, the next to choose to call me now option is the next step for the authentication of your account.

    AWS call on your registered mobile and enter the 6-digit number from the AWS website on your phone keypad.

    If you don’t receive a call from AWS, choose Sign in to the console again and start over. Or choose AWS Support

  7.  After verifying your phone number, you can sign in to your account by choosing Sign in to the console.

  8. The next step varies depending on the type of MFA you are using:

    1. For a virtual MFA device, remove the account from your device. Then go to the AWS Security Credentials( https://console.aws.amazon.com/console/home?nc2=h_ct&src=header-signin) page and delete the old MFA virtual device.

    2. For the U2F security key, go to the AWS Security Credentials( https://console.aws.amazon.com/console/home?nc2=h_ct&src=header-signin) page and deactivate the old U2F.

    3. For a hardware MFA device,   go to the AWS Security Credentials page and delete the old MFA hardware device entity


Reference:


CIS Controls:

4.5 Use Multifactor Authentication For All Administrative Access 

  • Use multi-factor authentication and encrypted channels for all administrative account access.