CMC Telecom cam kết hỗ trợ doanh nghiệp của bạn kịp thời
Hãy gửi phản hồi và câu hỏi của bạn cho chúng tôi để được giải đáp
Executive Summary
This article analyzes common security risks associated with utilizing Google Cloud Platform (GCP), where 86% of compromised cases are leveraged for cryptocurrency mining (Cryptojacking). The main causes include: weak passwords (48%), third-party software vulnerabilities (26%), and credential leakage on GitHub (4%). The article delves deep into the issue of Service Account key leakage, one of the most severe threat vectors, while providing a comprehensive guide on immediate incident response and essential preventive measures. These include adopting Workload Identity Federation, implementing the principle of least privilege, encrypting keys with Cloud Secret Manager, and enforcing Organization Policies and Quotas.

According to the latest report from the Cyber Security Action Team at CMC Telecom, 86% of recently compromised Google Cloud accounts were used to mine cryptocurrency. Hackers deployed cryptocurrency mining software within just 22 seconds of successfully breaching an account. When a Google Cloud account is hijacked for crypto mining, users face astronomical billing charges (potentially reaching billions of VND) in a very short span of time, alongside the risk of losing business-critical data.
A Service Account is a special type of identity on Google Cloud Platform (GCP) used to authenticate and authorize applications and system-level services. Service accounts can be created and managed directly by users or managed automatically by Google.
One of the most common methods to allow an external application to authenticate as a service account is to generate a service account key and use it to acquire OAuth 2.0 access tokens. There are several typical vectors through which hackers compromise service accounts:
Exposing a Service Account provides threat actors with a direct entry point into the GCP environment, allowing them to abuse compute resources to mine cryptocurrency. This technique is formally known as Cryptojacking. To weaponize a compromised service account for unauthorized mining, hackers typically:
The root cause of service account compromise lies in the insecure management and storage of service account keys. Common scenarios leading to exposure include:
This represents a severe threat vector that can incur catastrophic financial and operational damage. In Part 2, CMC will outline critical remediation steps and robust long-term preventive measures.

If you suspect or confirm that a service account key has been compromised, perform the following recovery actions immediately:
gcloud compute instances delete vm1 vm2 vm3 --zone us-central1-a --quiet --delete-disks all
To prevent service account credential leaks in the future, implement the following best practices:
(*) Workload Identity Federation is a feature that allows workloads running outside of GCP (e.g., on-premises or in other clouds) to authenticate securely as a service account. By linking an external Identity Provider (IdP) with a GCP service account, external workloads can exchange their federated tokens for short-lived GCP access tokens, eliminating the need to store static keys.
(**) Service Account Impersonation allows a user or another service account to dynamically act on behalf of a target service account. This allows you to delegate privileges temporarily and control access without distributing or managing static, long-lived service account keys.
Cloud Secret Manager is a secure GCP service designed to store, manage, and audit sensitive secrets such as passwords, API keys, and certificates. You can use it to store Service Account keys securely and retrieve them dynamically via Terraform. Here is a quick implementation flow:
Step 1: Provision the secret and upload the key payload securely to Cloud Secret Manager.
Step 2: Programmatically read the secret value within your Terraform configurations:
Use the google_secret_manager_secret_version data source block to reference the latest version of the secret at runtime:
resource "google_secret_manager_secret_version" "my_service_account_key" {
secret = "my-service-account-key"
version = "latest"
}
Step 1: Navigate to the Organization Policies page in the Google Cloud Console.
Step 2: Select the target organization node, folder, or project where you want to apply the restriction.
Step 3: Search for and select the Restrict Resource Locations constraint.
Step 4: Click Edit to customize the policy definition.
Step 5: Specify allowed or denied geographic regions and zones. Use filter prefixes such as in:, not-in:, has:, or not-has:. For example: `in:us-locations`, `not-in:asia-southeast1-a`, `has:europe`, `not-has:southamerica`. This prevents attackers from spinning up resource-intensive instances in unmonitored regions.
Step 6: Click Save to enforce the policy.
Step 1: Navigate to the Quotas & System Limits page in the GCP Console.
Step 2: Select the specific project you want to restrict.
Step 3: Filter by service, for example: Compute Engine API.
Step 4: Locate the metric you want to limit, such as VM Instances or CPU quotas.
Step 5: Click Edit Quotas to adjust the maximum limit.
Step 6: Set a safe maximum capacity threshold aligned with your daily operations (e.g., 10).
Step 7: Click Submit Request to save and apply the new quota limit.
CMC Telecom is committed to partnering with you to audit your security posture, review IAM configurations, and assist in setting up robust, optimized Policies and Quotas.
Sáng ngày 13 tháng 02 năm 2023 – Ngân hàng TMCP An Bình (ABBANK) hợp tác cùng liên danh Cloud Ace – CMC Telecom vừa tổ chức thành công Lễ Ký Kết và Khởi Động dự án “Xây dựng hạ tầng Hybrid Cloud.” Dự án được kỳ vọng tăng cường năng lực cạnh tranh của ABBANK trong cuộc đua chuyển đổi số khi sử dụng nền tảng Google Cloud.
Hãy gửi phản hồi và câu hỏi của bạn cho chúng tôi để được giải đáp