investigating-gcp-incidents
Skill11 starsChanged 3 months agoApache-2.0View on GitHub
Investigate a suspected Google Cloud compromise from the control plane — Cloud Audit Logs (Admin Activity, Data Access, System Event, Policy Denied), Cloud Logging, and VPC Flow Logs — to reconstruct IAM and service-account abuse, key creation, data access, and log tampering into a timeline. Use when the evidence is GCP audit logs rather than a host. Service-account keys and IAM bindings are the usual attack path; preserve the audit logs before retention lapses.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- EvilFreelancer/secasword for word, first seen Oct 15, 2026
Other versions1 project uses a version of this.
Word for word · 1
- EvilFreelancer/secas★ 11100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository50 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analyzing-binariesSkill
- analyzing-malwareSkill
- analyzing-memory-imagesSkill
- analyzing-network-trafficSkill
- analyzing-phishing-emailsSkill
- attacking-active-directorySkill
- attacking-wireless-networksSkill
- auditing-code-for-vulnerabilitiesSkill
- auditing-mcp-serversSkill
- auditing-supply-chainSkill
- container-securitySkill
- cracking-passwordsSkill
- engineering-detectionsSkill
- enumerating-network-servicesSkill
- escalating-linux-privilegesSkill
- escalating-windows-privilegesSkill
- establishing-persistenceSkill
- exploiting-cloud-platformsSkill
- hardening-cloud-postureSkill
- hunting-threatsSkill
- hunting-web-backdoorsSkill
- iac-securitySkill
- investigating-aws-incidentsSkill
- investigating-azure-incidentsSkill
- investigating-m365-entraSkill
- investigating-windows-endpointsSkill
- maintaining-engagement-stateSkill
- managing-vulnerabilitiesSkill
- mapping-attack-techniquesSkill
- orchestrating-vulnerability-researchSkill
- performing-reconnaissanceSkill
- performing-social-engineeringSkill
- producing-threat-intelligenceSkill
- recognizing-deceptionSkill
- reporting-security-findingsSkill
- responding-to-incidentsSkill
- reviewing-cryptographySkill
- securing-ai-systemsSkill
- testing-apisSkill
- testing-ics-ot-protocolsSkill
- testing-mobile-applicationsSkill
- testing-web-applicationsSkill
- threat-modelingSkill
- transferring-filesSkill
- triaging-security-alertsSkill
- vetting-agent-extensionsSkill
- writing-sigma-rulesSkill
- writing-yara-rulesSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 54
Check for a google.logging.v2.ConfigServiceV2.DeleteSink or disabled Data Access logging in the window — a gap after that point is …
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Investigating GCP Incidents
Google Cloud writes the intrusion into its audit logs. Cloud Audit Logs record who called which API on what resource, split into streams — Admin Activity (always on), Data Access (often off by default, and where read/exfil is proven), System Event, and Policy Denied. The attacker's path is usually identity: abusing a service account, minting a service-account key, or widening an IAM binding. The investigator reconstructs it from the logs, and the first job is to preserve them, because Data Access logs may not have been enabled and their retention is finite.
Confirm the project/organization is in scope per AGENTS.md. Note up front whether Data Access logging was enabled for the affected services — if it was not, read/exfil evidence may simply not exist, and that gap is itself a finding. This is read-only investigation; disabling keys or bindings is the operator's containment call.
When to Use
- A suspected GCP compromise where the evidence is Cloud Audit Logs
- Tracing IAM and service-account abuse, key creation, and impersonation
- Confirming data access or exfiltration from GCS and other services
- Finding cloud persistence (new bindings, keys) and log/sink tampering
- Building a GCP attack timeline for an incident
When NOT to Use
- On-host artifacts of a GCE instance — use
investigating-windows-endpoints(or acquire the disk/memory) - AWS or Azure — use
investigating-aws-incidentsorinvestigating-azure-incidents - Proactive search with no incident yet — use
hunting-threats - Offensive cloud testing — use
exploiting-cloud-platforms - Proactive hardening — use
hardening-cloud-posture - Running the whole incident — use
responding-to-incidents - Packaging IOCs into a product — use
producing-threat-intelligence
Preserve First
Export the relevant audit logs to a separate project or bucket before anything can be altered, and snapshot affected disks:
gcloud logging read \
'logName:"cloudaudit.googleapis.com" AND timestamp>="2026-08-01T00:00:00Z"' \
--project TARGET --format json > gcp_audit_$(date -u +%Y%m%d_%H%M%S).json
gcloud compute disks snapshot DISK --project TARGET --snapshot-names ir-DISKCheck for a google.logging.v2.ConfigServiceV2.DeleteSink or disabled Data
Access logging in the window — a gap after that point is evidence, not all-clear.
Reconstruct from the Control Plane
Scope the window and the suspect principal, then read the audit streams. Query
by protoPayload.methodName and authenticationInfo.principalEmail:
| Category | methodName signals |
| Access / recon | ...IAMPolicy.GetIamPolicy, ...testIamPermissions, unusual principalEmail |
| Persistence / privesc | SetIamPolicy (new bindings), CreateServiceAccountKey, generateAccessToken/generateIdToken (impersonation), CreateServiceAccount |
| Data access / exfil | storage.objects.get/list (Data Access logs), bigquery ... jobservice, disk image/snapshot export |
| Defense evasion | DeleteSink, UpdateSink, disabling Data Access logging, firewall/VPC changes |
# Service-account key creations in the window
gcloud logging read \
'protoPayload.methodName="google.iam.admin.v1.CreateServiceAccountKey"' \
--project TARGET --format 'table(timestamp, protoPayload.authenticationInfo.principalEmail, protoPayload.resourceName)'Correlate with VPC Flow Logs for egress volume and destinations. Pivot on
principalEmail, callerIp, and callerSuppliedUserAgent to follow an identity
through impersonation chains (generateAccessToken is the GCP equivalent of an
AssumeRole hop and a favorite privilege path).
Rationalizations to Reject
- "No Data Access logs, so no exfil happened." Data Access logging is off by default for many services. Absent logs mean unknown, not clean — record the gap.
- "Admin Activity looks quiet." Read/exfil and impersonation may only appear in Data Access and token-generation events. Check those streams explicitly.
- "One project is enough." Check the organization and folder levels and other projects the compromised principal could reach.
- "The key was deleted, case closed." Establish what the service-account key did before deletion; deletion may itself be the attacker covering tracks.
- "IAM binding change is routine." A new
SetIamPolicygranting a service account broad roles is a classic GCP persistence/privesc step. Verify it was authorized.
Deliverable
# GCP Investigation <GCP-###> Date: <UTC> Analyst: <name>
Project / org / scope: <ids, in-scope confirmation>
Window: <UTC start–end>
Logging state: <which audit streams were enabled — name the gaps>
Entry: <compromised principal / service account / key>
Actions: <methodNames by category, with caller IP + user agent>
Data touched: <GCS/BigQuery/snapshots — read/exported>
Persistence: <new bindings, SA keys, impersonation>
Log tampering: <sink deletes / disabled logging + resulting gaps>
Timeline: <UTC, chronological>
Conclusion: compromised / not / could-not-determine Confidence: <>Save log exports and query output as {tool}_{project}_{YYYYMMDD_HHMMSS}.{ext}
and log identities/IOCs via maintaining-engagement-state. ATT&CK IDs common
here (T1078.004 Valid Cloud Accounts, T1098 Account Manipulation, T1528 Steal
Application Access Token, T1530 Data from Cloud Storage, T1070 Indicator
Removal) — re-verify before citing.
References
investigating-aws-incidents,investigating-azure-incidents— the sibling cloud investigationsinvestigating-windows-endpoints— when a GCE host must be examinedresponding-to-incidents— the incident this feedshardening-cloud-posture— the audit logging and IAM controls this tests in hindsightexploiting-cloud-platforms— the offensive counterpart TTPs- Cloud Audit Logs (Admin Activity / Data Access / System Event / Policy Denied), Cloud Logging, VPC Flow Logs
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

