> [!NOTE]
> Premium and Enterprise (Deprecated) [service tiers](https://docs.cloud.google.com/security-command-center/docs/service-tiers.md.txt)

> [!CAUTION]
> The Security Command Center Enterprise service tier will shut down on May 21, 2027. If your organization uses the Enterprise service tier, then the organization will automatically move to the Premium service tier on or after May 21, 2027. Contact your account representative or a [Google Cloud sales specialist](https://cloud.google.com/contact) if you have questions.

This document describes a threat finding type in Security Command Center. Threat findings are generated by
[threat detectors](https://docs.cloud.google.com/security-command-center/docs/concepts-security-sources.md.txt#threats) when they detect
a potential threat in your cloud resources. For a full list of available threat findings, see [Threat findings index](https://docs.cloud.google.com/security-command-center/docs/threat-findings-index.md.txt).

## Overview

Detection of successful brute force of SSH on a host.

[Event Threat Detection](https://docs.cloud.google.com/security-command-center/docs/concepts-event-threat-detection-overview.md.txt) is the source of
this finding.

## How to respond

To respond to this finding, do the following:

### Step 1: Review finding details

1. Open a `Brute Force: SSH` finding, as directed in [Reviewing findings](https://docs.cloud.google.com/security-command-center/docs/how-to-investigate-threats.md.txt#reviewing_findings).
2. On the **Summary** tab of the finding details panel, review the
   information in the following sections:

   - **What was detected, especially the following fields:**

     - **Caller IP**: the IP address that launched the attack.
     - **User name**: the account that logged in.
   - **Affected resource**

   - **Related links**, especially the following fields:

     - **Cloud Logging URI**: link to Logging entries.
     - **MITRE ATT\&CK method**: link to the MITRE ATT\&CK documentation.
     - **Related findings**: links to any related findings.
3. Click the **JSON** tab.

4. In the JSON, note the following fields.

   - `sourceProperties`:
     - `evidence`:
       - `sourceLogId`: the project ID and timestamp to identify the log entry
       - `projectId`: the project that contains the finding
     - `properties`:
       - `attempts`:
       - `Attempts`: the number of login attempts
         - `username`: the account that logged in
         - `vmName`: the name of the virtual machine
         - `authResult`: the SSH authentication result

### Step 2: Review permissions and settings

1. In the Google Cloud console, go to the **Dashboard**.

   <br />

   [Go to the Dashboard](https://console.cloud.google.com/home)

   <br />

2. Select the project that is specified in
   `projectId`.

3. Navigate to the **Resources** card and click **Compute Engine**.

4. Click the VM instance that matches the name and zone in `vmName`. Review
   instance details, including network and access settings.

5. In the navigation pane, click **VPC Network** , then click **Firewall**.
   Remove or disable overly permissive firewall rules on port 22.

### Step 3: Check logs

1. In the Google Cloud console, go to **Logs Explorer** by clicking the link in **Cloud Logging URI**.
2. On the page that loads, find VPC Flow Logs related to the IP address that is listed on the **Principal email** row in the **Summary** tab of the finding details by using the following filter:
   - `logName="projects/projectId/logs/syslog"`
   - `labels."compute.googleapis.com/resource_name"="vmName"`

### Step 4: Research attack and response methods

1. Review the MITRE ATT\&CK framework entry for this finding type: [Valid Accounts: Local Accounts](https://attack.mitre.org/techniques/T1078/003/).
2. Review related findings by clicking the link on the **Related findings** on the **Related findings** row in the **Summary** tab of the finding details. Related findings are the same finding type and the same instance and network.
3. To develop a response plan, combine your investigation results with MITRE research.

### Step 5: 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 successful brute force attempt.
- Investigate the potentially compromised instance and remove any discovered malware. To assist with detection and removal, use an endpoint detection and response solution.
- Consider disabling SSH access to the VM. For information about disabling SSH keys, see [Restrict SSH keys from
  VMs](https://docs.cloud.google.com/compute/docs/connect/restrict-ssh-keys). This step could interrupt authorized access to the VM, so consider the needs of your organization before you proceed.
- Only use SSH authentication with [authorized
  keys](https://docs.cloud.google.com/compute/docs/instances/ssh).
- Block the malicious IP addresses by [updating firewall rules](https://docs.cloud.google.com/vpc/docs/using-firewalls)
  or by using Cloud Armor. Depending on data volume, Cloud Armor costs can be
  significant. See the [Cloud Armor pricing
  guide](https://cloud.google.com/armor/pricing) for more information.

  To enable Cloud Armor in the Google Cloud console, go to
  the **Integrated Services** page.

  [Go to Integrated Services](https://console.cloud.google.com/projectselector2/security/command-center/config/integrated-services?supportedpurview=organizationId)

## Example finding JSON

The following is an example of the finding JSON.

```json
{
    "finding": {
      "name": "organizations/ORGANIZATION_ID/sources/SOURCE_ID/findings/FINDING_ID",
      "parent": "organizations/ORGANIZATION_ID/sources/SOURCE_ID",
      "resourceName": "//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER",
      "state": "ACTIVE",
      "category": "Brute Force: SSH",
      "sourceProperties": {
        "evidence": [
          {
            "sourceLogId": {
              "projectId": "PROJECT_ID",
              "timestamp": {
                "nanos": 0.0,
                "seconds": "65"
              },
              "insertId": "INSERT_ID",
              "resourceContainer": "projects/PROJECT_ID"
            }
          }
        ],
        "properties": {
          "projectId": "PROJECT_ID",
          "zone": "us-west1-a",
          "instanceId": "INSTANCE_ID",
          "attempts": [
            {
              "sourceIp": "SOURCE_IP_ADDRESS",
              "username": "PROJECT_ID",
              "vmName": "INSTANCE_ID",
              "authResult": "SUCCESS"
            },
            {
              "sourceIp": "SOURCE_IP_ADDRESS",
              "username": "PROJECT_ID",
              "vmName": "INSTANCE_ID",
              "authResult": "FAIL"
            },
            {
              "sourceIp": "SOURCE_IP_ADDRESS",
              "username": "PROJECT_ID",
              "vmName": "INSTANCE_ID",
              "authResult": "FAIL"
            }
          ]
        },
        "detectionPriority": "HIGH",
        "sourceId": {
          "projectNumber": "PROJECT_NUMBER",
          "customerOrganizationNumber": "ORGANIZATION_ID"
        },
        "contextUris": {
          "mitreUri": {
            "displayName": "MITRE Link",
            "url": "https://attack.mitre.org/techniques/T1078/003/"
          }
        },
        "detectionCategory": {
          "technique": "brute_force",
          "indicator": "flow_log",
          "ruleName": "ssh_brute_force"
        },
        "affectedResources": [
          {
            "gcpResourceName": "//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER"
          }
        ]
      },
      "severity": "HIGH",
      "eventTime": "1970-01-01T00:00:00Z",
      "createTime": "1970-01-01T00:00:00Z"
    }
 }
```

## What's next

- Learn [how to work with threat
  findings in Security Command Center](https://docs.cloud.google.com/security-command-center/docs/how-to-investigate-threats).
- Refer to the [Threat findings index](https://docs.cloud.google.com/security-command-center/docs/threat-findings-index.md.txt).
- Learn how to [review a
  finding](https://docs.cloud.google.com/security-command-center/docs/how-to-investigate-threats#reviewing_findings) through the Google Cloud console.
- Learn about the [services that
  generate threat findings](https://docs.cloud.google.com/security-command-center/docs/concepts-security-sources#threats).