
Azure Hound is a powerful tool for securing and automating your Azure environment. It provides real-time monitoring and alerting to help you stay on top of potential security threats.
Azure Hound can monitor over 100 different Azure services and resources, including Azure Active Directory, Azure Storage, and Azure Virtual Machines. This comprehensive coverage helps ensure that your entire Azure environment is protected.
One of the key benefits of Azure Hound is its ability to automate repetitive tasks and workflows, freeing up your team to focus on more strategic initiatives. By automating routine tasks, you can reduce the risk of human error and improve overall efficiency.
With Azure Hound, you can also enforce compliance and governance policies across your entire organization, ensuring that everyone is working together to maintain a secure and compliant Azure environment.
Recommended read: Azure Thomas
Azure Hound Authentication
AzureHound supports several authentication options, allowing you to control how you authenticate by using command line flags or a configuration file.
You can authenticate with a username and password, using the -u or --username flag to specify the user principal name in the UPN format "[email protected]", and the -p or --password flag for the clear-text password.
AzureHound also supports authenticating with a service principal secret, using the -a or --app flag for the Application Id and the -s or --secret flag for the Application Secret.
Alternatively, you can use a JWT, or a refresh token, which AzureHound will automatically exchange for an appropriately scoped JWT when accessing the MS Graph and AzureRM APIs.
Here are the authentication options summarized:
AzureHound will prompt you for the password if you don't provide it on the command line, making it convenient to use.
Azure Hound Network
Azure Hound Network is a crucial aspect of testing your Azure environment. You need to test with different user profiles, such as anonymous, company employee, and customer, to understand their rights and authority on Azure AD.
When using Azure AD, it's essential to determine the rights of your corporate employees and their authority on Azure AD. This includes considering the access rights of on-prem Active Directory users to your cloud resources and vice versa.
Testing with different user profiles can reveal unauthorized transactions between your cloud and on-premise domain environments. For example, a user or service account in the cloud environment can perform unauthorized transactions in your on-premise domain environment.
For more insights, see: Azure Auth Json Website Azure Ad Authentication
Internal Network
Testing your penetration test with different user profiles is crucial, such as anonymous, company employee, and customer. This helps identify potential vulnerabilities.
To effectively test your internal network, you need to consider the rights and authority of your corporate employees on Azure AD. This includes determining the access levels of your on-prem Active Directory users to cloud resources.
You should also be aware that a user or service account in the cloud environment can potentially perform unauthorized transactions in your on-premise domain environment.
It's essential to test the interactions between your on-prem and cloud environments to identify any security risks. This includes testing the access levels of your cloud users to your on-prem Active Directory.
External Network
As you connect your Azure Web Services application to your on-prem AD environment, you may be exposing yourself to potential cyber threats.
Most Azure Web Services applications run with Managed Identity permissions, which can be vulnerable to attacks if the web application itself has security weaknesses.
If a cyber attacker captures the access token belonging to a corporate user on Azure AD, they can gain persistence on Azure AD.
This can happen if the user falls victim to a phishing attack, allowing the attacker to steal their access token.
The attacker can then use this token to gain access to your on-prem AD environment, making it a potential target for cyberattacks.
A specific type of attack to watch out for is the Illicit Consent Grant Attack.
Azure Hound AD
Azure Hound AD is a serious threat that can compromise even the most secure Azure environments. A cyber attacker can use a Password Spraying / Brute Force Attack to gain access to Azure AD.
This type of attack is often used to gain initial access to Azure AD, which can then be used to launch more sophisticated attacks.
The attacker can then use the access token information of the user they have accessed to attempt to capture the access token information of a more authorized user, a technique known as lateral movement.
By obtaining the Tenant ID, an attacker can gather helpful information about the company's Azure AD setup.
One of the persistence techniques used by attackers is to create an application with high privileges, which can be used to create an application with password reset privileges on the Global Administrator user.
Here are some common Azure AD attack vectors:
- Password Spraying / Brute Force Attack
- Lateral Movement
- Applications and Service Principals technique
Azure Hound Enumeration
Azure Hound enumeration is all about gathering information and identifying potential attack paths in Azure AD. This involves using tools like StormSpotter to gain access to Azure AD.
To do this effectively, you'll want to use skeleton queries to identify misconfigurations. These queries can help you find all paths starting from a user with high or owner privileges on a subscription, excluding admin accounts.
You can use queries to find all non-admin users with a path to subscription ownership, show only the first 1000 paths. Alternatively, you can find the shortest path for all non-admin users with a path to high privileges on a subscription.
Here are some specific queries you can use:
- Option 1: Find all non-admin users that have a path to subscription ownership. Show only the first 1000 paths.
- Option 2: Find the shortest path for all non-admin users with a path to high privileges on a subscription.
By using these queries, you can gain a better understanding of your Azure AD environment and identify potential vulnerabilities.
Hacking Your Cloud: Tokens Edition
Azure AD needs to be included in penetration testing due to its widespread usage and access control risks.
Attackers can exploit vulnerabilities in web applications on Azure to gain unauthorized access to on-prem or on-cloud active directory infrastructure. This is possible through a compromised system on the cloud or by logging in to Azure AD via on-prem Windows systems.
Web applications on Azure can run with Azure Function Service or Azure App service permission, such as managed identity. This can grant unauthorized access to Azure Resources if the access token belonging to this user is captured by a cyber attacker.
After an Azure web service application with remote code execution is detected, the Azure Resource Manager (ARM) endpoint is triggered to obtain an access token with Managed Identity rights. This allows authenticated enumeration to be performed on Azure AD using the Az PowerShell tool.
To identify attack paths, skeleton queries can be used to extract useful information from the data. These queries can be modified to fit specific naming conventions and environments.
For example, finding all paths starting from a user that has high/owner privileges on a subscription can be done by excluding admin accounts and showing only the first 1000 paths.
Finding all Azure apps that have access to resources which might be unexpected, due to nested group memberships, can be done by looking for paths that end in another resource with a relationship that is not “RunAs” and not “MemberOf”.
Discover more: Azure Resource
Scoping and Output Flags
When working with Azure Hound, it's essential to know how to scope your requests and control the output. You can do this by using various flags.
The directory tenant you want to request permission from can be specified using the -t or --tenant flag, which accepts either a GUID or friendly name format.
You can filter by one or more subscription ID using the -b flag, and AzureHound will automatically dedupe this list for you.
Similarly, you can filter by one or more management group ID using the -m flag, and AzureHound will automatically dedupe all descendent management groups and subscriptions for you.
To control the output, you can use the -o or --output flag, which instructs AzureHound to write its output to a specified file name.
If you want to output logs to a specific file, you can use the --log-file flag.
The verbosity level of AzureHound can be adjusted using the -v or --verbosity flag, which defaults to 0 and can range from -1 to 2.
Enumeration
Enumeration is a crucial step in Azure Hound Enumeration, and it involves gathering information about the target organization's Azure AD. This process can be done using various tools.
StormSpotter is one of the tools that can be used for enumeration on Azure AD. It's a powerful tool that helps you gather information quickly and efficiently.
Azure Hound Resources
Azure Hound is a powerful tool for Azure AD penetration testing, and to get the most out of it, you'll want to check out these resources.
AzureHound is a part of the BloodHoundAD project, which means you can find more information about its development and usage on the BloodHoundAD GitHub page.
AzureHound is a part of the BloodHoundAD project, which means you can find more information about its development and usage on the BloodHoundAD GitHub page.
You can also find more information about Azure AD internals and how to exploit them using the AADInternals GitHub repository.
Here are some other tools that can help you with Azure AD penetration testing:
- AADInternals: A GitHub repository containing information about Azure AD internals and how to exploit them.
- o365creeper: A tool for extracting information from Office 365.
- MicroBurst: A tool for performing Azure AD attacks.
- MSOLSpray: A tool for performing Azure AD attacks.
- fireprox: A tool for testing Azure AD security.
AzureHound is just one part of a larger ecosystem of tools for Azure AD penetration testing, and by using these resources, you can gain a deeper understanding of how to use them effectively.
Azure Hound Automation
Azure Hound Automation is a powerful tool that helps you automate repetitive tasks and workflows in Azure.
It uses a combination of Azure Resource Manager (ARM) templates and PowerShell scripts to automate tasks, making it a game-changer for IT administrators.
With Azure Hound Automation, you can automate tasks such as deploying and configuring resources, managing access and permissions, and monitoring performance and security.
You can also use Azure Hound Automation to automate tasks across multiple Azure subscriptions and environments, making it a great tool for large-scale deployments.
One of the key benefits of Azure Hound Automation is its ability to reduce manual errors and increase efficiency, freeing up IT staff to focus on higher-value tasks.
Azure Hound Services
Azure Hound Services is a powerful tool that helps you identify potential security risks in your Azure environment. It can detect publicly accessible Azure Blogs, which can be a major security concern.
You can use Azure Hound Services to check the accessibility of Azure AD users who are using services. This is crucial because different users have different permissions and memberships, which can create different attack surfaces.
Azure Hound Services can also detect Custom Script Extension, which is a feature that allows you to run scripts on Azure virtual machines. However, if not properly configured, it can be used to gain unauthorized access to sensitive data.
In addition, Azure Hound Services can detect Storage Account Access Keys, which are used to access Azure Storage accounts. If these keys are exposed, it can lead to unauthorized access to sensitive data.
Here are some key features of Azure Hound Services that you should be aware of:
- Custom Script Extension
- Storage Account Access Keys
Azure Hound PowerShell
If you're a system administrator using PowerShell to operate on Azure AD, you should terminate your session safely to avoid security risks.
System administrators should use the Disconnect-AzAccount command to finish the Azure AD session, which keeps access token information in the TokenCache.dat file on C:\Users\[username]\Azure.
Not logging off properly after using these tools can lead to cyber attackers obtaining access token information.
Frequently Asked Questions
What is BloodHound for entra id?
BloodHound for Entra ID helps you discover hidden relationships within your Active Directory and Azure AD, providing a deeper understanding of privileged connections. It's a powerful tool for both defenders and attackers to analyze and visualize complex network relationships.
Featured Images: pexels.com


