Logo : Investigating Gcp Incidents

Investigating Gcp Incidents

Communauté
trilwu
investigating-gcp-incidents

Enquêter sur un incident de sécurité dans Google Cloud : vérifier quels journaux d’audit sont disponibles avant de conclure à une lacune, reconstituer l’activité à partir de Cloud Audit Logs, examiner les abus de comptes de service et d’OAuth, analyser les alertes de Security Command Center et circonscrire les changements IAM et liés aux ressources. À utiliser pour répondre à une suspicion de compromission GCP, enquêter sur une clé de compte de service divulguée, traiter une alerte Security Command Center ou Event Threat Detection, ou reconstituer les actions d’un principal au sein d’une organisation GCP.

Add to TypingMind

Présentation

Éditeurtrilwu
Dépôtsecskills
Nom de la compétenceinvestigating-gcp-incidents
Étoiles
144
Forks
15
Fichiers inclus
Instructions uniquement
LicenceMIT
Liens
  • Instructions en Markdown

    Un fichier SKILL.md que le modèle charge à la demande : il ne consomme donc des tokens que lorsqu’une demande correspond réellement à la compétence.

  • Compatible avec tous les LLM

    Les compétences IA sont rédigées en Markdown et non sous forme de code propre à un fournisseur. Elles fonctionnent donc avec GPT, Claude, Gemini, Grok ou un modèle local.

  • Tout dans les instructions

    Tout ce dont le modèle a besoin se trouve dans les instructions : aucun fichier supplémentaire à synchroniser.

  • Open source

    Publiée par trilwu sur GitHub. Consultez les sources avant de l’installer.

Installation

Installez la compétence IA Investigating Gcp Incidents dans TypingMind pour l’utiliser avec n’importe quel LLM, ou ajoutez-la à un autre agent capable de lire SKILL.md.

1

Installer dans TypingMind

TypingMind installe une compétence directement depuis son dossier GitHub : l’application lit SKILL.md, regroupe les fichiers de ressources et enregistre le tout localement.

  1. Ouvrez l’application et accédez à Plugins → Compétences.
  2. Choisissez « Installer depuis GitHub ».
  3. Copiez l’URL ci-dessous, qui pointe vers le dossier de la compétence, puis collez-la et confirmez.
    https://github.com/trilwu/secskills/tree/main/secskills-defense/skills/investigating-gcp-incidents
  4. Activez la compétence dans chaque discussion où vous souhaitez pouvoir l’utiliser.
Plugins → Compétences → Ajouter une compétence → Via une URL GitHub, puis collez l’URL du dossier et appuyez sur Continuer.
2

Installer dans un autre agent

Tout agent capable de lire le format Agent Skills peut utiliser cette compétence : copiez le dossier dans le répertoire des compétences de cet agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/trilwu/secskills.git /tmp/secskills
mkdir -p .claude/skills
cp -r /tmp/secskills/secskills-defense/skills/investigating-gcp-incidents .claude/skills/investigating-gcp-incidents
Redémarrez Claude Code après la copie pour que la nouvelle compétence soit prise en compte.

Utilisez cette compétence dans TypingMind

Activez Investigating Gcp Incidents dans n’importe quelle discussion TypingMind et le modèle s’occupe du reste. Le nom et la description de la compétence figurent dans le prompt système. Dès qu’une demande correspond, le modèle charge lui-même l’intégralité des instructions : vous n’avez jamais à l’invoquer manuellement, et elle ne consomme aucun token tant qu’elle n’est pas utilisée.

Le modèle charge automatiquement Investigating Gcp Incidents dès qu’une demande correspond à cette compétence.

Compatible avec tous les modèles IA

Les compétences IA sont de simples instructions Markdown, et non du code propre à un fournisseur. Ainsi, la compétence Investigating Gcp Incidents n’est pas liée au modèle pour lequel elle a été conçue. Installez-la une seule fois dans TypingMind et utilisez-la avec GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou un modèle local que vous exécutez vous-même, le tout avec vos propres clés API.

  • Chargée uniquement en cas de besoin

    Le prompt système ne contient que le nom et la description. Les instructions sont récupérées à la première demande correspondante : une compétence inutilisée ne coûte donc rien.

  • Changez de modèle en cours de discussion

    La compétence étant constituée d’instructions et non de code, elle reste fonctionnelle lorsque vous changez de modèle : le nouveau modèle lit le même fichier SKILL.md.

Instructions de la compétence

Voici le contenu de SKILL.md que le modèle charge. Lisez-le avant l’installation : une compétence contient des instructions que votre modèle suivra.

Investigating GCP Incidents

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.

When to Use

  • Responding to a suspected compromise in a GCP project or organization
  • Investigating a leaked or abused service-account key
  • Working a Security Command Center, Event Threat Detection, or Chronicle alert
  • Reconstructing a principal's activity across projects
  • Scoping IAM policy or resource changes after a suspected privilege escalation

When NOT to Use

  • The incident is in AWS — use investigating-aws-incidents; in Azure or Microsoft 365 / Entra — use investigating-azure-incidents or investigating-m365-entra
  • Attacking GCP rather than investigating it — use exploiting-cloud-platforms
  • A GKE cluster compromise specifically — start here for the cloud-plane view, then use defending-kubernetes for the cluster-plane
  • Deciding whether an alert is even an incident — use triaging-security-alerts first

Establish Visibility Before You Conclude

GCP Cloud Audit Logs come in four streams, and their defaults are the whole game:

StreamDefaultCan disable?What it captures
Admin ActivityAlways onNo — written even if the Logging API is disabledConfig and metadata writes: IAM changes, resource create/delete
System EventAlways onNoGoogle-initiated actions on your resources
Data AccessOff (except BigQuery)YesReads and data-plane access — who read the bucket, the secret, the dataset
Policy DeniedOnNo (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.

bash
# 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'

Reconstructing Activity

bash
# Everything a principal did (Admin Activity is always present)
gcloud logging read \
  'protoPayload.authenticationInfo.principalEmail="attacker@example.com"' \
  --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-Account and OAuth Abuse

Service accounts are the center of most GCP incidents, because they hold durable credentials and are routinely over-privileged.

  • Impersonation chains. 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.
  • Key creation is persistence — a user-managed key survives a password reset and an MFA change. Every CreateServiceAccountKey on a privileged SA during the incident window is a finding.
  • OAuth grants and the Workspace boundary. A domain-wide-delegation grant lets a GCP service account act across Google Workspace; that crosses into investigating-m365-entra-style identity territory and is easy to miss from a pure-GCP view.

Follow Security Command Center, Don't Restart From Zero

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.

Rationalizations to Reject

  • "The logs show no data access, so nothing was exfiltrated." Data Access logging is off by default. Absence of the log is absence of the logging, not absence of the access. Report the visibility gap.
  • "Admin Activity is empty for that window, so the account was idle." Check the principal spelling and the project — activity is logged in the project whose resource was touched, which may not be the one you are querying.
  • "It's only 30 days back." That is the _Default bucket. Admin Activity is 400 days; if the relevant action was an IAM or resource change, the history is longer than you think.
  • "The service account made the call, so it was legitimate automation." Service accounts are exactly what attackers impersonate. Check whether the call came via getAccessToken/impersonation and from what source.
  • "SCC didn't flag it, so it didn't happen." Standard-tier SCC detects a fraction of what Premium does, and Data Access-dependent detections need the logs enabled. A quiet SCC is not an all-clear.

Reading External Sources

Fetch public advisories, specifications, and vendor reports as Markdown:

bash
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.

References

  • investigating-aws-incidents, investigating-azure-incidents — the same discipline in the other two clouds
  • defending-kubernetes — the cluster-plane view when the incident is in GKE
  • responding-to-incidents — the overall IR framing this feeds
  • hardening-cloud-posture — enabling the Data Access logging whose absence this skill keeps running into

Foire aux questions

À quoi sert la compétence IA Investigating Gcp Incidents ?

Enquêter sur un incident de sécurité dans Google Cloud : vérifier quels journaux d’audit sont disponibles avant de conclure à une lacune, reconstituer l’activité à partir de Cloud Audit Logs, examiner les abus de comptes de service et d’OAuth, analyser les alertes de Security Command Center et circonscrire les changements IAM et liés aux ressources. À utiliser pour répondre à une suspicion de compromission GCP, enquêter sur une clé de compte de service divulguée, traiter une alerte Security Command Center ou Event Threat Detection, ou reconstituer les actions d’un principal au sein d’une or...

Pourquoi utiliser Investigating Gcp Incidents sur TypingMind ?

Parce que vous l’installez une seule fois pour l’utiliser avec n’importe quel modèle. Investigating Gcp Incidents se compose de simples instructions en Markdown plutôt que de code propre à un fournisseur. La même compétence fonctionne donc avec GPT-5, Claude, Gemini, Grok ou un modèle local, et vous pouvez changer de modèle en cours de discussion sans perturber son fonctionnement. TypingMind utilise vos propres clés API : vous payez donc directement les fournisseurs plutôt qu’un abonnement par siège, et vos compétences et discussions restent dans votre propre espace de stockage.

Comment installer Investigating Gcp Incidents dans TypingMind ?

Dans TypingMind, ouvrez Plugins → Compétences → Installer depuis GitHub et collez https://github.com/trilwu/secskills/tree/main/secskills-defense/skills/investigating-gcp-incidents. TypingMind lit le fichier SKILL.md et l’installe sous forme de compétence que vous pouvez activer pour chaque discussion.

Quels modèles d’IA peuvent utiliser Investigating Gcp Incidents ?

N’importe quel modèle que vous connectez dans TypingMind. Les compétences IA sont de simples instructions en Markdown, et non du code propre à un fournisseur. GPT, Claude, Gemini, Grok et les modèles locaux peuvent donc tous charger cette compétence lorsqu’une demande lui correspond.

Combien de modèles d’IA puis-je utiliser avec Investigating Gcp Incidents ?

Autant que vous le souhaitez. Vous pouvez utiliser Investigating Gcp Incidents avec tout modèle qui prend en charge les compétences : GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama et bien d’autres, le tout dans TypingMind avec vos propres clés API.

La compétence IA Investigating Gcp Incidents est-elle gratuite ?

Oui. Cette compétence est publiée sur GitHub par trilwu sous licence MIT. Vous ne payez que votre propre fournisseur d’IA pour les tokens utilisés.

Que sont les compétences IA ?

Une compétence IA est un ensemble d’instructions réutilisables qui apprend à un modèle d’IA à accomplir une tâche précise. Elle suit le format ouvert Agent Skills : un fichier SKILL.md contenant un nom et une description, ainsi que les éventuels scripts, gabarits ou fichiers de référence dont le modèle peut avoir besoin. Le modèle ne lit les instructions que lorsque votre demande correspond à la compétence. Une compétence installée ne coûte donc rien tant qu’elle n’est pas utilisée.

En quoi les compétences IA diffèrent-elles des plugins ou des serveurs MCP ?

Un plugin ou un serveur MCP fournit au modèle de nouveaux outils à appeler : du code qui s’exécute quelque part et renvoie un résultat. Une compétence IA lui apporte plutôt des connaissances et une méthode : comment aborder une tâche, quelles étapes suivre et à quoi ressemble un bon résultat. Les compétences sont de simples instructions en Markdown. Elles ne nécessitent donc ni serveur, ni clé API, ni environnement d’exécution, et fonctionnent avec n’importe quel modèle.

Tout voir

Créez votre propre espace de travail IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇