Attempt to add SSH key to Google Compute Engine project metadata by a previously unseen user

Goal

Detect when a previously unseen user attempts to add or modify an SSH key to GCE project metadata.

Strategy

This rule monitors Google Cloud Audit Logs to determine when a previously unseen user attempts to add or modify an SSH key in the GCE project metadata. An attacker who has already gained initial access may try to preserve access or laterally move to other GCE instances by adding their SSH key to the project metadata.

Note: This rule uses the New Value detection method, to determine when a previously unseen user performs this action.

Triage and response

  1. Reach out to the user or owner of the service account to determine if this action is legitimate.
  2. If the action is legitimate, consider including the IP address or ASN in a suppression list. For more information, see Best practices for creating detection rules with Datadog Cloud SIEM.
  3. Otherwise, use the Cloud SIEM - IP Investigation dashboard to see if the IP address: {{@network.client.ip}} has taken other actions.
  4. If the results of the triage indicate that an attacker has taken the action, begin your company’s incident response process and investigate.