OpenAI ChatGPT Enterprise Google Drive Sensitive Query Burst

Detects a ChatGPT Enterprise user issuing five or more distinct Google Drive app search queries in a five-minute bucket where at least one query matches sensitive-data themes (payroll, payslip, confidential, payment, NDA, credentials, and similar). Adversaries who abuse a linked Drive connector after session compromise often run rapid multi-term searches to locate high-value files before download or sharing.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2026/10/08"
  3integration = ["openai_chatgpt_enterprise"]
  4maturity = "production"
  5updated_date = "2026/10/09"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Detects a ChatGPT Enterprise user issuing five or more distinct Google Drive app search queries in a five-minute bucket
 11where at least one query matches sensitive-data themes (payroll, payslip, confidential, payment, NDA, credentials, and
 12similar). Adversaries who abuse a linked Drive connector after session compromise often run rapid multi-term searches to
 13locate high-value files before download or sharing.
 14"""
 15false_positives = [
 16    """
 17    HR, legal, finance, or vendor-management workflows that legitimately search Drive for payroll, NDA, or contract
 18    terms across several queries. Validate the query values and business context before escalating.
 19    """,
 20    """
 21    Power users iterating many related document titles in one session. Raise the distinct-query or sensitive-query
 22    thresholds if approved roles remain noisy.
 23    """,
 24]
 25from = "now-30m"
 26interval = "5m"
 27language = "esql"
 28license = "Elastic License v2"
 29name = "OpenAI ChatGPT Enterprise Google Drive Sensitive Query Burst"
 30note = """## Triage and analysis
 31
 32### Investigating OpenAI ChatGPT Enterprise Google Drive Sensitive Query Burst
 33
 34One user ran five or more distinct Google Drive searches in five minutes, with at least one query matching
 35sensitive-data themes. That pattern can indicate using ChatGPT's Google Drive connector to discover payroll,
 36confidential, payment, NDA, or credential-related files ahead of collection or exfiltration.
 37
 38Escalate when queries look like bulk sensitive discovery, downloads or shares follow, or the actor is unexpected for
 39those document types. Close as a false positive for approved HR, legal, or finance research.
 40
 41#### Possible investigation steps
 42
 43- Review `Esql.query_values`, `Esql.sensitive_query_count`, and `Esql.query_count_distinct` on the alert.
 44- Correlate with nearby conversation messages asking ChatGPT to search or download Drive files.
 45- Check subsequent file downloads, conversation shares, or Codex MCP Drive tool calls from the same user.
 46- Confirm whether the Google Drive connector is approved for that user and whether the search matches their role.
 47
 48### False positive analysis
 49
 50- HR, payroll, legal, and vendor teams commonly search for NDA, payroll, or contract terms.
 51- Raise `Esql.query_count_distinct` (default 5) or `Esql.sensitive_query_count` above your baseline if approved roles
 52  remain noisy.
 53
 54### Response and remediation
 55
 56- If unauthorized, revoke Google Drive connector access for the user, review retrieved files, and treat exposed
 57  documents per your data-incident process.
 58- Hunt for follow-on downloads, shares, or external forwarding of the matched content.
 59"""
 60references = [
 61    "https://www.elastic.co/docs/reference/integrations/openai_chatgpt_enterprise",
 62    "https://platform.openai.com/docs/compliance",
 63]
 64risk_score = 47
 65rule_id = "8de28a44-6ec1-4d04-8ee0-2562f15d06c5"
 66setup = """## Setup
 67
 68This rule requires the OpenAI ChatGPT Enterprise integration to collect `app_log` events for the Google Drive app,
 69including request logs with `openai_chatgpt_enterprise.app_log.query` populated.
 70
 71https://www.elastic.co/docs/reference/integrations/openai_chatgpt_enterprise
 72"""
 73severity = "medium"
 74tags = [
 75    "Domain: GenAI",
 76    "Platform: OpenAI",
 77    "Data Source: OpenAI ChatGPT Enterprise",
 78    "Service: OpenAI ChatGPT Enterprise",
 79    "Use Case: Threat Detection",
 80    "Resources: Investigation Guide",
 81    "Rule Type: ES|QL",
 82    "Tactic: Collection",
 83    "Tactic: Discovery",
 84    "Mitre Atlas: AML.T0053",
 85    "Mitre Atlas: AML.T0085",
 86]
 87timestamp_override = "event.ingested"
 88type = "esql"
 89
 90query = '''
 91from logs-openai_chatgpt_enterprise.app_log-*
 92| where
 93    data_stream.dataset == "openai_chatgpt_enterprise.app_log" and
 94    openai_chatgpt_enterprise.app_log.app_name == "Google Drive" and
 95    openai_chatgpt_enterprise.app_log.log_type == "request" and
 96    openai_chatgpt_enterprise.app_log.query is not null and
 97    user.email is not null
 98| eval Esql.query_text = to_lower(openai_chatgpt_enterprise.app_log.query)
 99| eval Esql.is_sensitive = case(
100    Esql.query_text like "*payslip*" or
101    Esql.query_text like "*payroll*" or
102    Esql.query_text like "*salary*" or
103    Esql.query_text like "*compensation*" or
104    Esql.query_text like "*confidential*" or
105    Esql.query_text like "*privileged*" or
106    Esql.query_text like "*payment*" or
107    Esql.query_text like "*ssn*" or
108    Esql.query_text like "*social security*" or
109    Esql.query_text like "*passport*" or
110    Esql.query_text like "*bank account*" or
111    Esql.query_text like "*w2*" or
112    Esql.query_text like "*w-2*" or
113    Esql.query_text like "*tax return*" or
114    Esql.query_text like "*offer letter*" or
115    Esql.query_text like "*nda*" or
116    Esql.query_text like "*secret*" or
117    Esql.query_text like "*password*" or
118    Esql.query_text like "*api key*" or
119    Esql.query_text like "*credential*",
120    1,
121    0
122)
123| eval Esql.time_bucket = date_trunc(5 minutes, @timestamp)
124| stats
125    Esql.query_count_distinct = count_distinct(openai_chatgpt_enterprise.app_log.query),
126    Esql.event_count = count(*),
127    Esql.sensitive_query_count = sum(Esql.is_sensitive),
128    Esql.query_values = values(openai_chatgpt_enterprise.app_log.query),
129    Esql.timestamp_first_seen = min(@timestamp),
130    Esql.timestamp_last_seen = max(@timestamp)
131  by
132    user.email,
133    organization.id,
134    Esql.time_bucket
135| where
136    Esql.query_count_distinct >= 5 and
137    Esql.sensitive_query_count >= 1
138| keep
139    user.email,
140    organization.id,
141    Esql.time_bucket,
142    Esql.query_count_distinct,
143    Esql.sensitive_query_count,
144    Esql.event_count,
145    Esql.query_values,
146    Esql.timestamp_first_seen,
147    Esql.timestamp_last_seen
148'''
149
150
151[[rule.threat]]
152framework = "MITRE ATT&CK"
153[[rule.threat.technique]]
154id = "T1213"
155name = "Data from Information Repositories"
156reference = "https://attack.mitre.org/techniques/T1213/"
157
158
159[rule.threat.tactic]
160id = "TA0009"
161name = "Collection"
162reference = "https://attack.mitre.org/tactics/TA0009/"
163[[rule.threat]]
164framework = "MITRE ATT&CK"
165[[rule.threat.technique]]
166id = "T1083"
167name = "File and Directory Discovery"
168reference = "https://attack.mitre.org/techniques/T1083/"
169
170
171[rule.threat.tactic]
172id = "TA0007"
173name = "Discovery"
174reference = "https://attack.mitre.org/tactics/TA0007/"
175[[rule.threat_mappings]]
176framework = "MITRE ATLAS"
177version = "2026.08"
178[[rule.threat_mappings.threat]]
179framework = "MITRE ATLAS"
180[[rule.threat_mappings.threat.technique]]
181id = "AML.T0053"
182name = "AI Agent Tool Invocation"
183reference = "https://atlas.mitre.org/techniques/AML.T0053/"
184
185
186[rule.threat_mappings.threat.tactic]
187id = "AML.TA0005"
188name = "Execution"
189reference = "https://atlas.mitre.org/tactics/AML.TA0005/"
190[[rule.threat_mappings.threat]]
191framework = "MITRE ATLAS"
192[[rule.threat_mappings.threat.technique]]
193id = "AML.T0085"
194name = "Data from AI Services"
195reference = "https://atlas.mitre.org/techniques/AML.T0085/"
196
197
198[rule.threat_mappings.threat.tactic]
199id = "AML.TA0009"
200name = "Collection"
201reference = "https://atlas.mitre.org/tactics/AML.TA0009/"
202
203[rule.alert_suppression]
204group_by = ["user.email", "organization.id", "Esql.time_bucket"]
205missing_fields_strategy = "suppress"
206
207[rule.investigation_fields]
208field_names = [
209    "user.email",
210    "organization.id",
211    "Esql.time_bucket",
212    "Esql.query_count_distinct",
213    "Esql.sensitive_query_count",
214    "Esql.event_count",
215    "Esql.query_values",
216    "Esql.timestamp_first_seen",
217    "Esql.timestamp_last_seen",
218]
219
220[rule.alert_suppression.duration]
221unit = "h"
222value = 1

Triage and analysis

Investigating OpenAI ChatGPT Enterprise Google Drive Sensitive Query Burst

One user ran five or more distinct Google Drive searches in five minutes, with at least one query matching sensitive-data themes. That pattern can indicate using ChatGPT's Google Drive connector to discover payroll, confidential, payment, NDA, or credential-related files ahead of collection or exfiltration.

Escalate when queries look like bulk sensitive discovery, downloads or shares follow, or the actor is unexpected for those document types. Close as a false positive for approved HR, legal, or finance research.

Possible investigation steps

  • Review Esql.query_values, Esql.sensitive_query_count, and Esql.query_count_distinct on the alert.
  • Correlate with nearby conversation messages asking ChatGPT to search or download Drive files.
  • Check subsequent file downloads, conversation shares, or Codex MCP Drive tool calls from the same user.
  • Confirm whether the Google Drive connector is approved for that user and whether the search matches their role.

False positive analysis

  • HR, payroll, legal, and vendor teams commonly search for NDA, payroll, or contract terms.
  • Raise Esql.query_count_distinct (default 5) or Esql.sensitive_query_count above your baseline if approved roles remain noisy.

Response and remediation

  • If unauthorized, revoke Google Drive connector access for the user, review retrieved files, and treat exposed documents per your data-incident process.
  • Hunt for follow-on downloads, shares, or external forwarding of the matched content.

References

Related rules

to-top