Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
MFASweep — A tool for checking if MFA is enabled on multiple Microsoft Services | Kitploit
Tools/GitHubGitHub/dafthack/mfasweep
ReconnaissanceVulnerability AnalysisPenetration TestingCloud SecurityAuthentication
GitHubdafthack/mfasweep

MFASweep

A tool for checking if MFA is enabled on multiple Microsoft Services

View Repository
1.7k23034 months agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

MFASweep

MFASweep is a PowerShell script that attempts to log in to various Microsoft services using a provided set of credentials and will attempt to identify if MFA is enabled. Depending on how conditional access policies and other multi-factor authentication settings are configured some protocols may end up being left single factor. It also has an additional check for ADFS configurations and can attempt to log in to the on-prem ADFS server if detected.

Currently MFASweep has the ability to log in to the following services:

  • Microsoft Graph API
  • Azure Resource Manager API
  • Microsoft 365 Exchange Web Services
  • Microsoft 365 Web Portal w/ 7 user-agent / device types (Windows, Linux, MacOS, Android, iPhone, Windows Phone, Unknown Platform via Nintendo Switch)
  • Microsoft 365 Active Sync
  • ADFS

WARNING: This script attempts to login to the provided account ELEVEN (11) different times (12 if you include ADFS). If you entered an incorrect password this may lock the account out.

For more information check out the blog post here: Exploiting MFA Inconsistencies on Microsoft Services

MFASweep Example

Single Factor Access Results Example

Usage

This command will use the provided credentials and attempt to authenticate to the Microsoft Graph API, Azure Resource Manager API, Microsoft 365 Exchange Web Services, Microsoft 365 Web Portal with 7 different user agents, and Microsoft 365 Active Sync. If any authentication methods result in success, tokens and/or cookies will be written to AccessTokens.json. (Currently does not log cookies or tokens for EWS, ActiveSync, and ADFS.)

root@kitploit:~
Invoke-MFASweep -Username [email protected] -Password Winter2026 -WriteTokens 

This command runs with the default auth methods and checks for ADFS as well.

root@kitploit:~
Invoke-MFASweep -Username [email protected] -Password Winter2026 -Recon -IncludeADFS

Notes

  • The script now uses an Invoke-MFASweepWebRequest wrapper so it can run cleanly on both Windows PowerShell 5.1 and PowerShell 7+.
  • Microsoft Graph API and Azure Resource Manager API checks explicitly detect AADSTS53003 responses and report Conditional Access blocks separately from generic auth failures.
  • The "Unknown Platform" web check uses a Nintendo Switch user-agent string through Invoke-M365WebPortalAuth -UAtype NintendoSwitch.

Individual Modules

Each individual module can be run separately if needed as well.

Microsoft Graph API

root@kitploit:~
Invoke-GraphAPIAuth -Username [email protected] -Password Winter2026 

Azure Resource Manager API

root@kitploit:~
Invoke-AzureManagementAPIAuth -Username [email protected] -Password Winter2026 

Microsoft 365 Exchange Web Services

root@kitploit:~
Invoke-EWSAuth -Username [email protected] -Password Winter2026 

Microsoft 365 Web Portal (Windows user agent)

root@kitploit:~
Invoke-M365WebPortalAuth -Username [email protected] -Password Winter2026 -UAtype Windows

Microsoft 365 Web Portal (iPhone user agent)

root@kitploit:~
Invoke-M365WebPortalAuth -Username [email protected] -Password Winter2026 -UAtype iPhone

Microsoft 365 Web Portal (Unknown Platform / Nintendo Switch user agent)

root@kitploit:~
Invoke-M365WebPortalAuth -Username [email protected] -Password Winter2026 -UAtype NintendoSwitch

Microsoft 365 Active Sync

root@kitploit:~
Invoke-O365ActiveSyncAuth -Username [email protected] -Password Winter2026 

ADFS

root@kitploit:~
Invoke-ADFSAuth -Username [email protected] -Password Winter2026

Unknown Platform (CA Policy Bypass)

This module tests for misconfigured Conditional Access policies that don't enforce MFA for unknown device platforms. It uses a Nintendo Switch user-agent string so that Entra ID reports the device platform and browser as "Unknown."

root@kitploit:~
Invoke-UnknownPlatformAuth -Username [email protected] -Password Winter2026 

Brute Forcing Client IDs During ROPC Auth

The Invoke-BruteClientIDs function will loop through various resource types and client IDs during ROPC auth to find single factor access for various combinations of client IDs and resources. If any authentication methods result in success, tokens and/or cookies will be written to AccessTokens.json. (Currently does not log cookies or tokens for EWS, ActiveSync, and ADFS)

root@kitploit:~
Invoke-BruteClientIDs -Username [email protected] -Password Winter2026 -VerboseOut

By default the Invoke-BruteClientIDs module uses a list of the top 10 most common resources and top 50 clientIDs. You can use the -FullResourceList and -FullClientIdList flags to use built-in larger lists of 514 clientIDs and 54 resources.

root@kitploit:~
Invoke-BruteClientIDs -Username [email protected] -Password Winter2026  -FullResourceList -FullClientIdList -VerboseOut
Download Tool