如果您需要包含检测规则的模块来满足贵组织的独特需求,那么自定义模块非常有用。例如,您可以添加一个自定义模块,以在日志条目显示资源已连接到特定 IP 地址或在受限区域中创建时创建发现结果。
Event Threat Detection 的自定义模块的工作原理
自定义模块是一组精选的 Event Threat Detection 检测器,您可以使用自己的检测参数对其进行配置。您可以通过 Google Cloud 控制台创建 Event Threat Detection 自定义模块。或者,您也可以通过更新自定义模块模板并通过 Google Cloud CLI 将自定义模块发送到 Security Command Center 来创建自定义模块。如需了解可用的模板,请参阅自定义模块和模板。
自定义模块模板采用 JSON 格式编写,可让您定义检测参数,以控制日志条目中的哪些事件应触发发现结果。例如,内置的 Malware: Bad IP 检测器会检查虚拟专用云流日志,以查找与已知可疑 IP 地址的连接证据。不过,您可以启用并修改 Configurable Bad IP 自定义模块,其中包含您维护的可疑 IP 地址列表。如果您的日志表明存在与您提供的任何 IP 地址的连接,系统会生成发现结果并将其写入 Security Command Center。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-05。"],[],[],null,["| Premium and Enterprise [service tiers](/security-command-center/docs/service-tiers)\n\nThis page provides an overview of custom modules for Event Threat Detection.\n\nYou can configure modules, also known as *detectors* , to process your\n[Cloud Logging](/logging/docs/overview) stream and\ndetect threats based on parameters you specify. This feature extends the\nmonitoring capabilities of Event Threat Detection and lets you add modules with your\nown detection parameters, remediation guidance, and severity designations for\nconfigurations that the built-in detectors might not support.\n\nCustom modules are useful if you need modules with detection rules that meet the\nunique needs of your organization. For example, you can add a custom module that\ncreates findings if log entries show that a resource is connected to specific IP\naddresses or is created in a restricted region.\n\nHow custom modules for Event Threat Detection work\n\nCustom modules are a select group of Event Threat Detection detectors that you can\nconfigure with your own detection parameters. You can create an\nEvent Threat Detection custom module through the Google Cloud console. Alternatively,\nyou can create one by updating a custom module template and\nsending the custom module to Security Command Center through the Google Cloud CLI. For\ninformation about available templates, see [Custom modules and\ntemplates](#custom_modules_and_templates).\n\nCustom module templates are written in JSON and let you define detection\nparameters that control what events in log entries should trigger findings. For\nexample, the built-in `Malware: Bad IP` detector checks\nVirtual Private Cloud Flow Logs for evidence of connections to known suspicious IP\naddresses. However, you can enable and modify the `Configurable Bad IP` custom\nmodule with a list of suspicious IP addresses that you maintain. If your logs\nindicate a connection to any of your supplied IP addresses, a finding is\ngenerated and written to Security Command Center.\n\nModule templates also let you define the severity of threats and provide custom\nremediation steps to help your security teams fix issues.\n\nWith custom modules, you have more control over how Event Threat Detection detects\nthreats and reports findings. Custom modules include your supplied parameters,\nbut still utilize Event Threat Detection's proprietary detection logic and threat\nintelligence, including tripwire indicator matching. You can implement a broad\nset of threat models tailored to your organization's unique requirements.\n\nEvent Threat Detection custom modules run alongside the built-in detectors. Enabled\nmodules run in real-time mode, which triggers scans whenever new logs are\ncreated.\n\nCustom modules and templates\n\nThe following table contains a list of supported custom module types,\ndescriptions, required logs, and JSON module templates.\n\nYou need these JSON module templates if you want to use the\ngcloud CLI to create or update custom modules. To see a template,\nclick the expand icon add_circle next to its name. For information\nabout using custom modules, see [Configure and manage custom\nmodules](/security-command-center/docs/use-custom-modules-etd).\n\n| Finding category | Module type | Log source types | Description |\n|-----------------------------------------|-------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Configurable bad IP | `CONFIGURABLE_BAD_IP` | [VPC flow logs](/vpc/docs/flow-logs) [Firewall Rules logs](/vpc/docs/firewall-rules-logging) | Detects a connection to a specified IP address |\n| Configurable bad domain | `CONFIGURABLE_BAD_DOMAIN` | [Cloud DNS logs](/dns/docs/monitoring) | Detects a connection to a specified domain name |\n| Unexpected Compute Engine instance type | `CONFIGURABLE_ALLOWED_COMPUTE_ENGINE_INSTANCE_TYPE` | **Cloud Audit Logs:** [Admin Activity logs](/iam/docs/audit-logging) | Detects the creation of Compute Engine instances that do not match a specified instance type or configuration. |\n| Unexpected Compute Engine source image | `CONFIGURABLE_ALLOWED_COMPUTE_ENGINE_SOURCE_IMAGE` | **Cloud Audit Logs:** [Admin Activity logs](/iam/docs/audit-logging) | Detects the creation of a Compute Engine instance with an image or image family that does not match a specified list |\n| Unexpected Compute Engine region | `CONFIGURABLE_ALLOWED_COMPUTE_ENGINE_REGION` | **Cloud Audit Logs:** [Admin Activity logs](/iam/docs/audit-logging) | Detects the creation of a Compute Engine instance in a region that is not in a specified list |\n| Breakglass account used | `CONFIGURABLE_BREAKGLASS_ACCOUNT_USED` | **Cloud Audit Logs:** [Admin Activity logs](/iam/docs/audit-logging) [Data Access logs](/logging/docs/audit/configure-data-access) (optional) | Detects the usage of an emergency access (*breakglass*) account |\n| Unexpected role grant | `CONFIGURABLE_UNEXPECTED_ROLE_GRANT` | **Cloud Audit Logs:** [Admin Activity logs](/iam/docs/audit-logging) | Detects when a specified role is granted to a user |\n| Custom role with prohibited permission | `CONFIGURABLE_CUSTOM_ROLE_WITH_PROHIBITED_PERMISSION` | **Cloud Audit Logs:** [Admin Activity logs](/iam/docs/audit-logging) | Detects when a custom role with any of the specified IAM permissions is created or updated. |\n| Unexpected Cloud API Call | `CONFIGURABLE_UNEXPECTED_CLOUD_API_CALL` | **Cloud Audit Logs:** [Admin Activity logs](/iam/docs/audit-logging) [Data Access logs](/logging/docs/audit/configure-data-access) (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. |\n\nPricing and quota\n\nThis feature is free of charge to Security Command Center Premium\ncustomers.\n\nEvent Threat Detection custom modules are subject to quota limits.\n\nThe default quota limit for the creation of custom modules is 200.\n\nAPI calls to custom module methods are also subject to quota limits. The\nfollowing table shows the default quota limits for custom module API calls.\n\n| API call type | Limit |\n|------------------------|----------------------------------------------|\n| Get, List | 1,000 API calls per minute, per organization |\n| Create, Update, Delete | 60 API calls per minute, per organization |\n\nModule size limits\n\nEach Event Threat Detection custom module has a\nsize limit of 6 MB.\n\nRate limits\n\nThe following rate limits apply:\n\n- 30 findings per custom module per hour.\n- 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.\n\nThese limits can't be increased.\n\nWhat's next\n\n- Learn how to [create and manage custom modules](/security-command-center/docs/use-custom-modules-etd)."]]