Control: 4.1.1 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 principle of least privilege.
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.
Remediation
From 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
. - 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
Exclude
list.
- Case II : Removing user access on a virtual machine.
- Select the
Subscription
, then click onAccess control (IAM)
. - Select
Role assignments
and search forVirtual Machine Administrator Login
orVirtual Machine User Login
or any role that provides access to log into virtual machines. - Click on
Role Name
, SelectAssignments
, and remove identities with no MFA configured.
- Case III : Reducing access of managed identities attached to virtual machines.
- Select the
Subscription
, then click onAccess control (IAM)
. - Select
Role Assignments
from the top menu and apply filters onAssignment type
asPrivileged administrator roles
andType
asVirtual Machines
. - Click on
Role Name
, SelectAssignments
, and remove identities access make sure this follows the least privileges principal.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.cis_v400_4_1_1
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.cis_v400_4_1_1 --share
SQL
This control uses a named query:
select id as resource, 'info' as status, 'Manual verification required.' as reason, display_name as subscriptionfrom azure_subscription;