<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
---
name: performing-gcp-audit-log-analysis
description: >-
  Analyze Google Cloud audit logs for access patterns, permission changes, and data access events.
domain: cybersecurity
subdomain: cloud-forensics
tags:
  - gcp
  - audit-logs
  - forensics
  - cloud-security
version: "1.0"
author: defconxt
license: AGPL-3.0
metadata:
  mitre-attack: ["T1078.004"]
---

# Performing GCP Audit Log Analysis

## Overview

Analyze Google Cloud audit logs for access patterns, permission changes, and data access events.

## Prerequisites

| Requirement | Install |
|---|---|
| gcloud CLI | `apt install google-cloud-cli` |
| BigQuery | Log analytics |
| Python 3.10+ | For agent tooling |

## Key Concepts

GCP Audit Logs capture admin activity, data access, and system
events. Investigation covers IAM changes and service account usage.

## Quick Reference

```bash
gcloud logging read 'resource.type="gce_instance"' --limit 100
node agent.js query --project my-project --filter 'methodName=SetIamPolicy'
node agent.js timeline --project my-project --hours 48
node agent.js report --investigation GCP-2026-001
```

## Workflow

1. Define scope
2. Query audit logs
3. Analyze IAM changes
4. Trace service accounts
5. Check data access
6. Correlate projects
7. Document

## Detection

```yaml
title: Gcp Audit Log Analysis Detection
id: 7aedb7f5-e741-47d8-bdc0-2dbd1f300d7d
status: experimental
description: Detects suspicious activity related to performing gcp audit log analysis techniques in cloud forensics context
logsource:
  product: aws
  service: cloudtrail
detection:
  selection:
    eventName: "*Unauthorized*"
  condition: selection
level: high
tags:
  - attack.t1078.004
  - attack.collection
falsepositives:
  - Scheduled compliance scanning by authorized security tools
```

## Verification

- Verify queries
- Confirm IAM detection
- Validate SA tracking
- Check data access
- Verify evidence chain

## References

- OWASP Testing Guide — https://owasp.org/www-project-web-security-testing-guide/
- MITRE ATT&CK — https://attack.mitre.org/
- NIST SP 800-53 — https://csf.tools/reference/nist-sp-800-53/
