Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Prompt injection: Body instructions directed at an LLM from a new sender"
description: "Detects messages whose plaintext body contains instructions directed at an LLM (prompt injection), sent from a sender with no established, benign relationship. Targets attacks that attempt to manipulate downstream AI assistants that process email on the recipient's behalf."
type: "rule"
severity: "high"
source: |
//
// This rule makes use of a beta feature and is subject to change without notice.
// Using the beta feature in custom rules is not suggested until it has been formally released.
//
type.inbound
and beta.prompt_injection_detection(body.plain.raw).detection == "injection"
and profile.by_sender().prevalence in ("new", "outlier", "rare")
and not profile.by_sender().any_messages_benign

// Graymail exclusion (Fuzzy Attack Score), limited to authenticated senders
and not (
beta.fuzzy_attack_score().verdict == "graymail"
and headers.auth_summary.dmarc.pass
)

tags:
- "Email prompt injection"
attack_types:
- "Credential Phishing"
- "BEC/Fraud"
tactics_and_techniques:
- "Social engineering"
- "Evasion"
detection_methods:
- "Content analysis"
- "Natural Language Understanding"
- "Sender analysis"
id: "eeba0baa-be61-55af-833b-9e2282119270"
24 changes: 12 additions & 12 deletions dlp-discovery-rules/beta_dlp_at_vat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ source: |
type.outbound
and (
any(beta.ml_extract_sensitive_information(body.current_thread.text).elements,
.type == "at_vat" and .confidence in ("medium", "high")
.type == "at_vat" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(subject.subject).elements,
.type == "at_vat" and .confidence in ("medium", "high")
.type == "at_vat" and .confidence in ("medium", "high")
)
or any(attachments,
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "at_vat" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "at_vat" and .confidence in ("medium", "high")
)
)
)
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "at_vat" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "at_vat" and .confidence in ("medium", "high")
)
)
)
)
)
detection_methods:
Expand Down
24 changes: 12 additions & 12 deletions dlp-discovery-rules/beta_dlp_au_abn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ source: |
type.outbound
and (
any(beta.ml_extract_sensitive_information(body.current_thread.text).elements,
.type == "au_abn" and .confidence in ("medium", "high")
.type == "au_abn" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(subject.subject).elements,
.type == "au_abn" and .confidence in ("medium", "high")
.type == "au_abn" and .confidence in ("medium", "high")
)
or any(attachments,
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "au_abn" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "au_abn" and .confidence in ("medium", "high")
)
)
)
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "au_abn" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "au_abn" and .confidence in ("medium", "high")
)
)
)
)
)
detection_methods:
Expand Down
26 changes: 14 additions & 12 deletions dlp-discovery-rules/beta_dlp_au_bank_account.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,24 @@ source: |
type.outbound
and (
any(beta.ml_extract_sensitive_information(body.current_thread.text).elements,
.type == "au_bank_account" and .confidence in ("medium", "high")
.type == "au_bank_account" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(subject.subject).elements,
.type == "au_bank_account" and .confidence in ("medium", "high")
.type == "au_bank_account" and .confidence in ("medium", "high")
)
or any(attachments,
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "au_bank_account" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "au_bank_account" and .confidence in ("medium", "high")
)
)
)
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "au_bank_account"
and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "au_bank_account"
and .confidence in ("medium", "high")
)
)
)
)
)
detection_methods:
Expand Down
26 changes: 14 additions & 12 deletions dlp-discovery-rules/beta_dlp_au_driver_license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,24 @@ source: |
type.outbound
and (
any(beta.ml_extract_sensitive_information(body.current_thread.text).elements,
.type == "au_driver_license" and .confidence in ("medium", "high")
.type == "au_driver_license" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(subject.subject).elements,
.type == "au_driver_license" and .confidence in ("medium", "high")
.type == "au_driver_license" and .confidence in ("medium", "high")
)
or any(attachments,
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "au_driver_license" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "au_driver_license" and .confidence in ("medium", "high")
)
)
)
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "au_driver_license"
and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "au_driver_license"
and .confidence in ("medium", "high")
)
)
)
)
)
detection_methods:
Expand Down
25 changes: 13 additions & 12 deletions dlp-discovery-rules/beta_dlp_au_medicare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,23 @@ source: |
type.outbound
and (
any(beta.ml_extract_sensitive_information(body.current_thread.text).elements,
.type == "au_medicare" and .confidence in ("medium", "high")
.type == "au_medicare" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(subject.subject).elements,
.type == "au_medicare" and .confidence in ("medium", "high")
.type == "au_medicare" and .confidence in ("medium", "high")
)
or any(attachments,
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "au_medicare" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "au_medicare" and .confidence in ("medium", "high")
)
)
)
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "au_medicare" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "au_medicare"
and .confidence in ("medium", "high")
)
)
)
)
)
detection_methods:
Expand Down
26 changes: 14 additions & 12 deletions dlp-discovery-rules/beta_dlp_au_passport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,24 @@ source: |
type.outbound
and (
any(beta.ml_extract_sensitive_information(body.current_thread.text).elements,
.type == "au_passport_number" and .confidence in ("medium", "high")
.type == "au_passport_number" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(subject.subject).elements,
.type == "au_passport_number" and .confidence in ("medium", "high")
.type == "au_passport_number" and .confidence in ("medium", "high")
)
or any(attachments,
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "au_passport_number" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "au_passport_number" and .confidence in ("medium", "high")
)
)
)
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "au_passport_number"
and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "au_passport_number"
and .confidence in ("medium", "high")
)
)
)
)
)
detection_methods:
Expand Down
24 changes: 12 additions & 12 deletions dlp-discovery-rules/beta_dlp_au_tfn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ source: |
type.outbound
and (
any(beta.ml_extract_sensitive_information(body.current_thread.text).elements,
.type == "au_tfn" and .confidence in ("medium", "high")
.type == "au_tfn" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(subject.subject).elements,
.type == "au_tfn" and .confidence in ("medium", "high")
.type == "au_tfn" and .confidence in ("medium", "high")
)
or any(attachments,
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "au_tfn" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "au_tfn" and .confidence in ("medium", "high")
)
)
)
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "au_tfn" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "au_tfn" and .confidence in ("medium", "high")
)
)
)
)
)
detection_methods:
Expand Down
26 changes: 14 additions & 12 deletions dlp-discovery-rules/beta_dlp_aws_access_key.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,26 @@ source: |
type.outbound
and (
any(beta.ml_extract_sensitive_information(body.current_thread.text).elements,
.type == "aws_access_key" and .confidence in ("medium", "high")
.type == "aws_access_key" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(subject.subject).elements,
.type == "aws_access_key" and .confidence in ("medium", "high")
.type == "aws_access_key" and .confidence in ("medium", "high")
)
or any(attachments,
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "aws_access_key" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "aws_access_key" and .confidence in ("medium", "high")
)
)
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "aws_access_key"
and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "aws_access_key"
and .confidence in ("medium", "high")
)
)
)
)
)
)
tags:
- "Credentials"
attack_types:
Expand Down
24 changes: 12 additions & 12 deletions dlp-discovery-rules/beta_dlp_be_vat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ source: |
type.outbound
and (
any(beta.ml_extract_sensitive_information(body.current_thread.text).elements,
.type == "be_vat" and .confidence in ("medium", "high")
.type == "be_vat" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(subject.subject).elements,
.type == "be_vat" and .confidence in ("medium", "high")
.type == "be_vat" and .confidence in ("medium", "high")
)
or any(attachments,
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "be_vat" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "be_vat" and .confidence in ("medium", "high")
)
)
)
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "be_vat" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "be_vat" and .confidence in ("medium", "high")
)
)
)
)
)
detection_methods:
Expand Down
26 changes: 14 additions & 12 deletions dlp-discovery-rules/beta_dlp_ca_bank_account.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,24 @@ source: |
type.outbound
and (
any(beta.ml_extract_sensitive_information(body.current_thread.text).elements,
.type == "ca_bank_account" and .confidence in ("medium", "high")
.type == "ca_bank_account" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(subject.subject).elements,
.type == "ca_bank_account" and .confidence in ("medium", "high")
.type == "ca_bank_account" and .confidence in ("medium", "high")
)
or any(attachments,
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "ca_bank_account" and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "ca_bank_account" and .confidence in ("medium", "high")
)
)
)
any(file.explode(.),
(
any(beta.ml_extract_sensitive_information(.scan.strings.raw).elements,
.type == "ca_bank_account"
and .confidence in ("medium", "high")
)
or any(beta.ml_extract_sensitive_information(.scan.ocr.raw).elements,
.type == "ca_bank_account"
and .confidence in ("medium", "high")
)
)
)
)
)
detection_methods:
Expand Down
Loading
Loading