> [!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 page provides an overview of custom modules for Event Threat Detection.

You can configure modules, also known as *detectors* , to process your
[Cloud Logging](https://docs.cloud.google.com/logging/docs/overview.md.txt) stream and
detect threats based on parameters you specify. This feature extends the
monitoring capabilities of Event Threat Detection and lets you add modules with your
own detection parameters, remediation guidance, and severity designations for
configurations that the built-in detectors might not support.

Custom modules are useful if you need modules with detection rules that meet the
unique needs of your organization. For example, you can add a custom module that
creates findings if log entries show that a resource is connected to specific IP
addresses or is created in a restricted region.

## How custom modules for Event Threat Detection work

Custom modules are a select group of Event Threat Detection detectors that you can
configure with your own detection parameters. You can create an
Event Threat Detection custom module through the Google Cloud console. Alternatively,
you can create one by updating a custom module template and
sending the custom module to Security Command Center through the Google Cloud CLI. For
information about available templates, see [Custom modules and
templates](https://docs.cloud.google.com/security-command-center/docs/custom-modules-etd-overview#custom_modules_and_templates).

Custom module templates are written in JSON and let you define detection
parameters that control what events in log entries should trigger findings. For
example, the built-in `Malware: Bad IP` detector checks
Virtual Private Cloud Flow Logs for evidence of connections to known suspicious IP
addresses. However, you can enable and modify the `Configurable Bad IP` custom
module with a list of suspicious IP addresses that you maintain. If your logs
indicate a connection to any of your supplied IP addresses, a finding is
generated and written to Security Command Center.

Module templates also let you define the severity of threats and provide custom
remediation steps to help your security teams fix issues.

With custom modules, you have more control over how Event Threat Detection detects
threats and reports findings. Custom modules include your supplied parameters,
but still utilize Event Threat Detection's proprietary detection logic and threat
intelligence methods, such as identifying indicators of compromise (IoC). You
can implement a broad set of threat models tailored to your organization's
unique requirements.

Event Threat Detection custom modules run alongside the built-in detectors. Enabled
modules run in real-time mode, which triggers scans whenever new logs are
created.

## Custom modules and templates

The following table contains a list of supported custom module types,
descriptions, required logs, and JSON module templates.

You need these JSON module templates if you want to use the
gcloud CLI to create or update custom modules. To see a template,
click the expand icon next to its name. For information
about using custom modules, see [Configure and manage custom
modules](https://docs.cloud.google.com/security-command-center/docs/use-custom-modules-etd).

| Finding category | Module type | Log source types | Description |
|---|---|---|---|
| Configurable bad IP | `CONFIGURABLE_BAD_IP` | [VPC flow logs](https://docs.cloud.google.com/vpc/docs/flow-logs.md.txt) [Firewall Rules logs](https://docs.cloud.google.com/vpc/docs/firewall-rules-logging) | Detects a connection to a specified IP address |
| Configurable bad domain | `CONFIGURABLE_BAD_DOMAIN` | [Cloud DNS logs](https://docs.cloud.google.com/dns/docs/monitoring.md.txt) | Detects a connection to a specified domain name |
| Unexpected Compute Engine instance type | `CONFIGURABLE_ALLOWED_COMPUTE_ENGINE_INSTANCE_TYPE` | **Cloud Audit Logs:** [Admin Activity logs](https://docs.cloud.google.com/iam/docs/audit-logging.md.txt) | Detects the creation of Compute Engine instances that do not match a specified instance type or configuration. |
| Unexpected Compute Engine source image | `CONFIGURABLE_ALLOWED_COMPUTE_ENGINE_SOURCE_IMAGE` | **Cloud Audit Logs:** [Admin Activity logs](https://docs.cloud.google.com/iam/docs/audit-logging.md.txt) | Detects the creation of a Compute Engine instance with an image or image family that does not match a specified list |
| Unexpected Compute Engine region | `CONFIGURABLE_ALLOWED_COMPUTE_ENGINE_REGION` | **Cloud Audit Logs:** [Admin Activity logs](https://docs.cloud.google.com/iam/docs/audit-logging.md.txt) | Detects the creation of a Compute Engine instance in a region that is not in a specified list |
| Breakglass account used | `CONFIGURABLE_BREAKGLASS_ACCOUNT_USED` | **Cloud Audit Logs:** [Admin Activity logs](https://docs.cloud.google.com/iam/docs/audit-logging.md.txt) [Data Access logs](https://docs.cloud.google.com/logging/docs/audit/configure-data-access.md.txt) (optional) | Detects the usage of an emergency access (*breakglass*) account |
| Unexpected role grant | `CONFIGURABLE_UNEXPECTED_ROLE_GRANT` | **Cloud Audit Logs:** [Admin Activity logs](https://docs.cloud.google.com/iam/docs/audit-logging.md.txt) | Detects when a specified role is granted to a user |
| Custom role with prohibited permission | `CONFIGURABLE_CUSTOM_ROLE_WITH_PROHIBITED_PERMISSION` | **Cloud Audit Logs:** [Admin Activity logs](https://docs.cloud.google.com/iam/docs/audit-logging.md.txt) | Detects when a custom role with any of the specified IAM permissions is created or updated. |
| Unexpected Cloud API Call | `CONFIGURABLE_UNEXPECTED_CLOUD_API_CALL` | **Cloud Audit Logs:** [Admin Activity logs](https://docs.cloud.google.com/iam/docs/audit-logging.md.txt) [Data Access logs](https://docs.cloud.google.com/logging/docs/audit/configure-data-access.md.txt) (optional) | Detects when a specified principal calls a specified method against a specified resource. A finding is generated only if all regular expressions are matched in a single log entry. |

## Pricing and quota

This feature is free of charge to Security Command Center Premium
customers.

Event Threat Detection custom modules are subject to quota limits.

The default quota limit for the creation of custom modules is 200.

API calls to custom module methods are also subject to quota limits. The
following table shows the default quota limits for custom module API calls.

| API call type | Limit |
|---|---|
| Get, List | 1,000 API calls per minute, per organization |
| Create, Update, Delete | 60 API calls per minute, per organization |

## Module size limits

Each Event Threat Detection custom module has a
size limit of 6 MB.

## Rate limits

The following rate limits apply:

- 30 findings per custom module per hour.
- 200 custom module findings per parent resource (organization or project) per hour. Each finding counts towards either an organization or project, depending on which level the source custom module was created in.

These limits can't be increased.

## What's next

- Learn how to [create and manage custom modules](https://docs.cloud.google.com/security-command-center/docs/use-custom-modules-etd.md.txt).