Skip to content

Update GraphRunner to include MFA bypass - #35

Open
Pri3st wants to merge 1 commit into
dafthack:mainfrom
Pri3st:main
Open

Update GraphRunner to include MFA bypass#35
Pri3st wants to merge 1 commit into
dafthack:mainfrom
Pri3st:main

Conversation

@Pri3st

@Pri3stPri3st commented Aug 30, 2024

Copy link
Copy Markdown

Added a -CustomUserAgent parameter to the Get-GraphTokens function. This essentially allows the bypass of MFA enablement gaps related to Device Platforms like in the image below.
Screenshot (27)

Using an out-of-the-ordinary user agent, like Yahoo! Slurp bypasses the interaction_required warning when the -Device parameter fails.

Bypassed CAP Policy Example
Applies toIncluding: Users:
ApplicationsIncluding: All applications
On platformsIncluding: Android, iOS, Windows, Windows_Phone, macOS, Linux
Using clientsIncluding: Legacy Clients, Mobile and Desktop clients, Exchange ActiveSync, Browser
ControlsRequirements (any): Mfa
Session controlsSignInFrequency

Moreover, this argument could also contribute to OPSEC. If one knows the devices that a user utilizes to perform their everyday tasks (e.g. through OSINT), they can use the corresponding User Agent to avoid detection through out-of-the-ordinary User Agents in authentication logs.

The bypass has been successfully tested. PoC can be provided if needed.

Added CustomUserAgent parameter to the Get-GraphTokens function
@Pri3stPri3st changed the title Update GraphRunner.ps1Update GraphRunner to include MFA bypassFeb 19, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Pri3st