Google Workspace Drive Encryption Key(s) Accessed from Anonymous User

Detects when an external (anonymous) user has viewed, copied or downloaded an encryption key file from a Google Workspace drive. Adversaries may gain access to encryption keys stored in private drives from rogue access links that do not have an expiration. Access to encryption keys may allow adversaries to access sensitive data or authenticate on behalf of users.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2023/03/21"
 3integration = ["google_workspace"]
 4maturity = "production"
 5updated_date = "2024/09/23"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10Detects when an external (anonymous) user has viewed, copied or downloaded an encryption key file from a Google
11Workspace drive. Adversaries may gain access to encryption keys stored in private drives from rogue access links that do
12not have an expiration. Access to encryption keys may allow adversaries to access sensitive data or authenticate on
13behalf of users.
14"""
15false_positives = [
16    """
17    A user may generate a shared access link to encryption key files to share with others. It is unlikely that the
18    intended recipient is an external or anonymous user.
19    """,
20]
21from = "now-130m"
22index = ["filebeat-*", "logs-google_workspace*"]
23interval = "10m"
24language = "eql"
25license = "Elastic License v2"
26name = "Google Workspace Drive Encryption Key(s) Accessed from Anonymous User"
27note = """## Setup
28
29The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
30
31### Important Information Regarding Google Workspace Event Lag Times
32- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.
33- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.
34- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.
35- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).
36- See the following references for further information:
37  - https://support.google.com/a/answer/7061566
38  - https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html"""
39references = [
40    "https://support.google.com/drive/answer/2494822",
41    "https://www.elastic.co/security-labs/google-workspace-attack-surface-part-one",
42    "https://www.elastic.co/security-labs/google-workspace-attack-surface-part-two"
43]
44risk_score = 73
45rule_id = "980b70a0-c820-11ed-8799-f661ea17fbcc"
46severity = "high"
47tags = [
48    "Domain: Cloud",
49    "Data Source: Google Workspace",
50    "Use Case: Configuration Audit",
51    "Tactic: Credential Access",
52]
53timestamp_override = "event.ingested"
54type = "eql"
55
56query = '''
57file where event.dataset == "google_workspace.drive" and event.action : ("copy", "view", "download") and
58    google_workspace.drive.visibility: "people_with_link" and source.user.email == "" and
59    file.extension: (
60        "token","assig", "pssc", "keystore", "pub", "pgp.asc", "ps1xml", "pem", "gpg.sig", "der", "key",
61        "p7r", "p12", "asc", "jks", "p7b", "signature", "gpg", "pgp.sig", "sst", "pgp", "gpgz", "pfx", "crt",
62        "p8", "sig", "pkcs7", "jceks", "pkcs8", "psc1", "p7c", "csr", "cer", "spc", "ps2xml")
63'''
64
65
66[[rule.threat]]
67framework = "MITRE ATT&CK"
68[[rule.threat.technique]]
69id = "T1552"
70name = "Unsecured Credentials"
71reference = "https://attack.mitre.org/techniques/T1552/"
72[[rule.threat.technique.subtechnique]]
73id = "T1552.004"
74name = "Private Keys"
75reference = "https://attack.mitre.org/techniques/T1552/004/"
76
77
78
79[rule.threat.tactic]
80id = "TA0006"
81name = "Credential Access"
82reference = "https://attack.mitre.org/tactics/TA0006/"

Setup

The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.

Important Information Regarding Google Workspace Event Lag Times

  • As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.
  • This rule is configured to run every 10 minutes with a lookback time of 130 minutes.
  • To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.
  • By default, var.interval is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).
  • See the following references for further information:

References

Related rules

to-top