EXPLORE
← Back to Explore
elasticmediumTTP

OpenAI ChatGPT Enterprise Gmail Message Sent via Connector

Detects ChatGPT Enterprise Gmail connector `send_email` responses. Adversaries who abuse a linked Gmail connector after session compromise can exfiltrate data or perform lateral phishing by sending mail on behalf of the user. Draft-only activity (`create_draft`) is excluded.

MITRE ATT&CK

exfiltrationlateral-movement

Detection Query

from logs-openai_chatgpt_enterprise.app_log-* metadata _id, _version, _index
| where
    data_stream.dataset == "openai_chatgpt_enterprise.app_log" and
    openai_chatgpt_enterprise.app_log.app_name == "Gmail" and
    openai_chatgpt_enterprise.app_log.app_type == "SERVICE" and
    openai_chatgpt_enterprise.app_log.output is not null
| eval Esql.gmail_action = field_extract(openai_chatgpt_enterprise.app_log.output, "response.action_name")
| where Esql.gmail_action == "send_email"
| keep
    _id, _version, _index, @timestamp, user.id, user.email,
    Esql.gmail_action,
    openai_chatgpt_enterprise.app_log.app_name,
    openai_chatgpt_enterprise.app_log.app_type,
    openai_chatgpt_enterprise.app_log.log_type,
    openai_chatgpt_enterprise.app_log.output,
    data_stream.*

Author

Elastic

Created

2026/10/09

Data Sources

OpenAI ChatGPT Enterprise

Tags

Domain: GenAIPlatform: OpenAIData Source: OpenAI ChatGPT EnterpriseService: OpenAI ChatGPT EnterpriseUse Case: Threat DetectionResources: Investigation GuideRule Type: ES|QLTactic: ExfiltrationTactic: Lateral MovementMitre Atlas: AML.T0053Mitre Atlas: AML.T0025
Raw Content
[metadata]
creation_date = "2026/10/09"
integration = ["openai_chatgpt_enterprise"]
maturity = "production"
min_stack_comments = "field_extract (flattened field support) is available starting in 9.5.0, as a Technical Preview function; GA in 9.6.0."
min_stack_version = "9.5.0"
updated_date = "2026/10/09"

[rule]
author = ["Elastic"]
description = """
Detects ChatGPT Enterprise Gmail connector `send_email` responses. Adversaries who abuse a linked Gmail connector after
session compromise can exfiltrate data or perform lateral phishing by sending mail on behalf of the user. Draft-only
activity (`create_draft`) is excluded.
"""
false_positives = ["Users legitimately asking ChatGPT to send mail through an approved Gmail connector."]
from = "now-9m"
language = "esql"
license = "Elastic License v2"
name = "OpenAI ChatGPT Enterprise Gmail Message Sent via Connector"
note = """## Triage and analysis

### Investigating OpenAI ChatGPT Enterprise Gmail Message Sent via Connector

ChatGPT completed a Gmail connector `send_email` call. That can be legitimate assistance or abuse for exfiltration or
phishing after connector or session compromise.

Escalate when the recipient or content on the paired request is unexpected, the message looks like phishing or data
staging, or nearby activity shows sensitive Gmail or Drive discovery. Close as a false positive for approved
send-on-behalf workflows.

#### Possible investigation steps

- Review `user.email`, `Esql.gmail_action`, and `openai_chatgpt_enterprise.app_log.output` (sent message and thread IDs).
- Correlate with the preceding Gmail `request` from the same user (subject, body, and `to` are on the request event).
- Correlate with nearby Gmail discovery searches, Google Drive downloads, or unusual authentication activity.
- Confirm whether Gmail connector use and outbound send are approved for that user.

### False positive analysis

- Users who send calendar notes, status updates, or other approved outbound mail through the Gmail connector will match.

### Response and remediation

- Revoke Gmail connector access if unauthorized, review sent mail, and treat exposed content per your data-incident
  process.
- Hunt for additional sends, sensitive Gmail searches, or Drive downloads from the same user in the surrounding window.
"""
references = [
    "https://www.elastic.co/docs/reference/integrations/openai_chatgpt_enterprise",
    "https://platform.openai.com/docs/compliance",
]
risk_score = 47
rule_id = "7184e35d-5605-4283-badf-435e1974e488"
setup = """## Setup

This rule requires the OpenAI ChatGPT Enterprise integration to collect Gmail `app_log` response events where
`openai_chatgpt_enterprise.app_log.output` includes `response.action_name` (for example `send_email`).

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: Exfiltration",
    "Tactic: Lateral Movement",
    "Mitre Atlas: AML.T0053",
    "Mitre Atlas: AML.T0025",
]
timestamp_override = "event.ingested"
type = "esql"

query = '''
from logs-openai_chatgpt_enterprise.app_log-* metadata _id, _version, _index
| where
    data_stream.dataset == "openai_chatgpt_enterprise.app_log" and
    openai_chatgpt_enterprise.app_log.app_name == "Gmail" and
    openai_chatgpt_enterprise.app_log.app_type == "SERVICE" and
    openai_chatgpt_enterprise.app_log.output is not null
| eval Esql.gmail_action = field_extract(openai_chatgpt_enterprise.app_log.output, "response.action_name")
| where Esql.gmail_action == "send_email"
| keep
    _id, _version, _index, @timestamp, user.id, user.email,
    Esql.gmail_action,
    openai_chatgpt_enterprise.app_log.app_name,
    openai_chatgpt_enterprise.app_log.app_type,
    openai_chatgpt_enterprise.app_log.log_type,
    openai_chatgpt_enterprise.app_log.output,
    data_stream.*
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1567"
name = "Exfiltration Over Web Service"
reference = "https://attack.mitre.org/techniques/T1567/"


[rule.threat.tactic]
id = "TA0010"
name = "Exfiltration"
reference = "https://attack.mitre.org/tactics/TA0010/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1534"
name = "Internal Spearphishing"
reference = "https://attack.mitre.org/techniques/T1534/"


[rule.threat.tactic]
id = "TA0008"
name = "Lateral Movement"
reference = "https://attack.mitre.org/tactics/TA0008/"
[[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.T0025"
name = "Exfiltration via Cyber Means"
reference = "https://atlas.mitre.org/techniques/AML.T0025/"


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

[rule.investigation_fields]
field_names = [
    "@timestamp",
    "user.email",
    "user.id",
    "Esql.gmail_action",
    "openai_chatgpt_enterprise.app_log.input",
    "openai_chatgpt_enterprise.app_log.app_name",
]