This document describes a threat finding type in Security Command Center. Threat findings are generated by threat detectors when they detect a potential threat in your cloud resources. For a full list of available threat findings, see Threat findings index.
Finding description
Container Threat Detection observed a malicious URL in the argument list of an executable process. Attackers can load malware or malicious libraries through malicious URLs.
To respond to this finding, perform the following steps.
Step 1: Review finding details
Open a
Malicious URL Observed
finding as directed in Reviewing findings. The details panel for the finding opens to the Summary tab.On the Summary tab, review the information in the following sections:
- What was detected, especially the following fields:
- URI: the malicious URI observed.
- Added binary: the full path of the process binary that received the arguments that contain the malicious URL.
- Arguments: the arguments provided when invoking the process binary.
- Environment variables: the environment variables that were in effect when the process binary was invoked.
- Containers: the name of the container.
- Kubernetes pods: the pod name and namespace.
- Affected resource, especially the following fields:
- Resource display name: the name of the affected resource.
- Resource full name: the full resource name
of the cluster. The full resource name includes the following
information:
- The project that contains the cluster:
projects/PROJECT_ID
- The location in which the cluster is located: either
zone/ZONE
orlocations/LOCATION
- The name of the cluster:
projects/CLUSTER_NAME
- The project that contains the cluster:
- Related links, especially the following fields:
- VirusTotal indicator: link to the VirusTotal analysis page.
- What was detected, especially the following fields:
On the JSON tab, in the
sourceProperties
attribute, note the value of theVM_Instance_Name
property.
Step 2: Review cluster and node
In the Google Cloud console, go to the Kubernetes clusters page.
On the Google Cloud console toolbar, select the project that appears in Resource full name (
resource.name
), if necessary. The project name appears after/projects/
in the full resource name.Click on the cluster name that you noted in Resource display name (
resource.display_name
) of the finding summary. The Clusters page opens.In the Metadata section on the **Cluster details page, note any of the user-defined information that might be helpful in resolving the threat, such as information that identifies the cluster owner.
Click the Nodes tab.
From the listed nodes, select the node that matches the value of
VM_Instance_Name
that you noted in the finding JSON earlier.On the Details tab of the Node details page, in the Annotations section, note the value of the
container.googleapis.com/instance_id
annotation.
Step 3: Review Pod
In the Google Cloud console, go to the Kubernetes Workloads page.
On the Google Cloud console toolbar, select the project that you noted in the Resource full name (
resource.name
) of the cluster in the finding summary, if necessary.Click Show system workloads.
Filter the list of workloads by the cluster name that you noted in Resource full name (
resource.name
)of the finding summary and, if necessary, the pod Namespace (kubernetes.pods.ns
) that you noted.Click on the workload name that matches the value of the
VM_Instance_Name
property that you noted in the finding JSON earlier. The Pod details page opens.On the Pod details page, note any information about the Pod that might help you resolve the threat.
Step 4: Check logs
In the Google Cloud console, go to Logs Explorer.
On the Google Cloud console toolbar, select the project that appears in Resource full name (
resource.name
), if necessary.Set Select time range to the period of interest.
On the page that loads, do the following:
- Find Pod logs for your pod (
kubernetes.pods.name
) by using the following filter:resource.type="k8s_container"
resource.labels.project_id="PROJECT_ID"
resource.labels.location="LOCATION"
resource.labels.cluster_name="CLUSTER_NAME"
resource.labels.namespace_name="NAMESPACE_NAME"
resource.labels.pod_name="POD_NAME"
- Find cluster audit logs by using the following filter:
logName="projects/PROJECT_NAME/logs/cloudaudit.googleapis.com%2Factivity"
resource.type="k8s_cluster"
resource.labels.project_id="PROJECT_ID"
resource.labels.location="LOCATION_OR_ZONE"
resource.labels.cluster_name="CLUSTER_NAME/var>"
POD_NAME
- Find GKE node console logs by using the following filter:
resource.type="gce_instance"
resource.labels.instance_id="INSTANCE_ID"
- Find Pod logs for your pod (
Step 5: Investigate the running container
If the container is still running, it might be possible to investigate the container environment directly.
In the Google Cloud console, go to the Kubernetes clusters page.
Click the name of the cluster shown in
resource.labels.cluster_name
.On the Clusters page, click Connect, and then click Run in Cloud Shell.
Cloud Shell launches and adds commands for the cluster in the terminal.
Press enter and, if the Authorize Cloud Shell dialog appears, click Authorize.
Connect to the container environment by running the following command:
kubectl exec --namespace=POD_NAMESPACE -ti POD_NAME -c CONTAINER_NAME -- /bin/sh
Replace
CONTAINER_NAME
with the name of the container that you noted in the finding summary earlier.This command requires the container to have a shell installed at
/bin/sh
.
Step 6: Research attack and response methods
- Check Safe Browsing site status to get details on why the URL is classified as malicious.
- Review MITRE ATT&CK framework entries for this finding type: Ingress Tool Transfer.
- Check the SHA-256 hash value for the binary flagged as malicious on VirusTotal by clicking the link in VirusTotal indicator. VirusTotal is an Alphabet-owned service that provides context on potentially malicious files, URLs, domains, and IP addresses.
- To develop a response plan, combine your investigation results with the MITRE research and VirusTotal analysis.
Step 7: Implement your response
The following response plan might be appropriate for this finding, but might also impact operations. Carefully evaluate the information you gather in your investigation to determine the best way to resolve findings.
- Contact the owner of the project with the compromised container.
- Stop or delete the compromised container and replace it with a new container.
What's next
- Learn how to work with threat findings in Security Command Center.
- Refer to the Threat findings index.
- Learn how to review a finding through the Google Cloud console.
- Learn about the services that generate threat findings.