Az - ACR

Apoya a HackTricks

Información Básica

Azure Container Registry (ACR) es un servicio gestionado proporcionado por Microsoft Azure para almacenar y gestionar imágenes de contenedores Docker y otros artefactos. Ofrece características como herramientas integradas para desarrolladores, geo-replicación, medidas de seguridad como control de acceso basado en roles y escaneo de imágenes, compilaciones automatizadas, webhooks y disparadores, y aislamiento de red. Funciona con herramientas populares como Docker CLI y Kubernetes, e se integra bien con otros servicios de Azure.

Enumerar

Para enumerar el servicio, puedes utilizar el script Get-AzACR.ps1:

# List Docker images inside the registry
IEX (New-Object Net.Webclient).downloadstring("https://raw.githubusercontent.com/NetSPI/MicroBurst/master/Misc/Get-AzACR.ps1")

Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Internet Explorer\Main" -Name "DisableFirstRunCustomize" -Value 2

Get-AzACR -username <username> -password <password> -registry <corp-name>.azurecr.io
az acr list --output table
az acr show --name MyRegistry --resource-group MyResourceGroup

Az Powershell

Azure CLI is a powerful tool for managing Azure resources, but sometimes you may need to use PowerShell instead. Azure PowerShell provides cmdlets that allow you to manage Azure resources directly from the PowerShell command line.

To use Azure PowerShell, you need to install the Azure PowerShell module on your machine. You can do this by running the following command in PowerShell:

Install-Module -Name Az -AllowClobber -Scope CurrentUser

Once the module is installed, you can log in to your Azure account using the following command:

Connect-AzAccount

After logging in, you can start using Azure PowerShell cmdlets to manage your Azure resources. For example, you can create a new resource group using the following command:

New-AzResourceGroup -Name MyResourceGroup -Location eastus

Azure PowerShell provides a wide range of cmdlets for managing various Azure services, making it a versatile tool for interacting with Azure resources.

# List all ACRs in your subscription
Get-AzContainerRegistry

# Get a specific ACR
Get-AzContainerRegistry -ResourceGroupName "MyResourceGroup" -Name "MyRegistry"

Iniciar sesión y descargar desde el registro

docker login <corp-name>.azurecr.io --username <username> --password <password>
docker pull <corp-name>.azurecr.io/<image>:<tag>
Apoya a HackTricks

Last updated