OpenAI ChatGPT Enterprise High Codex MCP Tool Diversity

Last updated 8 days ago on 2026-10-09
Created 9 days ago on 2026-10-08

About

Detects a ChatGPT Enterprise Codex user invoking a high number of distinct MCP tools across multiple connectors within a 30-minute bucket. Broad tool and connector diversity in a short window can indicate compromised-account recon, unauthorized multi-system collection, or an agent rapidly enumerating organizational data sources.
Tags
Domain: GenAIPlatform: OpenAIData Source: OpenAI ChatGPT EnterpriseService: OpenAI ChatGPT EnterpriseUse Case: Threat DetectionUse Case: UEBARule Type: ES|QLTactic: CollectionMitre Atlas: AML.T0053Mitre Atlas: AML.T0085Language: esql
Severity
medium
Risk Score
47
MITRE ATT&CK™

Collection (TA0009)(external, opens in a new tab or window)

False Positive Examples
Power users and legitimate multi-connector Codex workflows (for example Slack + GitHub + Google Drive in one session) can approach these thresholds. Raise `Esql.gen_ai_tool_name_count_distinct` or `Esql.connector_id_count_distinct` above your baseline before broad enablement.
License
Elastic License v2(external, opens in a new tab or window)

Definition

Integration Pack
Prebuilt Security Detection Rules
Related Integrations

openai_chatgpt_enterprise(external, opens in a new tab or window)

Query
text code block:
from logs-openai_chatgpt_enterprise.codex_log-* | where data_stream.dataset == "openai_chatgpt_enterprise.codex_log" and event.action == "app_mcp_call" and user.email is not null and organization.id is not null and gen_ai.tool.name is not null | eval Esql.time_bucket = date_trunc(30 minutes, @timestamp) | stats Esql.gen_ai_tool_name_count_distinct = count_distinct(gen_ai.tool.name), Esql.connector_id_count_distinct = count_distinct(openai_chatgpt_enterprise.codex_log.event_details.tool_meta.connector_id), Esql.event_count = count(*), Esql.gen_ai_tool_name_values = values(gen_ai.tool.name), Esql.connector_id_values = values(openai_chatgpt_enterprise.codex_log.event_details.tool_meta.connector_id), Esql.timestamp_first_seen = min(@timestamp), Esql.timestamp_last_seen = max(@timestamp) by user.email, organization.id, Esql.time_bucket | where Esql.gen_ai_tool_name_count_distinct >= 10 and Esql.connector_id_count_distinct >= 3 | keep user.email, organization.id, Esql.time_bucket, Esql.gen_ai_tool_name_count_distinct, Esql.connector_id_count_distinct, Esql.event_count, Esql.gen_ai_tool_name_values, Esql.connector_id_values, Esql.timestamp_first_seen, Esql.timestamp_last_seen

Install detection rules in Elastic Security

Detect OpenAI ChatGPT Enterprise High Codex MCP Tool Diversity in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).