Skip to content

Commit 9f20047

Browse files
authored
Merge pull request #176 from JaimePolop/master
changes
2 parents 933055c + affec74 commit 9f20047

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

src/pentesting-cloud/azure-security/az-post-exploitation/az-key-vault-post-exploitation.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ This permission allows a principal to restore a secret from a backup.
108108
az keyvault secret restore --vault-name <vault-name> --file <backup-file-path>
109109
```
110110

111+
### Microsoft.KeyVault/vaults/keys/recover/action
112+
Allows recovery of a previously deleted key from an Azure Key Vault
113+
114+
```bash
115+
az keyvault secret recover --vault-name <vault-name> --name <secret-name>
116+
117+
```
111118
{{#include ../../../banners/hacktricks-training.md}}
112119

113120

src/pentesting-cloud/azure-security/az-privilege-escalation/az-container-instances-apps-jobs-privesc.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,14 @@ It looks like with these permissions it should be possibel to start a job. This
201201

202202
I haven't managed to make it work but according to the allowed parameters it should be possible.
203203

204+
### Microsoft.ContainerInstance/containerGroups/restart/action
205+
206+
Allows restarting a specific container group within Azure Container Instances.
207+
208+
```bash
209+
az container restart --resource-group <resource-group> --name <container-instances>
210+
```
211+
204212

205213
{{#include ../../../banners/hacktricks-training.md}}
206214

src/pentesting-cloud/azure-security/az-privilege-escalation/az-static-web-apps-privesc.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ curl -X PUT "https://functions.azure.com/api/github/updateGitHubContent" \
106106
```
107107

108108

109-
### `Microsoft.Web/staticSites/config/write`
109+
### Microsoft.Web/staticSites/config/write
110110

111111
With this permission, it's possible to **modify the password** protecting a static web app or even unprotect every environment by sending a request such as the following:
112112

@@ -125,6 +125,8 @@ az rest --method put \
125125
}
126126
}'
127127

128+
129+
128130
# Remove the need of a password
129131
az rest --method put \
130132
--url "/subscriptions/<subcription-id>/resourceGroups/<res-group>/providers/Microsoft.Web/staticSites/<app-name>/config/basicAuth?api-version=2021-03-01" \

src/pentesting-cloud/azure-security/az-privilege-escalation/az-virtual-machines-and-network-privesc.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,23 @@ az vm user update \
387387
--password <NEW_PASSWORD>
388388
```
389389
390+
### Microsoft.Compute/virtualMachines/write, "Microsoft.Compute/virtualMachines/read", "Microsoft.Compute/disks/read", "Microsoft.Network/networkInterfaces/read", "Microsoft.Network/networkInterfaces/join/action", "Microsoft.Compute/disks/write".
391+
392+
These permissions allow you to manage, disks, and network interfaces, and, they enable you to attach a disk to a virtual machine.
393+
```bash
394+
# Update the disk's network access policy
395+
az disk update \
396+
--name <disk-name> \
397+
--resource-group <resource-group-name> \
398+
--network-access-policy AllowAll
399+
400+
# Attach the disk to a virtual machine
401+
az vm disk attach \
402+
--vm-name <vm-name> \
403+
--resource-group <resource-group-name> \
404+
--name <disk-name>
405+
```
406+
390407
### TODO: Microsoft.Compute/virtualMachines/WACloginAsAdmin/action
391408
392409
According to the [**docs**](https://learn.microsoft.com/en-us/azure/role-based-access-control/permissions/compute#microsoftcompute), this permission lets you manage the OS of your resource via Windows Admin Center as an administrator. So it looks like this gives access to the WAC to control the VMs...

0 commit comments

Comments
 (0)