Summary
Notes around GCP Incident Response & Threat Hunting.
Notes around GCP Incident Response & Threat Hunting.
# Connect to GCP with service account key file
gcloud auth activate-service-account [email protected] --key-file=service-account-key-file.json
# List authenticated accounts
gcloud auth list
# Set the project
gcloud config set project some-project
# Find Logging Buckets
gcloud logging buckets list
# Read Logging Bucket files and output as JSON
gcloud logging read 'timestamp<="2022-10-01T00:00:00Z" AND timestamp>="2022-09-01T00:00:00Z"' --bucket=gcp-log-store --location=global --view=_AllLogs --format="json" > logs-gcp.json