Translated ['', 'src/pentesting-cloud/azure-security/az-enumeration-tool

This commit is contained in:
Translator
2026-02-05 12:29:48 +00:00
parent db6cf8e02f
commit 2280b5895d

View File

@@ -1,11 +1,11 @@
# Az - Enumeration Tools
# Az - 列挙ツール
{{#include ../../banners/hacktricks-training.md}}
## 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
@@ -24,19 +24,19 @@ pwsh
# Az cli
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
```
## MacOSPowerShell をインストール
## MacOSPowerShellをインストール
手順は [**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` をインストールします:
```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
```
3. PowerShell を実行:
3. PowerShell を実行する:
```sh
pwsh
```
@@ -45,23 +45,23 @@ pwsh
brew update
brew upgrade powershell
```
## 主な列挙ツール
## 主な列挙ツール
### az cli
[**Azure Command-Line Interface (CLI)**](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) は Python で書かれたクロスプラットフォームのツールで、ほとんどのAzureEntra 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 <service> <action> <parameters>`
Commands in Azure CLI are structured using a pattern of: `az <service> <action> <parameters>`
#### Debug | MitM az cli
パラメータ **`--debug`** を使用すると、ツール **`az`** が送信しているすべてのリクエストを確認できます:
Using the parameter **`--debug`** it's possible to see all the requests the tool **`az`** is sending:
```bash
az account management-group list --output table --debug
```
ツールに対して**MitM**を行い、送信している**すべてのリクエストを確認する**には、次のようにします:
ツールに対して**MitM**を行い、送信しているすべての**requests**を手動で確認するには、以下を実行します
{{#tabs }}
{{#tab name="Bash" }}
@@ -104,13 +104,177 @@ $env:HTTP_PROXY="http://127.0.0.1:8080"
{{#endtab }}
{{#endtabs }}
<details>
<summary><strong>“CA cert does not include key usage extension” の修正</strong></summary>
### なぜこのエラーが発生するのか
Azure CLIが認証する際、HTTPSリクエストを行いますMSAL → Requests → OpenSSL経由。BurpでTLSをインターセプトしている場合、Burpは`login.microsoftonline.com`のようなサイト用に“on the fly”で証明書を生成し、BurpのCAで署名します。
新しいスタックPython 3.13 + OpenSSL 3では、CAの検証がより厳格になっています
- CA証明書は **Basic Constraints: `CA:TRUE`** を含み、証明書署名を許可する **Key Usage** 拡張(**`keyCertSign`**、通常は **`cRLSign`**)を持っている必要があります。
BurpのデフォルトCAPortSwigger CAは古く、通常 Key Usage 拡張が欠けているため、OpenSSLはそれを「信頼している」場合でも却下します。
その結果、以下のようなエラーが発生します:
- `CA cert does not include key usage extension`
- `CERTIFICATE_VERIFY_FAILED`
- `self-signed certificate in certificate chain`
したがって、次を行う必要があります:
1. モダンなCA適切なKey Usageを持つを作成する。
2. Burpにそれを使わせてインターセプトした証明書を署名させる。
3. そのCAをmacOSで信頼する。
4. Azure CLI / RequestsにそのCAバンドルを指し示す。
### ステップバイステップ:動作する構成
#### 0) 前提条件
- Burpがローカルで稼働しているproxy が `127.0.0.1:8080`
- Azure CLIがインストールされているHomebrew
- `sudo`が使えるシステムキーチェーンにCAを信頼させるため
#### 1) Create a standards-compliant Burp CA (PEM + KEY)
OpenSSLの設定ファイルを作成して、CA拡張を明示的に設定します
```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 インポート形式)
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"
```
エクスポート用のパスワードを要求されます必ず設定してくださいBurpも同じパスワードを要求します
#### 3) CAをBurpにインポートしてBurpを再起動する
Burpで
- Proxy → Options
- Find Import / export CA certificate
- Click Import CA certificate
- Choose PKCS#12
- Select `burp-ca.p12`
- Enter the password
- Restart Burp completely (important)
なぜ再起動するのか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
```
(If you prefer GUI: Keychain Access → System → Certificates → import → set “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"
```
Notes:
- `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 2>/dev/null \
| openssl x509 -noout -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 を返すはずです。
</details>
### Az PowerShell
Azure PowerShell は、PowerShell のコマンドラインから Azure リソースを直接管理するための cmdlets を含むモジュールです。
Follow this link for the [**installation instructions**](https://learn.microsoft.com/en-us/powershell/azure/install-azure-powershell).
Azure PowerShell AZ Module のコマンドは次のような構成です: `<Action>-Az<Service> <parameters>`
Commands in Azure PowerShell AZ Module are structured like: `<Action>-Az<Service> <parameters>`
#### Debug | MitM Az PowerShell
@@ -118,36 +282,37 @@ Azure PowerShell AZ Module のコマンドは次のような構成です: `<Acti
```bash
Get-AzResourceGroup -Debug
```
ツールに対して**MitM**を行い、送信されるすべてのリクエストを手動で**確認する**には、環境変数 `HTTPS_PROXY``HTTP_PROXY` [**docs**](https://learn.microsoft.com/en-us/powershell/azure/az-powershell-proxy) に従って設定できます。
ツールに対して**MitM**を行い、送信しているすべてのリクエストを手動で**確認する**ために、`HTTPS_PROXY``HTTP_PROXY` の環境変数を [**docs**](https://learn.microsoft.com/en-us/powershell/azure/az-powershell-proxy) に従って設定できます。
### Microsoft Graph PowerShell
Microsoft Graph PowerShell はクロスプラットフォームの SDK で、単一のエンドポイントを使って SharePoint、Exchange、Outlook といったサービスを含むすべての Microsoft Graph API へのアクセスを可能にします。PowerShell 7+、MSAL を使ったモダン認証、外部アイデンティティ、および高度なクエリをサポートします。最小権限アクセスに重点を置き、安全な操作を確保し、最新の Microsoft Graph API 機能に合わせて定期的に更新されます。
Microsoft Graph PowerShell はクロスプラットフォームの SDK で、単一のエンドポイントを使って SharePoint、Exchange、Outlook のようなサービスを含むすべての Microsoft Graph APIs にアクセスできます。PowerShell 7+、MSAL を使ったモダン認証、外部アイデンティティ、および高度なクエリをサポートします。最小権限アクセスに重点を置き、安全な操作を保証するとともに、最新の Microsoft Graph API 機能に合わせて定期的にアップデートされます。
Follow this link for the [**installation instructions**](https://learn.microsoft.com/en-us/powershell/microsoftgraph/installation).
インストール手順は [**installation instructions**](https://learn.microsoft.com/en-us/powershell/microsoftgraph/installation) を参照してください。
Commands in Microsoft Graph PowerShell are structured like: `<Action>-Mg<Service> <parameters>`
Microsoft Graph PowerShell のコマンドは次のような形式です: `<Action>-Mg<Service> <parameters>`
#### Microsoft Graph PowerShell のデバッグ
#### Debug Microsoft Graph PowerShell
パラメータ **`-Debug`** を使用すると、ツールが送信しているすべてのリクエストを確認できます
パラメータ **`-Debug`** を使用すると、ツールが送信しているすべてのリクエストを確認できます:
```bash
Get-MgUser -Debug
```
### ~~**AzureAD Powershell**~~
Azure Active Directory (AD) モジュールは現在 **deprecated** で、Azure AD リソース管理するための Azure PowerShell の一部です。ユーザーグループ、アプリケーション登録の管理などのタスクに使う cmdlets を提供します。
Azure Active Directory (AD) モジュールは現在 **deprecated** で、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 & Compliance ツール
## 自動化された Recon & コンプライアンスツール
### [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 から情報を収集し、コンプライアンスチェックや構成ミスの検出を行えます。現在推奨される 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)
@@ -178,9 +343,9 @@ powerpipe server
```
### [Prowler](https://github.com/prowler-cloud/prowler)
Prowler は、AWS、Azure、Google Cloud、Kubernetes に対するセキュリティのベストプラクティス評価、監査、インシデント対応、継続的監視、ハードニング、フォレンジック準備を行うためのオープンソースのセキュリティツールです。
Prowler は、AWS、Azure、Google Cloud、Kubernetes セキュリティのベストプラクティスに関する評価、監査、インシデント対応、継続的モニタリング、ハードニング、およびフォレンジック準備を行うためのオープンソースのセキュリティツールです。
基本的に、Azure 環境に対して数百のチェックを実行しセキュリティの設定ミスを検出し結果を jsonおよび他のテキスト形式で収集したり、Web 上で確認したりできます。
基本的に、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
@@ -202,9 +367,9 @@ docker run --rm -e "AZURE_CLIENT_ID=<client-id>" -e "AZURE_TENANT_ID=<tenant-id>
```
### [Monkey365](https://github.com/silverhack/monkey365)
Azure サブスクリプション 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
@@ -225,7 +390,7 @@ Invoke-Monkey365 -TenantId <tenant-id> -ClientId <client-id> -ClientSecret $Secu
```
### [ScoutSuite](https://github.com/nccgroup/ScoutSuite)
Scout Suiteは手動検査用の構成データを収集し、リスクのある領域を強調表示します。マルチクラウドのセキュリティ監査ツールであり、クラウド環境のセキュリティ姿勢の評価を可能にします。
Scout Suite は手動検査用の構成データを収集し、リスク領域を強調表示します。マルチクラウドのセキュリティ監査ツールで、クラウド環境のセキュリティ勢の評価を可能にします。
```bash
virtualenv -p python3 venv
source venv/bin/activate
@@ -241,18 +406,18 @@ python scout.py azure --cli
```
### [Azure-MG-Sub-Governance-Reporting](https://github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting)
これは PowerShell スクリプトで、**Management GroupEntra ID 内のすべてのリソースと権限を可視化**し、セキュリティの設定ミスを発見するのに役立ちます。
これはpowershellスクリプトで、**Management GroupEntra IDテナント内のすべてのリソースと権限を可視化**し、セキュリティの設定を見つけるのに役立ちます。
Az PowerShell module を使用して動作するため、このモジュールがサポートする認証方式はすべてこのツールで利用できます。
Az PowerShell module を使用して動作するため、Az PowerShell module がサポートする認証方式はすべてこのツールで利用できます。
```bash
import-module Az
.\AzGovVizParallel.ps1 -ManagementGroupId <management-group-id> [-SubscriptionIdWhitelist <subscription-id>]
```
## 自動化された Post-Exploitation ツール
## Automated Post-Exploitation tools
### [**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
@@ -265,17 +430,17 @@ roadrecon gui
```
### [**AzureHound**](https://github.com/BloodHoundAD/AzureHound)
AzureHoundはMicrosoft Entra IDとAzure向けのBloodHoundコレクタです。Windows/Linux/macOS向けの単一の静的Goバイナリで、直接以下と通信します:
- Microsoft Graph (Entra ID directory, M365)
- Azure Resource Manager (ARM) control plane (subscriptions, resource groups, compute, storage, key vault, app services, AKS, etc.)
AzureHoundはMicrosoft Entra IDとAzure向けのBloodHoundコレクタです。Windows/Linux/macOSの単一の静的Goバイナリで、直接次にアクセスします:
- Microsoft Graph (Entra ID directory, M365) および
- Azure Resource Manager (ARM) の制御プレーン (subscriptions, resource groups, compute, storage, key vault, app services, AKS, etc.)
主な特徴
- パブリックインターネット上のどこからでもテナント APIs に対して実行可能(内部ネットワークアクセスは不要)
- BloodHound CE に取り込むための JSON を出力し、アイデンティティとクラウドリソース間の攻撃パスを可視化
- Default User-Agent observed: azurehound/v2.x.x
- パブリックインターネット上のどこからでも tenant APIs に対して実行可能(内部ネットワークアクセスは不要)
- JSONを出力し、BloodHound CE に取り込んでアイデンティティとクラウドリソース間の攻撃経路を可視化
- 観測されるデフォルトのUser-Agent: azurehound/v2.x.x
認証オプション
- Username + password: -u <upn> -p <password>
- ユーザー名 + パスワード: -u <upn> -p <password>
- Refresh token: --refresh-token <rt>
- JSON Web Token (access token): --jwt <jwt>
- Service principal secret: -a <appId> -s <secret>
@@ -324,7 +489,7 @@ What gets queried
- .../Microsoft.KeyVault/vaults, .../Microsoft.Compute/virtualMachines, .../Microsoft.Web/sites, .../Microsoft.ContainerService/managedClusters
Preflight behavior and endpoints
- Each azurehound list <object> typically performs these test calls before enumeration:
- azurehound list <object> は、列挙の前に通常以下のテストコールを実行します:
1) Identity platform: login.microsoftonline.com
2) Graph: GET https://graph.microsoft.com/v1.0/organization
3) ARM: GET https://management.azure.com/subscriptions?api-version=...
@@ -332,21 +497,21 @@ Preflight behavior and endpoints
ARM-heavy objects (less visible in Activity/Resource logs)
- 以下のターゲットは主に ARM コントロールプレーンの読み取りを使用します: 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 はデフォルトで有効になっていません。Graph コールの可視化に有効化して 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 コントロールプレーンの read/list 操作は Activity Logs に記録されません。リソースに対する多くの azurehound list 操作はそこに表示されません。サービスエンドポイントへの読み取りは、Diagnostic Settings を通したデータプレーンロギングのみが捕捉します。
- Defender XDR GraphApiAuditEvents (preview) は Graph コールやトークン識別子を露する可能性がありますが、UserAgent を欠いたり保持期間が短い場合があります。
- Microsoft Graph Activity Logs はデフォルトで有効になっていません。Graph コールの可視化のために有効化して SIEM にエクスポートしてください。Graph のプリフライト GET /v1.0/organization は UA azurehound/v2.x.x で行われることを想定してください。
- Entra ID の non-interactive sign-in ログは、AzureHound が使用する identity platform auth (login.microsoftonline.com) を記録します。
- ARM コントロールプレーンの read/list 操作は Activity Logs に記録されません。多くの azurehound list 操作はそこに表示されません。サービスエンドポイントへの読み取りを記録するのは、Diagnostic Settings 経由のデータプレーンロギングのみす。
- Defender XDR GraphApiAuditEvents (preview) は Graph コールやトークン識別子を露する可能性がありますが、UserAgent が欠落していたり保持期間が短い場合があります。
Tip: 権経路を列挙する際は、users、groups、roles、role assignments をダンプして BloodHound に取り込み、プリビルドの cypher クエリを使て Global Administrator / Privileged Role Administrator およびネストたグループ RBAC 割当を介する推移的昇格を可視化してください。
Tip: 権経路を列挙する際は、ユーザー、グループ、ロール、およびロール割り当てをダンプしてから BloodHound に取り込み、事前構築された Cypher クエリを使用して Global Administrator/Privileged Role Administrator ネストされたグループおよび RBAC 割り当て経由の推移的昇格を可視化してください。
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.
### [**MicroBurst**](https://github.com/NetSPI/MicroBurst)
MicroBurst は、Azure Services のディスカバリ、脆弱な設定の監査、credential dumping のようなポストエクスプロイトアクションをサポートする関数やスクリプトを含みます。Azure が利用されている penetration tests 中の利用を意図しています。
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.
```bash
Import-Module .\MicroBurst.psm1
Import-Module .\Get-AzureDomainInfo.ps1
@@ -354,9 +519,9 @@ Get-AzureDomainInfo -folder MicroBurst -Verbose
```
### [**PowerZure**](https://github.com/hausec/PowerZure)
PowerZureは、Azure、EntraID、および関連リソースreconnaissanceとexploitationの両方を実行できるフレームワークの必要性から作られました。
PowerZureは、Azure、EntraID、および関連リソースに対してreconnaissanceとexploitationの両方を実行できるフレームワークの必要性から作られました。
のツールは**Az PowerShell**モジュールを使用しているため、モジュールがサポートする認証はすべてこのツールでも利用できます。
は**Az PowerShell**モジュールを使用しているため、このツールがサポートする認証方式はすべて利用可能です。
```bash
# Login
Import-Module Az
@@ -387,7 +552,7 @@ Invoke-AzureRunCommand -Command <command> -VMName <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を行うための各種ツールを提供します。
```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
@@ -431,9 +596,7 @@ Invoke-GraphRunner -Tokens $tokens
```
### [Stormspotter](https://github.com/Azure/Stormspotter)
Stormspotter は Azure サブスクリプション内のリソースの “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
@@ -453,11 +616,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)
```
## 参考資料
- [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)
## 参考文献
- [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 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)