Az - ACR

Apprenez le piratage AWS de zéro à héros avec htARTE (Expert en équipe rouge AWS de HackTricks)!

Autres façons de soutenir HackTricks :

Informations de base

Azure Container Registry (ACR) est un service géré fourni par Microsoft Azure pour stocker et gérer des images de conteneurs Docker et d'autres artefacts. Il offre des fonctionnalités telles que des outils de développement intégrés, la géo-réplication, des mesures de sécurité telles que le contrôle d'accès basé sur les rôles et l'analyse d'images, des builds automatisés, des webhooks et des déclencheurs, et une isolation réseau. Il fonctionne avec des outils populaires comme Docker CLI et Kubernetes, et s'intègre bien avec d'autres services Azure.

Enumérer

Pour énumérer le service, vous pouvez utiliser le 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

Connect to Azure Container Registry

To connect to an Azure Container Registry (ACR) using Az PowerShell, you can use the Connect-AzAccount cmdlet to sign in to your Azure account, and then use the Select-AzSubscription cmdlet to select the subscription containing your ACR. Finally, you can use the Get-AzContainerRegistry cmdlet to get information about the ACR.

Connect-AzAccount
Select-AzSubscription -SubscriptionId <subscription_id>
Get-AzContainerRegistry -ResourceGroupName <resource_group_name> -Name <acr_name>

List Images in Azure Container Registry

You can list the images stored in an Azure Container Registry using the Get-AzContainerRegistryRepository cmdlet. This will provide you with a list of all the repositories (image names) in the specified ACR.

Get-AzContainerRegistryRepository -ResourceGroupName <resource_group_name> -RegistryName <acr_name>

Get Image Manifest

To get the manifest of a specific image in an Azure Container Registry, you can use the Get-AzContainerRegistryManifest cmdlet. This will give you detailed information about the layers and configuration of the image.

Get-AzContainerRegistryManifest -ResourceGroupName <resource_group_name> -RegistryName <acr_name> -RepositoryName <repository_name> -Tag <tag>

Delete Image from Azure Container Registry

If you need to delete an image from an Azure Container Registry, you can use the Remove-AzContainerRegistryRepository cmdlet. Make sure to specify the resource group, ACR name, repository name, and tag of the image you want to delete.

Remove-AzContainerRegistryRepository -ResourceGroupName <resource_group_name> -RegistryName <acr_name> -RepositoryName <repository_name> -Tag <tag>
# List all ACRs in your subscription
Get-AzContainerRegistry

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

Connexion et extraction depuis le registre

docker login <corp-name>.azurecr.io --username <username> --password <password>
docker pull <corp-name>.azurecr.io/<image>:<tag>
Apprenez le piratage AWS de zéro à héros avec htARTE (Expert de l'équipe rouge HackTricks AWS)!

D'autres façons de soutenir HackTricks:

Dernière mise à jour