SharkMapExec
Used to be C2-agents and implants for stealth operation tools for BlackMarlinExec.
Install / Use
/learn @byt3n33dl3/SharkMapExecREADME
SharkMapExec / Master : v1.3
<a href="https://github.com/byt3n33dl3/SharkMapExec/"><p align="center"> <img width="300" height="300" src="/inc/sahrk.png">
</p></a> <div align="center"> <h2>BlackMarlinExec Attack Research Kit</h2> <p></div> <p align="center"> <a href="https://github.com/byt3n33dl3/CrackMapExec/blob/master/LICENSE.txt"> <img src="https://img.shields.io/badge/license-BSD3-green.svg?style=flat-square" alt="License"> </a> <a href="https://github.com/byt3n33dl3/CrackMapExec/blob/master/LICENSE.txt"> <img src="https://img.shields.io/badge/Offensive-red.svg?style=flat-square" alt="LPT-Master"> </a> <a href="https://github.com/byt3n33dl3/CrackMapExec/blob/master/LICENSE.txt"> <img src="https://img.shields.io/badge/Powershell-blue.svg?style=flat-square" alt="Python"> </a> <a href="https://github.com/byt3n33dl3/CrackMapExec/issues"> <img src="https://img.shields.io/github/issues/byt3n33dl3/CrackMapExec.svg?style=flat-square" alt="Issues"> </a> <a href="https://github.com/byt3n33dl3/CrackMapExec/blob/master/CONTRIBUTING.md"> <img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat-square" alt="Contributing"> </a> </p>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
Token Management
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.
Entra Enumeration
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.
Azure Enumeration
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.
Intune Enumeration
SharkMapExec-IntuneManagedDevicescollects Intune-managed devices.SharkMapExec-IntuneRoleDefinitionscollects available Intune role definitions.
Entra Abuse
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.
Azure Abuse
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-AzureAutomationAccountR
