To get started with the Microsoft-Extractor-Suite, check out the Microsoft-Extractor-Suite docs.
Microsoft-Extractor-Suite is a fully-featured, actively-maintained, Powershell tool designed to streamline the process of collecting all necessary data and information from various sources within Microsoft.
The following Microsoft data sources are supported:
- Unified Audit Log
- Admin Audit Log
- Mailbox Audit Log
- Mailbox Rules
- Transport Rules
- Message Trace Logs
- Azure AD Sign-In Logs
- Azure AD Audit Logs
- Azure Activity Logs
- Azure Directory Activity Logs
In addition to the log sources above the tool is also able to retrieve other relevant information:
- Registered OAuth applications in Azure AD
- The MFA status for all users
- The creation time and date of the last password change for all users
- The risky users
- The risky detections
- The conditional access policies
- Administrator directory roles and their users
- A specific or list of e-mail(s) or attachment(s)
- Delegated permissions for all mailboxes in Microsoft 365.
- Information about all devices registered in Azure AD/Entra ID.
- Audit status and settings for all mailboxes in Microsoft 365.
- Functions designed to gather information about groups.
- Functions designed to gather information about licenses.
Microsoft-Extractor-Suite was created by Joey Rentenaar and Korstiaan Stam and is maintained by the Invictus IR team.
To get started with the Microsoft-Extractor-Suite tool, make sure the requirements are met. If you do not have the Connect-ExchangeOnline, AZ module or/and Connect-AzureAD installed check the installation guide.
Install the Microsoft-Extractor-Suite toolkit:
Install-Module -Name Microsoft-Extractor-Suite
To import the Microsoft-Extractor-Suite:
Import-Module .\Microsoft-Extractor-Suite.psd1
You must sign-in to Microsoft 365 or Azure depending on your use case before running the functions. To sign in, use one of the cmdlets:
Connect-M365 or connect-exchangeonline
Connect-Azure or Connect-AzureAD
Connect-AzureAZ or Connect-AzAccount
Get-UAL
- Collect all Unified Audit LogsGet-UALStatistics
- Displays the total number of logs within the Unified Audit Logs per Record TypeGet-MailboxAuditLog
- Collect Mailbox Audit LogsGet-AdminAuditLog
- Collect Admin Audit Logs
Show-MailboxRules
- Shows mailbox rulesGet-MailboxRules
- Export mailbox rulesGet-TransportRules
- Export transport rulesShow-TransportRules
- Shows transport rules
Get-MessageTraceLog
- Collect message tracking logsGet-Email
- Download specific or bullk emailsShow-Email
- Show email contentGet-Attachment
- Download email attachmentsGet-Sessions
- Collect session information related to MailItemsaccessed eventsGet-MessageIDs
- Extract message IDs from MailItemsaccessed events
Get-EntraAuditLogs
- Collect audit logs via AzureADGet-EntraSignInLogs
- Collect sign-in logs via AzureADGet-GraphEntraSignInLogs
- Collect sign-in logs via Graph APIGet-GraphEntraAuditLogs
- Collect audit logs via Graph API
Get-ActivityLogs
- Collect activity logsGet-DirectoryActivityLogs
- Collect directory activity logs
Get-OAuthPermissions
- Collect OAuth application permissions
Get-Users
- Collect user informationGet-AdminUsers
- Collect users with administrative privilegesGet-MFA
- Collect MFA status for usersGet-RiskyUsers
- Collect risky usersGet-RiskyDetections
- Collect risky detection events
Get-ConditionalAccessPolicies
- Collect conditional access policies
Get-Devices
- Collect device registration information
Get-MailboxAuditStatus
- Collect the mailbox audit configurationsGet-MailboxPermissions
- Collect delegated mailbox permissions
Get-Licenses
- Collect all licenses in the tenant with retention times and premium license indicatorsGet-LicenseCompatibility
- Checks the presence of E5, P2, P1, and E3 licenses and informs about functionality limitationsGet-EntraSecurityDefaults
- Checks the status of Entra ID security defaultsGet-LicensesByUser
- Collect license assignments for all users in the tenant
Get-Groups
- Collect all groups in the organization including details such as group ID and display nameGet-GroupMembers
- Collect all members of each group and their relevant detailsGet-DynamicGroups
- Collect all dynamic groups and their membership rules
Get-AllEvidence
- Collect all (almost) available evidence types automatically
Connect-M365
- Connect to Microsoft 365 servicesConnect-Azure
- Connect to Azure/Entra IDConnect-AzureAZ
- Connect using Az moduleDisconnect-M365
- Disconnect from Microsoft 365 servicesDisconnect-Azure
- Disconnect from Azure/Entra IDDisconnect-AzureAZ
- Disconnect from Az module session
To enhance your analysis, consider exploring the Microsoft-Analyzer-Suite developed by evild3ad. This suite offers a collection of PowerShell scripts specifically designed for analyzing Microsoft 365 and Microsoft Entra ID data, which can be extracted using the Microsoft-Extractor-Suite.