mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-11 07:15:15 +00:00
33 lines
2.1 KiB
Bash
33 lines
2.1 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Prowler - the handy cloud security tool (c) by Toni de la Fuente
|
|
#
|
|
# This Prowler check is licensed under a
|
|
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
|
#
|
|
# You should have received a copy of the license along with this
|
|
# work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
|
|
|
CHECK_ID_check113="1.13"
|
|
CHECK_TITLE_check113="[check113] Ensure MFA is enabled for the root account (Scored)"
|
|
CHECK_SCORED_check113="SCORED"
|
|
CHECK_TYPE_check113="LEVEL1"
|
|
CHECK_SEVERITY_check113="Critical"
|
|
CHECK_ASFF_TYPE_check113="Software and Configuration Checks/Industry and Regulatory Standards/CIS AWS Foundations Benchmark"
|
|
CHECK_ALTERNATE_check113="check113"
|
|
CHECK_SERVICENAME_check113="iam"
|
|
CHECK_RISK_check113='The root account is the most privileged user in an AWS account. MFA adds an extra layer of protection on top of a user name and password. With MFA 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. 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 independent of any individual personal devices. ("non-personal virtual MFA") This lessens the risks of losing access to the MFA due to device loss / trade-in or if the individual owning the device is no longer employed at the company.'
|
|
CHECK_REMEDIATION_check113='Using IAM console navigate to Dashboard and expand Activate MFA on your root account.'
|
|
CHECK_DOC_check113='https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#id_root-user_manage_mfa'
|
|
CHECK_CAF_EPIC_check113='IAM'
|
|
|
|
check113(){
|
|
# "Ensure MFA is enabled for the root account (Scored)"
|
|
COMMAND113=$($AWSCLI iam get-account-summary $PROFILE_OPT --region $REGION --output json --query 'SummaryMap.AccountMFAEnabled')
|
|
if [ "$COMMAND113" == "1" ]; then
|
|
textPass "Virtual MFA is enabled for root"
|
|
else
|
|
textFail "MFA is not ENABLED for root account"
|
|
fi
|
|
}
|