Lion Cipher Lab
Find your own Google Cloud assessment in Cloud Audit Logs after turning on Data Access logs (GCP assessment 4 of 5)
- Cloud Security
- Intermediate
- ~50 min
- Free · no account required
Why it matters
A defender can only investigate what was logged. On Google Cloud, the most important log for a service account takeover, the call that mints a token to act as the account, is not recorded unless you chose to record it. Finding that out in the middle of an incident is too late. Doing it to yourself first, in an assessment, teaches the lesson cheaply: your read-only assessor was invisible until you turned the right log on, and so would an attacker's impersonation have been. It is also the practical meaning of the line 'logging should be on before you need it'.
What you'll learn
- telling Admin Activity, Data Access, System Event and Policy Denied logs apart
- knowing which audit logs are on by default
- enabling Data Access logs for the IAM API through auditConfigs
- reading an impersonation event in Cloud Audit Logs
- reading serviceAccountDelegationInfo to see who was behind a service account
- querying logs with gcloud logging read
- writing down the limits of the evidence
Steps in this lab
- The rule first: your project, and a switch you will turn off again
- The four log types, and which ones are on
- Where impersonation is logged, and what to switch on
- Add the audit config safely, with a script
- Act as the assessor, then query the log for yourself
- Summarise who impersonated what, on sample logs first
- The defender's view, then switch it off
Open the full interactive lab →