azure-aci-write-redeploy
match (effective permission)
{
"action": "Microsoft.ContainerInstance/containerGroups/write",
"scope_type": "resource|resourceGroup|subscription"
}
emit
| source type | Identity |
|---|---|
| source | <principal> |
| target | <containerGroup> |
| permissions | Microsoft.ContainerInstance/containerGroups/write |
Narrative
{principal.name} can (re)deploy container group {target.name} with an arbitrary image/entrypoint (containerGroups/write), running attacker code.
Raw rule rules/derived/azure/aci.yaml
id: azure-aci-write-redeploy
emits: CanModifyCode
match_effective_permission:
action: Microsoft.ContainerInstance/containerGroups/write
scope_type: resource|resourceGroup|subscription
emit:
source_type: Identity
source: <principal>
target: <containerGroup>
permissions:
- Microsoft.ContainerInstance/containerGroups/write
escalation: "Recreate the group with an attacker-chosen image, command, or environmentVariables \u2014\
\ arbitrary code runs as the group's MI."
false_positive_note: "Container groups are largely immutable; write recreates the group. Effective code\
\ execution regardless \u2014 the new container runs whatever the attacker specifies."
narrative: '{principal.name} can (re)deploy container group {target.name} with an arbitrary image/entrypoint
(containerGroups/write), running attacker code.'