Merge branch 'master' of github.com:HackTricks-wiki/hacktricks-cloud

This commit is contained in:
Carlos Polop
2025-05-09 14:41:10 +02:00
2 changed files with 6 additions and 19 deletions

View File

@@ -62,7 +62,7 @@ So, if you have the permissions listed over these files, there is an attack vect
Follow the description in the *Abusing Terraform State Files* section of the *Terraform Security* page for directly usable exploit code:
{{#ref}}
pentesting-ci-cd/terraform-security.md#abusing-terraform-state-files
../../../pentesting-ci-cd/terraform-security.md#abusing-terraform-state-files
{{#endref}}
### `s3:PutBucketPolicy`

View File

@@ -156,26 +156,13 @@ az rest --method PUT \
With the permission **`Microsoft.Automation/automationAccounts/webhooks/write`** it's possible to create a new Webhook for a Runbook inside an Automation Account using the following command.
Note that you will need to **indicate webhook URI** with the token to use.
```bash
New-AzAutomationWebHook -Name <webhook-name> -ResourceGroupName <res-group> -AutomationAccountName <automation-account-name> -RunbookName <runbook-name> -IsEnabled $true
```
This command should return a webhook URI which is only displayed on creation. Then, to call the runbook using the webhook URI
```bash
az rest --method PUT \
--url "https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<res-group>/providers/Microsoft.Automation/automationAccounts/<automantion-account-name>/webhooks/<webhook-name>?api-version=2018-06-30" \
--body '{
"name": "<webhook-name>",
"properties": {
"isEnabled": true,
"expiryTime": "2026-01-09T20:03:30.291Z",
"parameters": {},
"runOn": null,
"runbook": {
"name": "<runbook-name>"
},
"uri": "https://f931b47b-18c8-45a2-9d6d-0211545d8c02.webhook.eus.azure-automation.net/webhooks?token=Ts5WmbKk0zcuA8PEUD4pr%2f6SM0NWydiCDqCqS1IdzIU%3d"
}
}'
# Then, to call the runbook using the webhook
curl -X POST "https://f931b47b-18c8-45a2-9d6d-0211545d8c02.webhook.eus.azure-automation.net/webhooks?token=Ts5WmbKk0zcuA8PEUD4pr%2f6SM0NWydiCDqCqS1IdzIU%3d" \
-H "Content-Length: 0"
```