Spike in GCP Audit Failed Messages
A machine learning job detected a significant spike in the rate of a particular failure in the GCP Audit messages. Spikes in failed messages may accompany attempts at privilege escalation, lateral movement, or discovery.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2025/10/06"
3integration = ["gcp"]
4maturity = "production"
5min_stack_comments = "New job added"
6min_stack_version = "9.3.0"
7updated_date = "2025/11/21"
8
9[rule]
10anomaly_threshold = 50
11author = ["Elastic"]
12description = """
13A machine learning job detected a significant spike in the rate of a particular failure in the GCP Audit messages. Spikes
14in failed messages may accompany attempts at privilege escalation, lateral movement, or discovery.
15"""
16false_positives = [
17 """
18 Spikes in failures can also be due to bugs in cloud automation scripts or workflows; changes to cloud
19 automation scripts or workflows; adoption of new services; changes in the way services are used; or changes to IAM
20 privileges.
21 """,
22]
23from = "now-60m"
24interval = "15m"
25license = "Elastic License v2"
26machine_learning_job_id = "gcp_audit_high_distinct_count_error_message"
27name = "Spike in GCP Audit Failed Messages"
28setup = """## Setup
29
30This rule requires the installation of associated Machine Learning jobs, as well as data coming in from GCP Audit.
31
32### Anomaly Detection Setup
33
34Once the rule is enabled, the associated Machine Learning job will start automatically. You can view the Machine Learning job linked under the "Definition" panel of the detection rule. If the job does not start due to an error, the issue must be resolved for the job to commence successfully. For more details on setting up anomaly detection jobs, refer to the [helper guide](https://www.elastic.co/guide/en/kibana/current/xpack-ml-anomalies.html).
35
36### GCP Audit logs Integration Setup
37The Google Cloud Platform (GCP) Audit logs integration allows you to collect logs and metrics from Google Cloud Platform (GCP) with Elastic Agent.
38
39#### The following steps should be executed in order to add the Elastic Agent System "Google Cloud Platform (GCP) Audit logs" integration to your system:
40- Go to the Kibana home page and click “Add integrations”.
41- In the query bar, search for “Google Cloud Platform (GCP) Audit logs” and select the integration to see more details about it.
42- Click “Add Google Cloud Platform (GCP) Audit logs".
43- Configure the integration.
44- Click “Save and Continue”.
45- For more details on the integration refer to the [helper guide](https://www.elastic.co/docs/current/integrations/gcp).
46"""
47references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
48risk_score = 21
49rule_id = "a4b740e4-be17-4048-9aa4-1e6f42b455b1"
50severity = "low"
51tags = [
52 "Domain: Cloud",
53 "Data Source: GCP",
54 "Data Source: GCP Audit Logs",
55 "Data Source: Google Cloud Platform",
56 "Rule Type: ML",
57 "Rule Type: Machine Learning",
58 "Resources: Investigation Guide",
59]
60type = "machine_learning"
61
62[[rule.threat]]
63framework = "MITRE ATT&CK"
64
65[rule.threat.tactic]
66id = "TA0007"
67name = "Discovery"
68reference = "https://attack.mitre.org/tactics/TA0007/"
69
70[[rule.threat.technique]]
71id = "T1526"
72name = "Cloud Service Discovery"
73reference = "https://attack.mitre.org/techniques/T1526/"
74
75[[rule.threat.technique]]
76id = "T1580"
77name = "Cloud Infrastructure Discovery"
78reference = "https://attack.mitre.org/techniques/T1580/"
79
80[[rule.threat]]
81framework = "MITRE ATT&CK"
82
83[rule.threat.tactic]
84id = "TA0004"
85name = "Privilege Escalation"
86reference = "https://attack.mitre.org/tactics/TA0004/"
87
88[[rule.threat]]
89framework = "MITRE ATT&CK"
90
91[rule.threat.tactic]
92id = "TA0008"
93name = "Lateral Movement"
94reference = "https://attack.mitre.org/tactics/TA0008/"
References
Related rules
- Rare GCP Audit Failure Event Code
- Unusual City For a GCP Event
- Unusual Country For a GCP Event
- Unusual GCP Event for a User
- GCP Firewall Rule Creation