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