How to Find AWS IAM multi-factor authentication (MFA) not enabled for all users that have a console password
Problem​
Password policies are used to enforce password complexity requirements. IAM password policies can be used to ensure password are comprised of different character sets. It is recommended that the password policy prevents at least password reuse of 24 or greater.
This security check is part of the CIS Amazon Web Services Benchmarks and is rated severity high.
Prerequisites​
This guide assumes that you have already installed and configured Resoto to collect your AWS cloud resources.
Directions​
Execute the following
search
command in Resoto Shell or Resoto UI:> search is(aws_iam_user) and password_enabled==true and mfa_active==false
​kind=aws_iam_user, ..., region=resoto-poweruser
​kind=aws_iam_user, ..., account=poweruser-teamPipe the
search
command into thedump
command:> search is(aws_iam_user) and password_enabled==true and mfa_active==false | dump
​reported:
​ id: /aws/iam/123
​ name: some-name
​ ctime: '2022-12-05T22:53:14Z'
​ kind: aws_iam_user
​ age: 2mo28dThe command output will list the details of all non-compliant
aws_iam_user
resources.Fix detected issues by following the remediation steps:
- Enable MFA for users account.
- MFA is a simple best practice that adds an extra layer of protection on top of your user name and password.
- Recommended to use hardware keys over virtual MFA.
notePlease refer to the AWS IAM documentation for details.