Skip to content

Instantly share code, notes, and snippets.

@kimsyversen
Created November 20, 2023 14:03
Show Gist options
  • Save kimsyversen/b0e9ce2a037744ae5e93b96566423c63 to your computer and use it in GitHub Desktop.
Save kimsyversen/b0e9ce2a037744ae5e93b96566423c63 to your computer and use it in GitHub Desktop.

Overview

Port Mapping Valid Credentials Virtual Machine Scripting Privileged Identity Management Role Account Manipulation Steal Managed Identity JsonWebToken SAS URI Generation
IP Discovery Password Spraying Unmanaged Scripting Elevated Access Toggle Account Creation Steal Service Principal Certificate File Share Mounting
Public Accessible Resource Malicious Application Consent Managed Device Scripting Local Resource Hijack HTTP Trigger Service Principal Secret Reveal Replication
Gather User Information Principal Impersonation Watcher Tasks Azure KeyVault Dumping Soft-Delete Recovery
Gather Application Information Azure AD Application Scheduled Jobs Resource Secret Reveal Azure Backup Delete
Gather Role Information Network Security Group Modification
Gather Resource Data External Entity Access
Gather Victim Data Azure Policy

The adversary is trying to gather information they can use to plan future operations.

Reconnaissance consists of techniques that involve adversaries actively or passively gathering information that can be used to support targeting. Such information may include details of the victim organization, infrastructure, or staff/personnel. This information can be leveraged by the adversary to aid in other phases of the adversary lifecycle, such as using gathered information to plan and execute Initial Access, to scope and prioritize post-compromise objectives, or to drive and lead further Reconnaissance efforts.

ID Name Description
AZT101 Port Mapping By viewing certain Azure resources, it is possible to view the open ports on a resource.
AZT102 IP Discovery By viewing certain Azure resources, it is possible to view the private and public IP addresses assigned to a resource.
AZT103 Public Accessible Resource A resource within Azure is accessible from the public internet.
AZT104 Gather User Information An adversary may obtain information about a user within Azure Active Directory.
AZT105 Gather Application Information An adversary may obtain information about an application within Azure Active Directory.
AZT106 Gather Role Information An adversary may obtain information about a role.
.001 Gather AAD Role Information An adversary may obtain information about a role within Azure Active Directory.
.002 Gather Application Role Information An adversary may obtain information about an application role within Azure Active Directory.
.003 Gather Azure Resources Role Assignments An adversary may gather role assignments for a specific Azure Resource, Resource Group, or Subscription.
AZT107 Gather Resource Data An adversary may obtain information and data within a resource.
AZT108 Gather Victim Data An adversary may access a user's
ID Name Description
AZT201 Valid Credentials Adversaries may login to AzureAD using valid credentials.
.001 User Account By obtaining valid user credentials, an adversary may login to AzureAD via command line or through the Azure Portal.
.002 Service Principal By obtaining a valid secret or certificate, an adversary may login to AzureAD via command line.
AZT202 Password Spraying An adversary may potentially gain access to AzureAD by guessing a common password for multiple users.

Execution

The adversary is trying to run malicious code.

Execution in Azure consists of techniques that run code either through a managed device, virtual machine, or on an unmanaged host. Execution specifically is attributable to when malicious code is ran in an attempt to gain access to a host/device.

ID Name Description
AZT301 Virtual Machine Scripting Adversaries may abuse access to virtual machines by executing a script through various methods in order to gain access to the Virtual Machine.
.001 RunCommand By utilizing the 'RunCommand' feature on a Virtual Machine, an attacker can pass PowerShell commands to the VM as SYSTEM.
.002 CustomScriptExtension By utilizing the 'CustomScriptExtension' extension on a Virtual Machine, an attacker can pass PowerShell commands to the VM as SYSTEM.
.003 Desired State Configuration By utilizing the 'Desired State Configuration extension' extension on a Virtual Machine, an attacker can pass PowerShell commands to the VM as SYSTEM.
.004 Compute Gallery Application By utilizing Compute Gallery Applications, an attacker can pass MS-DOS or PowerShell commands to the VM as SYSTEM.
.005 AKS Command Invoke By utilizing 'command invoke' on an Azure Kubernetes Service (AKS) cluster, an attacker can pass commands to the cluster's VM as SYSTEM
.006 Vmss Run Command By utilizing the 'RunCommand' feature on a virtual machine scale set (vmss), an attacker can execute a command on an instance of a VM as SYSTEM.
.007 Serial Console By utilizing the serial console feature on an Azure Virtual Machine, an adversary can pass arbitrary commands.
AZT302 Serverless Scripting Adversaries may abuse access to serverless resources that are able to execute PowerShell or Python scripts on an Azure Resource.
.001 Automation Account Runbook Hybrid Worker Group By utilizing an Automation Account configured with a Hybrid Worker Group, an attacker can execute Azure commands on any Azure VM within that Hybrid Worker Group.
.002 Automation Account Runbook RunAs Account By utilizing an Automation Account configured with a RunAs account, an attacker can execute commands on an Azure VM via RunCommand if that service principal has the correct role and privileges.
.003 Automation Account Runbook Managed Identity By utilizing an Automation Account configured with a Managed Identity, an attacker can execute commands on an Azure VM via RunCommand if that service principal has the correct role and privileges.
.004 Function Application By utilizing a Function Application, an attacker can execute Azure operations on a given resource.
AZT303 Managed Device Scripting Adversaries may abuse access to any managed devices in AzureAD by executing PowerShell or Python scripts on them.

Privilige Escalation

The adversary is trying to escalate their privileges within Azure Resources or Azure Active Directory.

ID Name Description
AZT401 Privileged Identity Management Role An adversary may escalate their privileges if their current account has access to Privileged Identity Management (PIM)
AZT402 Elevated Access Toggle An adversary may escalate their privileges from Azure AD to all Azure subscriptions in the tenant if they are a global administrator
AZT403 Local Resource Hijack An adversary may escalate their privileges by tampering with a local file generated by a resource
.001 Cloud Shell .IMG By modifying the .bashrc file in a CloudShell .IMG file, an adversary may escalate their privileges
AZT404 Principal Impersonation Adversaries may abuse resources that are configured with a service principal or other identity to further their access to the current or other resources.
.001 Function Application By utilizing a Function Application configured with a managed identity or other identity provider, an attacker can execute Azure operations on a given resource.
.002 Logic Application By utilizing a Logic Application configured with a managed identity or other identity provider, an attacker can execute Azure operations on a given resource.
.003 Automation Account By utilizing a Automation Account configured with a managed identity or RunAs account, an attacker can execute Azure operations on a given resource.
.004 App Service By utilizing an App Service configured with a managed identity or other identity provider, an attacker can execute Azure operations on a given resource.
AZT405 Azure AD Application Adversaries may abuse the assigned permissions on an Azure AD Application to escalate their privileges.
.001 Application API Permissions By compromising a service principal whose application has privileged API permissions, an attacker can escalate their privileges to a higher privileged role.
.002 Application Role By compromising a user, user in a group, or service principal that has an application role over an application, they may be able to escalate their privileges by impersonating the associated service principal and leveraging any privileged assigned application role.
.003 Application Registration Owner By compromising an account who is an 'Owner' over an application that is configured with additional roles or API permissions, an attacker can escalate their privileges by adding a certificate or credentials & logging in as the service principal.

Persistence

The adversary is trying to persist in the Azure tenant or subscription. Persistence consists of techniques that adversaries use to modify existing resources, or modify and manipulate accounts in order to access Azure Active Directory.

ID Name Description
AZT501 Account Manipulation An adverary may manipulate an account to maintain access in an Azure tenant
AZT501.1 User Account Manipulation An adverary may manipulate a user account to maintain access in an Azure tenant
AZT501.2 Service Principal Manipulation An adverary may manipulate a service principal to maintain access in an Azure tenant
AZT501.3 Azure VM Local Administrator Manipulation An adverary may manipulate the local admin account on an Azure VM
AZT502 Account Creation An adversary may create an account in Azure Active Directory.
AZT502.1 User Account Creation An adversary may create a user account in Azure Active Directory.
AZT502.2 Service Principal Creation An adversary may create an application & service principal in Azure Active Directory
AZT502.3 Guest Account Creation An adversary may create a guest account in Azure Active Directory
AZT503 HTTP Trigger Adversaries may configure a resource with an HTTP trigger to run commands without needing authentication.
AZT503.1 Logic Application HTTP Trigger Adversaries may configure a Logic Application with an HTTP trigger to run commands without needing authentication.
AZT503.2 Function App HTTP Trigger Adversaries may configure a Function App with an HTTP trigger to run commands without needing authentication.
AZT503.3 Runbook Webhook Adversaries may create a webhook to a Runbook which allows unauthenticated access into an Azure subscription or tenant.
AZT503.4 WebJob Adversaries may create a WebJob on a App Service which allows arbitrary background tasks to be run on a set schedule
AZT504 Watcher Tasks By configurating a watcher task and a Runbook, an adversary can establish persistence by executing the Runbook on a triggered event.
AZT505 Scheduled Jobs By configurating an Azure resource that supports scheduled execution, an adversary can execute an operation at a defined interval.
AZT505.1 Runbook Schedules Adversaries may create a schedule for a Runbook to run at a defined interval.
AZT506 Network Security Group Modification Adversaries can modify the rules in a Network Security Group to establish access over additional ports.
AZT507 External Entity Access Adversaries may configure the target Azure tenant to be managed by another, externel tenant, or its users.
AZT507.1 Azure Lighthouse Adversaries may utilize Azure Lighthouse to manage the target tenant from an external tenant.
AZT507.2 Microsoft Partners Adversaries may use Delegated Administrative Privileges to give themselves administrator access to the target tenant.
AZT507.3 Subscription Hijack An adversary may transfer a subscription from a target tenant to an attacker-controlled tenant.
AZT507.4 Domain Trust Modification An adversary may add an additional identity provider or domain to maintain a backdoor into the tenant.
AZT508 Azure Policy By configuring a policy with the 'DeployIfNotExists' definition, an adverary may establish persistence by creating a backdoor when the policy is triggered.
AZT509 Azure Bastion Azure Bastion can be abused to allow persistent network access to a virtual machine over public internet.

Credential Access

The adversary is trying to steal account usernames, passwords, or access tokens. Credential access in Azure consists of stealing methods of authentication which includes passwords and tokens. Stealing these credentials can give adversaries a potential avenue of privilege escalation or persistence.

ID Name Description
AZT601 Steal Managed Identity JsonWebToken An adverary may utilize the resource's functionality to obtain a JWT for the applied Managed Identity Service Principal account.
.001 Virtual Machine IMDS Request By utilizing access to IMDS, an attacker can request a JWT for a Managed Identity on an Azure VM if they have access to execute commands on the system.
.002 Azure Kubernetes Service IMDS Request By utilizing access to IMDS, an attacker can request a JWT for a Managed Identity on an AKS Cluster if they have access to execute commands on the system.
.003 Logic Application JWT PUT Request If a Logic App is using a Managed Identity, an adversary can modify the logic to make an HTTP POST request to reveal the Managed Identity's JWT.
.004 Function Application JWT GET Request If a Function App is using a Managed Identity, an adversary can modify the logic respond to an HTTP GET request to reveal the Managed Identity's JWT.
.005 Automation Account Runbook If an Automation Account is using a Managed Identity, an adversary can create a Runbook to request the Managed Identity's JWT.
AZT602 Steal Service Principal Certificate An Adversary may steal a Service Principal's certificate for authentication.
.001 Automation Account RunAs Account If a Runbook is utilizing a 'RunAs' account, then an adversary may manipulate the Runbook to reveal the certificate the Service Principal is using for authentication.
AZT603 Service Principal Secret Reveal An Adversary may reveal a service principal's secret in plain text.
.001 Function App Settings If a Function App is using a service principal for authentication, an adversary may manipulate the function app logic to reveal the service principal's secret in plain text.
AZT604 Azure KeyVault Dumping An adverary may access an Azure KeyVault in an attempt to view secrets, certificates, or keys.
.001 Azure KeyVault Secret Dump By accessing an Azure KeyVault, an adversary may dump any or all secrets.
.002 Azure KeyVault Certificate Dump By accessing an Azure KeyVault, an adversary may dump any or all certificates.
.003 Azure KeyVault Key Dump By accessing an Azure KeyVault, an adversary may dump any or all keys.
AZT605 Resource Secret Reveal
.001 Storage Account Access Key Dumping By accessing a Storage Account, an adversary may dump access keys pertaining to the Storage Account, which will give them full access to the Storage Account.
.002 Automation Account Credential Secret Dump By editing a Runbook, a credential configured in an Automation Account may be revealed
.003 Resource Group Deployment History Secret Dump By accessing deployment history of a Resource Group, secrets used in the ARM template may be revealed.

Impact

The adversary is trying to either steal, manipulate, or delete data. Exfiltration in Azure consists of using techniques to lift resource data from specific resources. This can be done by generating SAS URIs for unauthenticated & persistent downloads, or can be done by directly exfiltrating the data from the resource itself. Deletion can occur through various means.

ID Name Description
AZT701 SAS URI Generation By generating an SAS URI for a resource, an adversary may extract the contents of that resource without authentication at any time.
.001 VM Disk SAS URI An adversary may create an SAS URI to download the disk attached to a virtual machine.
.002 Storage Account File Share SAS By generating a Shared Access Signature (SAS) URI, an adversary can access a container in a Storage Account at any time.
AZT702 File Share Mounting An adversary may attach an Azure resource as a file share
.001 Storage Account File Share NFS/SMB Mount An adversary can generate a connection string to mount an Azure Storage Account File Share as an NFS or SMB share to their local machine.
AZT703 Replication An adversary may exfiltrate data by replicating it.
.001 Storage Account Replication By setting up cross-tenant replication, an adversary may set up replication from one tenant's storage account to an extrenal tenant's storage account.
AZT704 Soft-Delete Recovery An adversary may leverage resources found at a 'soft deletion' state, restore them and advance their attack by retrieving contents meant to be deleted
.001 Key Vault An adversary may recover a key vault object found in a 'soft deletion' state.
.002 Storage Blob An adversary may recover a storage blob found in a 'soft deletion' state.
.003 Virtual Machine An adversary may recover a virtual machine found in a 'soft deletion' state.
AZT705 Azure Backup Delete An adversary may delete data within the Recovery Service Vault, which houses backup data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment