MSSP カスタマー テナントからのアラートの取得Fetch alerts from MSSP customer tenant
適用対象:Applies to:
Microsoft Defender for Endpoint を体験してみませんか?Want to experience Microsoft Defender for Endpoint? 無料試用版にサインアップします。Sign up for a free trial.
注意
このアクションは MSSP によって実行されます。This action is taken by the MSSP.
アラートを取得するには、次の 2 つの方法があります。There are two ways you can fetch alerts:
- SIEM メソッドの使用Using the SIEM method
- API の使用Using APIs
SIEM にアラートをフェッチするFetch alerts into your SIEM
SIEM システムにアラートをフェッチするには、次の手順を実行する必要があります。To fetch alerts into your SIEM system, you'll need to take the following steps:
手順 1: サード パーティ製アプリケーションを作成するStep 1: Create a third-party application
手順 2: 顧客のテナントからアクセストークンと更新トークンを取得するStep 2: Get access and refresh tokens from your customer's tenant
手順 3: Microsoft Defender セキュリティ センターでアプリケーションを許可するStep 3: allow your application on Microsoft Defender Security Center
手順 1: Azure Active Directory でアプリケーションを作成する (Azure AD)Step 1: Create an application in Azure Active Directory (Azure AD)
アプリケーションを作成し、顧客の Microsoft Defender for Endpoint テナントからアラートを取得するためのアクセス許可を付与する必要があります。You'll need to create an application and grant it permissions to fetch alerts from your customer's Microsoft Defender for Endpoint tenant.
Azure AD ポータルにサインインします。Sign in to the Azure AD portal.
[Azure Active Directory アプリ > の登録] を選択します。Select Azure Active Directory > App registrations.
[新規 登録] をクリックします。Click New registration.
次の値を指定します。Specify the following values:
名前: <Tenant_name> SIEM MSSP コネクタ (Tenant_name表示名に置き換える)Name: <Tenant_name> SIEM MSSP Connector (replace Tenant_name with the tenant display name)
サポートされているアカウントの種類: この組織ディレクトリのアカウントのみSupported account types: Account in this organizational directory only
リダイレクト URI: [Web] を選択して入力
https://<domain_name>/SiemMsspConnector
します (<domain_name>テナント名に置き換えてください)Redirect URI: Select Web and typehttps://<domain_name>/SiemMsspConnector
(replace <domain_name> with the tenant name)
[登録] をクリックします。Click Register. アプリケーションは、所有するアプリケーションの一覧に表示されます。The application is displayed in the list of applications you own.
アプリケーションを選択し、[概要] を クリックします。Select the application, then click Overview.
[アプリケーション (クライアント ) ID] フィールドの値を安全な場所にコピーすると、次の手順でこの値が必要になります。Copy the value from the Application (client) ID field to a safe place, you will need this in the next step.
新 しいアプリケーション パネル& [ 証明書の秘密] を選択します。Select Certificate & secrets in the new application panel.
[新 しいクライアント シークレット] をクリックします。Click New client secret.
- 説明: キーの説明を入力します。Description: Enter a description for the key.
- 有効期限: [1 年間] を選択します。Expires: Select In 1 year
[ 追加] をクリックし、クライアント シークレットの値を安全な場所にコピーします。次の手順でこれを行う必要があります。Click Add, copy the value of the client secret to a safe place, you will need this in the next step.
手順 2: 顧客のテナントからアクセストークンと更新トークンを取得するStep 2: Get access and refresh tokens from your customer's tenant
このセクションでは、PowerShell スクリプトを使用して顧客のテナントからトークンを取得する方法について説明します。This section guides you on how to use a PowerShell script to get the tokens from your customer's tenant. このスクリプトでは、前の手順のアプリケーションを使用して、OAuth 承認コード フローを使用してアクセス トークンと更新トークンを取得します。This script uses the application from the previous step to get the access and refresh tokens using the OAuth Authorization Code Flow.
資格情報を指定した後、アプリケーションが顧客のテナントにプロビジョニングされるので、アプリケーションに同意を与える必要があります。After providing your credentials, you'll need to grant consent to the application so that the application is provisioned in the customer's tenant.
新しいフォルダーを作成し、名前を付きます
MsspTokensAcquisition
。Create a new folder and name it:MsspTokensAcquisition
.LoginBrowser.psm1 モジュールをダウンロードし、フォルダーに保存
MsspTokensAcquisition
します。Download the LoginBrowser.psm1 module and save it in theMsspTokensAcquisition
folder.注意
30 行目で、 に置き
authorzationUrl
換えるauthorizationUrl
。In line 30, replaceauthorzationUrl
withauthorizationUrl
.次の内容のファイルを作成し、フォルダーに名前
MsspTokensAcquisition.ps1
を付けて保存します。Create a file with the following content and save it with the nameMsspTokensAcquisition.ps1
in the folder:param ( [Parameter(Mandatory=$true)][string]$clientId, [Parameter(Mandatory=$true)][string]$secret, [Parameter(Mandatory=$true)][string]$tenantId ) [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # Load our Login Browser Function Import-Module .\LoginBrowser.psm1 # Configuration parameters $login = "https://login.microsoftonline.com" $redirectUri = "https://SiemMsspConnector" $resourceId = "https://graph.windows.net" Write-Host 'Prompt the user for his credentials, to get an authorization code' $authorizationUrl = ("{0}/{1}/oauth2/authorize?prompt=select_account&response_type=code&client_id={2}&redirect_uri={3}&resource={4}" -f $login, $tenantId, $clientId, $redirectUri, $resourceId) Write-Host "authorzationUrl: $authorizationUrl" # Fake a proper endpoint for the Redirect URI $code = LoginBrowser $authorizationUrl $redirectUri # Acquire token using the authorization code $Body = @{ grant_type = 'authorization_code' client_id = $clientId code = $code redirect_uri = $redirectUri resource = $resourceId client_secret = $secret } $tokenEndpoint = "$login/$tenantId/oauth2/token?" $Response = Invoke-RestMethod -Method Post -Uri $tokenEndpoint -Body $Body $token = $Response.access_token $refreshToken= $Response.refresh_token Write-Host " ----------------------------------- TOKEN ---------------------------------- " Write-Host $token Write-Host " ----------------------------------- REFRESH TOKEN ---------------------------------- " Write-Host $refreshToken
フォルダーで管理者特権の PowerShell コマンド プロンプトを開
MsspTokensAcquisition
きます。Open an elevated PowerShell command prompt in theMsspTokensAcquisition
folder.次のコマンドを実行します。
Set-ExecutionPolicy -ExecutionPolicy Bypass
Run the following command:Set-ExecutionPolicy -ExecutionPolicy Bypass
次のコマンドを入力します。
.\MsspTokensAcquisition.ps1 -clientId <client_id> -secret <app_key> -tenantId <customer_tenant_id>
Enter the following commands:.\MsspTokensAcquisition.ps1 -clientId <client_id> -secret <app_key> -tenantId <customer_tenant_id>
- 前 <client_id> の手順 で取得したアプリケーション (クライアント) ID に置き換えてください。Replace <client_id> with the Application (client) ID you got from the previous step.
- 前 <app_key> の手順 で作成した クライアント シークレットに置き換える。Replace <app_key> with the Client Secret you created from the previous step.
- 顧客 <customer_tenant_id> のテナント ID に置き換える。Replace <customer_tenant_id> with your customer's Tenant ID.
資格情報と同意を入力する必要があります。You'll be asked to provide your credentials and consent. ページ リダイレクトを無視します。Ignore the page redirect.
PowerShell ウィンドウで、アクセス トークンと更新トークンを受け取ります。In the PowerShell window, you'll receive an access token and a refresh token. SIEM コネクタを構成するには、更新トークンを保存します。Save the refresh token to configure your SIEM connector.
手順 3: Microsoft Defender セキュリティ センターでアプリケーションを許可するStep 3: Allow your application on Microsoft Defender Security Center
Microsoft Defender セキュリティ センターで作成したアプリケーションを許可する必要があります。You'll need to allow the application you created in Microsoft Defender Security Center.
アプリケーションを許可するには、ポータル システム設定の 管理 権限が必要です。You'll need to have Manage portal system settings permission to allow the application. それ以外の場合は、アプリケーションを許可する顧客を要求する必要があります。Otherwise, you'll need to request your customer to allow the application for you.
に移動
https://securitycenter.windows.com?tid=<customer_tenant_id>
します ( <customer_tenant_id> 顧客のテナント ID に置き換えてください。Go tohttps://securitycenter.windows.com?tid=<customer_tenant_id>
(replace <customer_tenant_id> with the customer's tenant ID.[設定 SIEM] を > クリックします。Click Settings > SIEM.
[MSSP] タブを選択 します。Select the MSSP tab.
最初の 手順とテナント ID からアプリケーション ID を 入力します。Enter the Application ID from the first step and your Tenant ID.
[アプリケーション の承認] をクリックします。Click Authorize application.
これで、SIEM に関連する構成ファイルをダウンロードし、Defender for Endpoint API に接続できます。You can now download the relevant configuration file for your SIEM and connect to the Defender for Endpoint API. 詳細については、「SIEM ツールにアラート をプルする」を参照してください。For more information, see, Pull alerts to your SIEM tools.
- ArcSight 構成ファイル / Splunk Authentication Properties ファイルで、シークレット値を設定してアプリケーション キーを手動で記述します。In the ArcSight configuration file / Splunk Authentication Properties file, write your application key manually by setting the secret value.
- ポータルで更新トークンを取得する代わりに、前の手順のスクリプトを使用して更新トークンを取得 (または他の方法で取得) します。Instead of acquiring a refresh token in the portal, use the script from the previous step to acquire a refresh token (or acquire it by other means).
API を使用して MSSP 顧客のテナントからアラートを取得するFetch alerts from MSSP customer's tenant using APIs
REST API を使用してアラートをフェッチする方法については、「REST API を使用 してアラートをプルする」を参照してください。For information on how to fetch alerts using REST API, see Pull alerts using REST API.