Abuse Info
You can use BARK’s Invoke-AzureRMWebAppShellCommand function to execute commands on a target Web App. You can use BARK’s New-PowerShellFunctionAppFunction, Get-AzureFunctionAppMasterKeys, and Get-AzureFunctionOutput functions to execute arbitrary commands against a target Function App. These functions require you to supply an Azure Resource Manager scoped JWT associated with the principal that has the privilege to execute commands on the web app or function app. There are several ways to acquire a JWT. For example, you may use BARK’s Get-ARMTokenWithRefreshToken to acquire an Azure RM-scoped JWT by supplying a refresh token:Opsec Considerations
This will depend on which particular abuse you perform, but in general Azure will create a log event for each abuse.References
- https://github.com/BloodHoundAD/BARK
- https://www.netspi.com/blog/technical/cloud-penetration-testing/lateral-movement-azure-app-services/
- https://specterops.io/blog/2023/02/15/abusing-azure-app-service-managed-identity-assignments/
- https://specterops.io/blog/2023/04/18/introducing-bloodhound-4-3-get-global-admin-more-often/