ROADtools is a framework to interact with Azure AD. It consists of a library (roadlib) with common components, the ROADrecon Azure AD exploration tool and the ROADtools Token eXchange (roadtx) tool.
install it via pip
later
AzureAD Module
AzureAD is a PowerShell module from Microsoft for managing Azure AD.
Can be used only to interact with Azure AD, no access to Azure resources.
Get the current session state
Get details of the current tenant
AzureAD Users
Enumerate all users
Enumerate a specific user
Search for users who contain the word "admin" in their Display name:
List all the attributes for a user
Search attributes for all users that contain the string "password":
All users who are synced from on-prem
All users who are from Azure AD
Objects created by any user (use -ObjectIdfor a specific user)
Objects owned by a specific user
AzureAD Groups
List all Groups
Enumerate a specific group
Search for a groupbased on string in first characters of DisplayName(wildcard not supported)
To search for groups which contain the word "admin" in their name:
Get Groups that allow Dynamic membership (Note the cmdlet name)
All groups that are synced from on-prem(note that security groups are not synced)
All groups that are from Azure AD
Get members of a group
Get groups and roles where the specified user is a member
AzureAD Role
Get all available role templates
Get all roles
Enumerate users to whom roles are assigned
Enumerating Admin Roles in AzureAD
AzureAD Devices
Get all Azure joined and registered devices
Get the device configuration object (note the RegistrationQuotain the output)
AzureAD Apps
Get all the application objects registered with the current tenant (visible in App Registrations in Azure portal). An application object is the global representation of an app.
Get-AzureADApplication -All $true
Get all details about an application
Get-AzureADApplication -ObjectId [ID NO] | fl *
Get an application based on the display name
Get-AzureADApplication -All $true | ?{$_.DisplayName-match"app"}
The Get-AzureADApplicationPasswordCredential will show the applications with an application password but the password value is not shown.
Get the owner of an application
Get-AzureADApplication -ObjectId [ID NO] | Get-AzureADApplicationOwner | fl *
Get Apps where a User has a role (exact role is not shown)
Get-AzureADUser-ObjectId [MAIL] |Get-AzureADUserAppRoleAssignment | fl *
Get Apps where a Group has a role (exact role is not shown)
Get-AzureADGroup -ObjectId [ID NO] | Get-AzureADGroupAppRoleAssignment | fl *
AzureAD Service Principals
Enumerate Service Principals (visible as Enterprise Applications in Azure Portal).
The service principal is a local representation for an app in a specific tenant and it is the security object that has privileges. This is the 'service account'! Service Principals can be assigned Azure roles.
Get all service principals
Get-AzureADServicePrincipal -All $true
Get all details about a service principal
Get-AzureADServicePrincipal -ObjectId [ID NO] | fl *
Get a service principal based on the display name
Get-AzureADServicePrincipal-All$true|?{$_.DisplayName-match"app"}
Get the owner of a service principal
Get-AzureADServicePrincipal-ObjectId [ID no] | Get-AzureADServicePrincipalOwner | fl *
Get objects owned by a service principal
Get-AzureADServicePrincipal-ObjectId [ID no] | Get-AzureADServicePrincipalOwnedObject
Get objects created by a service principal
Get-AzureADServicePrincipal-ObjectId cdddd16e-2611-4442-8f45-234rwf234 | Get-AzureADServicePrincipalCreatedObject
Get group and role memberships of a service principal
Get-AzureADServicePrincipal -ObjectId [ID no] | Get-AzureADServicePrincipalMembership | fl *
Get-AzureADServicePrincipal | Get-AzureADServicePrincipalMembership