Lock down VMware vSphere with least-privilege and built-in anti-escalation controls
Quick summary
-
Isolate management — separate VLAN/subnet, VPN/jump box, firewall rules. vmware.com+1
-
Use RBAC: create narrowly scoped custom roles in vCenter, avoid administrator@vsphere.local for day-to-day ops. techdocs.broadcom.com+1
-
Harden ESXi: enable Lockdown Mode, secure boot/UEFI, enable host firewall, disable unused services. techdocs.broadcom.com+1
-
Centralize identity + MFA (IDP/SAML/OIDC) for vCenter and require MFA for admin actions. StarWind
-
KMS for VM encryption / vTPM for VMs that need strong protection. vmware.com
-
Logging/monitoring/alerting to external SIEM (you use Graylog) and continuous audit of roles & config. vmware.com
1 — Architecture & network isolation (first, foundational)
Actions
-
Put vCenter, ESXi management interfaces (mgmt/vMotion/host management) on a dedicated management VLAN and subnet. Restrict access to that network by firewall to only jump hosts and approved admin IPs. vmware.com
-
Require access to the management network only via a hardened jump box (bastion host) or VPN terminating into a hardened jump host. Disable direct internet access on management hosts. vmware.com
-
Use host-based firewall on ESXi and restrict allowed services to the bare minimum. vmware.com
Why this matters: if attackers can reach management interfaces, they can attempt lateral movement and privilege escalation. Isolation dramatically reduces attack surface.
2 — Identity & access: least privilege, RBAC, and separation of duties
Actions
-
Never use
administrator@vsphere.localfor daily tasks. Create named service accounts and role-based human accounts (mapped from AD/IdP) for operations. Veeam Software+1 -
Use vCenter custom roles scoped to the least privileges required for a job function. Start from read-only and grant single privileges only as needed. Audit role assignments regularly. (VMware docs: best practices for roles & permissions). techdocs.broadcom.com
Example PowerCLI (create a minimal backup role skeleton — adapt privileges to your backup product):
(You’ll want to enumerate the exact privileges for your use-case; VMware docs list fine-grained privilege names.) techdocs.broadcom.com
Recommended policies
-
Map AD groups to vCenter roles rather than assigning per-user permissions.
-
Enforce separation of duties (e.g., network admins vs virtualization admins vs backup admins).
-
Implement just-in-time (JIT) elevation if possible (scripts/automation that grant temporary rights).
3 — Prevent privilege escalation on hosts & vCenter
Controls & configuration
-
Enable ESXi Lockdown Mode (Normal or Strict depending on needs). Use Exception Users carefully (only for emergency local logins). Lockdown prevents vCenter credentials being used to log directly to ESXi shell/SSH. techdocs.broadcom.com+1
-
Use secure boot + UEFI and enable host TPM/secure boot options where supported. This prevents tampering with hypervisor binaries. vmware.com
-
Disable/remediate privileged local accounts; remove unnecessary local users. Where possible, use directory integration but be aware AD integration risks (see section on AD below). Google Cloud
Why this matters: many privilege escalation paths require interacting directly with ESXi hosts; lockdown + secure boot removes common attack vectors.
4 — Identity federation, MFA, service account hygiene
Actions
-
Integrate vCenter with an Identity Provider (SAML / OIDC) and require MFA for admin accounts. vSphere 8 supports more modern IdP integrations. StarWind
-
Use dedicated, constrained service accounts for automation (least privileges, no interactive logins). Store credentials in a secrets manager (or vCenter’s built-in solution) and rotate frequently.
-
Audit and minimize the set of users allowed in privileged groups. Log privileged-group membership changes.
Caveat: Active Directory integration is convenient but increases attack surface if your AD gets compromised. Consider the principle of least trust between AD and vSphere and harden AD hosts that can manage vCenter. Google Cloud
5 — Hardening ESXi and vCenter configuration
Practical steps
-
Follow VMware Security Hardening Guides + CIS Benchmarks: they provide explicit configs (services to disable, TLS settings, logging levels, SSH settings, etc.). Implement Level 1 as baseline and Level 2 where required. vmware.com+1
-
Keep vCenter and ESXi patched and on a supported release. Establish a maintenance window and patching workflow. Use Host Profiles / Image Builder for consistent secure baseline across hosts. vmware.com
-
Disable remote syslog only to internal SIEM — forward ESXi and vCenter logs to a centralized collector (you mentioned Graylog — treat as primary audit sink). Store logs off-host and retain per your compliance retention. vmware.com
Example check (ESXi):
-
Ensure SSH is disabled except for emergencies and monitored when enabled.
-
Ensure ESXi firewall allows only required management ports.
6 — VM-level protections (prevent lateral movement & guest compromise)
Actions
-
Use VM Encryption + KMS for workloads with sensitive data. Encryption prevents snapshot/host compromise from exposing disk contents. vmware.com
-
Enable vTPM for Windows VMs that require attestation.
-
Enforce VM/Portgroup security policies: disable promiscuous mode, forged transmits, MAC address changes on portgroups unless explicitly required.
-
Use guest OS hardening (antivirus, EDR, patching) — secure the guest as you would a physical server.
7 — Reduce API abuse & automation risks
Actions
-
Remove or limit API tokens and long-lived credentials. Use short-lived tokens where possible. Ensure automation runbooks use service accounts with narrowly-scoped roles.
-
Monitor API calls and unusual patterns (mass VM deletes, datastore manipulations). Configure SIEM alerts for anomalous vSphere API behavior.
8 — Monitoring, audit, and incident playbooks
Actions
-
Centralize logs (vCenter, ESXi audit logs, NetFlow, host syslog) to Graylog and build dashboards / alerts for suspicious activity (failed logins, privilege changes, new role assignments, removal of audit logs). vmware.com
-
Periodic reviews: role assignments, exception user lists, open firewall ports, and host lockdown state. Automate compliance checks (Host Profiles / PowerCLI scripts) against the hardening baseline.
-
Define an incident response playbook for compromised vCenter/ESXi, including revocation of credentials, isolating hosts, and forensic preservation of logs.
9 — Practical checklist (immediate actions)
-
Put vCenter + hosts on isolated management VLAN; restrict with ACLs/firewall. vmware.com
-
Configure a jump box + require MFA for management access. StarWind
-
Integrate vCenter with IdP and disable local SSO admin for daily use. StarWind
-
Create custom vCenter roles for each operation (backup, networking, storage, vmops). Assign to AD groups. techdocs.broadcom.com
-
Enable ESXi Lockdown Mode (test exception users). techdocs.broadcom.com
-
Enable secure boot on hosts; enable TPM where available. vmware.com
-
Forward logs to Graylog; build alerts for privilege changes. vmware.com
-
Apply VMware hardening guide / CIS benchmark baseline and automate checks. vmware.com+1
10 — Example PowerCLI snippets (audit and role creation)
List roles and permissions:
Create a skeleton custom role (you must supply exactly the privileges required):
(Use VMware docs to expand the $privs list to the exact privileges you intend to grant.) techdocs.broadcom.com
11 — References & further reading (official / authoritative)
-
VMware Security Hardening Guides (official). vmware.com
-
VMware vSphere permissions & roles best practices (TechDocs). techdocs.broadcom.com
-
VMware Best Practices for Hardening Your Infrastructure (VMware PDF). vmware.com
-
CIS Benchmarks (VMware). cisecurity.org
-
ESXi Lockdown Mode docs (how/when to use). techdocs.broadcom.com+1
vCenter Custom Role Matrix — Exact VMware Privilege IDs
Notes:
-
Privilege IDs are case-sensitive strings such as
VirtualMachine.Interact.PowerOn. -
Some roles below include only the most common / safe privileges you’ll need; you may need to add a few extras depending on backup vendor or automation requirements. Always test in a lab.
-
Use
Get-VIPrivilege | Select Id, Descriptionin PowerCLI to list every privilege available in your environment. WilliamLam.com+1
Role: ReadOnly
Assigned group: AD\VSphere_Readers
Purpose: Read-only view of inventory, events, and object metadata.
Privileges (IDs):
-
System.Read -
VirtualMachine.Inventory.Read -
Host.Inventory.Read -
Datastore.Browse -
Network.View -
ContentLibrary.View -
Event.EventList(orEvents.Readdepending on version; validate with Get-VIPrivilege) -
Global.Diagnostics.View
(Use these to create a strict read-only role; if your vCenter exposes slightly different names check Get-VIPrivilege.) techdocs.broadcom.com
Role: VMOperator
Assigned group: AD\VM_Operators
Purpose: Day-to-day VM operations (power, console, snapshots) without allowing destructive config changes.
Privileges (IDs):
-
VirtualMachine.Interact.PowerOn -
VirtualMachine.Interact.PowerOff -
VirtualMachine.Interact.Suspend -
VirtualMachine.Interact.Reset -
VirtualMachine.Interact.ConsoleInteraction(console access) -
VirtualMachine.Snapshot.Create -
VirtualMachine.Snapshot.Remove -
VirtualMachine.Snapshot.Revert -
VirtualMachine.Inventory.Read -
Datastore.Browse
Notes: Do NOT include VirtualMachine.Config.* privileges unless a limited subset is required. For example, avoid VirtualMachine.Config.AddNewDisk or VirtualMachine.Config.Settings unless explicitly needed. techdocs.broadcom.com
Role: BackupOperator (limited)
Assigned group: AD\Backup_Service
Purpose: Allow backups and restores without broad admin rights.
Privileges (IDs):
-
Datastore.Browse -
VirtualMachine.Snapshot.Create -
VirtualMachine.Snapshot.Remove -
VirtualMachine.Snapshot.Revert -
VirtualMachine.Config.Migrate(only if backup product needs to change placement — otherwise omit) -
Session.Provisioning(sometimes required by backup tooling) -
System.AnonymousorSystem.Read(read access may be needed)
Notes: Different backup products require slightly different privilege sets; use your vendor's guidance and start with minimal privileges then add what’s absolutely required. techdocs.broadcom.com
Role: StorageAdmin
Assigned group: AD\Storage_Admins
Purpose: Manage datastores and storage policies; no VM power or console control.
Privileges (IDs):
-
Datastore.Browse -
Datastore.AllocateSpace -
Datastore.FileManagement(if they must create/delete files) -
StorageProfile.View(orStorageProfile.Assign/Profile.Updatedepending on vCenter version) -
Host.Storage.Administer(if host-level storage config changes are required) -
Global.Licenses.View(if needed for reporting)
Be careful not to include VirtualMachine.Config.* privileges if you want to prevent VM configuration changes. techdocs.broadcom.com
Role: NetworkAdmin
Assigned group: AD\Network_Admins
Purpose: Manage distributed switches, port groups, and networking settings.
Privileges (IDs):
-
Network.Assign -
Network.Config -
DistributedSwitch.Configure(orVslm.*/Host.Network.Configuredepending on version) -
Host.Network.Administer/Host.Network.Configure(host-level network config) -
DVPortgroup.Config(if using distributed portgroups) -
DVSwitch.Configure/DVSwitch.ApplyPolicies(name varies by vCenter release)
Validate exact distributed switch privilege IDs with Get-VIPrivilege because names vary across vSphere versions. techdocs.broadcom.com
Role: SecOps_Auditor
Assigned group: AD\Security_Audit
Purpose: Centralized auditing and event review; read-only privileges to events, tasks, roles, and diagnostics.
Privileges (IDs):
-
System.Read -
Events.Read(orEvent.EventListdepending on version) -
Tasks.View -
Global.Diagnostics.View -
Global.Licenses.View -
Authorization.RoleView(view role and permission definitions; name may bePermissions.View/Permissions.Read) -
Datastore.Browse(optional read-only)
This role should be strictly non-destructive and scoped as read-only. techdocs.broadcom.com
Role: PlatformAdmin (break-glass / emergency only)
Assigned group: AD\Platform_Admins
Purpose: Full administrator rights used only under emergency/JIT conditions.
Privileges (IDs): Full set — equivalent to Administrator role. Some key privileges included in Administrator:
-
System.Read -
System.Anonymous -
Global.ManageCustomAttributes -
Authorization.ModifyRole -
Authorization.ModifyUser/Authorization.AddUser -
VirtualMachine.Config.*(all) -
Datastore.*(all) -
Host.*(all) -
Network.*(all) -
ContentLibrary.*(all) -
Session.*(all)
Because this is "all privilege" you should not create a custom list — instead assign the built-in Administrator role to a tightly controlled AD group, enforce MFA, and require JIT. Use audit logs to track any use. techdocs.broadcom.com
Example PowerCLI snippets to create roles (copy/paste)
Use these as templates — replace YOURDOMAIN\GroupName with your AD group and validate privilege IDs with Get-VIPrivilege.
List privileges to confirm IDs:
Create ReadOnly role:
Create VMOperator role:
Create BackupOperator role (example):
Notes:
-
If a
Get-VIPrivilege -Id "<id>"fails it means that privilege ID is not present in your vCenter version; use theGet-VIPrivilegeoutput to select the correct ID in that case. vdc-download.vmware.com
Verification & testing recommendations
-
Run
Get-VIPrivilege | Select Id, Descriptionto confirm privilege IDs in your environment. WilliamLam.com+1 -
Create roles in a lab vCenter first and assign to test AD groups.
-
Validate by logging in as a test user and confirming permitted actions succeed and forbidden actions fail.
-
Keep a documented mapping of role → exact privilege IDs in source control for audit and reproducibility.
Final notes & important cautions
-
Test everything in a lab before production. Lockdown mode and firewall changes can lock you out if emergency accounts are not configured. techdocs.broadcom.com
-
Rotate credentials and store them in a secrets manager. Use JIT for platform admin access where possible. vmware.com
vSphere Least-Privilege Maintenance Checklist
A regular maintenance plan keeps your least-privilege model effective and auditable.
Use this checklist quarterly—or after any major vCenter, ESXi, or SSO change.
Access Review
-
Verify all vCenter roles match the approved matrix.
-
Confirm Active Directory group membership aligns with current job functions.
-
Remove any direct user assignments (use only AD groups).
-
Audit PlatformAdmin (break-glass) account usage—ensure no recent logins outside of emergency events.
-
Ensure MFA is still enforced for all admin and operator groups.
Privilege Validation
-
Use
Get-VIPermissionin PowerCLI to export current role assignments. -
Compare privilege sets with baseline documentation or previous quarter exports.
-
Verify that no role inheritance has unintentionally propagated to higher scopes.
-
Validate no new roles have been created without change control approval.
-
Check that ReadOnly and Auditor roles are still restricted to view-only actions.
Logging & Monitoring
-
Confirm Graylog / SIEM receives logs for:
-
Permission changes
-
Role creation/deletion
-
Successful
administrator@vsphere.locallogins -
Privilege escalation events
-
-
Test your alerting rules for changes in user privileges.
-
Review failed login attempts and account lockouts.
-
Ensure log retention meets your compliance policy (e.g., 180 days or longer).
Configuration Integrity
-
Export a backup of all custom roles with:
-
Validate PowerCLI scripts still create correct privilege sets after upgrades.
-
Test restoring role definitions from the exported XML.
-
Document any exceptions granted for new tooling or automation.
-
Confirm role descriptions and purpose statements are still accurate.
Testing & Validation
-
Perform role-based access tests using a non-admin test account.
-
Verify VMOperator can power on/off but not reconfigure or delete VMs.
-
Verify StorageAdmin cannot modify VM configuration.
-
Verify NetworkAdmin can update distributed switches but cannot edit VMs.
-
Verify Auditor can only view, not modify.
Documentation & Governance
-
Update your vCenter Access Control SOP with any changes.
-
Store the latest privilege matrix in version control (Git or internal repo).
-
Record findings and next review date in your change log.
-
Schedule the next access review in your ticketing or compliance system.
Comments
Post a Comment
Got something to say? Drop a comment below — let’s chat!