From 602283afa3dc9fa9387954bdc98af2bc8c889120 Mon Sep 17 00:00:00 2001 From: Translator Date: Thu, 5 Feb 2026 12:30:07 +0000 Subject: [PATCH] Translated ['', 'src/pentesting-cloud/azure-security/az-enumeration-tool --- .../azure-security/az-enumeration-tools.md | 308 +++++++++++++----- 1 file changed, 235 insertions(+), 73 deletions(-) diff --git a/src/pentesting-cloud/azure-security/az-enumeration-tools.md b/src/pentesting-cloud/azure-security/az-enumeration-tools.md index 9e921b498..195d73f77 100644 --- a/src/pentesting-cloud/azure-security/az-enumeration-tools.md +++ b/src/pentesting-cloud/azure-security/az-enumeration-tools.md @@ -1,11 +1,11 @@ -# Az - Enumeration Tools +# Az - 열거 도구 {{#include ../../banners/hacktricks-training.md}} -## Linux에서 PowerShell 설치 +## Linux에 PowerShell 설치 > [!TIP] -> linux에서는 PowerShell Core를 설치해야 합니다: +> Linux에서는 PowerShell Core를 설치해야 합니다: ```bash sudo apt-get update sudo apt-get install -y wget apt-transport-https software-properties-common @@ -26,13 +26,13 @@ curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash ``` ## MacOS에 PowerShell 설치 -다음은 [**documentation**](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-macos?view=powershell-7.4): +다음은 [**documentation**](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-macos?view=powershell-7.4)에서 가져온 지침입니다: -1. `brew`가 아직 설치되어 있지 않다면 설치하세요: +1. 아직 설치되어 있지 않다면 `brew`를 설치하세요: ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -2. PowerShell의 최신 안정 버전을 설치하세요: +2. 최신 안정 버전의 PowerShell을 설치하세요: ```sh brew install powershell/tap/powershell ``` @@ -49,19 +49,19 @@ brew upgrade powershell ### az cli -[**Azure Command-Line Interface (CLI)**](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)은 Python으로 작성된 크로스 플랫폼 도구로, (대부분의) Azure 및 Entra ID 리소스를 관리·운영하기 위해 사용됩니다. 명령줄 또는 스크립트를 통해 Azure에 연결하여 관리 명령을 실행합니다. +[**Azure Command-Line Interface (CLI)**](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) 는 Python으로 작성된 크로스 플랫폼 도구로, (대부분의) Azure 및 Entra ID 리소스를 관리 및 운영하는 데 사용됩니다. 명령줄이나 스크립트를 통해 Azure에 연결하고 관리 명령을 실행합니다. -설치 지침은 다음 링크를 참고하세요: [**installation instructions¡**](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli#install). +설치는 다음 링크를 참고하세요: [**installation instructions¡**](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli#install). -Azure CLI의 명령은 다음 패턴을 따릅니다: `az ` +Azure CLI의 명령은 다음 패턴으로 구성됩니다: `az ` -#### Debug | MitM az cli +#### 디버그 | MitM az cli -파라미터 **`--debug`**를 사용하면 도구 **`az`**가 전송하는 모든 요청을 확인할 수 있습니다: +파라미터 **`--debug`**를 사용하면 도구 **`az`**가 전송하는 모든 요청을 볼 수 있습니다: ```bash az account management-group list --output table --debug ``` -도구에 대해 **MitM**을 수행하고 수동으로 전송되는 **모든 요청을 확인**하려면 다음을 수행할 수 있습니다: +도구에 **MitM**을 수행하고 도구가 보내는 모든 **check all the requests**를 수동으로 확인하려면 다음을 수행할 수 있습니다: {{#tabs }} {{#tab name="Bash" }} @@ -104,51 +104,213 @@ $env:HTTP_PROXY="http://127.0.0.1:8080" {{#endtab }} {{#endtabs }} +
+Fixing “CA cert does not include key usage extension” + +### Why the error happens + +When Azure CLI authenticates, it makes HTTPS requests (via MSAL → Requests → OpenSSL). If you’re intercepting TLS with Burp, Burp generates “on the fly” certificates for sites like `login.microsoftonline.com` and signs them with Burp’s CA. + +On newer stacks (Python 3.13 + OpenSSL 3), CA validation is stricter: + +- A CA certificate must include **Basic Constraints: `CA:TRUE`** and a **Key Usage** extension permitting certificate signing (**`keyCertSign`**, and typically **`cRLSign`**). + +Burp’s default CA (PortSwigger CA) is old and typically lacks the Key Usage extension, so OpenSSL rejects it even if you “trust it”. + +That produces errors like: + +- `CA cert does not include key usage extension` +- `CERTIFICATE_VERIFY_FAILED` +- `self-signed certificate in certificate chain` + +So you must: + +1. Create a modern CA (with proper Key Usage). +2. Make Burp use it to sign intercepted certs. +3. Trust that CA in macOS. +4. Point Azure CLI / Requests to that CA bundle. + +### Step-by-step: working configuration + +#### 0) Prereqs + +- Burp running locally (proxy at `127.0.0.1:8080`) +- Azure CLI installed (Homebrew) +- You can `sudo` (to trust the CA in the system keychain) + +#### 1) Create a standards-compliant Burp CA (PEM + KEY) + +Create an OpenSSL config file that explicitly sets CA extensions: +```bash +mkdir -p ~/burp-ca && cd ~/burp-ca + +cat > burp-ca.cnf <<'EOF' +[ req ] +default_bits = 2048 +prompt = no +default_md = sha256 +distinguished_name = dn +x509_extensions = v3_ca + +[ dn ] +C = US +O = Burp Custom CA +CN = Burp Custom Root CA + +[ v3_ca ] +basicConstraints = critical,CA:TRUE +keyUsage = critical,keyCertSign,cRLSign +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always,issuer +EOF +``` +CA 인증서 + 개인 키 생성: +```bash +openssl req -x509 -new -nodes \ +-days 3650 \ +-keyout burp-ca.key \ +-out burp-ca.pem \ +-config burp-ca.cnf +``` +정상성 검사(반드시 Key Usage를 확인하세요): +```bash +openssl x509 -in burp-ca.pem -noout -text | egrep -A3 "Basic Constraints|Key Usage" +``` +다음과 같은 항목이 포함되어야 합니다: + +- `CA:TRUE` +- `Key Usage: ... Certificate Sign, CRL Sign` + +#### 2) PKCS#12로 변환 (Burp import format) + +Burp는 certificate + private key가 필요하며, 가장 쉬운 형식은 PKCS#12입니다: +```bash +openssl pkcs12 -export \ +-out burp-ca.p12 \ +-inkey burp-ca.key \ +-in burp-ca.pem \ +-name "Burp Custom Root CA" +``` +#### 3) CA를 Burp에 임포트하고 Burp 재시작 + +Burp에서: + +- Proxy → Options +- Import / export CA certificate 항목을 찾기 +- Import CA certificate 클릭 +- Choose PKCS#12 +- Select `burp-ca.p12` +- 비밀번호 입력 +- Burp를 완전히 재시작 (중요) + +왜 재시작하나요? Burp는 재시작할 때까지 이전 CA를 계속 사용할 수 있습니다. + +#### 4) macOS 시스템 키체인에서 새 CA 신뢰 + +이 작업으로 시스템 앱과 많은 TLS 스택이 해당 CA를 신뢰하게 됩니다. +```bash +sudo security add-trusted-cert \ +-d -r trustRoot \ +-k /Library/Keychains/System.keychain \ +~/burp-ca/burp-ca.pem +``` +(만약 GUI를 선호한다면: Keychain Access → System → Certificates → import → “Always Trust”로 설정하세요.) + +#### 5) 프록시 환경 변수 구성 +```bash +export HTTPS_PROXY="http://127.0.0.1:8080" +export HTTP_PROXY="http://127.0.0.1:8080" +``` +#### 6) Requests/Azure CLI가 Burp CA를 신뢰하도록 구성 + +Azure CLI는 내부적으로 Python Requests를 사용합니다; 둘 다 설정하세요: +```bash +export REQUESTS_CA_BUNDLE="$HOME/burp-ca/burp-ca.pem" +export SSL_CERT_FILE="$HOME/burp-ca/burp-ca.pem" +``` +참고: + +- `REQUESTS_CA_BUNDLE`은 Requests에서 사용됩니다. +- `SSL_CERT_FILE`는 다른 TLS 클라이언트와 특수한 경우에 도움이 됩니다. +- CA가 올바르면 일반적으로 이전의 `ADAL_PYTHON_SSL_NO_VERIFY` / `AZURE_CLI_DISABLE_CONNECTION_VERIFICATION`는 필요하지 않습니다. + +#### 7) Burp가 실제로 새로운 CA로 서명하고 있는지 확인하기 (중요 확인) + +이것으로 인터셉션 체인이 올바른지 확인합니다: +```bash +openssl s_client -connect login.microsoftonline.com:443 \ +-proxy 127.0.0.1:8080 /dev/null \ +| openssl x509 -noout -issuer +``` +예상 발급자(issuer)에는 귀하의 CA 이름이 포함되어야 합니다. 예: + +`O=Burp Custom CA, CN=Burp Custom Root CA` + +여전히 PortSwigger CA가 보이면, Burp가 가져온 CA를 사용하고 있지 않습니다 → 가져오기를 다시 확인하고 재시작하세요. + +#### 8) Python Requests가 Burp를 통해 작동하는지 확인 +```bash +python3 - <<'EOF' +import requests +requests.get("https://login.microsoftonline.com") +print("OK") +EOF +``` +예상: `OK` + +#### 9) Azure CLI 테스트 +```bash +az account get-access-token --resource=https://management.azure.com/ +``` +이미 로그인되어 있으면 `accessToken`을 포함한 JSON을 반환해야 합니다. + +
+ ### Az PowerShell -Azure PowerShell은 PowerShell 명령줄에서 Azure 리소스를 직접 관리하기 위한 cmdlet들을 제공하는 모듈입니다. +Azure PowerShell은 PowerShell 명령줄에서 Azure 리소스를 직접 관리하기 위한 cmdlets가 포함된 모듈입니다. -자세한 내용은 [**설치 지침**](https://learn.microsoft.com/en-us/powershell/azure/install-azure-powershell)을 참고하세요. +설치 지침은 다음 링크를 참고하세요: [**installation instructions**](https://learn.microsoft.com/en-us/powershell/azure/install-azure-powershell). -Azure PowerShell AZ Module의 명령은 다음과 같은 형식입니다: `-Az ` +Azure PowerShell AZ Module의 명령은 다음과 같이 구성됩니다: `-Az ` #### Debug | MitM Az PowerShell -파라미터 **`-Debug`**를 사용하면 도구가 전송하는 모든 요청을 확인할 수 있습니다: +파라미터 **`-Debug`**를 사용하면 도구가 전송하는 모든 요청을 볼 수 있습니다: ```bash Get-AzResourceGroup -Debug ``` -툴에 대해 **MitM**을 수행하고 수동으로 **전송되는 모든 요청을 확인**하려면 [**docs**](https://learn.microsoft.com/en-us/powershell/azure/az-powershell-proxy)에 따라 환경 변수 `HTTPS_PROXY`와 `HTTP_PROXY`를 설정할 수 있습니다. +도구에 대해 **MitM**를 수행하고 전송하는 모든 요청을 수동으로 확인하려면 환경 변수 `HTTPS_PROXY` 및 `HTTP_PROXY`를 [**docs**](https://learn.microsoft.com/en-us/powershell/azure/az-powershell-proxy)에 따라 설정할 수 있습니다. ### Microsoft Graph PowerShell -Microsoft Graph PowerShell는 단일 엔드포인트를 통해 SharePoint, Exchange, Outlook 같은 서비스를 포함한 모든 Microsoft Graph APIs에 접근할 수 있게 해주는 크로스-플랫폼 SDK입니다. PowerShell 7+를 지원하며 MSAL을 통한 최신 인증, 외부 아이덴티티 및 고급 쿼리를 지원합니다. 최소 권한 원칙(least privilege access)에 중점을 두어 안전한 운영을 보장하며, 최신 Microsoft Graph API 기능에 맞춰 정기적으로 업데이트됩니다. +Microsoft Graph PowerShell은 단일 엔드포인트를 사용해 SharePoint, Exchange, Outlook 같은 서비스를 포함한 모든 Microsoft Graph API에 접근할 수 있게 하는 크로스-플랫폼 SDK입니다. PowerShell 7+를 지원하며, MSAL을 통한 현대적 인증, 외부 identities, 고급 쿼리를 지원합니다. 최소 권한 접근을 중시하여 안전한 운영을 보장하고 최신 Microsoft Graph API 기능에 맞춰 정기적으로 업데이트됩니다. -자세한 내용은 [**installation instructions**](https://learn.microsoft.com/en-us/powershell/microsoftgraph/installation)를 참고하세요. +Follow this link for the [**installation instructions**](https://learn.microsoft.com/en-us/powershell/microsoftgraph/installation). -Microsoft Graph PowerShell의 명령은 다음과 같은 구조를 가집니다: `-Mg ` +Microsoft Graph PowerShell의 명령은 다음과 같은 형식입니다: `-Mg ` -#### Microsoft Graph PowerShell 디버깅 +#### Debug Microsoft Graph PowerShell -파라미터 **`-Debug`**를 사용하면 툴이 전송하는 모든 요청을 확인할 수 있습니다: +파라미터 **`-Debug`**를 사용하면 도구가 전송하는 모든 요청을 확인할 수 있습니다: ```bash Get-MgUser -Debug ``` ### ~~**AzureAD Powershell**~~ -Azure Active Directory (AD) 모듈은 현재 **더 이상 권장되지 않음** 상태이며, Azure AD 리소스를 관리하기 위한 Azure PowerShell의 일부입니다. 이 모듈은 Entra ID에서 사용자, 그룹 및 애플리케이션 등록과 같은 작업을 수행하기 위한 cmdlet을 제공합니다. +Azure Active Directory (AD) 모듈은 현재 **사용 중단됨** 상태이며, Azure AD 리소스 관리를 위한 Azure PowerShell의 일부입니다. 이 모듈은 Entra ID에서 사용자, 그룹 및 애플리케이션 등록 관리를 비롯한 작업을 수행하기 위한 cmdlets를 제공합니다. > [!TIP] > 이는 Microsoft Graph PowerShell로 대체되었습니다 -Follow this link for the [**installation instructions**](https://www.powershellgallery.com/packages/AzureAD). +설치 지침은 다음 링크를 참조하세요: [**installation instructions**](https://www.powershellgallery.com/packages/AzureAD). -## 자동화된 Recon 및 규정 준수 도구 +## 자동화된 Recon 및 Compliance 도구 ### [turbot azure plugins](https://github.com/orgs/turbot/repositories?q=mod-azure) -Turbot는 steampipe 및 powerpipe와 함께 Azure 및 Entra ID에서 정보를 수집하고 규정 준수 검사를 수행하며 잘못된 구성을 찾을 수 있게 해줍니다. 현재 실행을 권장하는 Azure 모듈은 다음과 같습니다: +Turbot은 steampipe 및 powerpipe와 함께 Azure 및 Entra ID에서 정보를 수집하고 컴플라이언스 검사 및 잘못된 구성(misconfigurations)을 찾아냅니다. 현재 권장되는 Azure 모듈은 다음과 같습니다: - [https://github.com/turbot/steampipe-mod-azure-compliance](https://github.com/turbot/steampipe-mod-azure-compliance) - [https://github.com/turbot/steampipe-mod-azure-insights](https://github.com/turbot/steampipe-mod-azure-insights) @@ -179,9 +341,9 @@ powerpipe server ``` ### [Prowler](https://github.com/prowler-cloud/prowler) -Prowler는 AWS, Azure, Google Cloud 및 Kubernetes의 보안 모범 사례 평가, 감사, 사고 대응, 지속적 모니터링, 하드닝 및 포렌식 준비태세를 수행하기 위한 오픈 소스 보안 도구입니다. +Prowler는 AWS, Azure, Google Cloud 및 Kubernetes에 대한 보안 모범 사례 평가, 감사, 사고 대응, 지속적인 모니터링, 하드닝 및 포렌식 준비를 수행하기 위한 오픈 소스 보안 도구입니다. -기본적으로 Azure 환경에 대해 수백 개의 검사를 실행하여 보안 구성 오류를 찾아내고 결과를 json(및 기타 텍스트 형식)으로 수집하거나 웹에서 확인할 수 있습니다. +기본적으로 Azure 환경에서 수백 가지 검사를 실행하여 보안 구성 오류를 찾아 결과를 json (및 기타 텍스트 형식)으로 수집하거나 웹에서 확인할 수 있게 해줍니다. ```bash # Create a application with Reader role and set the tenant ID, client ID and secret in prowler so it access the app @@ -203,9 +365,9 @@ docker run --rm -e "AZURE_CLIENT_ID=" -e "AZURE_TENANT_ID= ``` ### [Monkey365](https://github.com/silverhack/monkey365) -Azure subscriptions와 Microsoft Entra ID의 보안 구성 검토를 자동으로 수행합니다. +자동으로 Azure 구독 및 Microsoft Entra ID 보안 구성 검토를 수행할 수 있습니다. -HTML 보고서는 github 리포지토리 폴더의 `./monkey-reports` 디렉토리에 저장됩니다. +HTML 보고서는 github 저장소 폴더 내의 `./monkey-reports` 디렉토리에 저장됩니다. ```bash git clone https://github.com/silverhack/monkey365 Get-ChildItem -Recurse monkey365 | Unblock-File @@ -226,7 +388,7 @@ Invoke-Monkey365 -TenantId -ClientId -ClientSecret $Secu ``` ### [ScoutSuite](https://github.com/nccgroup/ScoutSuite) -Scout Suite는 수동 검사용 구성 데이터를 수집하고 위험 영역을 강조합니다. 멀티클라우드 보안 감사 도구로서 클라우드 환경의 보안 태세 평가를 가능하게 합니다. +Scout Suite는 수동 검사를 위해 구성 데이터를 수집하고 위험 영역을 강조합니다. 멀티클라우드 환경을 대상으로 하는 보안 감사 도구로, 클라우드 환경의 보안 상태 평가를 가능하게 합니다. ```bash virtualenv -p python3 venv source venv/bin/activate @@ -242,9 +404,9 @@ python scout.py azure --cli ``` ### [Azure-MG-Sub-Governance-Reporting](https://github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting) -이것은 Management Group과 Entra ID 테넌트 내부의 모든 리소스와 권한을 **시각화** 하고 보안 구성 오류를 찾아주는 powershell 스크립트입니다. +이것은 powershell 스크립트로, **Management Group 및 Entra ID 테넌트 내부의 모든 리소스와 권한을 시각화**하고 보안 구성 오류를 찾아줍니다. -Az PowerShell 모듈을 사용하므로 Az PowerShell에서 지원하는 모든 인증 방식이 이 도구에서도 지원됩니다. +Az PowerShell module을 사용하여 작동하므로 이 도구에서 지원하는 모든 인증 방식이 그대로 사용 가능합니다. ```bash import-module Az .\AzGovVizParallel.ps1 -ManagementGroupId [-SubscriptionIdWhitelist ] @@ -253,7 +415,7 @@ import-module Az ### [**ROADRecon**](https://github.com/dirkjanm/ROADtools) -ROADRecon의 enumeration은 Entra ID의 구성(예: 사용자, 그룹, 역할, 조건부 액세스 정책 등)에 대한 정보를 제공합니다... +ROADRecon의 enumeration은 Entra ID의 구성(예: users, groups, roles, conditional access policies)에 대한 정보를 제공합니다... ```bash cd ROADTools pipenv shell @@ -266,23 +428,23 @@ roadrecon gui ``` ### [**AzureHound**](https://github.com/BloodHoundAD/AzureHound) -AzureHound는 Microsoft Entra ID 및 Azure용 BloodHound collector입니다. Windows/Linux/macOS용 단일 정적 Go 바이너리로 다음과 직접 통신합니다: -- Microsoft Graph (Entra ID directory, M365) 및 -- Azure Resource Manager (ARM) 컨트롤 플레인(구독, 리소스 그룹, 컴퓨트, 스토리지, Key Vault, 앱 서비스, AKS 등) +AzureHound는 Microsoft Entra ID와 Azure용 BloodHound 수집기입니다. Windows/Linux/macOS용 단일 정적 Go 바이너리로, 다음과 직접 통신합니다: +- Microsoft Graph (Entra ID directory, M365) and +- Azure Resource Manager (ARM) control plane (subscriptions, resource groups, compute, storage, key vault, app services, AKS, etc.) -주요 특징 -- 퍼블릭 인터넷 어디에서나 테넌트 API에 대해 실행(내부 네트워크 접근 불필요) -- BloodHound CE에 수집을 위해 JSON을 출력하여 아이덴티티 및 클라우드 리소스 전반의 공격 경로를 시각화 -- 기본 User-Agent 관찰됨: azurehound/v2.x.x +Key traits +- 퍼블릭 인터넷 어디에서나 테넌트 API를 대상으로 실행 (내부 네트워크 접근 불필요) +- 아이덴티티와 클라우드 리소스 전반의 공격 경로를 시각화하기 위해 BloodHound CE가 수집할 수 있는 JSON을 출력 +- 관찰된 기본 User-Agent: azurehound/v2.x.x -인증 옵션 +Authentication options - 사용자 이름 + 비밀번호: -u -p -- Refresh token: --refresh-token +- 리프레시 토큰: --refresh-token - JSON Web Token (access token): --jwt -- Service principal secret: -a -s -- Service principal certificate: -a --cert --key [--keypass ] +- 서비스 프린시펄 시크릿: -a -s +- 서비스 프린시펄 인증서: -a --cert --key [--keypass ] -예시 +Examples ```bash # Full tenant collection to file using different auth flows ## User creds @@ -317,37 +479,37 @@ azurehound list storage-containers -t "" -o containers.json azurehound list web-apps -t "" -o webapps.json azurehound list function-apps -t "" -o funcapps.json ``` -What gets queried -- Graph endpoints (examples): +쿼리 대상 +- Graph endpoints (예시): - /v1.0/organization, /v1.0/users, /v1.0/groups, /v1.0/roleManagement/directory/roleDefinitions, directoryRoles, owners/members -- ARM endpoints (examples): +- ARM endpoints (예시): - management.azure.com/subscriptions/.../providers/Microsoft.Storage/storageAccounts - .../Microsoft.KeyVault/vaults, .../Microsoft.Compute/virtualMachines, .../Microsoft.Web/sites, .../Microsoft.ContainerService/managedClusters -Preflight behavior and endpoints -- 각 azurehound list 는 일반적으로 열거하기 전에 다음 테스트 호출을 수행합니다: -1) Identity platform: login.microsoftonline.com +사전 검사(preflight) 동작 및 엔드포인트 +- 각 azurehound list 는 일반적으로 열거 전에 다음 테스트 호출을 수행합니다: +1) Identity 플랫폼: login.microsoftonline.com 2) Graph: GET https://graph.microsoft.com/v1.0/organization 3) ARM: GET https://management.azure.com/subscriptions?api-version=... -- Government/China/Germany용 클라우드 환경의 기본 URL은 다릅니다. 자세한 내용은 repo의 constants/environments.go를 참조하세요. +- Cloud 환경의 기본 URL은 Government/China/Germany에 따라 다릅니다. 레포의 constants/environments.go를 참조하세요. -ARM-heavy objects (less visible in Activity/Resource logs) +ARM-중심 객체 (Activity/Resource logs에서 덜 보임) - 다음 대상 목록은 주로 ARM control plane 읽기 작업을 사용합니다: automation-accounts, container-registries, function-apps, key-vaults, logic-apps, managed-clusters, management-groups, resource-groups, storage-accounts, storage-containers, virtual-machines, vm-scale-sets, web-apps. -- 이러한 GET/list 작업은 일반적으로 Activity Logs에 기록되지 않습니다; 데이터 플레인 읽기(예: *.blob.core.windows.net, *.vault.azure.net)는 리소스 수준의 Diagnostic Settings에서 처리됩니다. +- 이러한 GET/list 작업은 일반적으로 Activity Logs에 기록되지 않습니다; 데이터-플레인 읽기(예: *.blob.core.windows.net, *.vault.azure.net)는 리소스 수준의 Diagnostic Settings에 의해 처리됩니다. -OPSEC and logging notes -- Microsoft Graph Activity Logs는 기본적으로 활성화되어 있지 않습니다; 가시성을 얻으려면 활성화하고 SIEM으로 내보내세요. Graph preflight GET /v1.0/organization은 UA azurehound/v2.x.x로 기록됩니다. -- Entra ID non-interactive sign-in 로그는 AzureHound가 사용한 identity platform auth (login.microsoftonline.com)를 기록합니다. -- ARM control-plane read/list 작업은 Activity Logs에 기록되지 않습니다; 많은 azurehound list 작업이 Activity Logs에 표시되지 않을 것입니다. 서비스 엔드포인트에 대한 읽기는 데이터 플레인 로깅(Diagnostic Settings)을 통해 캡처됩니다. -- Defender XDR GraphApiAuditEvents (preview)는 Graph 호출 및 토큰 식별자를 노출할 수 있지만 UserAgent가 없을 수 있고 보존 기간이 제한적일 수 있습니다. +OPSEC 및 로깅 관련 주의사항 +- Microsoft Graph Activity Logs는 기본적으로 활성화되어 있지 않습니다; Graph 호출의 가시성을 얻으려면 활성화 후 SIEM으로 내보내세요. 프리플라이트 Graph 호출은 GET /v1.0/organization이며 UA는 azurehound/v2.x.x로 예상됩니다. +- Entra ID의 non-interactive sign-in 로그는 AzureHound가 사용한 identity 플랫폼 인증(login.microsoftonline.com)을 기록합니다. +- ARM control-plane의 read/list 작업은 Activity Logs에 기록되지 않습니다; 리소스에 대한 많은 azurehound list 작업이 Activity Logs에 나타나지 않을 것입니다. 서비스 엔드포인트에 대한 읽기는 오직 데이터-플레인 로깅(예: Diagnostic Settings)을 통해 캡처됩니다. +- Defender XDR의 GraphApiAuditEvents(미리보기)는 Graph 호출 및 토큰 식별자를 노출할 수 있으나 UserAgent가 없거나 보존 기간이 제한적일 수 있습니다. -Tip: 권한 경로를 열거할 때는 users, groups, roles 및 role assignments를 덤프한 다음 BloodHound에 가져와 미리 만들어진 cypher 쿼리를 사용하여 Global Administrator/Privileged Role Administrator 및 중첩 그룹과 RBAC 할당을 통한 전이적 권한 상승을 도출하세요. +팁: 권한 경로를 열거할 때는 사용자, 그룹, 역할 및 역할 할당을 덤프한 다음 BloodHound에 로드하고, 사전 구성된 cypher 쿼리를 사용해 Global Administrator/Privileged Role Administrator 및 중첩 그룹과 RBAC 할당을 통한 전이적 권한 상승(transitive escalation)을 찾아보세요. -Launch the BloodHound web with `curl -L https://ghst.ly/getbhce | docker compose -f - up` and import the `output.json` file. Then, in the EXPLORE tab, in the CYPHER section you can see a folder icon that contains pre-built queries. +BloodHound 웹을 `curl -L https://ghst.ly/getbhce | docker compose -f - up` 명령으로 실행한 후 `output.json` 파일을 가져오세요. 그런 다음 EXPLORE 탭의 CYPHER 섹션에서 사전 구성된 쿼리를 포함한 폴더 아이콘을 볼 수 있습니다. ### [**MicroBurst**](https://github.com/NetSPI/MicroBurst) -MicroBurst includes functions and scripts that support Azure Services discovery, weak configuration auditing, and post exploitation actions such as credential dumping. It is intended to be used during penetration tests where Azure is in use. +MicroBurst는 Azure Services discovery, weak configuration auditing, 그리고 credential dumping과 같은 post exploitation 작업을 지원하는 함수와 스크립트를 포함합니다. 이는 Azure가 사용되는 penetration tests 중에 사용되도록 설계되었습니다. ```bash Import-Module .\MicroBurst.psm1 Import-Module .\Get-AzureDomainInfo.ps1 @@ -355,9 +517,9 @@ Get-AzureDomainInfo -folder MicroBurst -Verbose ``` ### [**PowerZure**](https://github.com/hausec/PowerZure) -PowerZure는 Azure, EntraID 및 관련 리소스에 대한 정찰과 익스플로잇을 모두 수행할 수 있는 프레임워크가 필요해서 만들어졌습니다. +PowerZure는 Azure, EntraID 및 관련 리소스에 대한 reconnaissance 및 exploitation을 모두 수행할 수 있는 프레임워크의 필요성에서 만들어졌습니다. -이 도구는 **Az PowerShell** 모듈을 사용하므로 이 모듈이 지원하는 모든 인증 방식이 그대로 지원됩니다. +이 도구는 **Az PowerShell** 모듈을 사용하므로, 이 모듈이 지원하는 모든 인증 방식이 이 도구에서도 지원됩니다. ```bash # Login Import-Module Az @@ -388,7 +550,7 @@ Invoke-AzureRunCommand -Command -VMName ``` ### [**GraphRunner**](https://github.com/dafthack/GraphRunner/wiki/Invoke%E2%80%90GraphRunner) -GraphRunner는 Microsoft Graph API와 상호작용하기 위한 post-exploitation 도구 모음입니다. 이는 Microsoft Entra ID (Azure AD) 계정에서 데이터에 대한 reconnaissance, persistence 및 pillaging을 수행하기 위한 다양한 도구를 제공합니다. +GraphRunner은 Microsoft Graph API와 상호작용하기 위한 post-exploitation 툴셋입니다. Microsoft Entra ID (Azure AD) 계정에서 reconnaissance, persistence 및 pillaging of data를 수행하기 위한 다양한 도구를 제공합니다. ```bash #A good place to start is to authenticate with the Get-GraphTokens module. This module will launch a device-code login, allowing you to authenticate the session from a browser session. Access and refresh tokens will be written to the global $tokens variable. To use them with other GraphRunner modules use the Tokens flag (Example. Invoke-DumpApps -Tokens $tokens) Import-Module .\GraphRunner.ps1 @@ -432,9 +594,9 @@ Invoke-GraphRunner -Tokens $tokens ``` ### [Stormspotter](https://github.com/Azure/Stormspotter) -Stormspotter는 Azure subscription의 리소스에 대한 “attack graph”를 생성합니다. 이는 red teams와 pentesters가 tenant 내의 attack surface와 pivot opportunities를 시각화할 수 있게 해주며, defenders가 incident response 작업의 방향을 빠르게 잡고 우선순위를 정하는 것을 대폭 지원합니다. +Stormspotter는 Azure 구독의 리소스에 대한 “attack graph”를 생성합니다. 이는 red teams와 pentesters가 tenant 내에서 attack surface와 pivot 기회를 시각화할 수 있게 해주며, defenders가 incident response 작업을 빠르게 파악하고 우선순위를 정하는 데 큰 도움이 됩니다. -**불행히도 유지보수가 되지 않는 것으로 보입니다.** +**안타깝게도, 유지보수가 이루어지지 않는 것으로 보입니다.** ```bash # Start Backend cd stormspotter\backend\ @@ -452,11 +614,11 @@ az login -u test@corp.onmicrosoft.com -p Welcome2022! python stormspotter\stormcollector\sscollector.pyz cli # This will generate a .zip file to upload in the frontend (127.0.0.1:9091) ``` -## 참조 -- [Cloud Discovery With AzureHound (Unit 42)](https://unit42.paloaltonetworks.com/threat-actor-misuse-of-azurehound/) -- [AzureHound repository](https://github.com/SpecterOps/AzureHound) -- [BloodHound repository](https://github.com/SpecterOps/BloodHound) -- [AzureHound Community Edition Flags](https://bloodhound.specterops.io/collect-data/ce-collection/azurehound-flags) +## 참고자료 +- [AzureHound을 이용한 클라우드 발견 (Unit 42)](https://unit42.paloaltonetworks.com/threat-actor-misuse-of-azurehound/) +- [AzureHound 저장소](https://github.com/SpecterOps/AzureHound) +- [BloodHound 저장소](https://github.com/SpecterOps/BloodHound) +- [AzureHound Community Edition 플래그](https://bloodhound.specterops.io/collect-data/ce-collection/azurehound-flags) - [AzureHound constants/environments.go](https://github.com/SpecterOps/AzureHound/blob/main/constants/environments.go) - [AzureHound client/storage_accounts.go](https://github.com/SpecterOps/AzureHound/blob/main/client/storage_accounts.go) - [AzureHound client/roles.go](https://github.com/SpecterOps/AzureHound/blob/main/client/roles.go)