Google Security Operations SIEM Custom Integration

Google Security Operations SIEM Custom Integration

The Google Security Operations (SecOps) SIEM Custom SecOps integration allows you to receive Lumu detections and related operating events. In this article, you will learn how to configure your Google Security Operations SIEM instance and its Lumu integration to enhance your current visibility, leveraging Chronicle’s ingestion API.

Requirements

  • An active Google Security Operations (SecOps) subscription.
  • Lumu Defender API key. To retrieve an API token, please refer to the Defender API document.
  • A Docker-enabled host. This host will be used to deploy the integration component. This host must have Internet visibility over the Lumu Defender API endpoints and the Chronicle Ingestion API.
  • Component and Script package. Contact the Lumu support team to request for indication, or visit the component documentation on our DockerHub site.
  • Contacted hosts. Ensure your integration host can communicate with the following hosts. These are required for the operation of this integration.
    • https://chronicle.{region}.rep.googleapis.com (Google Chronicle API endpoints)
    • defender.lumu.io
    • docker.io
    • ghcr.io
    • *.ubuntu.com
    • *.launchpad.net
    • canonical.com
    • debian.org
    • *.debian.org
    • debian-security.org
    • pypi.python.org
    • pypi.org
    • pythonhosted.org
    • files.pythonhosted.org

Integration’s overview

Lumu Custom SecOps integration with Google Security Operations (SecOps) uses the Google Chronicle API to deliver Unified Data Model-formatted (UDM) events. Customers can then create correlation rules based on Lumu-reported events.

Preliminary Setup - Configure and collect information from your Google Security Operations instance

First, you need to configure and collect information from your Google Security Operations instance. Ask your Google Security Operations (SecOps) administrator to follow these steps.

1. Collect deployment data from your Google SecOps console
2. Enable the Chronicle API
3. Create an integration custom role
4. Create the integration Service Account
5. Generate and download the JSON key

The next sections outline the procedure for each step

Collect deployment data from your Google SecOps console

You need to collect your Customer ID, your deployment Region, and your GCP Project ID. Log in to your Chronicle Security Operations console and follow these steps:

1. Click on the Settings menu in the left navigation panel.
2. Click on the Profile menu.
3. Copy the Consumer ID, the Region, and the GCP Project ID values found in the Profile window under the Organization Details section.
Notes Keep this data at hand. You need it to deploy the integration.

Enable the Chronicle API

You must ensure the API is enabled in the project associated with your Google Security Operations instance.

1. Open the Google Cloud Console.
2. Select the specific project tied to your Google SecOps instance. It is the one collected in the previous step.
3. Navigate to APIs & Services > Library.
4. Search for Chronicle API, click it, and click Enable.

Create an integration custom role

Now, create a dedicated integration custom role following the principle of least privilege.

1. Navigate to IAM & Admin > Roles using the left-hand menu.
2. Click + Create Role at the top of the page. Fill in the required data.
3. Click + Add Permissions. In the filter box, paste or search for: chronicle.events.import.
4. Check the box next to the permission and click Add.

Create the integration service account

Let’s create the integration service account and assign the integration role created before.

1. Go to IAM & Admin > Service Accounts in the side menu.
2. Click Create Service Account at the top of the page. Fill in the requested data. When finished, click Create and Continue.
3. Ensure you select the created Role in the Permissions section. Then, click Create and close.

Generate and download the JSON key

The last step is to generate and download the JSON key. This key will be used by the integration to send events to Google Security Operations.

1. From the Service Account list, click on the service account you just created.
2. Select the Keys tab at the top.
3. Click Add Key > Create new key.
4. Choose JSON as the format and click Create. Your browser will download a .json file containing the service key.
NotesKeep the service key file at hand. It will be needed to configure the integration.

Preliminary setup - Lumu portal

You must collect the following information from the Lumu portal:

  • Lumu Defender API key
  • Company UUID

Follow the steps in the sections below to collect the information.

Collect the Lumu Defender API key

To collect the Lumu Defender API key, please refer to the Defender API document.

Collect your Lumu company UUID

To collect your Lumu company UUID, log in to your Lumu portal. Once you are in the main window, copy the string below your company name.

Preliminary Setup - Docker-enabled host

You must follow the Docker installation documentation for your specific OS if your integration host does not have Docker installed. Ensure you follow the Post-installation steps for Linux before deploying the integration.
NotesFor Windows users, follow the Install Docker Desktop for Windows documentation to install the Docker Engine.

Deploy the integration

The following section will guide you through the deployment process.

Set up the Management Script

Lumu prepared a short snippet to help you to manage your integration. Create a file named manage.sh in your integration host, in your integration folder. Copy and paste the following code into the file.

Code snippet
#!/usr/bin/env bash

RED='\033[0;31m'
GREEN='\033[0;32m'
CYAN='\033[0;36m'
YELLOW='\033[1;33m'
BOLD='\033[1m'
RESET='\033[0m'

info() { echo -e "${CYAN}[INFO]${RESET} $*"; }
success() { echo -e "${GREEN}[OK]${RESET} $*"; }
warn() { echo -e "${YELLOW}[WARN]${RESET} $*"; }
error() { echo -e "${RED}[ERROR]${RESET} $*" >&2; }
prompt() { echo -e "${BOLD}${YELLOW}$*${RESET}"; }

IMG=lumutools/google-secops-siem:latest
INTEGRATION_NAME=lumu-google-secops-siem
INTEGRATION_DIR=${HOME}/ChronicleSecOps
VOLUME_DATA=${INTEGRATION_DIR}/data:/app/data
VOLUME_CONFIG=${INTEGRATION_DIR}/data/.config.toml:/app/.config.toml:ro

mkdir -p "${INTEGRATION_DIR}/data"
chmod -R o+w "${INTEGRATION_DIR}/data" > /dev/null 2>&1

run_config() {
warn "${BOLD}Please ensure that the service account credentials file is present in '${YELLOW}${INTEGRATION_DIR}/data${RESET}${BOLD}' if required for the integration.${RESET}"
info "Running configuration script ..."
if docker run --rm -it -v "${INTEGRATION_DIR}/data:/app/data" "${IMG}" bash run_config; then
success "Configuration completed."
else
error "Configuration script failed."; return 1
fi
}

start_integration() {
if [[ ! -f "${INTEGRATION_DIR}/data/.config.toml" ]]; then
error "Please configure the integration first."; return 1
fi

info "Setting up integration '${INTEGRATION_NAME}' ..."
if ! docker container inspect "${INTEGRATION_NAME}" &>/dev/null; then
info "Integration '${INTEGRATION_NAME}' does not exist. Creating ..."
if ! docker create \
-v "${VOLUME_DATA}" \
-v "${VOLUME_CONFIG}" \
--restart unless-stopped \
--log-driver json-file \
--log-opt max-size=30m \
--log-opt max-file=3 \
--name "${INTEGRATION_NAME}" \
"${IMG}" bash run_component; then
error "Failed to create integration."; return 1
fi
else
warn "Integration '${INTEGRATION_NAME}' already exists. Skipping create."
fi
if docker start "${INTEGRATION_NAME}"; then
success "Integration started."
else
error "Failed to start integration."; return 1
fi
}

check_status() {
info "Checking status of integrations ..."
if [[ ! -f "${INTEGRATION_DIR}/data/.status.ndjson" ]]; then
error "Status check failed. Verify if your integration has been deployed."; return 1
fi
if docker run --rm -it -v "${VOLUME_DATA}":ro "${IMG}" bash run_status; then
success "Status check completed."
else
error "Status check failed."; return 1
fi
}

show_logs() {
info "Showing logs for '${INTEGRATION_NAME}' ..."
docker logs --tail 100 -f "${INTEGRATION_NAME}"
}

usage() {
echo ""
prompt " Google Security Operations INTEGRATION MANAGEMENT"
echo -e " ${BOLD}Usage:${RESET} $0 "
echo ""
echo -e " ${CYAN}config${RESET} Run configuration"
echo -e " ${CYAN}start${RESET} Start integration"
echo -e " ${CYAN}status${RESET} Check integration status"
echo -e " ${CYAN}logs${RESET} Show integration logs"
echo ""
}

case "${1}" in
config) run_config ;;
start) start_integration ;;
status) check_status ;;
logs) show_logs ;;
*) usage
[[ -n "${1}" ]] && error "Unknown command '${1}'."
exit 1 ;;
esac


Using the Management Script

With the management script, you can:

  • Configure the integration.
  • Start the integration.
  • Check the status of the integration.
  • Check the audit logs of the integration.

You can check these options by running the following command:

bash manage.sh

When running the configuration options, a wizard will guide you through a series of prompts. If the provided credentials are correct, the wizard will confirm this. If the credentials fail, you will receive an error message and have the option to re-enter the credentials or proceed despite the error.

Set up the configuration parameters

Execute the following command and type in all parameters gathered during the Preliminary Setup of the third-party solution. Fix any errors in your inputs if prompted.

bash manage.sh config
NotesWe strongly recommend correcting any errors before attempting to start the integration using the start command.

Copy the service account key file

Copy the service account key file downloaded in step 4 from the Generate and download the JSON key section into the integration folder ~/GoogleSecOps/data/. This folder is created during the configuration phase.

NotesEnsure you name your service account key file as the name given when asked by the configuration wizard

Run the integration

Run the integration by running this command:

bash manage.sh start

NotesIf you have run this process before, you may receive warning messages about the existence of running components. To ensure you have the latest version of the integration, we recommend removing the existing integration containers before entering the start command.

Show Logs

Notes We kindly request you to, when issuing a support case, attach the integration logs collected using the steps described in this section.

The logs option allows you to view the integration's logs. Run this command to show the latest events from the integration component.

bash manage.sh logs

Expected results

You can check Lumu events in your Google Security Operations (SecOps) instance. Open your console and follow these steps:

1. Head to the left menu and select Investigation > Search.
2. Copy and search the following in the SEARCH box: metadata.vendor_name = "Lumu". Remember to modify the Time Range based on your needs, ensuring that the range covers when the integration was activated.
3. The events reported by the integration to Google SecOps will be shown in the Results tab.
4. This is a sample of the details of a single Lumu event.



Further steps

After ingesting Lumu detections and operating events, you can create your own rule to raise Lumu detections within your Chronicle SIEM deployment. You can use the following YARA-L rule to raise detections based on the destination and the incident ID, grouping all events related to new incidents and new contacts into a single detection, and within a timeframe.

  1. rule Lumu_detections {
    // This rule matches Lumu-related events

    meta:
    author = "Lumu Technologies, Inc."
    description = "Rule to detect new contacts based on Lumu ingested events"
    version = "1.0"

    events:
    // Let's select the events based on the Vendor name, and product event type
    // Then, calculate the destination and incidentId fields. These will be used for grouping events into detections
    $e.metadata.vendor_name = "Lumu"
    $e.metadata.product_event_type = /NewIncidentCreated|IncidentUpdated/
    strings.coalesce($e.target.hostname, $e.target.ip) = $destination
    $e.metadata.product_log_id = $incidentId

    match:
    // Group detections based on the destination and incidentId values collected in the previous step
    // Let's group them within a 2 hours timeframe
    $destination, $incidentId over 2h

    outcome:
    // Define additional conditions. These will be used for the alerting section
    $risk_score = max(50)

    condition:
    $e
    }

After setting up your detection rule, you can see a detection dashboard like this:


If you enable the Alerting toggle in your Rules dashboard, then the rule will trigger alerts. They will look as follows: