OpenAI ChatGPT Enterprise Gmail Message Sent via Connector
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.
Query · esql
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.*
Investigation fields
Pivot points the source recommends for triage.
@timestampuser.emailuser.idEsql.gmail_actionopenai_chatgpt_enterprise.app_log.inputopenai_chatgpt_enterprise.app_log.app_name
Implementation guide
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
Known false positives
- Users legitimately asking ChatGPT to send mail through an approved Gmail connector.
Analyst notes
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, andopenai_chatgpt_enterprise.app_log.output(sent message and thread IDs). - Correlate with the preceding Gmail
requestfrom the same user (subject, body, andtoare 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.