Profile Applicability:
- Level 1
Description:
Multi-Factor Authentication (MFA) adds an additional layer of security by requiring a second form of verification (such as an OTP or device-based approval) when users sign in. This is especially critical for protecting sensitive AWS database configurations and account access.
Rationale:
Using MFA helps prevent unauthorized access to your AWS environment even if a password is compromised. It reduces the likelihood of successful phishing, credential stuffing, and brute-force attacks.
Impact:
Requiring MFA for IAM users enhances account protection, though it may introduce minor login delays. Properly managing MFA setup and user onboarding is essential to avoid lockouts.
Default Value:
MFA is not enabled by default for any IAM users or the root account.
Pre-requisites:
IAM user(s) created
Admin permissions to assign and manage MFA devices
Remediation:
Test Plan
Using AWS Console:
Sign in to the AWS Management Console.
Navigate to IAM > Users.
Select a user and go to the Security credentials tab.
Check whether Assigned MFA device is present and enabled.
Using AWS CLI:
List IAM users:
aws iam list-users
Check MFA devices associated with a user:
aws iam list-mfa-devices --user-name <username>
Implementation Plan
Using AWS Console:
Sign in to the AWS Management Console.
Go to IAM > Users, and select the target user.
Click on Security credentials tab.
Under Assigned MFA device, click Manage.
Select Virtual MFA device or Hardware MFA device.
Follow on-screen steps to scan QR code or enter device serial.
Enter two consecutive OTPs generated by the device.
Click Assign MFA.
Using AWS CLI:
Create a virtual MFA device:
aws iam create-virtual-mfa-device --virtual-mfa-device-name <device-name> --outfile <path-to-qr-code-image> --bootstrap-method QRCodePNG
Enable the MFA device with two consecutive authentication codes:
aws iam enable-mfa-device --user-name <username> --serial-number <arn-of-mfa-device> --authentication-code1 <first-code> --authentication-code2 <second-code>
Backout Plan
Using AWS Console:
Sign in to the AWS Console.
Go to IAM > Users, and select the target user.
Click on Security credentials tab.
Under Assigned MFA device, click Remove.
Confirm removal.
Using AWS CLI:
Deactivate the MFA device:
aws iam deactivate-mfa-device --user-name <username> --serial-number <arn-of-mfa-device>
Delete the virtual MFA device:
aws iam delete-virtual-mfa-device --serial-number <arn-of-mfa-device>
References:
CIS AWS Database Services Benchmark v1.0.0, Section 2.12