OpenAI ChatGPT Enterprise Google Drive Sensitive Query Burst


Description

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.

Query · esql

from logs-openai_chatgpt_enterprise.app_log-*
| where
    data_stream.dataset == "openai_chatgpt_enterprise.app_log" and
    openai_chatgpt_enterprise.app_log.app_name == "Google Drive" and
    openai_chatgpt_enterprise.app_log.log_type == "request" and
    openai_chatgpt_enterprise.app_log.query is not null and
    user.email is not null
| eval Esql.query_text = to_lower(openai_chatgpt_enterprise.app_log.query)
| eval Esql.is_sensitive = case(
    Esql.query_text like "*payslip*" or
    Esql.query_text like "*payroll*" or
    Esql.query_text like "*salary*" or
    Esql.query_text like "*compensation*" or
    Esql.query_text like "*confidential*" or
    Esql.query_text like "*privileged*" or
    Esql.query_text like "*payment*" or
    Esql.query_text like "*ssn*" or
    Esql.query_text like "*social security*" or
    Esql.query_text like "*passport*" or
    Esql.query_text like "*bank account*" or
    Esql.query_text like "*w2*" or
    Esql.query_text like "*w-2*" or
    Esql.query_text like "*tax return*" or
    Esql.query_text like "*offer letter*" or
    Esql.query_text like "*nda*" or
    Esql.query_text like "*secret*" or
    Esql.query_text like "*password*" or
    Esql.query_text like "*api key*" or
    Esql.query_text like "*credential*",
    1,
    0
)
| eval Esql.time_bucket = date_trunc(5 minutes, @timestamp)
| stats
    Esql.query_count_distinct = count_distinct(openai_chatgpt_enterprise.app_log.query),
    Esql.event_count = count(*),
    Esql.sensitive_query_count = sum(Esql.is_sensitive),
    Esql.query_values = values(openai_chatgpt_enterprise.app_log.query),
    Esql.timestamp_first_seen = min(@timestamp),
    Esql.timestamp_last_seen = max(@timestamp)
  by
    user.email,
    organization.id,
    Esql.time_bucket
| where
    Esql.query_count_distinct >= 5 and
    Esql.sensitive_query_count >= 1
| keep
    user.email,
    organization.id,
    Esql.time_bucket,
    Esql.query_count_distinct,
    Esql.sensitive_query_count,
    Esql.event_count,
    Esql.query_values,
    Esql.timestamp_first_seen,
    Esql.timestamp_last_seen

Investigation fields

Pivot points the source recommends for triage.

  • user.email
  • organization.id
  • Esql.time_bucket
  • Esql.query_count_distinct
  • Esql.sensitive_query_count
  • Esql.event_count
  • Esql.query_values
  • Esql.timestamp_first_seen
  • Esql.timestamp_last_seen

Implementation guide

This rule requires the OpenAI ChatGPT Enterprise integration to collect app_log events for the Google Drive app, including request logs with openai_chatgpt_enterprise.app_log.query populated.

https://www.elastic.co/docs/reference/integrations/openai_chatgpt_enterprise

Known false positives

  • HR, legal, finance, or vendor-management workflows that legitimately search Drive for payroll, NDA, or contract terms across several queries. Validate the query values and business context before escalating.
  • Power users iterating many related document titles in one session. Raise the distinct-query or sensitive-query thresholds if approved roles remain noisy.

Analyst notes

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.
Raw source OpenAI ChatGPT Enterprise Google Drive Sensitive Query Burst · Elastic TOML
Esc
Published by elastic/detection-rules ↗, licensed under Elastic License 2.0 ↗. Reproduced here unmodified.
[metadata]
creation_date = "2026/10/08"
integration = ["openai_chatgpt_enterprise"]
maturity = "production"
updated_date = "2026/10/09"

[rule]
author = ["Elastic"]
description = """
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.
"""
false_positives = [
    """
    HR, legal, finance, or vendor-management workflows that legitimately search Drive for payroll, NDA, or contract
    terms across several queries. Validate the query values and business context before escalating.
    """,
    """
    Power users iterating many related document titles in one session. Raise the distinct-query or sensitive-query
    thresholds if approved roles remain noisy.
    """,
]
from = "now-30m"
interval = "5m"
language = "esql"
license = "Elastic License v2"
name = "OpenAI ChatGPT Enterprise Google Drive Sensitive Query Burst"
note = """## 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 = [
    "https://www.elastic.co/docs/reference/integrations/openai_chatgpt_enterprise",
    "https://platform.openai.com/docs/compliance",
]
risk_score = 47
rule_id = "8de28a44-6ec1-4d04-8ee0-2562f15d06c5"
setup = """## Setup

This rule requires the OpenAI ChatGPT Enterprise integration to collect `app_log` events for the Google Drive app,
including request logs with `openai_chatgpt_enterprise.app_log.query` populated.

https://www.elastic.co/docs/reference/integrations/openai_chatgpt_enterprise
"""
severity = "medium"
tags = [
    "Domain: GenAI",
    "Platform: OpenAI",
    "Data Source: OpenAI ChatGPT Enterprise",
    "Service: OpenAI ChatGPT Enterprise",
    "Use Case: Threat Detection",
    "Resources: Investigation Guide",
    "Rule Type: ES|QL",
    "Tactic: Collection",
    "Tactic: Discovery",
    "Mitre Atlas: AML.T0053",
    "Mitre Atlas: AML.T0085",
]
timestamp_override = "event.ingested"
type = "esql"

query = '''
from logs-openai_chatgpt_enterprise.app_log-*
| where
    data_stream.dataset == "openai_chatgpt_enterprise.app_log" and
    openai_chatgpt_enterprise.app_log.app_name == "Google Drive" and
    openai_chatgpt_enterprise.app_log.log_type == "request" and
    openai_chatgpt_enterprise.app_log.query is not null and
    user.email is not null
| eval Esql.query_text = to_lower(openai_chatgpt_enterprise.app_log.query)
| eval Esql.is_sensitive = case(
    Esql.query_text like "*payslip*" or
    Esql.query_text like "*payroll*" or
    Esql.query_text like "*salary*" or
    Esql.query_text like "*compensation*" or
    Esql.query_text like "*confidential*" or
    Esql.query_text like "*privileged*" or
    Esql.query_text like "*payment*" or
    Esql.query_text like "*ssn*" or
    Esql.query_text like "*social security*" or
    Esql.query_text like "*passport*" or
    Esql.query_text like "*bank account*" or
    Esql.query_text like "*w2*" or
    Esql.query_text like "*w-2*" or
    Esql.query_text like "*tax return*" or
    Esql.query_text like "*offer letter*" or
    Esql.query_text like "*nda*" or
    Esql.query_text like "*secret*" or
    Esql.query_text like "*password*" or
    Esql.query_text like "*api key*" or
    Esql.query_text like "*credential*",
    1,
    0
)
| eval Esql.time_bucket = date_trunc(5 minutes, @timestamp)
| stats
    Esql.query_count_distinct = count_distinct(openai_chatgpt_enterprise.app_log.query),
    Esql.event_count = count(*),
    Esql.sensitive_query_count = sum(Esql.is_sensitive),
    Esql.query_values = values(openai_chatgpt_enterprise.app_log.query),
    Esql.timestamp_first_seen = min(@timestamp),
    Esql.timestamp_last_seen = max(@timestamp)
  by
    user.email,
    organization.id,
    Esql.time_bucket
| where
    Esql.query_count_distinct >= 5 and
    Esql.sensitive_query_count >= 1
| keep
    user.email,
    organization.id,
    Esql.time_bucket,
    Esql.query_count_distinct,
    Esql.sensitive_query_count,
    Esql.event_count,
    Esql.query_values,
    Esql.timestamp_first_seen,
    Esql.timestamp_last_seen
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1213"
name = "Data from Information Repositories"
reference = "https://attack.mitre.org/techniques/T1213/"


[rule.threat.tactic]
id = "TA0009"
name = "Collection"
reference = "https://attack.mitre.org/tactics/TA0009/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1083"
name = "File and Directory Discovery"
reference = "https://attack.mitre.org/techniques/T1083/"


[rule.threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"
[[rule.threat_mappings]]
framework = "MITRE ATLAS"
version = "2026.08"
[[rule.threat_mappings.threat]]
framework = "MITRE ATLAS"
[[rule.threat_mappings.threat.technique]]
id = "AML.T0053"
name = "AI Agent Tool Invocation"
reference = "https://atlas.mitre.org/techniques/AML.T0053/"


[rule.threat_mappings.threat.tactic]
id = "AML.TA0005"
name = "Execution"
reference = "https://atlas.mitre.org/tactics/AML.TA0005/"
[[rule.threat_mappings.threat]]
framework = "MITRE ATLAS"
[[rule.threat_mappings.threat.technique]]
id = "AML.T0085"
name = "Data from AI Services"
reference = "https://atlas.mitre.org/techniques/AML.T0085/"


[rule.threat_mappings.threat.tactic]
id = "AML.TA0009"
name = "Collection"
reference = "https://atlas.mitre.org/tactics/AML.TA0009/"

[rule.alert_suppression]
group_by = ["user.email", "organization.id", "Esql.time_bucket"]
missing_fields_strategy = "suppress"

[rule.investigation_fields]
field_names = [
    "user.email",
    "organization.id",
    "Esql.time_bucket",
    "Esql.query_count_distinct",
    "Esql.sensitive_query_count",
    "Esql.event_count",
    "Esql.query_values",
    "Esql.timestamp_first_seen",
    "Esql.timestamp_last_seen",
]

[rule.alert_suppression.duration]
unit = "h"
value = 1

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.