Accessing AAD using PowerShell
Of course, we all know the Azure portal; surely attackers can also take advantage of seamless SSO and access the portal using the user’s browser. There’s even a way to run code directly from the Azure portal using Azure Cloud Shell. But these methods are hard to automate and attackers would struggle to stay undetected. The following screenshot shows how Azure Cloud Shell can be run from the Azure portal:
Figure 7.6 – Using Azure Cloud Shell from the Azure portal
But there are also some ways to access AAD using code or the command line directly from your computer:
- The Azure CLI
- Azure PowerShell
- Azure .NET: https://docs.microsoft.com/en-us/dotnet/azure/
Originally, these methods were developed to support automation and simplify administration tasks, but as usual, they can also be abused by attackers.
We will not dive deeper into Azure .NET in this chapter. Azure .NET is a set of...