azure-vm-snapshot-export

derived azure emits CanExfiltrate

match (effective permission)

{ "action": "Microsoft.Compute/snapshots/beginGetAccess/action", "scope_type": "resource|resourceGroup|subscription" }

where

principal also has Microsoft.Compute/snapshots/write or /disks/beginGetAccess/action to create/export

emit

source<principal>
target<managed disk / snapshot>
permissionsMicrosoft.Compute/snapshots/beginGetAccess/action Microsoft.Compute/snapshots/write

Narrative

{principal.name} can snapshot and export the disk of a VM (snapshots/beginGetAccess) and read its contents offline.

Raw rule rules/derived/azure/vm.yaml

id: azure-vm-snapshot-export
emits: CanExfiltrate
match_effective_permission:
  action: Microsoft.Compute/snapshots/beginGetAccess/action
  scope_type: resource|resourceGroup|subscription
where:
- principal also has Microsoft.Compute/snapshots/write or /disks/beginGetAccess/action to create/export
emit:
  source: <principal>
  target: <managed disk / snapshot>
  permissions:
  - Microsoft.Compute/snapshots/beginGetAccess/action
  - Microsoft.Compute/snapshots/write
  note: Snapshot a disk and generate a SAS download URL -> offline theft of OS/data disk incl. embedded
    secrets.
  narrative: '{principal.name} can snapshot and export the disk of a VM (snapshots/beginGetAccess) and
    read its contents offline.'
move · open · esc close