Last active
July 14, 2020 12:45
-
-
Save ciphertxt/760869efbabc316a6f3596e10f5fa122 to your computer and use it in GitHub Desktop.
Spot check Granted OATH permissions. Attackers are utilizing malicious OATH grants for persistence.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-AzureADServicePrincipal ` | |
-Filter "serviceprincipaltype eq 'Application'" -All $true -PipelineVariable sp ` | |
| Get-AzureADServicePrincipalOAuth2PermissionGrant ` | |
-top 1 ` | |
| select @{N="SPDisplayname";E={$sp.displayname}}, @{N="SPObjectid";E={$sp.objectid}}, consenttype, scope | |
#https://twitter.com/rootsecdev/status/1282640558025060354 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment