lacework-global-36
Eliminate use of the 'root' user for administrative and daily tasks (Automated)
Profile Applicability
• Level 1
Description
With the creation of an AWS account, you create a 'root user' that you cannot disable or delete. That user has unrestricted access to and control over all resources in the AWS account. It is highly recommended to avoid using this account for everyday tasks.
Rationale
The 'root user' has unrestricted access to and control over all account resources. Use of it is inconsistent with the principles of least privilege and separation of duties, and can lead to unnecessary harm due to error or account compromise.
Audit
From Console
- Login to the AWS Management Console at
https://console.aws.amazon.com/iam/
- In the left pane, click
Credential Report
- Click on
Download Report
- Open of Save the file locally
- Locate the
<root account>
under the user column - Review
password_last_used, access_key_1_last_used_date, access_key_2_last_used_date
to determine when the 'root user' was last used.
From Command Line
Run the following CLI commands to provide a credential report for determining the last time the 'root user' was used:
aws iam generate-credential-report
aws iam get-credential-report --query 'Content' --output text | base64 -d | cut -d, -f1,5,11,16 | grep -B1 '<root_account>'
Review password_last_used
, access_key_1_last_used_date
, access_key_2_last_used_date
to determine when the root user was last used.
There are a few conditions under which the use of the 'root' user account is required. Please see the reference links for all of the tasks that require use of the 'root' user.
Remediation
If you find use of the 'root' user account for daily activity to include administrative tasks that do not require the 'root' user:
- Change the 'root' user password.
- Deactivate or delete any access keys associate with the root user.
**Remember, anyone who has 'root' user credentials for your AWS account has unrestricted access to and control of all the resources in your account, including billing information.
References
https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html
https://docs.aws.amazon.com/general/latest/gr/aws_tasks-that-require-root.html
Additional Information
The 'root' user for us-gov cloud regions is not enabled by default. However, on request to AWS support, they can enable the 'root' user and grant access only through access-keys (CLI, API methods) for us-gov cloud region. This recommendation is applicable if using the 'root' user for us-gov cloud regions.
You can monitor usage of the 'root' user by implementing recommendation 3.3 Ensure a log metric filter and alarm exist for usage of the 'root' user.