# GCP - Stackdriver Enum {{#include ../../../banners/hacktricks-training.md}} ## [Stackdriver logging](https://cloud.google.com/sdk/gcloud/reference/logging/) [**Stackdriver**](https://cloud.google.com/stackdriver/) は、Google が提供する包括的なインフラストラクチャ **ログスイート** として認識されています。これは、Compute Instances 内で実行された個々のコマンドを報告する syslog のような機能を通じて、機密データをキャプチャする能力を持っています。さらに、ロードバランサーや App Engine アプリケーションに送信された HTTP リクエスト、VPC 通信内のネットワークパケットメタデータなどを監視します。 Compute Instance に対して、対応するサービスアカウントはインスタンスの活動をログに記録するために **WRITE** 権限のみを必要とします。しかし、管理者がサービスアカウントに **READ** と **WRITE** の両方の権限を **誤って** 与える可能性があります。そのような場合、ログを調査して機密情報を確認することができます。 これを実現するために、[gcloud logging](https://cloud.google.com/sdk/gcloud/reference/logging/) ユーティリティは一連のツールを提供します。最初に、現在のプロジェクトに存在するログの種類を特定することをお勧めします。 ```bash # List logs gcloud logging logs list # Read logs gcloud logging read [FOLDER] # Write logs # An attacker writing logs may confuse the Blue Team gcloud logging write [FOLDER] [MESSAGE] # List Buckets gcloud logging buckets list ``` ## 参考文献 - [https://about.gitlab.com/blog/2020/02/12/plundering-gcp-escalating-privileges-in-google-cloud-platform/#reviewing-stackdriver-logging](https://about.gitlab.com/blog/2020/02/12/plundering-gcp-escalating-privileges-in-google-cloud-platform/#reviewing-stackdriver-logging) - [https://initblog.com/2020/gcp-post-exploitation/](https://initblog.com/2020/gcp-post-exploitation/) {{#include ../../../banners/hacktricks-training.md}}