Skip to content

Recon & Enumeration Modules

Beau Bullock edited this page Oct 20, 2023 · 11 revisions

Recon & Enumeration

Invoke-GraphRecon

This module gathers information about the tenant including the primary contact info, directory sync settings, and user settings such as if users have the ability to create apps, create groups, or consent to apps.

--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter
PermissionEnum - Enumerates individual permissions for the current user.
Invoke-GraphRecon -Tokens $tokens -PermissionEnum

Untitled

Untitled

Untitled

Invoke-DumpCAPS

A module to dump conditional access policies from a tenant.

--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter
ResolveGuids   - Resolve any object ID guids found 
Invoke-DumpCAPS -Tokens $tokens -ResolveGuids

Untitled

Invoke-DumpApps

This module helps identify malicious app registrations. It will dump a list of Azure app registrations from the tenant including permission scopes and users that have consented to the apps. Additionally, it will list external apps that are not owned by the current tenant or by Microsoft's main app tenant. This is a good way to find third-party external apps that users may have consented to.

--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter
Invoke-DumpApps -Tokens $tokens

Untitled

Untitled

Get-AzureADUsers

Gather the full list of users from the directory.

--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter
OutFile        - A file to output the results to
Get-AzureADUsers -Tokens $tokens -OutFile users.txt

Get-SecurityGroups

Create a list of security groups along with their members.

--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter
Get-SecurityGroups -AccessToken $tokens.access_token

Untitled

Get-UpdatableGroups

Gets groups that may be able to be modified by the current user

--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter
Get-UpdatableGroups -Tokens $tokens

Untitled

Get-DynamicGroups

Finds dynamic groups and displays membership rules

--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter
Get-DynamicGroups -Tokens $tokens

Untitled

Get-SharePointSiteURLs

Gets a list of SharePoint site URLs visible to the current user

--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter
Get-SharePointSiteURLs -Tokens $tokens

Untitled

Invoke-GraphOpenInboxFinder

This module attempts to locate mailboxes in a tenant that have allowed other users to read them. By providing a userlist the module will attempt to access the inbox of each user and display if it was successful. The access token needs to be scoped to Mail.Read.Shared or Mail.ReadWrite.Shared for this to work.

--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter
Userlist       - A list of usernames one per line
Invoke-GraphOpenInboxFinder -Tokens $tokens -Userlist users.txt

Untitled

Get-TenantID

This module attempts to gather a tenant ID associated with a domain.

--OPTIONS--
Domain   - Pass the $tokens global variable after authenticating to this parameter
Get-TenantID -Domain