Browse Rules

Search and filter across all detection sources

151 rules

elastic medium kql

GenAI Process Connection to Unusual Domain

Detects GenAI tools connecting to unusual domains on macOS. Adversaries may compromise GenAI tools through prompt injection, malicious MCP servers, or poisoned plugins to establish C2 channels or exfiltrate sensitive data to attacker-controlled infrastructure. AI agents with network access can be manipulated to beacon to external servers, download malicious payloads, or transmit harvested credentials and documents.

elastic medium eql

GenAI Process Connection to Suspicious Top Level Domain

Detects when GenAI tools connect to domains using suspicious TLDs commonly abused for malware C2 infrastructure. TLDs like .top, .xyz, .ml, .cf, .onion are frequently used in phishing and malware campaigns. Legitimate GenAI services use well-established domains (.com, .ai, .io), so connections to suspicious TLDs may indicate compromised tools, malicious plugins, or AI-generated code connecting to attacker infrastructure.

elastic medium eql

GenAI Process Performing Encoding/Chunking Prior to Network Activity

Detects when GenAI processes perform encoding or chunking (base64, gzip, tar, zip) followed by outbound network activity. This sequence indicates data preparation for exfiltration. Attackers encode or compress sensitive data before transmission to obfuscate contents and evade detection. Legitimate GenAI workflows rarely encode data before network communications.

elastic medium kql

Unusual Process Modifying GenAI Configuration File

Detects unusual modification of GenAI tool configuration files. Adversaries may inject malicious MCP server configurations to hijack AI agents for persistence, C2, or data exfiltration. Attack vectors include malware or scripts directly poisoning config files, supply chain attacks via compromised dependencies, and prompt injection attacks that abuse the GenAI tool itself to modify its own configuration. Unauthorized MCP servers added to these configs execute arbitrary commands when the AI tool i

elastic high kql

OpenAI ChatGPT Enterprise Domain Created

Detects ChatGPT Enterprise audit events that create a workspace domain boundary entry. Domain changes can expand who is allowed to join or access the tenant and may establish persistence for attacker-controlled domains.

elastic high eql

GenAI Process Accessing Sensitive Files

Detects when GenAI tools access sensitive files such as cloud credentials, SSH keys, browser password databases, or shell configurations. Attackers leverage GenAI agents to systematically locate and exfiltrate credentials, API keys, and tokens. Access to credential stores (.aws/credentials, .ssh/id_*) suggests harvesting, while writes to shell configs (.bashrc, .zshrc) indicate persistence attempts. Note: On linux only creation events are available. Access events are not yet implemented.

elastic high kql

High Confidence Malicious GenAI Assistant Response

Detects a GenAI assistant response that a security_ai classifier scores as high-confidence malicious content. The rule requires a high prediction from one of four models: refusal, encoding, word obfuscation, or hash string. ES|QL COMPLETION then reviews the response and drops likely false positives before an alert is created.

elastic high kql

Anthropic Organization Domain Boundary Changed

Verified organization domains control which email addresses can join or be pulled into an Anthropic tenant. Verifying, claiming, adding, or removing a domain changes the tenant boundary and can pull in attacker-controlled mailboxes or push out legitimate corporate domains. These events are infrequent and affect organization-wide membership trust.

elastic medium eql

GenAI CLI Started with Unsafe Permission Bypass

Identifies GenAI agent CLIs started with permission-bypass or auto-approval flags that disable human-in-the-loop guardrails. These modes are intended for isolated sandboxes but are frequently misused on internet-connected developer workstations, allowing prompt injection, compromised dependencies, or malicious skills to execute commands, modify files, or reach sensitive paths without confirmation.

elastic low eql

GenAI or MCP Server Child Process Execution

Detects child process execution from GenAI tools or MCP (Model Context Protocol) servers. Adversaries exploit AI agents to execute system commands, exfiltrate data, or establish persistence. MCP servers provide LLMs direct access to execute shell commands, read files, and interact with external services. This building block provides visibility into AI-initiated process execution for correlation with other suspicious activity.

elastic high kql

High Confidence Prompt Injection in a GenAI User Message

Detects a GenAI user message that a security_ai classifier scores as high-confidence prompt injection. The rule requires a high prediction from one of four models: instruction override, encoding, word obfuscation, or hash string. ES|QL COMPLETION then reviews the message and drops likely false positives before an alert is created.

elastic critical kql

Elastic Defend Alert from GenAI Utility or Descendant

Detects Elastic Defend alerts (behavior, malicious file, memory signature, shellcode) where the alerted process or its direct parent is a GenAI coding or assistant utility (e.g. Cursor, Claude, Windsurf, Cody, Continue, Aider, OpenClaw, Moltbot, Clawdbot, Codeium, Tabnine, GitHub Copilot). Activity from these tools can indicate prompt injection, malicious skills, or supply-chain abuse; this Higher-Order rule helps prioritize such alerts for triage.

elastic high kql

Potential Destructive AWS CLI Command Executed by GenAI Agent

Identifies a cloud CLI command that destroys infrastructure or identities, such as terminating EC2 instances, removing S3 buckets, or deleting IAM users, when it is spawned by a GenAI coding agent directly or through the agent's shell wrapper. A compromised or prompt-injected agent can be steered into wiping the developer's environment and cloud account using the credentials it already holds, as seen in the malicious Amazon Q Developer for VS Code v1.84.0 release (AWS-2025-015).

elastic medium eql

GenAI Process Compiling or Generating Executables

Detects when GenAI tools spawn compilers or packaging tools to generate executables. Attackers leverage local LLMs to autonomously generate and compile malware, droppers, or implants. Python packaging tools (pyinstaller, nuitka, pyarmor) are particularly high-risk as they create standalone executables that can be deployed without dependencies. This rule focuses on compilation activity that produces output binaries, filtering out inspection-only operations.

elastic low eql

Ollama DNS Query to Untrusted Domain

Detects Ollama DNS queries to domains outside official infrastructure. Adversaries can redirect Ollama to pull models from attacker-controlled servers via OLLAMA_HOST or custom manifests. Malicious models may contain backdoors, exploit parsing vulnerabilities like CVE-2025-1975, or poison inference outputs.

elastic medium kql

OpenAI ChatGPT Enterprise Multiple Authentication Failures

Detects multiple failed ChatGPT Enterprise login attempts for the same user email within a short window. Password spraying or credential stuffing against enterprise accounts often precedes a successful compromise.

elastic medium kql

GenAI Prompt Contains Cryptographic Hash String

Detects hex-encoded hash strings (MD5, SHA-1, SHA-256, SHA-512) within GenAI prompt or completion text. The security_ai ML model has identified one or more candidate strings whose character distribution matches a cryptographic digest. Attackers may pass hashes in prompts to exfiltrate credentials for offline cracking, to reference stolen data without sending plaintext, or as part of prompt injection payloads that encode malicious instructions as hex data.

elastic medium kql

GenAI Prompt Contains Base64-Encoded Payload

Detects base64-encoded content within GenAI prompt or completion text. The security_ai ML model has identified one or more candidate strings in the message that score as encoded payloads. Attackers embed base64 in prompts to smuggle instructions past content filters, exfiltrate data, or inject indirect prompt-injection payloads into model context. Strings that match known credential formats (AWS access key IDs, API keys, private key headers, and similar) are excluded — those fire the dedicated

elastic medium kql

OpenAI ChatGPT Enterprise User Invite Sent

Detects ChatGPT Enterprise audit events that invite a new user into the workspace. An adversary who compromises an administrator can invite a mailbox they control to gain durable access.

elastic high kql

GenAI Prompt Contains Leaked Credential

Detects known credential formats — AWS access key IDs, LLM vendor API keys, GitHub personal access tokens, SSH/PEM private key headers, JWTs, and similar — appearing in GenAI prompt or completion text, or in strings flagged by the security_ai ML model as encoded payloads. Credentials in the model input mean an application or user is sending secrets to the model, exposing them to invocation logging, the model provider, and prompt history. Credentials in the model output or in ML-extracted encode

elastic medium kql

Unusual High Denied Topic Blocks Detected

Detects repeated compliance violation 'BLOCKED' actions coupled with specific policy name such as 'topic_policy', indicating persistent misuse or attempts to probe the model's denied topics.

elastic medium kql

Unusual High Word Policy Blocks Detected

Detects repeated compliance violation 'BLOCKED' actions coupled with specific policy name such as 'word_policy', indicating persistent misuse or attempts to probe the model's denied topics.

elastic medium kql

Unusual High Denied Sensitive Information Policy Blocks Detected

Detects repeated compliance violation 'BLOCKED' actions coupled with specific policy name such as 'sensitive_information_policy', indicating persistent misuse or attempts to probe the model's denied topics.

elastic medium eql

Potential Prompt Injection Coercing Shell Execution

Detects shells or scripting interpreters launched from a parent command line that contains common LLM prompt-injection or jailbreak language. Attackers (or malicious content ingested by an agent) use instruction-override, DAN/developer- mode, system-prompt extraction, and safety-filter bypass phrasing to coerce GenAI coding agents and automation wrappers into running attacker-chosen commands. When that injected text reaches a child shell or interpreter, it is a strong signal that untrusted promp

elastic medium eql

Connection to Common Large Language Model Endpoints

Identifies DNS queries to known Large Language Model domains by unsigned binaries or common Windows scripting utilities. Malwares may leverage the capabilities of LLM to perform actions in the affected system in a dynamic way.