/secskills-defense:investigating-gcp-incidentsfrom secskills-defense
Investigates GCP security incidents by establishing audit-log visibility, reconstructing activity from Cloud Audit Logs, triaging service-account and OAuth abuse, and scoping IAM/resource changes.
Ships in secskills-defense. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The completeness of a GCP investigation is decided before the incident, by which audit logs were enabled. The single most damaging mistake is reading an empty query result as "nothing happened" when the real answer is "that log category was never turned on." Establish visibility first; conclude second.
GCP's audit model is not AWS's and not Azure's. Two categories are always on and two are mostly off, and knowing which is which is the difference between a scoped investigation and a false all-clear.
investigating-aws-incidents; in Azure or
Microsoft 365 / Entra — use investigating-azure-incidents or
investigating-m365-entraexploiting-cloud-platformsdefending-kubernetes for the cluster-planetriaging-security-alerts firstGCP Cloud Audit Logs come in four streams, and their defaults are the whole game:
| Stream | Default | Can disable? | What it captures |
|---|---|---|---|
| Admin Activity | Always on | No — written even if the Logging API is disabled | Config and metadata writes: IAM changes, resource create/delete |
| System Event | Always on | No | Google-initiated actions on your resources |
| Data Access | Off (except BigQuery) | Yes | Reads and data-plane access — who read the bucket, the secret, the dataset |
| Policy Denied | On | No (can exclude from storage) | Access blocked by policy — VPC-SC, org policy |
The consequence you must internalize: Data Access logging is off by default everywhere except BigQuery. So "did the attacker read the secret / download the bucket / exfiltrate the dataset?" is usually unanswerable from logs unless Data Access logging was enabled in advance. Do not report "no exfiltration occurred" — report "Data Access logging was not enabled, so read activity cannot be confirmed or ruled out." Those are different findings, and only one is honest.
Retention also differs by stream. Admin Activity and System Event land in the
_Required bucket — 400 days, not configurable. Data Access and Policy
Denied land in _Default — 30 days unless someone extended it or routed a
sink to longer storage. Check the retention before assuming history exists.
# What audit config is actually in effect at the org / project level
gcloud organizations get-iam-policy ORG_ID --format=json | jq '.auditConfigs'
gcloud projects get-iam-policy PROJECT_ID --format=json | jq '.auditConfigs'
# Everything a principal did (Admin Activity is always present)
gcloud logging read \
'protoPayload.authenticationInfo.principalEmail="[email protected]"' \
--project=PROJECT_ID --freshness=30d --format=json
# IAM policy changes — the escalation signal
gcloud logging read \
'protoPayload.methodName:"SetIamPolicy"' --freshness=30d --format=json
# Service-account key creation — persistence
gcloud logging read \
'protoPayload.methodName="google.iam.admin.v1.CreateServiceAccountKey"' \
--freshness=30d --format=json
Read the request fields, not just the method name. authenticationInfo
carries the principal and, critically, whether a call was made as a service
account via impersonation. requestMetadata.callerIp and callerSuppliedUserAgent
locate the source; a gcloud user agent from an unexpected ASN on a service
account is a strong signal.
Service accounts are the center of most GCP incidents, because they hold durable credentials and are routinely over-privileged.
iam.serviceAccounts.getAccessToken and
...signJwt/...signBlob let one principal act as another. Trace the chain:
who impersonated what, and does the terminal identity hold more than the
origin? This is GCP's primary lateral-movement and escalation primitive.CreateServiceAccountKey on a privileged SA
during the incident window is a finding.investigating-m365-entra-style identity territory and is easy to miss from
a pure-GCP view.If Security Command Center is enabled, Event Threat Detection has likely already correlated some of this — anomalous IAM grants, service-account key abuse, and exfiltration patterns surface as findings. Start from SCC findings to seed the timeline, then corroborate each against the raw audit logs rather than trusting the finding alone. SCC in the Standard tier is far thinner than Premium/Enterprise; confirm which tier is licensed before assuming a detection would have fired.
_Default bucket. Admin Activity is
400 days; if the relevant action was an IAM or resource change, the history
is longer than you think.getAccessToken/impersonation and from what source.Fetch public advisories, specifications, and vendor reports as Markdown:
curl -sL "https://defuddle.md/<url>" # scheme in the path is optional
This strips page boilerplate — roughly 78% fewer tokens on a prose page — and returns the full text rather than a summary, so you can grep it and trust a negative result.
Three things it is not for. Fetch JSON and API responses raw, because readability extraction mangles structured data. Fetch authenticated or JavaScript-rendered pages directly, because it retrieves them anonymously. And never route adversary infrastructure (phishing links, C2, malware hosting), client-owned hosts, or engagement URLs through it — the request leaves your machine to a third party, and for live adversary infrastructure it also tips off the operator.
Some sites block the extractor and return an error blob rather than the page —
{"error":"Failed to fetch: 418 I'm a teapot"} from freedesktop.org, for
instance. That is the fetch being refused, not the source saying the thing
does not exist. Re-fetch the URL directly before drawing any conclusion from
it.
investigating-aws-incidents, investigating-azure-incidents — the same
discipline in the other two cloudsdefending-kubernetes — the cluster-plane view when the incident is in GKEresponding-to-incidents — the overall IR framing this feedshardening-cloud-posture — enabling the Data Access logging whose absence
this skill keeps running intoWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub trilwu/secskills --plugin secskills-defense22 skills in this plugin
/analyzing-disk-imagesPerform dead-disk forensics on an acquired disk image using The Sleuth Kit, Plaso, and bulk_extractor — verify integrity and mount read-only, map partitions, recover deleted files, build a file-system and super-timeline, carve unallocated space, mine registry hives and OS artifacts, and detect anti-forensics. Use when handed a .E01/.dd/.raw/.vmdk/.vhdx disk image or forensic acquisition to examine, recovering deleted files, building a file-system timeline, or carving artifacts from unallocated space./analyzing-linux-persistenceSystematically identify and analyze persistence mechanisms on Linux systems during DFIR investigations -- sweep systemd units, cron jobs, shell initialization, SSH config, kernel modules, LD_PRELOAD, package manager hooks, udev rules, container entrypoints, and XDG autostart entries. Use when investigating a compromised Linux host, performing forensic analysis of a Linux disk image, looking for backdoors or unauthorized access mechanisms, or determining how an attacker maintained access./analyzing-malwareAnalyze suspected malware safely — containment, static triage, sandboxed detonation, unpacking, capability and C2 extraction, IOC production, and YARA rule authoring. Use when handed a suspicious file, hash, or sample, when triaging an alert artifact, or when producing detection content from a specimen.2 plugins ship this exact skill · first indexed Jul 31, 2026
Other plugins' skills for the same job