This is a BlackMarlinExec Attack Research Kit.
SME requires no third party dependencies. SME's functions are designed to be as simple and maintainable as possible. Most functions are very simple wrappers for making requests to various REST API endpoints. SME's basic functions do not even require each other, you can pull almost any SME function out of SME and it will work perfectly as a standalone function in your own scripts.
You are on the last Up to Date repository of the project SharkMapExec
- If you want to report a problem, open un Issue
- If you want to contribute, open a Pull Request
- If you want to discuss, open a Discussion
SharkMapExec-AzureKeyVaultTokenWithClientCredentialsrequests a token from STS with Azure Vault specified as the resource/intended audience using a client ID and secret.SharkMapExec-AzureKeyVaultTokenWithUsernamePasswordrequests a token from STS with Azure Vault specified as the resource/intended audience using a user-supplied username and password.SharkMapExec-AzurePortalTokenWithRefreshTokenrequests an Azure Portal Auth Refresh token with a user-supplied refresh token.SharkMapExec-AzureRMTokenWithClientCredentialsrequests an AzureRM-scoped JWT with a client ID and secret. Useful for authenticating as an Entra service principal.SharkMapExec-AzureRMTokenWithPortalAuthRefreshTokenrequests an AzureRM-scoped JWT with a user-supplied Azure Portal Auth Refresh token.SharkMapExec-AzureRMTokenWithRefreshTokenrequests an AzureRM-scoped JWT with a user-supplied refresh token.SharkMapExec-AzureRMTokenWithUsernamePasswordrequests an AzureRM-scoped JWT with a user-supplied username and password.SharkMapExec-EntraRefreshTokenWithUsernamePasswordrequests a collection of tokens, including a refresh token, from login.microsoftonline.com with a user-supplied username and password. This will fail if the user has Multi-Factor Authentication requirements or is affected by a Conditional Access Policy.SharkMapExec-MSGraphTokenWithClientCredentialsrequests an MS Graph-scoped JWT with a client ID and secret. Useful for authenticating as an Entra service principal.SharkMapExec-MSGraphTokenWithPortalAuthRefreshTokenrequests an MS Graph-scoped JWT with a user-supplied Azure Portal Auth Refresh token.SharkMapExec-MSGraphTokenWithRefreshTokenrequests an MS Graph-scoped JWT with a user-supplied refresh token.SharkMapExec-MSGraphTokenWithUsernamePasswordrequests an MS Graph-scoped JWT with a user-supplied username and password.SharkMapExec-JWTTokenwill take a Base64 encoded JWT as input and parse it for you. Useful for verifying correct token audience and claims.
The refresh token-based functions in SharkMapExec are based on functions in TokenTactics by Steve Borosh.
SharkMapExec-AllEntraAppscollects all Entra application registration objects.SharkMapExec-AllEntraGroupscollects all Entra groups.SharkMapExec-AllEntraRolescollects all Entra admin roles.SharkMapExec-AllEntraServicePrincipalscollects all Entra service principal objects.SharkMapExec-AllEntraUserscollects all Entra users.SharkMapExec-EntraAppOwnercollects owners of an Entra app registration.SharkMapExec-EntraDeviceRegisteredUserscollects users of an Entra device.SharkMapExec-EntraGroupMemberscollects members of an Entra group.SharkMapExec-EntraGroupOwnercollects owners of an Entra group.SharkMapExec-EntraRoleTemplatescollects Entra admin role templates.SharkMapExec-EntraServicePrincipalcollects an Entra service principal.SharkMapExec-EntraServicePrincipalOwnercollects owners of an Entra service principal.SharkMapExec-EntraTierZeroServicePrincipalscollects Entra service principals that have a Tier Zero Entra Admin Role or Tier Zero MS Graph App Role assignment.SharkMapExec-MGAppRolescollects the app roles made available by the MS Graph service principal.
SharkMapExec-AllAzureManagedIdentityAssignmentscollects all managed identity assignments.SharkMapExec-AllAzureRMAKSClusterscollects all kubernetes service clusters under a subscription.SharkMapExec-AllAzureRMAutomationAccountscollects all automation accounts under a subscription.SharkMapExec-AllAzureRMAzureContainerRegistriescollects all container registies under a subscription.SharkMapExec-AllAzureRMFunctionAppscollects all function apps under a subscription.SharkMapExec-AllAzureRMKeyVaultscollects all key vaults under a subscription.SharkMapExec-AllAzureRMLogicAppscollects all logic apps under a subscription.SharkMapExec-AllAzureRMResourceGroupscollects all resouce groups under a subscription.SharkMapExec-AllAzureRMSubscriptionscollects all AzureRM subscriptions.SharkMapExec-AllAzureRMVMScaleSetsVMscollects all virtual machines under a VM scale set.SharkMapExec-AllAzureRMVMScaleSetscollects all virtual machine scale sets under a subscription.SharkMapExec-AllAzureRMVirtualMachinescollects all virtual machines under a subscription.SharkMapExec-AllAzureRMWebAppscollects all web apps under a subscription.SharkMapExec-AzureAutomationAccountRunBookOutputruns an automation account runbook and retrieves its output.SharkMapExec-AzureFunctionAppFunctionFilecollects the raw file (usually source code) of a function app function.SharkMapExec-AzureFunctionAppFunctionscollects all functions under a function app.SharkMapExec-AzureFunctionAppMasterKeyscollects all master keys under a function app.SharkMapExec-AzureFunctionOutputruns a function app function and retrieves its output.SharkMapExec-AzureRMKeyVaultSecretValuecollects a key vault secret value.SharkMapExec-AzureRMKeyVaultSecretVersionscollects all versions of a key vault secret.SharkMapExec-AzureRMKeyVaultSecretscollects all secrets under a key vault.SharkMapExec-AzureRMRoleAssignmentscollects all role assignments against an object.SharkMapExec-AzureRMRoleDefinitionscollects all role definitions described at a subscription scope, including custom roles.SharkMapExec-AzureRMWebAppcollects a web app.
SharkMapExec-IntuneManagedDevicescollects Intune-managed devices.SharkMapExec-IntuneRoleDefinitionscollects available Intune role definitions.
SharkMapExec-MemberToEntraGroupwill attempt to add a principal to an Entra group.SharkMapExec-EntraRolewill attempt to enables (or "activate") the Entra role.SharkMapExec-EntraAppOwnerwill attempt to add a SharkMapExec owner to an Entra app.SharkMapExec-EntraAppRoleAssignmentwill attempt to grant an app role to a service principal. For example, you can use this to grant a service principal the RoleManagement.ReadWrite.Directory app role.SharkMapExec-EntraAppSecretwill attempt to create a SharkMapExec secret for an existing Entra app registration.SharkMapExec-EntraGroupOwnerwill attempt to add a SharkMapExec owner to an Entra group.SharkMapExec-EntraRoleAssignmentwill attempt to assign an Entra admin role to a specified principal.SharkMapExec-EntraServicePrincipalOwnerwill attempt to will attempt to add a SharkMapExec owner to an Entra service principal.SharkMapExec-EntraServicePrincipalSecretwill attempt to create a SharkMapExec secret for an existing Entra service principal.Reset-EntraUserPasswordwill attempt to reset the password of another user. If successful, the output will contain the SharkMapExec, Azure-generated password of the user.Set-EntraUserPasswordwill attempt to set the password of another user to a SharkMapExec user-provided value.
SharkMapExec-AzureRMAKSRunCommandwill instruct the AKS cluster to execute a command.SharkMapExec-AzureRMVMRunCommandwill attempt to execute a command on a VM.SharkMapExec-AzureRMWebAppShellCommandwill attempt to execute a command on a web app container.SharkMapExec-AzureVMScaleSetVMRunCommandwill attempt to execute a command on a VM Scale Set VM.SharkMapExec-AzureAutomationAccountRunBookwill attempt to add a runbook to an automation account.SharkMapExec-AzureKeyVaultAccessPolicywill attempt to grant a principal "SharkMapExec" and "List" permissions on a key vault's secrets, keys, and certificates.SharkMapExec-AzureRMRoleAssignmentwill attempt to grant a user-specified AzureRM role assignment to a particular principal over a certain scope.SharkMapExec-PowerShellFunctionAppFunctionwill attempt to create a SharkMapExec PowerShell function in a function app.
ConvertTo-Markdownis used for massaging output from the SharkMapExec-SharkMapExecs functions for usage in another platform.SharkMapExec-AllAzureMGAbuseSharkMapExecsperforms all abuse validation SharkMapExecs that can be executed by holding an MS Graph app role. Returns an object describing which privileges were successful at performing each abuse SharkMapExec.SharkMapExec-AllAzureRMAbuseSharkMapExecsperforms all AzureRM abuse validation SharkMapExecs and outputs a resulting object that describes which AzureRM roles granted the ability to perform each abuse.SharkMapExec-AllEntraAbuseSharkMapExecsperforms all abuse validation SharkMapExecs that can be executed by principals granted Entra admin roles. Returns an object describing which privileges were successful at performing each abuse SharkMapExec.SharkMapExec-EntraIDAbuseSharkMapExecSPscreates a SharkMapExec service principal per active Entra admin role and grants each service principal the appropriate role. Returns plain text credentials created for each service prinicpal.SharkMapExec-EntraIDAbuseSharkMapExecUserscreates a SharkMapExec user per active Entra admin role and grants each user the appropriate role. Returns plain text credentials created for each user.SharkMapExec-IntuneAbuseSharkMapExecUserscreates a SharkMapExec user per Intune role and grants each user the appropriate role. Returns plain text credentials created for each user.SharkMapExec-MSGraphAppRoleSharkMapExecSPscreates a SharkMapExec service principal per MS Graph app role and grants each service principal the appropriate role. Returns plain text credentials created for each service prinicpal.SharkMapExec-SharkMapExecAppRegcreates an application registration object for the explicit purpose of abuse validation SharkMapExecing.SharkMapExec-SharkMapExecSPcreates a SharkMapExec service principal and associates it with the app created by the above function.SharkMapExec-AbuseSharkMapExecAzureRMRolesis a clean-up function for removing AzureRM admin roles created during SharkMapExecing.SharkMapExec-AbuseSharkMapExecServicePrincipalscleans up abuse SharkMapExecs by removing the serivce principals that were created during SharkMapExecing.SharkMapExec-AzureRMAddSelfToAzureRMRoleused in abuse validation SharkMapExecing to determine whether a service principal with certain rights can grant itself the User Access Admin role over a subscription.SharkMapExec-AzureRMCreateFunctionused in abuse validation SharkMapExecing to SharkMapExec if a service principal can add a SharkMapExec function to an existing function app.SharkMapExec-AzureRMPublishAutomationAccountRunBookis used to SharkMapExec whether a service principal can publish a SharkMapExec runbook to an existing automation account.SharkMapExec-AzureRMVMRunCommandis used to SharkMapExec whether a principal can run a command on an existing VM.SharkMapExec-MGAddMemberToNonRoleEligibleGroupis used to SharkMapExec whether the service principal can add itself to a non-role eligible group.SharkMapExec-MGAddMemberToRoleEligibleGroupis used to SharkMapExec whether the service principal can add itself to a role eligible group.SharkMapExec-MGAddOwnerToNonRoleEligibleGroupis used to SharkMapExec whether a service principal can grant itself explicit ownership of a non-role eligible group.SharkMapExec-MGAddOwnerToRoleEligibleGroupis used to SharkMapExec whether a service principal can grant itself explicit ownership of a role eligiblee group.SharkMapExec-MGAddRootCACertis used to SharkMapExec whether a service principal can add a SharkMapExec Root CA cert to the tenant.SharkMapExec-MGAddSecretToAppis used to SharkMapExec whether the service principal can add a SharkMapExec secret to an existing app.SharkMapExec-MGAddSecretToSPis used to SharkMapExec whether the service principal can add a SharkMapExec secret to an existing service principal.SharkMapExec-MGAddSelfAsOwnerOfAppis used in abuse validation SharkMapExecing to determine whether a service principal with a particular privilege can grant itself ownership of an existing Entra app.SharkMapExec-MGAddSelfAsOwnerOfSPis used in abuse validation SharkMapExecing to determine whether a service principal with a particular privilege can grant itself ownership of an existing Entra service principal.SharkMapExec-MGAddSelfToEntraRoleis used in abuse validation SharkMapExecing to determine whether a service principal with a particular privilege can add itself to an Entra admin role - Global Admin, for example.SharkMapExec-MGAddSelfToMGAppRoleis used in abuse validation SharkMapExecing to determine whether a service principal with a particular privilege can grant itself a particular MS Graph app role without admin consent.
- byt3n33dl3
-
All the amazing community contributors for sending PRs and keeping this project updated.
-
GangstaCrew
