Az - ACR

ゼロからヒーローまでAWSハッキングを学ぶ htARTE(HackTricks AWS Red Team Expert)

HackTricks をサポートする他の方法:

基本情報

Azure Container Registry(ACR)は、Microsoft Azureによって提供される Dockerコンテナイメージやその他のアーティファクトを保存および管理する マネージドサービスです。 統合開発者ツール、ジオレプリケーション、ロールベースのアクセス制御やイメージスキャンなどのセキュリティ対策、自動ビルド、Webhookとトリガー、ネットワーク分離などの機能を提供します。 一般的なツールであるDocker CLIやKubernetesと連携し、他のAzureサービスともうまく統合されています。

列挙

サービスを列挙するには、スクリプト 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

Azure Container Registry (ACR)

Azure Container Registry (ACR) is a managed Docker registry service based on the open-source Docker Registry 2.0. It allows you to store and manage container images for all types of container deployments.

Key Features:

  • Private Repositories: ACR allows you to create private repositories to store your container images securely.

  • Role-Based Access Control (RBAC): You can control access to your container registry using Azure RBAC.

  • Webhooks: ACR supports webhooks to trigger events when images are pushed or deleted.

  • Geo-Replication: You can replicate your container images across multiple Azure regions for better availability.

  • Vulnerability Scanning: ACR integrates with Azure Security Center to scan container images for vulnerabilities.

az acr Commands:

  • az acr create: Create a new container registry.

  • az acr login: Log in to a container registry.

  • az acr repository list: List repositories in a container registry.

  • az acr build: Build a container image using an Azure Container Registry build task.

ACR is a critical component in managing containerized applications in Azure, providing a secure and reliable way to store and deploy container images.

az acr list --output table
az acr show --name MyRegistry --resource-group MyResourceGroup

Azure PowerShellを使用して、Azure Container Registry(ACR)を監査および管理できます。以下は、ACRに関連する一般的な操作です。

ACRへの接続

Connect-AzAccount
Select-AzSubscription -SubscriptionId <SubscriptionId>

ACRリソースの取得

Get-AzContainerRegistry -ResourceGroupName <ResourceGroupName> -Name <RegistryName>

ACRイメージのリスト

Get-AzContainerRegistryRepository -Registry <RegistryName>

ACRログの取得

Get-AzContainerRegistryLog -Registry <RegistryName>

ACRアクセスキーの取得

$registry = Get-AzContainerRegistry -ResourceGroupName <ResourceGroupName> -Name <RegistryName>
$registry.Passwords

これらのコマンドを使用して、ACRを効果的に管理し、セキュリティを強化できます。

# List all ACRs in your subscription
Get-AzContainerRegistry

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

ログインしてレジストリからプルします

docker login <corp-name>.azurecr.io --username <username> --password <password>
docker pull <corp-name>.azurecr.io/<image>:<tag>
htARTE(HackTricks AWS Red Team Expert) でAWSハッキングをゼロからヒーローまで学ぶ

HackTricksをサポートする他の方法:

最終更新