GenAI Prompt Contains Cryptographic Hash String

Last updated a day ago on 2026-11-06
Created 3 months ago on 2026-08-18

About

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.
Tags
Domain: GenAIUse Case: Security for AITactic: Credential AccessTactic: ExfiltrationMitre Atlas: AML.T0057Data Source: AWS BedrockData Source: OpenAI ChatGPT EnterprisePlatform: AWSPlatform: OpenAIService: AWS BedrockService: OpenAI ChatGPT EnterpriseRule Type: Custom Query (KQL)Language: kuery
Severity
medium
Risk Score
47
MITRE ATT&CK™

Credential Access (TA0006)(external, opens in a new tab or window)

False Positive Examples
Security or forensics workflows that send file hashes to a model for threat intelligence lookup or malware triage. Review the surrounding context and verify the hash does not correspond to a credential or sensitive artifact. Development tooling that includes git commit SHAs, Docker image digests, or package checksums in prompts for CI/CD automation.
License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Query (Kibana Query Language)
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-aws_bedrock.invocation-*logs-openai_chatgpt_enterprise.codex_log-*logs-openai_chatgpt_enterprise.conversation_message-*logs-openai_chatgpt_enterprise.custom_agents_log-*
Related Integrations

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

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

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

Query
text code block:
data_stream.dataset : ( "aws_bedrock.invocation" or "openai_chatgpt_enterprise.codex_log" or "openai_chatgpt_enterprise.conversation_message" or "openai_chatgpt_enterprise.custom_agents_log" ) and (security_ai.hash_string.input_messages.strings : * or security_ai.hash_string.output_messages.strings : *)

Install detection rules in Elastic Security

Detect GenAI Prompt Contains Cryptographic Hash String 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).