rule EntityRiskScore {
meta:
events:
$e1.principal.hostname != ""
$e1.principal.hostname = $hostname
$e2.graph.entity.hostname = $hostname
$e2.graph.risk_score.risk_window_size.seconds = 86400 // 24 hours
$e2.graph.risk_score.risk_score >= 100
// Run deduplication across the risk score.
$rscore = $e2.graph.risk_score.risk_score
match:
// Dedup on hostname and risk score across a 4 hour window.
$hostname, $rscore over 4h
outcome:
// Force these risk score based rules to have a risk score of zero to
// prevent self feedback loops.
$risk_score = 0
condition:
$e1 and $e2
}
此示例规则还使用 match 部分执行了自我去重。如果规则检测可能会触发,但在 4 小时内主机名和风险评分保持不变,则不会创建新的检测。
[[["易于理解","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-03。"],[[["\u003cp\u003eThis document details the Risk Analytics for UEBA rule sets, which are designed to detect threats in Google Cloud environments using Google Cloud data.\u003c/p\u003e\n"],["\u003cp\u003eThe rule sets are categorized into Authentication, Network traffic analysis, Peer group-based detections, Suspicious actions, and Data loss prevention-based detections, each focusing on different types of patterns and anomalies.\u003c/p\u003e\n"],["\u003cp\u003eSpecific log data is required for each category of rule sets, such as Azure AD Directory Audit or Windows Event logs for Authentication and Peer group-based detections, and network activity logs for Network traffic analysis.\u003c/p\u003e\n"],["\u003cp\u003eRule exclusions can be configured to reduce the number of alerts generated by the rules, allowing for more focused threat detection.\u003c/p\u003e\n"],["\u003cp\u003eExample rules are provided to illustrate how to detect high-risk entities based on risk scores and how to combine entity context data with risk scores for more comprehensive analysis.\u003c/p\u003e\n"]]],[],null,["# Overview of Risk Analytics for UEBA category\n============================================\n\nSupported in: \nGoogle secops [SIEM](/chronicle/docs/secops/google-secops-siem-toc)\n\nThis document provides an overview of the rule sets in the Risk Analytics for UEBA category, the\nrequired data, and configuration you can use to tune the alerts generated\nby each rule set. These rule sets help identify threats in Google Cloud\nenvironments using Google Cloud data.\n\nRule set descriptions\n---------------------\n\nThe following rule sets are available in the Risk Analytics for UEBA category and are\ngrouped by the type of patterns detected:\n\n### Authentication\n\n- **New Login by User to Device**: a user logged in to a new device.\n- **Anomalous Authentication Events by User**: a single user entity had anomalous authentication events recently, compared to historical usage.\n- **Failed Authentications by Device**: a single-device entity had many failed login attempts recently, compared to historical usage.\n- **Failed Authentications by User**: a single-user entity had many failed login attempts recently, compared to historical usage.\n\n### Network traffic analysis\n\n- **Anomalous Inbound Bytes by Device**: significant amount of data recently uploaded to single device entity, compared to historical usage.\n- **Anomalous Outbound Bytes by Device**: significant amount of data recently downloaded from a single device entity, compared to historical usage.\n- **Anomalous Total Bytes by Device**: a device entity recently uploaded and downloaded a significant amount of data, compared to historical usage.\n- **Anomalous Inbound Bytes by User**: a single-user entity recently downloaded a significant amount of data, compared to historical usage.\n- **Anomalous Total Bytes by User**: a user entity recently uploaded and downloaded a significant amount of data recently, compared to historical usage.\n- **Brute Force then Successful Login by User**: a single-user entity from one IP address had several failed authentication attempts to a certain application before successfully logging in.\n\n### Peer group-based detections\n\n- **Anomalous or Excessive Logins for a Newly Created User**: anomalous or excessive\n authentication activity for a recently created user. This uses creation time from\n AD Context data.\n\n- **Anomalous or Excessive Suspicious Actions for a Newly Created User**:\n anomalous or excessive activity (including, but not limited to, HTTP telemetry,\n process execution, and group modification) for a recently created\n user. This uses creation time from AD Context data.\n\n### Suspicious actions\n\n- **Excessive Account Creation by Device**: a device entity created several new user accounts.\n- **Excessive Alerts by User** : a large number of security alerts from an antivirus or endpoint device (for example, *connection was blocked* , *malware was detected* ) were reported about a user entity, which was much greater than historical patterns. These are events where the `security_result.action` UDM field is set to `BLOCK`.\n\n### Data loss prevention-based detections\n\n- **Anomalous or Excessive Processes with Data Exfiltration Capabilities**: anomalous or excessive activity for processes associated with data exfiltration capabilities such as keyloggers, screenshots, and remote access. This uses file metadata enrichment from VirusTotal.\n\nRequired data needed by Risk Analytics for UEBA category\n--------------------------------------------------------\n\nThis section details the data required by each rule set category for optimal\nperformance. While UEBA detections are designed to work with all supported default\nparsers, using the following specific data types maximizes their benefit.\nFor a complete list of supported default parsers, see\n[Supported log types and default parsers](/chronicle/docs/ingestion/parser-list/supported-default-parsers).\n\n### Authentication\n\nTo use any of these rule sets, collect log data from either\nAzure AD Directory Audit (`AZURE_AD_AUDIT`) or Windows Event (`WINEVTLOG`).\n\n### Network traffic analysis\n\nTo use any of these rule sets, collect log data that captures network activity.\nFor example, from devices such as FortiGate (`FORTINET_FIREWALL`),\nCheck Point (`CHECKPOINT_FIREWALL`), Zscaler (`ZSCALER_WEBPROXY`), CrowdStrike Falcon (`CS_EDR`),\nor Carbon Black (`CB_EDR`).\n\n### Peer group-based detections\n\nTo use any of these rule sets, collect log data from either\nAzure AD Directory Audit (`AZURE_AD_AUDIT`) or Windows Event (`WINEVTLOG`).\n\n### Suspicious actions\n\nRule sets in this group each use a different type of data.\n\n#### Excessive Account Creation by Device rule set\n\nTo use this rule set, collect log data from either\nAzure AD Directory Audit (`AZURE_AD_AUDIT`) or Windows Event (`WINEVTLOG`).\n\n#### Excessive Alerts by User rule set\n\nTo use this rule set, collect log data that captures endpoint activities or\naudit data, such as that recorded by CrowdStrike Falcon (`CS_EDR`),\nCarbon Black (`CB_EDR`), or Azure AD Directory Audit (`AZURE_AD_AUDIT`).\n\n### Data loss prevention-based detections\n\nTo use any of these rule sets, collect log data that captures process and file activities,\nsuch as that recorded by CrowdStrike Falcon (`CS_EDR`), Carbon Black (`CB_EDR`),\nor SentinelOne EDR (`SENTINEL_EDR`).\n\nRule sets in this category depend on events with the following `metadata.event_type`\nvalues: `PROCESS_LAUNCH`, `PROCESS_OPEN`, `PROCESS_MODULE_LOAD`.\n\nTuning alerts returned by rule sets this category\n-------------------------------------------------\n\nYou can reduce the number of detections a rule or rule set generates using\n[rule exclusions](/chronicle/docs/detection/rule-exclusions).\n\nA rule exclusion defines the criteria used to exclude an event from being evaluated by\nthe rule set, or by specific rules in the rule set. Create one or more rule exclusions\nto help reduce the volume of detections. See [Configure rule exclusions](/chronicle/docs/detection/rule-exclusions)\nfor information about how to do this.\n\nExample of a rule for Risk Analytics for UEBA category\n------------------------------------------------------\n\nThe following example shows how to create a rule to generate detections on\nany entity hostname whose risk score is greater than `100`: \n\n rule EntityRiskScore {\n meta:\n events:\n $e1.principal.hostname != \"\"\n $e1.principal.hostname = $hostname\n\n $e2.graph.entity.hostname = $hostname\n $e2.graph.risk_score.risk_window_size.seconds = 86400 // 24 hours\n $e2.graph.risk_score.risk_score \u003e= 100\n\n // Run deduplication across the risk score.\n $rscore = $e2.graph.risk_score.risk_score\n\n match:\n // Dedup on hostname and risk score across a 4 hour window.\n $hostname, $rscore over 4h\n\n outcome:\n // Force these risk score based rules to have a risk score of zero to\n // prevent self feedback loops.\n $risk_score = 0\n\n condition:\n $e1 and $e2\n }\n\nThis example rule also performs a self deduplication using the match\nsection. If a rule detection might trigger, but the hostname and risk score\nremain unchanged within a 4-hour window, no new detections are created.\n\nThe only possible risk windows for entity risk score rules are either 24 hours\nor 7 days (86,400 or 604,800 seconds respectively). If you don't include the\nrisk window size in the rule, the rule returns inaccurate results.\n\nEntity risk score data is stored separately from entity context data. To use\nboth in a rule, the rule must have two separate entity events, one for the\nentity context and one for the entity risk score, as shown as in the following\nexample: \n\n rule EntityContextAndRiskScore {\n meta:\n events:\n $log_in.metadata.event_type = \"USER_LOGIN\"\n $log_in.principal.hostname = $host\n\n $context.graph.entity.hostname = $host\n $context.graph.metadata.entity_type = \"ASSET\"\n\n $risk_score.graph.entity.hostname = $host\n $risk_score.graph.risk_score.risk_window_size.seconds = 604800\n\n match:\n $host over 2m\n\n outcome:\n $entity_risk_score = max($risk_score.graph.risk_score.normalized_risk_score)\n\n condition:\n $log_in and $context and $risk_score and $entity_risk_score \u003e 100\n }\n\nWhat's next\n-----------\n\n- [Investigate risk using the Risk Analytics dashboard](/chronicle/docs/detection/risk-analytics-dashboard)\n\n**Need more help?** [Get answers from Community members and Google SecOps professionals.](https://security.googlecloudcommunity.com/google-security-operations-2)"]]