Virtual machines

Taking over Azure VMs: run command and Custom Script Extension for SYSTEM or root execution, managed-identity token theft, and user-data and cloud-init secrets.

1분 분량2026년 10월 7일 업데이트florianamette기여자 1명
어시스턴트에게 묻기 (MCP)GitHub에서 편집

A VM you hold write rights over is both a code-execution target and a credential source. The management plane gives you execution without any stored credential (run command, an extension), and once you are on the box, the VM's attached managed identity hands out a subscription token from the metadata endpoint.

Pages#

  • Run command: runCommand for SYSTEM or root execution with no credential.
  • Custom Script Extension: extensions/write to run code, including VMAccess to reset the admin password.
  • Managed identity: steal the VM identity's token from IMDS.
  • User data: read cloud-init and user data for secrets, or write it to run at boot.

References#