Imported from node011/Bounty-Reaper (
.bountyreper/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/cis-microsoft-azure-compute-services/cis-azure-compute-20.9/SKILL.md). Install upstream withnpx skills add node011/Bounty-Reaper --skill cis-azure-compute-20.9. Copyright stays with the author (CC-BY-NC-SA-4.0).
Ensure only MFA enabled identities can access privileged Virtual Machine
Description
Verify identities without MFA that can log in to a privileged virtual machine using separate login credentials. An adversary can leverage the access to move laterally and perform actions with the virtual machine's managed identity. Make sure the virtual machine only has necessary permissions, and revoke the admin-level permissions according to the least privileges principal.
Rationale
Integrating multi-factor authentication (MFA) as part of the organizational policy can greatly reduce the risk of an identity gaining control of valid credentials that may be used for additional tactics such as initial access, lateral movement, and collecting information. MFA can also be used to restrict access to cloud resources and APIs.
An Adversary may log into accessible cloud services within a compromised environment using Valid Accounts that are synchronized to move laterally and perform actions with the virtual machine's managed identity. The adversary may then perform management actions or access cloud-hosted resources as the logged-on managed identity.
Impact
This recommendation requires the Entra ID P2 license to implement.
Ensure that identities that are provisioned to a virtual machine utilizes an RBAC/ABAC group and is allocated a role using Azure PIM, and the Role settings require MFA or use another third-party PAM solution for accessing Virtual Machines.
Audit Procedure
Using Azure Portal
- Log in to the Azure portal.
- Select the
Subscription, then click onAccess control (IAM). - Click
Role : Alland clickAllto display the drop-down menu. - Type
Virtual Machine Administrator Loginand selectVirtual Machine Administrator Login. - Review the list of identities that have been assigned the
Virtual Machine Administrator Loginrole. - Go to
Microsoft Entra ID. - For
Per-user MFA:- Under
Manage, clickUsers. - Click
Per-user MFA. - Ensure that none of the identities assigned the
Virtual Machine Administrator Loginrole from step 4 haveStatusset todisabled.
- Under
- For
Conditional Access:- Under
Manage, clickSecurity. - Under
Protect, clickConditional Access. - Ensure that none of the identities assigned the
Virtual Machine Administrator Loginrole from step 4 are exempt from a Conditional Access policy requiring MFA for all users.
- Under
Expected Result
All identities with the Virtual Machine Administrator Login role should have MFA enabled, either through Per-user MFA or Conditional Access policies.
Remediation
Using Azure Portal
- Log in to the Azure portal.
- This can be remediated by enabling MFA for user, Removing user access or Reducing access of managed identities attached to virtual machines.
-
Case I: Enable MFA for users having access on virtual machines.
- Go to
Microsoft Entra ID. - For
Per-user MFA:- Under
Manage, clickUsers. - Click
Per-user MFA. - For each user requiring remediation, check the box next to their name.
- Click
Enable MFA. - Click
Enable.
- Under
- For
Conditional Access:- Under
Manage, clickSecurity. - Under
Protect, clickConditional Access. - Update the Conditional Access policy requiring MFA for all users, removing each user requiring remediation from the
Excludelist.
- Under
- Go to
-
Case II: Removing user access on a virtual machine.
- Select the
Subscription, then click onAccess control (IAM). - Select
Role assignmentsand search forVirtual Machine Administrator LoginorVirtual Machine User Loginor any role that provides access to log into virtual machines. - Click on
Role Name, SelectAssignments, and remove identities with no MFA configured.
- Select the
-
Case III: Reducing access of managed identities attached to virtual machines.
- Select the
Subscription, then click onAccess control (IAM). - Select
Role Assignmentsfrom the top menu and apply filters onAssignment typeasPrivileged administrator rolesandTypeasVirtual Machines. - Click on
Role Name, SelectAssignments, and remove identities access make sure this follows the least privileges principal.
- Select the
Default Value
By default, MFA is not enforced for Virtual Machine access.
References
No specific references listed in the benchmark for this control.
Profile
Level 2 | Manual