Security Command Center のプレミアム ティアに移行していない場合は、Event Threat Detection を構成し、Event Threat Detection の出力を書き込む場所を選択します。このガイドでは、Security Command Center のレガシー UI について説明します。これは、Security Command Center プレミアム ティアまたはスタンダード ティアに移行していない場合にのみ表示されます。
推奨設定
以下の初期設定を行うことをおすすめします。
- すべてのプロジェクトをスキャンする
- すべてのルールを有効にする
プロジェクトで Cloud Logging を有効にする
Cloud Console
プロジェクトのスキャン
Event Threat Detection の [ソース] タブで、モニタリングするプロジェクトを選択できます。
すべてのプロジェクトをモニタリングするには:
- Cloud Console で Event Threat Detection の [ソース] ページに移動します。
[ソース] ページに移動 - [現在と将来のすべてのプロジェクトを含める] を選択します。
- [保存] をクリックします。
ほとんどのプロジェクトをモニタリングするには、モニタリングしないプロジェクトを除外します。
- Cloud Console で Event Threat Detection の [ソース] ページに移動します。
[ソース] ページに移動 - [プロジェクトのサブセットを除外する] を選択します。
- モニタリングしないプロジェクトを選択します。
- [保存] をクリックします。
少数のプロジェクトをモニタリングするには、含める特定のプロジェクトを選択します。
- Cloud Console で Event Threat Detection の [ソース] ページに移動します。
[ソース] ページに移動 - [プロジェクトのサブセットを含める] を選択します。
- モニタリングするプロジェクトを選択します。1 つ以上選択する必要があります。
- [保存] をクリックします。
有効化ルール
Event Threat Detection の [ルール] タブで、有効にするルールを選択できます。
- Cloud Console で Event Threat Detection の [ルール] ページに移動します。
[ルール] ページに移動 - [有効にする] でルール名の横をクリックして、そのルールを有効または無効にします。
出力の構成
Event Threat Detection の [出力] タブで、検出結果をログに記録する場所を選択できます。
Event Threat Detection の検出結果は、自動的に Security Command Center に書き込まれます。検出結果を Google Cloud のオペレーション スイートにも記録する場合は、次の手順に従います。
- Cloud Console の Event Threat Detection の [出力] ページに移動します。
[出力] ページに移動 - [Log findings to Google's operations suite] を有効にします。
- ログを保存するプロジェクトを選択します。[プロジェクト] に名前を入力するか、[参照] をクリックしてプロジェクトを選択します。
- [保存] をクリックします。
API
API を使用して推奨される Event Threat Detection 設定を有効にするには、認証情報の署名なしトークンを取得し、次の curl コマンドを使用します。
認証情報の署名なしトークンの取得
サービス アカウントの認証情報の署名なしトークンを取得するには、次の gcloud
ツールコマンドを使用します。
$ export GOOGLE_APPLICATION_CREDENTIALS=path-to-your-service-account.json $ TOKEN=`gcloud auth application-default print-access-token`
プロジェクトのスキャン
sourceSettings
を使用して、モニタリングするプロジェクトを選択します。組織内のすべてのプロジェクトで Event Threat Detection を有効にするには、次のコマンドを使用します。
$ curl -s --request PATCH \
-H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
"https://threatdetection.googleapis.com/v1/organizations/your-organization-ID/sourceSettings" \
--data '{ "settings": { "log_sources": { "inclusion_mode": "ALL" } } }'
有効化ルール
detectorSettings
を使用して、有効にする検出項目を選択します。すべての Event Threat Detection 検出項目を有効にするには、次のコマンドを使用して、すべてのルールを true
に設定します。
$ curl -s --request PATCH \
-H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
"https://threatdetection.googleapis.com/v1/organizations/your-organization-ID/detectorSettings" \
--data '{ "settings": \
{ "outgoing_dos": { "enable_event_threat_detection": true }, \
"malware_bad_ip": { "enable_event_threat_detection": true }, \
"malware_bad_domain": { "enable_event_threat_detection": true }, \
"ssh_brute_force": { "enable_event_threat_detection": true }, \
"cryptomining_pool_domain": { "enable_event_threat_detection": true }, \
"cryptomining_pool_ip": { "enable_event_threat_detection": true }, \
"iam_anomalous_grant": { "enable_event_threat_detection": true } } }'
出力の構成
sinkSettings
を使用して出力を構成します。検出がログに記録されるプロジェクトを設定するには、次のコマンドを使用します。
$ curl -s --request PATCH \
-H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
"https://threatdetection.googleapis.com/v1/organizations/your-organization-ID/sinkSettings" \
--data '{ "settings": \
{ "logging_sink_project": "projects/your-ETD-logging-destination-project-ID" } }'
Event Threat Detection の無効化
Event Threat Detection を無効にするには、sourceSettings
、detectorSettings
、sinkSettings
を空のオブジェクトに設定します。
$ curl -s --request PATCH \ -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \ "https://threatdetection.googleapis.com/v1/organizations/your-organization-ID/sourceSettings" \ --data '{ "settings": {} }' $ curl -s --request PATCH \ -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \ "https://threatdetection.googleapis.com/v1/organizations/your-organization-ID/sinkSettings" \ --data '{ "settings": {} }' $ curl -s --request PATCH \ -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \ "https://threatdetection.googleapis.com/v1/organizations/your-organization-ID/sinkSettings" \ --data '{ "settings": {} }'
次のステップ
- Event Threat Detection のテストについて確認する。