+ // Reply-to: foo@outlook.com
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ and (
+ sender.email.domain.root_domain not in $tranco_1m
+ or any(headers.reply_to, .email.domain.domain != sender.email.domain.domain)
)
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/impersonation_paypal.yml b/detection-rules/impersonation_paypal.yml
index d15b6c23e8a..f8c180384a7 100644
--- a/detection-rules/impersonation_paypal.yml
+++ b/detection-rules/impersonation_paypal.yml
@@ -8,60 +8,61 @@ severity: "medium"
source: |
type.inbound
and (
- sender.display_name =~ "paypal"
- or strings.ilevenshtein(sender.display_name, 'paypal') <= 1
- or strings.ilike(sender.email.domain.domain, '*paypal*')
-
- or any(attachments, .file_type in ("pdf", "jpg", "jpeg", "png")
- and any(ml.logo_detect(.).brands, .name == "PayPal")
- and any(file.explode(.),
- any(.scan.strings.strings, strings.ilike(., "*PayPal*"))
- and any(.scan.strings.strings,
- strings.ilike(.,
- "*invoice*",
- "*transaction*",
- "*bitcoin*",
- "*dear customer*",
- )
- )
- )
- )
+ sender.display_name =~ "paypal"
+ or strings.ilevenshtein(sender.display_name, 'paypal') <= 1
+ or strings.ilike(sender.email.domain.domain, '*paypal*')
+ or any(attachments,
+ (.file_type in $file_types_images or .file_type == "pdf")
+ and any(ml.logo_detect(.).brands, .name == "PayPal")
+ and any(file.explode(.),
+ strings.ilike(.scan.ocr.raw, "*PayPal*")
+ and strings.ilike(.scan.ocr.raw,
+ "*invoice*",
+ "*transaction*",
+ "*bitcoin*",
+ "*dear customer*",
+ )
+ )
+ )
)
-
- and sender.email.domain.root_domain not in~ (
- 'paypal.com',
- 'paypal.ch',
- 'paypal.nl',
- 'paypal.co.uk',
- 'google.com',
- 'q4inc.com',
- 'paypal.com.au',
- 'paypal.se',
- 'paypal.be',
- 'paypal.de',
- 'paypal.dk',
- 'paypal.pl',
- 'paypal.es',
- 'paypal.ca',
- 'paypal.fr',
- 'paypal.it',
- 'synchronyfinancial.com',
- 'synchronybank.com',
- 'xoom.com',
- 'paypal-experience.com',
- 'paypalcorp.com'
+ and sender.email.domain.root_domain not in (
+ 'paypal.com',
+ 'paypal.ch',
+ 'paypal.nl',
+ 'paypal.co.uk',
+ 'google.com',
+ 'q4inc.com',
+ 'paypal.com.au',
+ 'paypal.se',
+ 'paypal.be',
+ 'paypal.de',
+ 'paypal.dk',
+ 'paypal.pl',
+ 'paypal.es',
+ 'paypal.ca',
+ 'paypal.fr',
+ 'paypal.it',
+ 'synchronyfinancial.com',
+ 'synchronybank.com',
+ 'xoom.com',
+ 'paypal-experience.com',
+ 'paypalcorp.com',
+ 'paypal-customerfeedback.com',
+ 'paypal-creditsurvey.com',
+ 'paypal-prepaid.com',
+ 'xoom.com'
)
// unsolicited
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/impersonation_recipient_domain.yml b/detection-rules/impersonation_recipient_domain.yml
index eedf925ca66..d02e2a84f81 100644
--- a/detection-rules/impersonation_recipient_domain.yml
+++ b/detection-rules/impersonation_recipient_domain.yml
@@ -11,29 +11,37 @@ source: |
// only 1 To: recipient
and length(recipients.to) + length(recipients.bcc) + length(recipients.cc) == 1
-
and any(recipients.to,
- // custom domains only
- sender.email.domain.domain not in $free_email_providers
-
- // recipient's domain is in the sender's display name
- and strings.icontains(sender.display_name, .email.domain.root_domain))
+ // custom domains only
+ sender.email.domain.domain not in $free_email_providers
+ // recipient's domain is in the sender's display name
+ and strings.icontains(sender.display_name, .email.domain.root_domain)
+ )
+
and not (
- strings.contains(sender.display_name, "on behalf of")
- and sender.email.domain.root_domain == "microsoftonline.com"
+ (
+ strings.contains(sender.display_name, "on behalf of")
+ and sender.email.domain.root_domain == "microsoftonline.com"
+ )
+ or (
+ strings.contains(sender.display_name, "via TransferXL")
+ and sender.email.domain.root_domain == "transferxl.com"
+ )
)
+
+ and all(recipients.to, .email.email != sender.email.email)
// first-time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/impersonation_recipient_sld_in_sender_local_fts.yml b/detection-rules/impersonation_recipient_sld_in_sender_local_fts.yml
index 087cf4725c7..193fc25d260 100644
--- a/detection-rules/impersonation_recipient_sld_in_sender_local_fts.yml
+++ b/detection-rules/impersonation_recipient_sld_in_sender_local_fts.yml
@@ -6,12 +6,24 @@ description: |
the sender's domain is not a known org domain, and it's a first time sender.
source: |
type.inbound
+ // check that there's at least 1 sus attachment, link, or body text
and (
- any(recipients.to,
- (strings.contains(sender.email.local_part, .email.domain.sld)
+ length(attachments) > 0
+ // this must be run in user environments to not flag,
+ // not the Analyzer
+ or any(body.links, .href_url.domain.domain not in $org_domains)
+ or any(ml.nlu_classifier(body.current_thread.text).intents,
+ .name != "benign" and .confidence == "high"
+ )
+ )
+ and (
+ any(recipients.to,
+ (
+ strings.contains(sender.email.local_part, .email.domain.sld)
// checking to ensure no FPs, like "me" in "me.com"
- and length(.email.domain.sld) > 3)
- )
+ and length(.email.domain.sld) > 3
+ )
+ )
)
and sender.email.domain.root_domain not in $org_domains
and (
diff --git a/detection-rules/impersonation_ripple.yml b/detection-rules/impersonation_ripple.yml
index 69176a1177c..da3450cfb57 100644
--- a/detection-rules/impersonation_ripple.yml
+++ b/detection-rules/impersonation_ripple.yml
@@ -11,14 +11,14 @@ source: |
and regex.imatch(sender.display_name, '\bripple\b')
and sender.email.domain.root_domain not in ("ripple.com", "ripplejobs.co.uk")
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
+ )
)
tags:
- "Cryptocurrency"
diff --git a/detection-rules/impersonation_sharepoint_body_credential_theft.yml b/detection-rules/impersonation_sharepoint_body_credential_theft.yml
index d3252dd7cd1..f4bdaeaabac 100644
--- a/detection-rules/impersonation_sharepoint_body_credential_theft.yml
+++ b/detection-rules/impersonation_sharepoint_body_credential_theft.yml
@@ -1,16 +1,28 @@
name: "Brand impersonation: Sharepoint"
description: |
- Body contains a Sharepoint logo, a link, and credential theft language.
+ Body, attached images or pdf contains a Sharepoint logo. The message contains a link and credential theft language.
type: "rule"
severity: "high"
source: |
type.inbound
and length(body.links) > 0
- and any(attachments,
- .file_type in ('png', 'jpeg', 'jpg', 'bmp')
- and any(ml.logo_detect(.).brands, .name == "Microsoft SharePoint")
+ and (
+ any(attachments,
+ (.file_type in $file_types_images or .file_type == "pdf")
+ and any(ml.logo_detect(.).brands, .name == "Microsoft SharePoint")
+ )
+ or any(ml.logo_detect(beta.message_screenshot()).brands, .name == "Microsoft SharePoint")
+ )
+ and (
+ any(ml.nlu_classifier(body.current_thread.text).intents,
+ .name == "cred_theft" and .confidence == "high"
+ )
+ or any(file.explode(beta.message_screenshot()),
+ any(ml.nlu_classifier(.scan.ocr.raw).intents,
+ .name == "cred_theft" and .confidence == "high"
+ )
+ )
)
- and any(ml.nlu_classifier(coalesce(body.html.display_text, body.plain.raw)).intents, .name == "cred_theft")
attack_types:
- "Credential Phishing"
tactics_and_techniques:
diff --git a/detection-rules/impersonation_sharepoint_image_credential_theft.yml b/detection-rules/impersonation_sharepoint_image_credential_theft.yml
deleted file mode 100644
index cb947d11466..00000000000
--- a/detection-rules/impersonation_sharepoint_image_credential_theft.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-name: "Brand impersonation: Sharepoint (image as content)"
-description: |
- Impersonation of Sharepoint where the attached image contains the contents of the credential phishing attack.
-type: "rule"
-severity: "high"
-source: |
- type.inbound
- and length(body.links) > 0
- and any(attachments,
- .file_type in ('png', 'jpeg', 'jpg', 'bmp')
- and any(ml.logo_detect(.).brands, .name == "Microsoft SharePoint")
-
- and any(file.explode(.),
- any(ml.nlu_classifier(.scan.ocr.raw).intents,
- .name == "cred_theft" and
- .confidence == "high"
- )
- )
- )
-attack_types:
- - "Credential Phishing"
-tactics_and_techniques:
- - "Impersonation: Brand"
- - "Image as content"
- - "Social engineering"
-detection_methods:
- - "Computer Vision"
- - "File analysis"
- - "Header analysis"
- - "Natural Language Understanding"
- - "Optical Character Recognition"
- - "Sender analysis"
-id: "0ac51b9a-7a2a-5be2-9e04-f71b9bfd61ac"
diff --git a/detection-rules/impersonation_spotify.yml b/detection-rules/impersonation_spotify.yml
index 4e982b24716..cfddbc55737 100644
--- a/detection-rules/impersonation_spotify.yml
+++ b/detection-rules/impersonation_spotify.yml
@@ -8,22 +8,28 @@ severity: "low"
source: |
type.inbound
and (
- strings.ilike(sender.display_name, '*spotify*')
- or strings.ilevenshtein(sender.display_name, 'spotify') <= 1
- or strings.ilike(sender.email.domain.domain, '*spotify*')
+ strings.ilike(sender.display_name, '*spotify*')
+ or strings.ilevenshtein(sender.display_name, 'spotify') <= 1
+ or strings.ilike(sender.email.domain.domain, '*spotify*')
+ )
+ and sender.email.domain.root_domain not in~ (
+ 'spotify.com',
+ 'byspotify.com',
+ 'echosign.com',
+ 'fromspotify.com',
+ 'anchor.fm'
)
- and sender.email.domain.root_domain not in~ ('spotify.com', 'byspotify.com', 'echosign.com', 'fromspotify.com', 'anchor.fm')
and sender.email.domain.domain not in~ ('privaterelay.appleid.com')
// first-time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/impersonation_stellar.yml b/detection-rules/impersonation_stellar.yml
index 898f25f88ee..0a6c3a65b1e 100644
--- a/detection-rules/impersonation_stellar.yml
+++ b/detection-rules/impersonation_stellar.yml
@@ -11,14 +11,14 @@ source: |
and regex.imatch(sender.display_name, '\bstellar\b')
and sender.email.domain.root_domain != "stellar.org"
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
+ )
)
tags:
- "Cryptocurrency"
diff --git a/detection-rules/impersonation_sublime_security.yml b/detection-rules/impersonation_sublime_security.yml
index b1dd99c3ad9..092022258c8 100644
--- a/detection-rules/impersonation_sublime_security.yml
+++ b/detection-rules/impersonation_sublime_security.yml
@@ -8,25 +8,20 @@ severity: "high"
source: |
type.inbound
and (
- sender.display_name in~ (
- 'Sublime Security',
- 'Josh Kamdjou',
- 'Joshua Kamdjou',
- 'Ian Thiel'
- )
+ sender.display_name in~ ('Sublime Security', 'Josh Kamdjou', 'Joshua Kamdjou', 'Ian Thiel')
or strings.ilevenshtein(sender.email.domain.domain, 'sublimesecurity.com') <= 2
)
and sender.email.domain.domain != 'sublimesecurity.com'
// first-time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/impersonation_turbotax.yml b/detection-rules/impersonation_turbotax.yml
index f0ed686bf7f..ac382473349 100644
--- a/detection-rules/impersonation_turbotax.yml
+++ b/detection-rules/impersonation_turbotax.yml
@@ -8,9 +8,9 @@ severity: "low"
source: |
type.inbound
and (
- strings.ilike(sender.display_name, '*turbotax*')
- or strings.ilevenshtein(sender.display_name, 'turbotax') <= 1
- or strings.ilike(sender.email.domain.domain, '*turbotax*')
+ strings.ilike(sender.display_name, '*turbotax*')
+ or strings.ilevenshtein(sender.display_name, 'turbotax') <= 1
+ or strings.ilike(sender.email.domain.domain, '*turbotax*')
)
and sender.email.domain.root_domain not in~ ('intuit.com', 'turbotax.com', 'intuit.ca')
and sender.email.email not in $recipient_emails
diff --git a/detection-rules/impersonation_twitter.yml b/detection-rules/impersonation_twitter.yml
index dc64485fd8c..82ec602f085 100644
--- a/detection-rules/impersonation_twitter.yml
+++ b/detection-rules/impersonation_twitter.yml
@@ -8,11 +8,11 @@ severity: "medium"
source: |
type.inbound
and (
- sender.display_name =~ "twitter"
- or strings.ilevenshtein(sender.display_name, 'twitter') <= 1
- or strings.ilike(sender.email.domain.domain, '*twitter*')
+ sender.display_name =~ "twitter"
+ or strings.ilevenshtein(sender.display_name, 'twitter') <= 1
+ or strings.ilike(sender.email.domain.domain, '*twitter*')
)
- and sender.email.domain.domain not in~ ('twitter.com', 'privaterelay.appleid.com', 'stripe.com')
+ and sender.email.domain.domain not in~ ('twitter.com', 'privaterelay.appleid.com', 'stripe.com', 'x.com')
and sender.email.email not in $recipient_emails
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/impersonation_ukr_net.yml b/detection-rules/impersonation_ukr_net.yml
index 7a399e522f3..802cf6d666e 100644
--- a/detection-rules/impersonation_ukr_net.yml
+++ b/detection-rules/impersonation_ukr_net.yml
@@ -15,38 +15,38 @@ severity: "medium"
source: |
type.inbound
and (
- (
- // technique
- strings.ilike(sender.display_name, "ukr*net")
- and sender.email.domain.root_domain != "ukr.net"
- )
- or (
- // IOCs
- subject.subject == "Увага"
- and (
- sender.email.email in (
- "muthuprakash.b@tvsrubber.com",
- "rakesh.ict@msruas.ac.in",
- "omars@salecharter.net",
- "citi.in.pm@xerago.com",
- "qs@gsengint.com",
- "sec.ls@msruas.ac.in",
- "vaishnavi.kj@tvsrubber.com",
- "nshcorp@nshcorp.in",
- "purchase2@hitechelastomers.com",
- "productionbelgavi@hodekindia.com",
- "narayanababu.py.ph@msruas.ac.in",
- "roopa.tsld@msruas.ac.in",
- "in-nonciti.basupport@xerago.com",
- "info@empiink.com",
- "pooja.fa@msruas.ac.in",
- "babu.d@tvsrubber.com",
- "systeam@xerago.com",
- "dean.ds@msruas.ac.in",
- )
- or any(body.links, .href_url.domain.domain == "consumerspanel.frge.io")
- )
+ (
+ // technique
+ strings.ilike(sender.display_name, "ukr*net")
+ and sender.email.domain.root_domain != "ukr.net"
+ )
+ or (
+ // IOCs
+ subject.subject == "Увага"
+ and (
+ sender.email.email in (
+ "muthuprakash.b@tvsrubber.com",
+ "rakesh.ict@msruas.ac.in",
+ "omars@salecharter.net",
+ "citi.in.pm@xerago.com",
+ "qs@gsengint.com",
+ "sec.ls@msruas.ac.in",
+ "vaishnavi.kj@tvsrubber.com",
+ "nshcorp@nshcorp.in",
+ "purchase2@hitechelastomers.com",
+ "productionbelgavi@hodekindia.com",
+ "narayanababu.py.ph@msruas.ac.in",
+ "roopa.tsld@msruas.ac.in",
+ "in-nonciti.basupport@xerago.com",
+ "info@empiink.com",
+ "pooja.fa@msruas.ac.in",
+ "babu.d@tvsrubber.com",
+ "systeam@xerago.com",
+ "dean.ds@msruas.ac.in",
+ )
+ or any(body.links, .href_url.domain.domain == "consumerspanel.frge.io")
)
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/impersonation_vanta.yml b/detection-rules/impersonation_vanta.yml
index 241749c7896..6267a289c5e 100644
--- a/detection-rules/impersonation_vanta.yml
+++ b/detection-rules/impersonation_vanta.yml
@@ -8,17 +8,17 @@ authors:
source: |
type.inbound
and (
- strings.ilike(sender.display_name, '*vanta*')
- or strings.ilike(sender.email.email, '*vanta*')
- or strings.ilevenshtein(sender.email.domain.sld, 'vanta') <= 1
+ regex.imatch(sender.display_name, '\bvanta\b')
+ or strings.ilike(sender.email.local_part, '*vanta*')
+ or strings.ilevenshtein(sender.email.domain.sld, 'vanta') <= 1
)
and not (
- strings.ilike(sender.display_name, '*advantage*')
- or strings.ilike(sender.email.email, '*advantage*')
- or strings.ilevenshtein(sender.email.domain.sld, 'advantage') <= 1
+ strings.ilike(sender.display_name, '*advantage*')
+ or strings.ilike(sender.email.email, '*advantage*')
+ or strings.ilevenshtein(sender.email.domain.sld, 'advantage') <= 1
)
and sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
+ and sender.email.email not in $sender_emails
attack_types:
- "Credential Phishing"
tactics_and_techniques:
diff --git a/detection-rules/impersonation_venmo.yml b/detection-rules/impersonation_venmo.yml
index d7f223835cb..e22d70de6cf 100644
--- a/detection-rules/impersonation_venmo.yml
+++ b/detection-rules/impersonation_venmo.yml
@@ -8,12 +8,21 @@ severity: "medium"
source: |
type.inbound
and (
- strings.ilike(sender.display_name, '*venmo*')
- or strings.ilevenshtein(sender.display_name, 'venmo') <= 1
- or strings.ilike(sender.email.domain.domain, '*venmo*')
+ strings.ilike(sender.display_name, '*venmo*')
+ or strings.ilevenshtein(sender.display_name, 'venmo') <= 1
+ or strings.ilike(sender.email.domain.domain, '*venmo*')
)
- and sender.email.domain.root_domain not in~ ('venmo.com', 'synchronybank.com')
+ and sender.email.domain.root_domain not in~ ('venmo.com', 'synchronybank.com', 'venmocreditsurvey.com')
and sender.email.email not in $recipient_emails
+
+ // and not if the sender.display.name contains "via" and dmarc pass from venmo.com
+ and not (
+ any(distinct(headers.hops, .authentication_results.dmarc is not null),
+ strings.ilike(.authentication_results.dmarc, "pass")
+ and .authentication_results.dmarc_details.from.domain == "venmo.com"
+ )
+ and strings.contains(sender.display_name, "via")
+ )
attack_types:
- "Credential Phishing"
tactics_and_techniques:
diff --git a/detection-rules/impersonation_vip_urgent_request.yml b/detection-rules/impersonation_vip_urgent_request.yml
index ca351239169..a0b24a6fd91 100644
--- a/detection-rules/impersonation_vip_urgent_request.yml
+++ b/detection-rules/impersonation_vip_urgent_request.yml
@@ -7,29 +7,24 @@ type: "rule"
severity: "high"
source: |
type.inbound
-
and any($org_vips, .display_name == sender.display_name)
-
- and any([body.plain.raw, body.html.inner_text],
- any(ml.nlu_classifier(.).intents,
- .name == "bec" and .confidence == "high"
- )
+ and (
+ any(ml.nlu_classifier(body.current_thread.text).intents, .name == "bec" and .confidence == "high")
or (
- any(ml.nlu_classifier(.).entities, .name == "urgency")
- and any(ml.nlu_classifier(.).entities, .name == "request")
+ any(ml.nlu_classifier(body.current_thread.text).entities, .name == "urgency")
+ and any(ml.nlu_classifier(body.current_thread.text).entities, .name == "request")
)
)
-
// first-time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
attack_types:
- "BEC/Fraud"
diff --git a/detection-rules/impersonation_wells_fargo.yml b/detection-rules/impersonation_wells_fargo.yml
index df4a0d019c4..117f9f3fd7f 100644
--- a/detection-rules/impersonation_wells_fargo.yml
+++ b/detection-rules/impersonation_wells_fargo.yml
@@ -9,14 +9,23 @@ severity: "high"
source: |
type.inbound
and (
- sender.display_name =~ 'wells fargo'
- or strings.ilevenshtein(sender.display_name, 'wells fargo') <= 1
- or strings.ilike(sender.email.domain.domain, '*wellsfargo*')
- or strings.ilike(subject.subject, '*wells fargo security*')
- or strings.ilike(body.plain.raw, '*wells fargo security team*')
- or strings.ilike(body.html.inner_text, '*wells fargo security team*')
+ sender.display_name =~ 'wells fargo'
+ or strings.ilevenshtein(sender.display_name, 'wells fargo') <= 1
+ or strings.ilike(sender.email.domain.domain, '*wellsfargo*')
+ or strings.ilike(subject.subject, '*wells fargo security*')
+ or strings.ilike(body.plain.raw, '*wells fargo security team*')
+ or strings.ilike(body.html.inner_text, '*wells fargo security team*')
+ )
+ and sender.email.domain.root_domain not in~ (
+ 'wellsfargo.com',
+ 'wellsfargoadvisors.com',
+ 'transunion.com',
+ 'wellsfargoemail.com',
+ 'wellsfargorewards.com',
+ 'comcast-spectacor.com',
+ 'investordelivery.com',
+ 'comcastspectacor.com'
)
- and sender.email.domain.root_domain not in~ ('wellsfargo.com', 'wellsfargoadvisors.com', 'transunion.com', 'wellsfargoemail.com', 'wellsfargorewards.com', 'comcast-spectacor.com', 'investordelivery.com', 'comcastspectacor.com')
and sender.email.email not in $recipient_emails
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/impersonation_wise_suspicious_attachment.yml b/detection-rules/impersonation_wise_suspicious_attachment.yml
index 7ee9bb9b194..9c08fa76a1a 100644
--- a/detection-rules/impersonation_wise_suspicious_attachment.yml
+++ b/detection-rules/impersonation_wise_suspicious_attachment.yml
@@ -6,15 +6,15 @@ severity: "high"
source: |
type.inbound
and (
- strings.ilike(sender.display_name, '*wise*')
- or strings.ilike(sender.email.domain.domain, '*wise*')
- )
+ strings.ilike(sender.display_name, '*wise*')
+ or strings.ilike(sender.email.domain.domain, '*wise*')
+ )
and any(ml.nlu_classifier(body.current_thread.text).tags, .name in ("payment", "invoice"))
- and any(attachments, .file_type
- in $file_extensions_common_archives
- or .file_type in $file_extensions_executables
- or .file_type in $file_extensions_macros
- or .file_type in ("lz")
+ and any(attachments,
+ .file_type in $file_extensions_common_archives
+ or .file_type in $file_extensions_executables
+ or .file_type in $file_extensions_macros
+ or .file_type in ("lz")
)
and sender.email.domain.root_domain not in~ ('wise.com', 'wise.jobs')
attack_types:
diff --git a/detection-rules/impersonation_zoom_strict.yml b/detection-rules/impersonation_zoom_strict.yml
index 7f16a2066ac..73980c81631 100644
--- a/detection-rules/impersonation_zoom_strict.yml
+++ b/detection-rules/impersonation_zoom_strict.yml
@@ -9,24 +9,24 @@ severity: "medium"
source: |
type.inbound
and (
- sender.display_name =~ 'zoom'
- or sender.display_name =~ 'zoom video communications, inc.'
- or sender.display_name =~ 'zoom call'
+ sender.display_name =~ 'zoom'
+ or sender.display_name =~ 'zoom video communications, inc.'
+ or sender.display_name =~ 'zoom call'
)
- and sender.email.domain.root_domain not in ('zoom.us', 'zuora.com')
+ and sender.email.domain.root_domain not in ('zoom.us', 'zuora.com','zoomgov.com')
and (
- // if this comes from a free email provider,
- // flag if org has never sent an email to sender's email before
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
- )
- // if this comes from a custom domain,
- // flag if org has never sent an email to sender's domain before
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
- )
+ // if this comes from a free email provider,
+ // flag if org has never sent an email to sender's email before
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
+ )
+ // if this comes from a custom domain,
+ // flag if org has never sent an email to sender's domain before
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/inline_image_as_message.yml b/detection-rules/inline_image_as_message.yml
index 545207dd3ff..ce0948fce12 100644
--- a/detection-rules/inline_image_as_message.yml
+++ b/detection-rules/inline_image_as_message.yml
@@ -10,20 +10,26 @@ source: |
type.inbound
and length(body.html.raw) < 200
and (
- (
- length(body.links) > 0
+ (
+ length(body.links) > 0
- // as of 20220116 there's a link parsing bug with .png inline images, so ignore those
- and any(body.links, not strings.ilike(.href_url.url, "*.png"))
- )
- // cid images are treated as attachments, so we're looking for more than 1
- or (
- length(attachments) > 1
- and any(attachments, .file_type not in ("jpg", "png", "gif"))
- )
+ // as of 20220116 there's a link parsing bug with .png inline images, so ignore those
+ and any(body.links, not strings.ilike(.href_url.url, "*.png"))
+ )
+ // cid images are treated as attachments, so we're looking for more than 1
+ or (length(attachments) > 1 and any(attachments, .file_type not in $file_types_images))
)
and strings.ilike(body.html.raw, "*img*cid*")
- and sender.email.email not in $recipient_emails
+ and (
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
+ )
attack_types:
- "Credential Phishing"
tactics_and_techniques:
diff --git a/detection-rules/link_coinbase_low_rep_or_shortened.yml b/detection-rules/link_coinbase_low_rep_or_shortened.yml
index 25ca7d8847f..c766a76b482 100644
--- a/detection-rules/link_coinbase_low_rep_or_shortened.yml
+++ b/detection-rules/link_coinbase_low_rep_or_shortened.yml
@@ -8,42 +8,40 @@ source: |
and sender.email.domain.root_domain != "coinbase.com"
// more than 0 less than 5 links
- and 0 < length(body.links) < 5
+ and 0 < length(body.links) < 5
// none of the links are to coinbase.com
and all(body.links, .href_url.domain.root_domain != "coinbase.com")
// low rep or url shortened links found
- and any(body.links,
- .href_url.domain.domain in $url_shorteners
-
- // exempting legitimate Google Maps shortener
- and (
- not strings.ilike(.href_url.url, "http?://goo.gl/maps*")
- or
- (
- .href_url.domain.domain not in $tranco_1m or
- .href_url.domain.domain in $free_file_hosts or
- .href_url.domain.root_domain in $free_subdomain_hosts or
- .href_url.domain.domain in $url_shorteners or
+ and any(body.links,
+ .href_url.domain.domain in $url_shorteners
- // mass mailer link, masks the actual URL
- .href_url.domain.root_domain in (
+ // exempting legitimate Google Maps shortener
+ and (
+ not strings.ilike(.href_url.url, "http?://goo.gl/maps*")
+ or (
+ .href_url.domain.domain not in $tranco_1m
+ or .href_url.domain.domain in $free_file_hosts
+ or .href_url.domain.root_domain in $free_subdomain_hosts
+ or .href_url.domain.domain in $url_shorteners
+ or
+
+ // mass mailer link, masks the actual URL
+ .href_url.domain.root_domain in (
"hubspotlinks.com",
"mandrillapp.com",
"sendgrid.net",
)
+ )
)
- )
)
// Coinbase logo
and (
- any(attachments,
- .file_type in ('png', 'jpeg', 'jpg', 'bmp')
- and any(ml.logo_detect(.).brands, .name == "Coinbase")
- )
- or any(ml.logo_detect(beta.message_screenshot()).brands,
- .name == "Coinbase")
+ any(attachments,
+ .file_type in $file_types_images and any(ml.logo_detect(.).brands, .name == "Coinbase")
+ )
+ or any(ml.logo_detect(beta.message_screenshot()).brands, .name == "Coinbase")
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_contains_punycode_characters.yml b/detection-rules/link_contains_punycode_characters.yml
index b6602634cf6..961e9e9ad8a 100644
--- a/detection-rules/link_contains_punycode_characters.yml
+++ b/detection-rules/link_contains_punycode_characters.yml
@@ -9,7 +9,7 @@ authors:
severity: "medium"
source: |
type.inbound
- and any(body.links, .href_url.domain.punycode is not null)
+ and any(body.links, .href_url.domain.punycode is not null and .href_url.domain.valid == true)
and (
// include automated emails
sender.display_name == "WordPress"
@@ -17,12 +17,12 @@ source: |
// Has my organization ever sent an email to this sender?
or (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
)
or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
)
)
attack_types:
diff --git a/detection-rules/link_credential_phishing.yml b/detection-rules/link_credential_phishing.yml
index 4da5dafcea0..214ae9fda81 100644
--- a/detection-rules/link_credential_phishing.yml
+++ b/detection-rules/link_credential_phishing.yml
@@ -4,21 +4,21 @@ description: |
type: "rule"
severity: "high"
source: |
- type.inbound
- and any(body.links,
- beta.linkanalysis(.).credphish.disposition == "phishing"
- and beta.linkanalysis(.).credphish.confidence in ("medium", "high")
- )
+ type.inbound
+ and any(body.links,
+ beta.linkanalysis(.).credphish.disposition == "phishing"
+ and beta.linkanalysis(.).credphish.confidence in ("medium", "high")
+ )
// first-time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_credential_phishing_intent_and_other_indicators.yml b/detection-rules/link_credential_phishing_intent_and_other_indicators.yml
index f2ab0717bac..9a305f9ede5 100644
--- a/detection-rules/link_credential_phishing_intent_and_other_indicators.yml
+++ b/detection-rules/link_credential_phishing_intent_and_other_indicators.yml
@@ -7,292 +7,286 @@ source: |
type.inbound
and (
regex.icontains(subject.subject,
- "termination.*notice",
- "38417",
- ":completed",
- "[il1]{2}mit.*ma[il1]{2} ?bo?x",
- "[il][il][il]egai[ -]",
- "[li][li][li]ega[li] attempt",
- "[ng]-?[io]n .*block",
- "[ng]-?[io]n .*cancel",
- "[ng]-?[io]n .*deactiv",
- "[ng]-?[io]n .*disabl",
- "action.*required",
- "abandon.*package",
- "about.your.account",
- "acc(ou)?n?t (is )?on ho[li]d",
- "acc(ou)?n?t.*terminat",
- "acc(oun)?t.*[il1]{2}mitation",
- "access.*limitation",
- "account (will be )?block",
- "account.*de-?activat",
- "account.*locked",
- "account.*re-verification",
- "account.*security",
- "account.*suspension",
- "account.has.been",
- "account.has.expired",
- "account.will.be.blocked",
- "account v[il]o[li]at",
- "activity.*acc(oun)?t",
- "almost.full",
- "app[li]e.[il]d",
- "authenticate.*account",
- "been.*suspend",
- "clos.*of.*account.*processed",
- "confirm.your.account",
- "courier.*able",
- "deactivation.*in.*progress",
- "delivery.*attempt.*failed",
- "document.received",
- "documented.*shared.*with.*you",
- "dropbox.*document",
- "e-?ma[il1]+ .{010}suspen",
- "e-?ma[il1]{1} user",
- "e-?ma[il1]{2} acc",
- "e-?ma[il1]{2}.*up.?grade",
- "e.?ma[il1]{2}.*server",
- "e.?ma[il1]{2}.*suspend",
- "email.update",
- "faxed you",
- "fraud(ulent)?.*charge",
- "from.helpdesk",
- "fu[il1]{2}.*ma[il1]+[ -]?box",
- "has.been.*suspended",
- "has.been.limited",
- "have.locked",
- "he[li]p ?desk upgrade",
- "heipdesk",
- "i[il]iega[il]",
- "ii[il]ega[il]",
- "incoming e?mail",
- "incoming.*fax",
- "lock.*security",
- "ma[il1]{1}[ -]?box.*quo",
- "ma[il1]{2}[ -]?box.*fu[il1]",
- "ma[il1]{2}box.*[il1]{2}mit",
- "ma[il1]{2}box stor",
- "mail on.?hold",
- "mail.*box.*migration",
- "mail.*de-?activat",
- "mail.update.required",
- "mails.*pending",
- "messages.*pending",
- "missed.*shipping.*notification",
- "missed.shipment.notification",
- "must.update.your.account",
- "new [sl][io]g?[nig][ -]?in from",
- "new voice ?-?mail",
- "notifications.*pending",
- "office.*3.*6.*5.*suspend",
- "office365",
- "on google docs with you",
- "online doc",
- "password.*compromised",
- "periodic maintenance",
- "potential(ly)? unauthorized",
- "refund not approved",
- "report",
- "revised.*policy",
- "scam",
- "scanned.?invoice",
- "secured?.update",
- "security breach",
- "securlty",
- "signed.*delivery",
- "status of your .{314}? ?delivery",
- "susp[il1]+c[il1]+ous.*act[il1]+v[il1]+ty",
- "suspicious.*sign.*[io]n",
- "suspicious.activit",
- "temporar(il)?y deactivate",
- "temporar[il1]{2}y disab[li]ed",
- "temporarily.*lock",
- "un-?usua[li].activity",
- "unable.*deliver",
- "unauthorized.*activit",
- "unauthorized.device",
- "undelivered message",
- "unread.*doc",
- "unusual.activity",
- "upgrade.*account",
- "upgrade.notice",
- "urgent message",
- "urgent.verification",
- "v[il1]o[li1]at[il1]on security",
- "va[il1]{1}date.*ma[il1]{2}[ -]?box",
- "verification ?-?require",
- "verification( )?-?need",
- "verify.your?.account",
- "web ?-?ma[il1]{2}",
- "web[ -]?ma[il1]{2}",
- "will.be.suspended",
- "your (customer )?account .as",
- "your.office.365",
- "your.online.access",
- // https://github.com/sublime-security/static-files/blob/master/suspicious_subjects.txt
- "account has been limited",
- "action required",
- "almost full",
- "apd notifi cation",
- "are you at your desk",
- "are you available",
- "attached file to docusign",
- "banking is temporarily unavailable",
- "bankofamerica",
- "closing statement invoice",
- "completed: docusign",
- "de-activation of",
- "delivery attempt",
- "delivery stopped for shipment",
- "detected suspicious",
- "detected suspicious actvity",
- "docu sign",
- "document for you",
- "document has been sent to you via docusign",
- "document is ready for signature",
- "docusign",
- "encrypted message",
- "failed delivery",
- "fedex tracking",
- "file was shared",
- "freefax",
- "fwd: due invoice paid",
- "has shared",
- "inbox is full",
- "invitation to comment",
- "invitation to edit",
- "invoice due",
- "left you a message",
- "message from",
- "new message",
- "new voicemail",
- "on desk",
- "out of space",
- "password reset",
- "payment status",
- "quick reply",
- "re: w-2",
- "required",
- "required: completed docusign",
- "remittance",
- "ringcentral",
- "scanned image",
- "secured files",
- "secured pdf",
- "security alert",
- "new sign-in",
- "new sign in",
- "sign-in attempt",
- "sign in attempt",
- "staff review",
- "suspicious activity",
- "unrecognized login attempt",
- "upgrade immediately",
- "urgent",
- "wants to share",
- "w2",
- "you have notifications pending",
- "your account",
- "your amazon order",
- "your document settlement",
- "your order with amazon",
- "your password has been compromised",
+ "termination.*notice",
+ "38417",
+ ":completed",
+ "[il1]{2}mit.*ma[il1]{2} ?bo?x",
+ "[il][il][il]egai[ -]",
+ "[li][li][li]ega[li] attempt",
+ "[ng]-?[io]n .*block",
+ "[ng]-?[io]n .*cancel",
+ "[ng]-?[io]n .*deactiv",
+ "[ng]-?[io]n .*disabl",
+ "action.*required",
+ "abandon.*package",
+ "about.your.account",
+ "acc(ou)?n?t (is )?on ho[li]d",
+ "acc(ou)?n?t.*terminat",
+ "acc(oun)?t.*[il1]{2}mitation",
+ "access.*limitation",
+ "account (will be )?block",
+ "account.*de-?activat",
+ "account.*locked",
+ "account.*re-verification",
+ "account.*security",
+ "account.*suspension",
+ "account.has.been",
+ "account.has.expired",
+ "account.will.be.blocked",
+ "account v[il]o[li]at",
+ "activity.*acc(oun)?t",
+ "almost.full",
+ "app[li]e.[il]d",
+ "authenticate.*account",
+ "been.*suspend",
+ "clos.*of.*account.*processed",
+ "confirm.your.account",
+ "courier.*able",
+ "deactivation.*in.*progress",
+ "delivery.*attempt.*failed",
+ "document.received",
+ "documented.*shared.*with.*you",
+ "dropbox.*document",
+ "e-?ma[il1]+ .{010}suspen",
+ "e-?ma[il1]{1} user",
+ "e-?ma[il1]{2} acc",
+ "e-?ma[il1]{2}.*up.?grade",
+ "e.?ma[il1]{2}.*server",
+ "e.?ma[il1]{2}.*suspend",
+ "email.update",
+ "faxed you",
+ "fraud(ulent)?.*charge",
+ "from.helpdesk",
+ "fu[il1]{2}.*ma[il1]+[ -]?box",
+ "has.been.*suspended",
+ "has.been.limited",
+ "have.locked",
+ "he[li]p ?desk upgrade",
+ "heipdesk",
+ "i[il]iega[il]",
+ "ii[il]ega[il]",
+ "incoming e?mail",
+ "incoming.*fax",
+ "lock.*security",
+ "ma[il1]{1}[ -]?box.*quo",
+ "ma[il1]{2}[ -]?box.*fu[il1]",
+ "ma[il1]{2}box.*[il1]{2}mit",
+ "ma[il1]{2}box stor",
+ "mail on.?hold",
+ "mail.*box.*migration",
+ "mail.*de-?activat",
+ "mail.update.required",
+ "mails.*pending",
+ "messages.*pending",
+ "missed.*shipping.*notification",
+ "missed.shipment.notification",
+ "must.update.your.account",
+ "new [sl][io]g?[nig][ -]?in from",
+ "new voice ?-?mail",
+ "notifications.*pending",
+ "office.*3.*6.*5.*suspend",
+ "office365",
+ "on google docs with you",
+ "online doc",
+ "password.*compromised",
+ "periodic maintenance",
+ "potential(ly)? unauthorized",
+ "refund not approved",
+ "report",
+ "revised.*policy",
+ "scam",
+ "scanned.?invoice",
+ "secured?.update",
+ "security breach",
+ "securlty",
+ "signed.*delivery",
+ "status of your .{314}? ?delivery",
+ "susp[il1]+c[il1]+ous.*act[il1]+v[il1]+ty",
+ "suspicious.*sign.*[io]n",
+ "suspicious.activit",
+ "temporar(il)?y deactivate",
+ "temporar[il1]{2}y disab[li]ed",
+ "temporarily.*lock",
+ "un-?usua[li].activity",
+ "unable.*deliver",
+ "unauthorized.*activit",
+ "unauthorized.device",
+ "undelivered message",
+ "unread.*doc",
+ "unusual.activity",
+ "upgrade.*account",
+ "upgrade.notice",
+ "urgent message",
+ "urgent.verification",
+ "v[il1]o[li1]at[il1]on security",
+ "va[il1]{1}date.*ma[il1]{2}[ -]?box",
+ "verification ?-?require",
+ "verification( )?-?need",
+ "verify.your?.account",
+ "web ?-?ma[il1]{2}",
+ "web[ -]?ma[il1]{2}",
+ "will.be.suspended",
+ "your (customer )?account .as",
+ "your.office.365",
+ "your.online.access",
+ // https://github.com/sublime-security/static-files/blob/master/suspicious_subjects.txt
+ "account has been limited",
+ "action required",
+ "almost full",
+ "apd notifi cation",
+ "are you at your desk",
+ "are you available",
+ "attached file to docusign",
+ "banking is temporarily unavailable",
+ "bankofamerica",
+ "closing statement invoice",
+ "completed: docusign",
+ "de-activation of",
+ "delivery attempt",
+ "delivery stopped for shipment",
+ "detected suspicious",
+ "detected suspicious actvity",
+ "docu sign",
+ "document for you",
+ "document has been sent to you via docusign",
+ "document is ready for signature",
+ "docusign",
+ "encrypted message",
+ "failed delivery",
+ "fedex tracking",
+ "file was shared",
+ "freefax",
+ "fwd: due invoice paid",
+ "has shared",
+ "inbox is full",
+ "invitation to comment",
+ "invitation to edit",
+ "invoice due",
+ "left you a message",
+ "message from",
+ "new message",
+ "new voicemail",
+ "on desk",
+ "out of space",
+ "password reset",
+ "payment status",
+ "quick reply",
+ "re: w-2",
+ "required",
+ "required: completed docusign",
+ "remittance",
+ "ringcentral",
+ "scanned image",
+ "secured files",
+ "secured pdf",
+ "security alert",
+ "new sign-in",
+ "new sign in",
+ "sign-in attempt",
+ "sign in attempt",
+ "staff review",
+ "suspicious activity",
+ "unrecognized login attempt",
+ "upgrade immediately",
+ "urgent",
+ "wants to share",
+ "w2",
+ "you have notifications pending",
+ "your account",
+ "your amazon order",
+ "your document settlement",
+ "your order with amazon",
+ "your password has been compromised",
)
or regex.icontains(sender.display_name,
- "Admin",
- "Administrator",
- "Alert",
- "Assistant",
- "Billing",
- "Benefits",
- "Bonus",
- "CEO",
- "CFO",
- "CIO",
- "CTO",
- "Chairman",
- "Claim",
- "Confirm",
- "Critical",
- "Customer Service",
- "Deal",
- "Discount",
- "Director",
- "Exclusive",
- "Executive",
- "Fax",
- "Free",
- "Gift",
- "HR",
- "Helpdesk",
- "Human Resources",
- "Immediate",
- "Important",
- "Info",
- "Information",
- "Invoice",
- '\bIT\b',
- "Legal",
- "Lottery",
- "Management",
- "Manager",
- "Member Services",
- "Notification",
- "Offer",
- "Operations",
- "Order",
- "Partner",
- "Payment",
- "Payroll",
- "President",
- "Premium",
- "Prize",
- "Receipt",
- "Refund",
- "Registrar",
- "Required",
- "Reward",
- "Sales",
- "Secretary",
- "Security",
- "Service",
- "Support",
- "Sweepstakes",
- "System",
- "Tax",
- "Team",
- "Tech Support",
- "Update",
- "Upgrade",
- "Urgent",
- "Validate",
- "Verify",
- "VIP",
- "Webmaster",
- "Winner",
+ "Admin",
+ "Administrator",
+ "Alert",
+ "Assistant",
+ "Billing",
+ "Benefits",
+ "Bonus",
+ "CEO",
+ "CFO",
+ "CIO",
+ "CTO",
+ "Chairman",
+ "Claim",
+ "Confirm",
+ "Critical",
+ "Customer Service",
+ "Deal",
+ "Discount",
+ "Director",
+ "Exclusive",
+ "Executive",
+ "Fax",
+ "Free",
+ "Gift",
+ "HR",
+ "Helpdesk",
+ "Human Resources",
+ "Immediate",
+ "Important",
+ "Info",
+ "Information",
+ "Invoice",
+ '\bIT\b',
+ "Legal",
+ "Lottery",
+ "Management",
+ "Manager",
+ "Member Services",
+ "Notification",
+ "Offer",
+ "Operations",
+ "Order",
+ "Partner",
+ "Payment",
+ "Payroll",
+ "President",
+ "Premium",
+ "Prize",
+ "Receipt",
+ "Refund",
+ "Registrar",
+ "Required",
+ "Reward",
+ "Sales",
+ "Secretary",
+ "Security",
+ "Service",
+ "Support",
+ "Sweepstakes",
+ "System",
+ "Tax",
+ "Team",
+ "Tech Support",
+ "Update",
+ "Upgrade",
+ "Urgent",
+ "Validate",
+ "Verify",
+ "VIP",
+ "Webmaster",
+ "Winner",
)
)
and any(body.links,
- // is the recipient's email address in the URL?
- // this method accounts for any encoding we might encounter
- // in the query_params
- // this is common in link tracking, both for
- // benign marketing traffic but also attackers
- any(recipients.to,
- strings.icontains(..href_url.url, .email.local_part)
- and strings.icontains(..href_url.url, .email.domain.domain)
- )
- )
- and any(ml.nlu_classifier(coalesce(
- body.html.display_text, body.plain.raw)).intents,
- .name == "cred_theft"
- and .confidence in ("medium", "high")
+ // is the recipient's email address in the URL?
+ // this method accounts for any encoding we might encounter
+ // in the query_params
+ // this is common in link tracking, both for
+ // benign marketing traffic but also attackers
+ any(recipients.to,
+ strings.icontains(..href_url.url, .email.local_part)
+ and strings.icontains(..href_url.url, .email.domain.domain)
+ )
)
- and any(ml.nlu_classifier(coalesce(
- body.html.display_text, body.plain.raw)).entities,
- .name == "request"
+ and any(ml.nlu_classifier(body.current_thread.text).intents,
+ .name == "cred_theft" and .confidence in ("medium", "high")
)
-
+ and any(ml.nlu_classifier(body.current_thread.text).entities, .name == "request")
and (
// freemail providers should never be sending this type of email
sender.email.domain.domain in $free_email_providers
@@ -304,14 +298,14 @@ source: |
// first-time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_credential_phishing_language_ipfs.yml b/detection-rules/link_credential_phishing_language_ipfs.yml
index b94fc53e673..3879245c22c 100644
--- a/detection-rules/link_credential_phishing_language_ipfs.yml
+++ b/detection-rules/link_credential_phishing_language_ipfs.yml
@@ -8,22 +8,22 @@ source: |
and strings.ilike(body.html.display_text, "*expir*")
and strings.ilike(body.html.display_text, "*password*")
and any(ml.nlu_classifier(body.html.display_text).intents, .name == "cred_theft")
- and any(body.links,
- strings.icontains(beta.linkanalysis(.).effective_url.url, 'ipfs')
- or (
- regex.icontains(beta.linkanalysis(.).effective_url.path, '[\.-/]ipfs|ipfs[\.-/]')
- and beta.linkanalysis(.).effective_url.domain.domain not in $org_domains
- and (
- (
- // don't include high rep domains
- beta.linkanalysis(.).effective_url.domain.domain not in $tranco_1m
- and beta.linkanalysis(.).effective_url.domain.domain not in $umbrella_1m
- )
+ and any(body.links,
+ strings.icontains(beta.linkanalysis(.).effective_url.url, 'ipfs')
+ or (
+ regex.icontains(beta.linkanalysis(.).effective_url.path, '[\.-/]ipfs|ipfs[\.-/]')
+ and beta.linkanalysis(.).effective_url.domain.domain not in $org_domains
+ and (
+ (
+ // don't include high rep domains
+ beta.linkanalysis(.).effective_url.domain.domain not in $tranco_1m
+ and beta.linkanalysis(.).effective_url.domain.domain not in $umbrella_1m
+ )
// if it's in Tranco or Umbrella, still include it if it's one of these
or beta.linkanalysis(.).effective_url.domain.domain in $free_file_hosts
or beta.linkanalysis(.).effective_url.domain.root_domain in $free_subdomain_hosts
+ )
)
- )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_credential_phishing_secure_message.yml b/detection-rules/link_credential_phishing_secure_message.yml
index 51ae6b43e60..4cf9ed06d0b 100644
--- a/detection-rules/link_credential_phishing_secure_message.yml
+++ b/detection-rules/link_credential_phishing_secure_message.yml
@@ -5,7 +5,6 @@ type: "rule"
severity: "medium"
source: |
type.inbound
-
and any(ml.nlu_classifier(body.current_thread.text).intents,
.name == "cred_theft" and .confidence == "high"
)
@@ -21,6 +20,14 @@ source: |
// has at least 1 link
and length(body.links) > 0
+ // negate legitimate message senders
+ and (
+ sender.email.domain.root_domain not in ("protectedtrust.com")
+ and any(body.links,
+ .href_url.domain.root_domain != sender.email.domain.root_domain
+ )
+ )
+
// first-time sender
and (
(
diff --git a/detection-rules/link_credential_phishing_suspicious_sender_tld_and_signals.yml b/detection-rules/link_credential_phishing_suspicious_sender_tld_and_signals.yml
index b3fbdb5bcb6..f8d7ac3732c 100644
--- a/detection-rules/link_credential_phishing_suspicious_sender_tld_and_signals.yml
+++ b/detection-rules/link_credential_phishing_suspicious_sender_tld_and_signals.yml
@@ -15,7 +15,6 @@ source: |
// commonly abused sender TLD
and strings.ilike(sender.email.domain.tld, "*.jp")
-
and 3 of (
// language attempting to engage
any(ml.nlu_classifier(body.html.display_text).entities, .name == "request"),
@@ -30,36 +29,31 @@ source: |
any(body.links, regex.match(.href_url.path, '\/[a-z]{3}\d[a-z]')),
// suspicious image that's most likely cred_theft
- any(attachments, .file_type in~ ('bmp', 'png', 'jpg', 'jpeg')
- and any(file.explode(.),
- any(ml.nlu_classifier(.scan.ocr.raw).intents, .name == "cred_theft")
-
- or any(ml.nlu_classifier(.scan.ocr.raw).entities, .name == "financial")
- )
+ any(attachments,
+ .file_type in $file_types_images
+ and any(file.explode(.),
+ any(ml.nlu_classifier(.scan.ocr.raw).intents, .name == "cred_theft")
+ or any(ml.nlu_classifier(.scan.ocr.raw).entities, .name == "financial")
+ )
),
// recipient's SLD is in the sender's display name
- any(recipients.to,
- strings.icontains(sender.display_name, .email.domain.sld)
- ),
+ any(recipients.to, strings.icontains(sender.display_name, .email.domain.sld)),
// recipient's email address in the subject
- any(recipients.to,
- strings.icontains(subject.subject, .email.email)
- ),
-
+ any(recipients.to, strings.icontains(subject.subject, .email.email)),
)
// unsolicited
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_credential_phishing_voicemail_language.yml b/detection-rules/link_credential_phishing_voicemail_language.yml
index 7b446d465d4..0df96e25fe3 100644
--- a/detection-rules/link_credential_phishing_voicemail_language.yml
+++ b/detection-rules/link_credential_phishing_voicemail_language.yml
@@ -5,53 +5,44 @@ description: |
type: "rule"
severity: "medium"
source: |
- type.inbound
+ type.inbound
and length(body.links) > 0
-
+
// voicemail related
and (
- regex.icontains(coalesce(body.html.inner_text, body.html.display_text),
- 'voice\s?(mail|message|recording|call)'
- ) or (
- regex.icontains(subject.subject, 'voice\s?(mail|message|recording|call)')
- )
+ regex.icontains(body.current_thread.text, 'voice\s?(mail|message|recording|call)')
+ or (regex.icontains(subject.subject, 'voice\s?(mail|message|recording|call)'))
)
-
and 2 of (
- (
- any([body.plain.raw, body.html.inner_text],
- any(ml.nlu_classifier(.).intents,
- .name in ("cred_theft") and
- .confidence in ("medium", "high")
- )
- )
- ),
- (
- regex.icontains(sender.display_name, 'voice\s?(mail|message|recording|call)')
- ),
- (
- // sender domain matches no body domains
- all(body.links,
- .href_url.domain.root_domain != sender.email.domain.root_domain and
- .href_url.domain.root_domain not in $org_domains
- )
- ),
- (
- // recipient's SLD is in the sender's display name
- any(recipients.to,
- strings.icontains(sender.display_name, .email.domain.sld)
- )
- ),
+ (
+ any(ml.nlu_classifier(body.current_thread.text).intents,
+ .name in ("cred_theft") and .confidence in ("medium", "high")
+ )
+ ),
+ (regex.icontains(sender.display_name, 'voice\s?(mail|message|recording|call)')),
+ (
+ // sender domain matches no body domains
+ all(body.links,
+ .href_url.domain.root_domain != sender.email.domain.root_domain
+ and .href_url.domain.root_domain not in $org_domains
+ and .href_url.domain.root_domain not in ("unitelvoice.com", "googleapis.com", "dialmycalls.com")
+ )
+ ),
+ (
+ // recipient's SLD is in the sender's display name
+ any(recipients.to, strings.icontains(sender.display_name, .email.domain.sld))
+ ),
)
+ and sender.email.domain.root_domain not in ("magicjack.com", "unitelvoice.com")
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_deactivated_bitly.yml b/detection-rules/link_deactivated_bitly.yml
index c7d0fb33248..b0467b973d4 100644
--- a/detection-rules/link_deactivated_bitly.yml
+++ b/detection-rules/link_deactivated_bitly.yml
@@ -6,14 +6,12 @@ severity: "medium"
source: |
type.inbound
and any(body.links,
- // contains bit.ly link
- .href_url.domain.root_domain == "bit.ly"
- // link doesn't forward through
- and beta.linkanalysis(.).effective_url.domain.domain == "bit.ly"
- // blocked by bit.ly
- and strings.ilike(
- beta.linkanalysis(.).final_dom.display_text, "*link*blocked*"
- )
+ // contains bit.ly link
+ .href_url.domain.root_domain == "bit.ly"
+ // link doesn't forward through
+ and beta.linkanalysis(.).effective_url.domain.domain == "bit.ly"
+ // blocked by bit.ly
+ and strings.ilike(beta.linkanalysis(.).final_dom.display_text, "*link*blocked*")
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_download_disk_image_in_encrypted_zip.yml b/detection-rules/link_download_disk_image_in_encrypted_zip.yml
index 03c55ce08db..4d4019a331e 100644
--- a/detection-rules/link_download_disk_image_in_encrypted_zip.yml
+++ b/detection-rules/link_download_disk_image_in_encrypted_zip.yml
@@ -11,27 +11,29 @@ severity: "medium"
authors:
- twitter: "ajpc500"
source: |
- type.inbound
- and any(body.links,
- any(beta.linkanalysis(.).files_downloaded,
- any(
- file.explode(.), (
- any(.flavors.yara, . == "encrypted_zip") and
- any(.scan.zip.all_paths, any([".img", ".iso", ".vhd"], strings.ends_with(.., .)))
+ type.inbound
+ and any(body.links,
+ any(beta.linkanalysis(.).files_downloaded,
+ any(file.explode(.),
+ (
+ any(.flavors.yara, . == "encrypted_zip")
+ and any(.scan.zip.all_paths,
+ any([".img", ".iso", ".vhd"], strings.ends_with(.., .))
+ )
+ )
)
)
- )
)
// first-time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
tags:
- "Malfam: QakBot"
diff --git a/detection-rules/link_download_suspicious_file.yml b/detection-rules/link_download_suspicious_file.yml
index 51f23a46dad..969c0ef8cdb 100644
--- a/detection-rules/link_download_suspicious_file.yml
+++ b/detection-rules/link_download_suspicious_file.yml
@@ -14,36 +14,35 @@ severity: "medium"
source: |
type.inbound
and any(body.links,
- any(beta.linkanalysis(.).files_downloaded,
- any(file.explode(.),
- (
- // look for files in encrypted zips.
- // if password cracking the zip wasn't
- // successful, our only opportunity to look
- // for suspicious file types is here under
- // .zip.attempted_files
- "encrypted_zip" in .flavors.yara
-
- and any(.scan.zip.attempted_files,
- strings.ilike(., "*.lnk", "*.js", "*.vba", "*.vbs", "*.vbe")
+ any(beta.linkanalysis(.).files_downloaded,
+ any(file.explode(.),
+ (
+ // look for files in encrypted zips.
+ // if password cracking the zip wasn't
+ // successful, our only opportunity to look
+ // for suspicious file types is here under
+ // .zip.attempted_files
+ "encrypted_zip" in .flavors.yara
+ and any(.scan.zip.attempted_files,
+ strings.ilike(., "*.lnk", "*.js", "*.vba", "*.vbs", "*.vbe")
+ )
)
+ // for both non-encrypted zips and encrypted zips
+ // that were successfully cracked
+ or .file_extension in ("lnk", "js", "vba", "vbs", "vbe")
)
- // for both non-encrypted zips and encrypted zips
- // that were successfully cracked
- or .file_extension in ("lnk", "js", "vba", "vbs", "vbe")
)
- )
)
// unsolicited
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
+ )
)
attack_types:
- "Malware/Ransomware"
diff --git a/detection-rules/link_dynamics_form.yml b/detection-rules/link_dynamics_form.yml
index 57279577c92..d7c287edbb6 100644
--- a/detection-rules/link_dynamics_form.yml
+++ b/detection-rules/link_dynamics_form.yml
@@ -7,35 +7,38 @@ type: "rule"
severity: "high"
source: |
type.inbound
- and any(body.links, .href_url.domain.domain in ("ncv.microsoft.com", "customervoice.microsoft.com")
- and beta.linkanalysis(.).effective_url.domain.domain == "customervoice.microsoft.com"
+ and any(body.links,
+ .href_url.domain.domain in ("ncv.microsoft.com", "customervoice.microsoft.com")
+ and beta.linkanalysis(.).effective_url.domain.domain == "customervoice.microsoft.com"
- // confirm it is a form
- and any(beta.linkanalysis(.).final_dom.links, .href_url.domain.domain == "cdn.forms.office.net")
+ // confirm it is a form
+ and any(beta.linkanalysis(.).final_dom.links,
+ .href_url.domain.domain == "cdn.forms.office.net"
+ )
- // analyze for credential phishing signals
- and 1 of (
+ // analyze for credential phishing signals
+ and 1 of (
(
- // analyze the link
- any(file.explode(beta.linkanalysis(.).screenshot),
- any(ml.nlu_classifier(.scan.ocr.raw).intents,
- .name == "cred_theft" and .confidence != "low"
- )
+ // analyze the link
+ any(file.explode(beta.linkanalysis(.).screenshot),
+ any(ml.nlu_classifier(.scan.ocr.raw).intents,
+ .name == "cred_theft" and .confidence != "low"
)
+ )
),
(
- // analyze the HTML body
- any(ml.nlu_classifier(body.html.display_text).intents,
- .name == "cred_theft" and .confidence != "low"
- )
+ // analyze the HTML body
+ any(ml.nlu_classifier(body.html.display_text).intents,
+ .name == "cred_theft" and .confidence != "low"
+ )
),
(
- // analyze the plain body
- any(ml.nlu_classifier(body.plain.raw).intents,
- .name == "cred_theft" and .confidence != "low"
- )
+ // analyze the plain body
+ any(ml.nlu_classifier(body.plain.raw).intents,
+ .name == "cred_theft" and .confidence != "low"
+ )
)
- )
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_fake_fax_low_reputation.yml b/detection-rules/link_fake_fax_low_reputation.yml
index 0bf72f79c40..0974ab392d0 100644
--- a/detection-rules/link_fake_fax_low_reputation.yml
+++ b/detection-rules/link_fake_fax_low_reputation.yml
@@ -10,60 +10,50 @@ source: |
and 0 < length(body.links) < 5
and sender.email.domain.root_domain not in $org_domains
and any(body.links,
- (
- .href_url.domain.domain not in $tranco_1m or
- .href_url.domain.domain in $free_file_hosts or
- .href_url.domain.root_domain in $free_subdomain_hosts or
- .href_url.domain.domain in $url_shorteners or
-
- // mass mailer link, masks the actual URL
- .href_url.domain.root_domain in (
- "hubspotlinks.com",
- "mandrillapp.com",
- "sendgrid.net",
+ (
+ .href_url.domain.domain not in $tranco_1m
+ or .href_url.domain.domain in $free_file_hosts
+ or .href_url.domain.root_domain in $free_subdomain_hosts
+ or .href_url.domain.domain in $url_shorteners
+ or
+
+ // mass mailer link, masks the actual URL
+ .href_url.domain.root_domain in ("hubspotlinks.com", "mandrillapp.com", "sendgrid.net", )
)
- )
)
-
+
// any brand logo detected
and (
- any(attachments,
- .file_type in ('png', 'jpeg', 'jpg', 'bmp')
- and any(ml.logo_detect(.).brands, .name is not null)
- )
- or any(ml.logo_detect(beta.message_screenshot()).brands,
- .name is not null)
+ any(attachments,
+ .file_type in $file_types_images and any(ml.logo_detect(.).brands, .name is not null)
+ )
+ or any(ml.logo_detect(beta.message_screenshot()).brands, .name is not null)
)
-
+
// Subject or sender contains fax
- and (
- strings.icontains(subject.subject, "fax") or
- strings.icontains(sender.display_name, "fax")
- )
-
+ and (strings.icontains(subject.subject, "fax") or strings.icontains(sender.display_name, "fax"))
+
// suspicious content
and (
- strings.ilike(body.plain.raw, "*fax*")
- or (
- any(attachments,
- .file_type in ('png', 'jpeg', 'jpg', 'bmp')
- and any(file.explode(.),
- strings.ilike(.scan.ocr.raw, "*fax*")
- )
- )
+ strings.ilike(body.plain.raw, "*fax*")
+ or (
+ any(attachments,
+ .file_type in $file_types_images
+ and any(file.explode(.), strings.ilike(.scan.ocr.raw, "*fax*"))
)
+ )
)
-
+
// first time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_fake_thread_nlu_financial_request.yml b/detection-rules/link_fake_thread_nlu_financial_request.yml
index 4f52fb5e712..6531d54e6b2 100644
--- a/detection-rules/link_fake_thread_nlu_financial_request.yml
+++ b/detection-rules/link_fake_thread_nlu_financial_request.yml
@@ -3,65 +3,72 @@ description: "Detects fake message threads with suspicious links and financial r
type: "rule"
severity: "medium"
source: |
- type.inbound
-
+ type.inbound
+ and length(body.links) < 10
// suspicious link
and any(body.links,
- .href_url.domain.root_domain not in $tranco_1m and
- .href_url.domain.domain not in $umbrella_1m
+ .href_url.domain.root_domain not in $tranco_1m
+ and .href_url.domain.domain not in $umbrella_1m
)
-
+
// fake thread check
- and (
- strings.istarts_with(subject.subject, "RE:")
- or strings.istarts_with(subject.subject, "FWD:")
- )
-
+ and (strings.istarts_with(subject.subject, "RE:") or strings.istarts_with(subject.subject, "FWD:"))
+
// Check for the Presence of References or In-Reply-To properties
and (
- (
- length(headers.references) == 0
- and headers.in_reply_to is null
- )
- or (
- not any(headers.hops, any(.fields, strings.ilike(.name, "In-Reply-To")))
- and not any(headers.hops, strings.ilike(.signature.headers, "*:reply-to"))
- )
+ (length(headers.references) == 0 and headers.in_reply_to is null)
+ or (
+ not any(headers.hops, any(.fields, strings.ilike(.name, "In-Reply-To")))
+ and not any(headers.hops, strings.ilike(.signature.headers, "*:reply-to"))
+ )
)
-
+
// sender's domain is not in body, and body has > 0 links
and length(body.links) > 0
and sender.email.domain.root_domain not in $free_email_providers
and not any(body.links, .href_url.domain.root_domain == sender.email.domain.root_domain)
-
+
// unusual sender (email address rarely sends to your organization)
and sender.email.email not in $sender_emails
-
+
// unusual sender domain (domain rarely sends to your organization)
and sender.email.domain.domain not in $sender_domains
-
- and 2 of (
+ and 4 of (
// language attempting to engage
- any(ml.nlu_classifier(body.html.inner_text).entities, .name == "request"),
-
- // financial request
- any(ml.nlu_classifier(body.html.inner_text).entities, .name == "financial"),
-
+ (
+ any(ml.nlu_classifier(body.current_thread.text).entities, .name == "request")
+ and any(ml.nlu_classifier(body.current_thread.text).entities, .name == "financial")
+ ),
+
+ // invoicing language
+ any(ml.nlu_classifier(body.current_thread.text).tags, .name == "invoice"),
+
// urgency request
- any(ml.nlu_classifier(body.html.inner_text).entities, .name == "urgency"),
-
+ any(ml.nlu_classifier(body.current_thread.text).entities, .name == "urgency"),
+
// cred_theft detection
- any(ml.nlu_classifier(body.html.inner_text).intents, .name == "cred_theft" and .confidence in~ ("medium", "high")),
-
+ any(ml.nlu_classifier(body.current_thread.text).intents,
+ .name == "cred_theft" and .confidence in~ ("medium", "high")
+ ),
+
// commonly abused sender TLD
strings.ilike(sender.email.domain.tld, "*.jp"),
-
+
+ // headers traverse abused TLD
+ any(headers.domains, strings.ilike(.tld, "*.jp")),
+
// known suspicious pattern in the URL path
any(body.links, regex.match(.href_url.path, '\/[a-z]{3}\d[a-z]')),
-
+
// link display text is in all caps
any(body.links, regex.match(.display_text, '[A-Z ]+')),
-
+
+ // display name contains an email
+ regex.contains(sender.display_name, '[a-z0-9]+@[a-z]+'),
+
+ // Sender domain is empty
+ sender.email.domain.domain == "",
+
// sender domain matches no body domains
all(body.links, .href_url.domain.root_domain != sender.email.domain.root_domain),
)
diff --git a/detection-rules/link_firebase_new_domain_redirect.yml b/detection-rules/link_firebase_new_domain_redirect.yml
index 56770e6e0dd..f08ddba7daa 100644
--- a/detection-rules/link_firebase_new_domain_redirect.yml
+++ b/detection-rules/link_firebase_new_domain_redirect.yml
@@ -7,11 +7,11 @@ authors:
- twitter: "ajpc500"
severity: "low"
source: |
- type.inbound and
- any(body.links,
- .href_url.domain.root_domain =~ "goo.gl" and
- strings.icontains(.href_url.domain.domain, "app") and
- any(beta.linkanalysis(.).redirect_history, beta.whois(.domain).days_old < 7)
+ type.inbound
+ and any(body.links,
+ .href_url.domain.root_domain =~ "goo.gl"
+ and strings.icontains(.href_url.domain.domain, "app")
+ and any(beta.linkanalysis(.).redirect_history, beta.whois(.domain).days_old < 7)
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_google_amp_suspicious_indicators.yml b/detection-rules/link_google_amp_suspicious_indicators.yml
index 69b2c6eb4ea..21209aa3456 100644
--- a/detection-rules/link_google_amp_suspicious_indicators.yml
+++ b/detection-rules/link_google_amp_suspicious_indicators.yml
@@ -10,17 +10,17 @@ severity: "medium"
source: |
type.inbound
- // Any body links with a domain SLD of 'google' and a path starting with /amp/s
+ // Any body links with a domain SLD of 'google' and a path starting with /amp
and any(body.links,
.href_url.domain.sld == "google"
- and strings.starts_with(.href_url.path, "/amp/s/")
+ and strings.starts_with(.href_url.path, "/amp/")
// Brand Logo detected that is not google
and (
any(ml.logo_detect(beta.message_screenshot()).brands,
.name is not null and .name != "Google"
)
-
+
// or the page has a login or captcha
or (
beta.linkanalysis(.).credphish.contains_login
@@ -38,7 +38,7 @@ source: |
any(ml.nlu_classifier(.scan.ocr.raw).intents,
.name == "cred_theft" and .confidence in ("medium", "high")
)
-
+
// captcha partially loaded
or strings.icontains(.scan.ocr.raw, "Checking if the site connection is secure")
)
diff --git a/detection-rules/link_google_apps_script_macro.yml b/detection-rules/link_google_apps_script_macro.yml
index 455c236c8c7..646a0a9f669 100644
--- a/detection-rules/link_google_apps_script_macro.yml
+++ b/detection-rules/link_google_apps_script_macro.yml
@@ -8,19 +8,19 @@ type: "rule"
severity: "medium"
source: |
type.inbound
- and any(body.links, .href_url.domain.domain == "script.google.com"
- and strings.ilike(.href_url.path, "/macros*")
+ and any(body.links,
+ .href_url.domain.domain == "script.google.com" and strings.ilike(.href_url.path, "/macros*")
)
// first-time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_google_comment_script_macro.yml b/detection-rules/link_google_comment_script_macro.yml
index f3b769a83de..89ea228a3df 100644
--- a/detection-rules/link_google_comment_script_macro.yml
+++ b/detection-rules/link_google_comment_script_macro.yml
@@ -9,18 +9,18 @@ type: "rule"
severity: "medium"
source: |
type.inbound
- and regex.contains(
- sender.display_name, '\(Google (Slides|Docs)')
+ and regex.contains(sender.display_name, '\(Google (Slides|Docs)')
and any(body.links,
- .href_url.domain.domain == "script.google.com"
- and strings.ilike(.href_url.path, "/macros*")
+ .href_url.domain.domain == "script.google.com" and strings.ilike(.href_url.path, "/macros*")
)
and 1 of (
strings.ilike(body.plain.raw, '*you have ? hours*'),
strings.ilike(body.plain.raw, '*transfer of funds*'),
strings.ilike(body.plain.raw, '*order your funds*')
// Or the Sender Display Name is not in your Org Display Names
- or not any($org_display_names, strings.istarts_with(sender.display_name, strings.concat(., " (Google ")))
+ or not any($org_display_names,
+ strings.istarts_with(sender.display_name, strings.concat(., " (Google "))
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_google_fake_sign_in_image_lure.yml b/detection-rules/link_google_fake_sign_in_image_lure.yml
index 0f7f8a25679..8f0d8bd3aa6 100644
--- a/detection-rules/link_google_fake_sign_in_image_lure.yml
+++ b/detection-rules/link_google_fake_sign_in_image_lure.yml
@@ -6,33 +6,32 @@ severity: "high"
source: |
type.inbound
and length(body.links) > 0
-
+
// Google Logo in Attachment
and any(attachments,
- .file_type in ('png', 'jpeg', 'jpg', 'bmp')
- and any(ml.logo_detect(.).brands, .name in ("Google"))
+ .file_type in $file_types_images and any(ml.logo_detect(.).brands, .name in ("Google"))
)
and any(attachments,
- .file_type in~ ('bmp', 'png', 'jpg', 'jpeg')
- and (
- any(file.explode(.),
- // Fake activity warning
- length(filter(.scan.strings.strings, strings.ilike(.,
- "*new sign-in*",
- "*google account*",
- "*secure your account*",
- "*check activity*"
- ))) >= 3
+ .file_type in $file_types_images
+ and (
+ any(file.explode(.),
+ // Fake activity warning
+ 3 of (
+ strings.ilike(.scan.ocr.raw, "*new sign-in*"),
+ strings.ilike(.scan.ocr.raw, "*google account*"),
+ strings.ilike(.scan.ocr.raw, "*secure your account*"),
+ strings.ilike(.scan.ocr.raw, "*check activity*"),
+ )
+ )
)
- )
)
-
+
// legitimate sign-in warnings contains links to google, gmail or googleapis.com
and (
- not all(body.links,
- .href_url.domain.root_domain in ("google.com", "gmail.com", "googleapis.com")
- or .href_url.domain.root_domain is null
- )
+ not all(body.links,
+ .href_url.domain.root_domain in ("google.com", "gmail.com", "googleapis.com")
+ or .href_url.domain.root_domain is null
+ )
)
and sender.email.domain.root_domain not in $org_domains
and sender.email.domain.root_domain != "google.com"
diff --git a/detection-rules/link_google_open_redirect_with_suspicious_indicators.yml b/detection-rules/link_google_open_redirect_with_suspicious_indicators.yml
new file mode 100644
index 00000000000..e91911a9a39
--- /dev/null
+++ b/detection-rules/link_google_open_redirect_with_suspicious_indicators.yml
@@ -0,0 +1,82 @@
+name: "Open Redirect: Google domain with /url path and suspicious indicators"
+description: |
+ This rule examines messages containing image attachments that utilize Google's open redirect (google[.]com/url...).
+ To enhance accuracy and minimize false positives, the rule conducts additional assessments for suspicious indicators, as indicated in the comments.
+type: "rule"
+severity: "medium"
+source: |
+ type.inbound
+ // All attachments are images
+ and length(attachments) > 0
+ and all(attachments, .file_type in $file_types_images)
+ and sender.email.domain.root_domain not in $org_domains
+
+ // not a reply
+ and (
+ length(headers.references) == 0
+ or not any(headers.hops, any(.fields, strings.ilike(.name, "In-Reply-To")))
+ )
+ // With a Google Redirect
+ and any(body.links,
+ .href_url.domain.sld == "google"
+ and .href_url.path == "/url"
+ and regex.contains(.href_url.query_params, "hl=.{2}&q=http(s)?://")
+ )
+ and 2 of (
+ // Not a google logo
+ any(attachments,
+ .file_type in $file_types_images
+ and (
+ any(ml.logo_detect(.).brands, not strings.starts_with(.name, "Google"))
+ or any(ml.logo_detect(beta.message_screenshot()).brands,
+ not strings.starts_with(.name, "Google")
+ )
+ )
+ ),
+ // Body analysis - NLU - Credential theft
+ (
+ any(ml.nlu_classifier(body.current_thread.text).intents,
+ .name == "cred_theft" and .confidence in~ ("medium", "high")
+ )
+ ),
+ // Image analysis - NLU - Credential theft language
+ (
+ any(attachments,
+ .file_type in $file_types_images
+ and any(file.explode(.),
+ any(ml.nlu_classifier(.scan.ocr.raw).intents, .name == "cred_theft")
+ )
+ )
+ ),
+ // Content analysis - Body - Urgency
+ (
+ any(ml.nlu_classifier(body.current_thread.text).entities, .name == "urgency")
+ ),
+
+ // White font is found in html raw
+ (
+ length(body.html.display_text) < 500
+ and regex.icontains(body.html.raw,
+ ' 0 and
+ // There are files downloaded
+ length(beta.linkanalysis(.).files_downloaded) > 0
+ and
- // Adobe branding
- beta.linkanalysis(.).credphish.brand.name == "Adobe" and
- beta.linkanalysis(.).credphish.brand.confidence == "high" and
+ // Adobe branding
+ beta.linkanalysis(.).credphish.brand.name == "Adobe"
+ and beta.linkanalysis(.).credphish.brand.confidence == "high"
+ and
- // Qakbot text for user coercion
- any(file.explode(beta.linkanalysis(.).screenshot),
- all([
- "the file is not displayed correctly",
- "document password"
- ], strings.icontains(..scan.ocr.raw, .))
- )
+ // Qakbot text for user coercion
+ any(file.explode(beta.linkanalysis(.).screenshot),
+ all(["the file is not displayed correctly", "document password"],
+ strings.icontains(..scan.ocr.raw, .)
+ )
+ )
)
// unsolicited
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
- )
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
+ )
+ )
tags:
- "Malfam: QakBot"
attack_types:
diff --git a/detection-rules/link_html_smuggling_with_google_drive_branding.yml b/detection-rules/link_html_smuggling_with_google_drive_branding.yml
index 9998b9f2052..0038b4ffdf7 100644
--- a/detection-rules/link_html_smuggling_with_google_drive_branding.yml
+++ b/detection-rules/link_html_smuggling_with_google_drive_branding.yml
@@ -7,37 +7,40 @@ references:
- "https://twitter.com/pr0xylife/status/1598016053787123713"
severity: "high"
source: |
- type.inbound and
- any(body.links,
- // This isn't a Google Drive link
- .href_url.domain.root_domain != "google.com" and
-
- // There are files downloaded
- length(beta.linkanalysis(.).files_downloaded) > 0 and
-
- // Google Drive branding
- beta.linkanalysis(.).credphish.brand.name == "GoogleDrive" and
- beta.linkanalysis(.).credphish.brand.confidence == "high" and
+ type.inbound
+ and length(body.links) < 10
+ and any(body.links,
+ // This isn't a Google Drive link
+ .href_url.domain.root_domain != "google.com"
+ and
- // Hi from Qakbot
- any(file.explode(beta.linkanalysis(.).screenshot),
- any([
- "the file is not displayed correctly",
- "use local downloaded file"
- ], strings.icontains(..scan.ocr.raw, .))
- )
+ // There are files downloaded
+ length(beta.linkanalysis(.).files_downloaded) > 0
+ and
+
+ // Google Drive branding
+ beta.linkanalysis(.).credphish.brand.name == "GoogleDrive"
+ and beta.linkanalysis(.).credphish.brand.confidence == "high"
+ and
+
+ // Hi from Qakbot
+ any(file.explode(beta.linkanalysis(.).screenshot),
+ any(["the file is not displayed correctly", "use local downloaded file"],
+ strings.icontains(..scan.ocr.raw, .)
+ )
+ )
)
// Unsolicited
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
- )
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
+ )
+ )
tags:
- "Malfam: QakBot"
attack_types:
diff --git a/detection-rules/link_invoice_fake_customer_service_freemail_sender.yml b/detection-rules/link_invoice_fake_customer_service_freemail_sender.yml
index 7e41ca94b07..bd50ed86d42 100644
--- a/detection-rules/link_invoice_fake_customer_service_freemail_sender.yml
+++ b/detection-rules/link_invoice_fake_customer_service_freemail_sender.yml
@@ -6,12 +6,19 @@ severity: "low"
authors:
- twitter: "vector_sec"
source: |
- type.inbound
+ type.inbound
and sender.email.domain.root_domain in $free_email_providers
- and any(body.links,
- .display_text == "Unsubscribe" and
- (length(.href_url.query_params) == 0 or .href_url.query_params is null) and
- (.href_url.path == "/" or .href_url.path is null or (.href_url.domain.root_domain == "google.com" and not strings.ilike(.href_url.path, "*/forms/*")))
+ and any(body.links,
+ .display_text == "Unsubscribe"
+ and (length(.href_url.query_params) == 0 or .href_url.query_params is null)
+ and (
+ .href_url.path == "/"
+ or .href_url.path is null
+ or (
+ .href_url.domain.root_domain == "google.com"
+ and not strings.ilike(.href_url.path, "*/forms/*")
+ )
+ )
)
// First time sender exclusions are in place to avoid legitimate messages from known freemail senders.
and sender.email.email not in $sender_emails
diff --git a/detection-rules/link_ipfs_phishing.yml b/detection-rules/link_ipfs_phishing.yml
index 668f3492769..bb6973c2c02 100644
--- a/detection-rules/link_ipfs_phishing.yml
+++ b/detection-rules/link_ipfs_phishing.yml
@@ -7,42 +7,40 @@ type: "rule"
severity: "medium"
source: |
type.inbound
-
and any(body.links,
- // Any body link domains contain "ipfs"
- strings.icontains(.href_url.domain.domain, "ipfs")
+ // Any body link domains contain "ipfs"
+ strings.icontains(.href_url.domain.domain, "ipfs")
- // Or the path contains ipfs anchored to a leading or trailing '-', '/', '.'
- or (
- regex.icontains(.href_url.query_params, '[\.-/]ipfs|ipfs[\.-/]')
- and .href_url.domain.domain not in $org_domains
- and (
- (
+ // Or the path contains ipfs anchored to a leading and trailing '-', '/', '.'
+ or (
+ regex.icontains(.href_url.query_params, '[\.-/]ipfs[\.-/]')
+ and .href_url.domain.domain not in $org_domains
+ and (
+ (
// don't include high rep domains
.href_url.domain.domain not in $tranco_1m
and .href_url.domain.domain not in $umbrella_1m
+ )
+ // if it's in Tranco or Umbrella, still include it if it's one of these
+ or .href_url.domain.domain in $free_file_hosts
+ or .href_url.domain.root_domain in $free_subdomain_hosts
)
- // if it's in Tranco or Umbrella, still include it if it's one of these
- or .href_url.domain.domain in $free_file_hosts
- or .href_url.domain.root_domain in $free_subdomain_hosts
- )
- )
+ )
)
// adding negation block for legitimate domains with ipfs in their name
-
and not sender.email.domain.domain in ("shipfsl.com")
// unsolicited
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_login_or_captcha.yml b/detection-rules/link_login_or_captcha.yml
index 28342feeed5..5e9aed2b023 100644
--- a/detection-rules/link_login_or_captcha.yml
+++ b/detection-rules/link_login_or_captcha.yml
@@ -5,26 +5,25 @@ type: "rule"
severity: "high"
source: |
type.inbound
+ and any(body.links,
- and any(body.links,
-
- // contains login or captcha
- (
- beta.linkanalysis(.).credphish.contains_login
- or beta.linkanalysis(.).credphish.contains_captcha
- )
+ // contains login or captcha
+ (
+ beta.linkanalysis(.).credphish.contains_login
+ or beta.linkanalysis(.).credphish.contains_captcha
+ )
- // either the original or the redirect is a free subdomain
- and (
- beta.linkanalysis(.).effective_url.domain.root_domain in $free_subdomain_hosts
- or .href_url.domain.root_domain in $free_subdomain_hosts
- )
+ // either the original or the redirect is a free subdomain
+ and (
+ beta.linkanalysis(.).effective_url.domain.root_domain in $free_subdomain_hosts
+ or .href_url.domain.root_domain in $free_subdomain_hosts
+ )
- // exclude FP prone free subdomain hosts
- // if it's a known brand impersonation, we'll detect it in other rules
- and .href_url.domain.root_domain not in ("zendesk.com")
- and beta.linkanalysis(.).effective_url.domain.root_domain not in ("zendesk.com")
- and beta.linkanalysis(.).effective_url.domain.domain not in ("login.squarespace.com")
+ // exclude FP prone free subdomain hosts
+ // if it's a known brand impersonation, we'll detect it in other rules
+ and .href_url.domain.root_domain not in ("zendesk.com")
+ and beta.linkanalysis(.).effective_url.domain.root_domain not in ("zendesk.com")
+ and beta.linkanalysis(.).effective_url.domain.domain not in ("login.squarespace.com")
)
// exclude FP prone senders
@@ -32,14 +31,14 @@ source: |
// first-time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_microsoft_device_code_phish.yml b/detection-rules/link_microsoft_device_code_phish.yml
index 50111ea8102..6553b9b081d 100644
--- a/detection-rules/link_microsoft_device_code_phish.yml
+++ b/detection-rules/link_microsoft_device_code_phish.yml
@@ -18,27 +18,30 @@ source: |
and sender.email.domain.root_domain not in~ ("microsoft.com", "microsoftonline.com")
// Link to the device code MS pages
- and any(body.links, (
- .href_url.url == "https://microsoft.com/devicelogin" or
- .href_url.url == "https://login.microsoftonline.com/common/oauth2/deviceauth")
+ and any(body.links,
+ (
+ .href_url.url == "https://microsoft.com/devicelogin"
+ or .href_url.url == "https://login.microsoftonline.com/common/oauth2/deviceauth"
+ )
)
// Body text references device codes
and (
- strings.icontains(body.html.display_text, "device code") or
- // A nine character string containing a combination of letters and characters
- regex.icontains(body.html.display_text, '[\W]([A-Z0-9]{9})[\W]')
+ strings.icontains(body.html.display_text, "device code")
+ or
+ // A nine character string containing a combination of letters and characters
+ regex.icontains(body.html.display_text, '[\W]([A-Z0-9]{9})[\W]')
)
// Unsolicited
and (
(
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
)
or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
)
)
attack_types:
diff --git a/detection-rules/link_microsoft_go2_open_redirect_phish.yml b/detection-rules/link_microsoft_go2_open_redirect_phish.yml
index 82d692fcfb2..086b84a39bd 100644
--- a/detection-rules/link_microsoft_go2_open_redirect_phish.yml
+++ b/detection-rules/link_microsoft_go2_open_redirect_phish.yml
@@ -8,20 +8,22 @@ source: |
type.inbound
// url path ends with go2.aspx
+ and any(body.links,
+ strings.ends_with(.href_url.path, "go2.aspx")
- and any(body.links, strings.ends_with(.href_url.path, "go2.aspx")
-
- // query params from href_url or beta.linkanalysis contain a redirection string ending with a base64
- // pattern intended to capture an encoded email passed as an additional parameter
-
- and (regex.contains(.href_url.query_params,
- '[a-z]=[a-z0-9-]+\.[a-z]{2,3}.+[A-Za-z0-9+/=]$|=[^=]$|={3,}$')
- or regex.icontains(beta.linkanalysis(.).effective_url.query_params,
- '[a-z]=[a-z0-9-]+\.[a-z]{2,3}.+[A-Za-z0-9+/=]$|=[^=]$|={3,}$'))
+ // query params from href_url or beta.linkanalysis contain a redirection string ending with a base64
+ // pattern intended to capture an encoded email passed as an additional parameter
+ and (
+ regex.contains(.href_url.query_params,
+ '[a-z]=[a-z0-9-]+\.[a-z]{2,3}.+[A-Za-z0-9+/=]$|=[^=]$|={3,}$'
+ )
+ or regex.icontains(beta.linkanalysis(.).effective_url.query_params,
+ '[a-z]=[a-z0-9-]+\.[a-z]{2,3}.+[A-Za-z0-9+/=]$|=[^=]$|={3,}$'
+ )
+ )
)
and headers.mailer is null
- and regex.icontains(body.html.inner_text,
- '(i͏c͏r͏os͏of͏|icrosof)|(office|o)\s?365')
+ and regex.icontains(body.html.inner_text, '(i͏c͏r͏os͏of͏|icrosof)|(office|o)\s?365')
attack_types:
- "Credential Phishing"
tactics_and_techniques:
diff --git a/detection-rules/link_microsoft_impersonation_using_hosted_png.yml b/detection-rules/link_microsoft_impersonation_using_hosted_png.yml
index 56a8df0da3f..1469d86d458 100644
--- a/detection-rules/link_microsoft_impersonation_using_hosted_png.yml
+++ b/detection-rules/link_microsoft_impersonation_using_hosted_png.yml
@@ -14,7 +14,9 @@ source: |
and sender.email.domain.root_domain not in~ ('microsoft.com', 'microsoftsupport.com', 'office.com')
// logo hosted on microsoft.com
- and any(body.links, regex.icontains(.display_url.url, '.{0,50}microsoft\.com\/.{0,70}logo.{0,25}\.png'))
+ and any(body.links,
+ regex.icontains(.display_url.url, '.{0,50}microsoft\.com\/.{0,70}logo.{0,25}\.png')
+ )
// and at least one link display text is in all caps
and any(body.links, regex.icontains(.display_text, '[VIEW|CLICK|DOWNLOAD|CHECK]'))
@@ -23,7 +25,10 @@ source: |
and any(ml.nlu_classifier(body.html.inner_text).entities, .name == "request")
// sender domain matches no body domains
- and not any(body.links, .href_url.domain.root_domain == sender.email.domain.root_domain and .href_url.domain.root_domain not in $tranco_1m)
+ and not any(body.links,
+ .href_url.domain.root_domain == sender.email.domain.root_domain
+ and .href_url.domain.root_domain not in $tranco_1m
+ )
// org domain in the subject of the message
and any($org_domains, strings.icontains(subject.subject, .))
diff --git a/detection-rules/link_microsoft_low_reputation.yml b/detection-rules/link_microsoft_low_reputation.yml
index 8c1f579ea3e..3579bb944e5 100644
--- a/detection-rules/link_microsoft_low_reputation.yml
+++ b/detection-rules/link_microsoft_low_reputation.yml
@@ -6,90 +6,130 @@ source: |
type.inbound
// suspicious link
and any(body.links,
- (
- .href_url.domain.domain not in $tranco_1m or
- .href_url.domain.domain in $free_file_hosts or
- .href_url.domain.root_domain in $free_subdomain_hosts or
- .href_url.domain.domain in $url_shorteners or
+ (
+ .href_url.domain.root_domain not in $tranco_1m
+ or .href_url.domain.domain in $free_file_hosts
+ or .href_url.domain.root_domain in $free_subdomain_hosts
+ or .href_url.domain.domain in $url_shorteners
+ or
- // mass mailer link, masks the actual URL
- .href_url.domain.root_domain in (
- "hubspotlinks.com",
- "mandrillapp.com",
- "sendgrid.net"
+ // mass mailer link, masks the actual URL
+ .href_url.domain.root_domain in ("hubspotlinks.com", "mandrillapp.com", "sendgrid.net")
+
+ // Google AMP redirect
+ or (
+ .href_url.domain.sld == "google"
+ and strings.starts_with(.href_url.path, "/amp/")
+ )
+ )
+
+ // exclude sources of potential FPs
+ and .href_url.domain.root_domain not in (
+ "svc.ms",
+ "sharepoint.com",
+ "1drv.ms",
+ "microsoft.com"
)
- )
-
- // exclude sources of potential FPs
- and .href_url.domain.root_domain not in ("svc.ms", "sharepoint.com", "1drv.ms", "microsoft.com")
)
// not a reply
and (
- length(headers.references) == 0
- or not any(headers.hops, any(.fields, strings.ilike(.name, "In-Reply-To")))
+ length(headers.references) == 0
+ or not any(headers.hops, any(.fields, strings.ilike(.name, "In-Reply-To")))
)
// Microsoft logo
-
and (
- any(attachments,
- .file_type in ('png', 'jpeg', 'jpg', 'bmp')
- and any(ml.logo_detect(.).brands, strings.starts_with(.name, "Microsoft"))
- )
- or any(ml.logo_detect(beta.message_screenshot()).brands,
- strings.starts_with(.name, "Microsoft")
- )
+ any(attachments,
+ .file_type in $file_types_images
+ and any(ml.logo_detect(.).brands, strings.starts_with(.name, "Microsoft"))
+ )
+ or any(ml.logo_detect(beta.message_screenshot()).brands, strings.starts_with(.name, "Microsoft"))
)
// suspicious content
and (
- (
- strings.ilike(body.plain.raw, "*password*", "*document*", "*voicemail*", "*cache*", "*fax*", "*storage*", "*quota*", "*messages*")
- and strings.ilike(body.plain.raw, "*terminated*", "*review*", "*expire*", "*click*", "*view*", "*exceed*", "*clear*", "*only works*", "*failed*", "*deleted*")
+ (
+ strings.ilike(body.plain.raw,
+ "*password*",
+ "*document*",
+ "*voicemail*",
+ "*cache*",
+ "*fax*",
+ "*storage*",
+ "*quota*",
+ "*messages*"
)
- or (
- any(attachments,
- .file_type in ('png', 'jpeg', 'jpg', 'bmp')
+ and strings.ilike(body.plain.raw,
+ "*terminated*",
+ "*review*",
+ "*expire*",
+ "*click*",
+ "*view*",
+ "*exceed*",
+ "*clear*",
+ "*only works*",
+ "*failed*",
+ "*deleted*"
+ )
+ )
+ or (
+ any(attachments,
+ .file_type in $file_types_images
and any(file.explode(.),
- strings.ilike(.scan.ocr.raw, "*password*", "*document*", "*voicemail*", "*cache*", "*fax*", "*storage*", "*quota*", "*messages*")
- and strings.ilike(.scan.ocr.raw, "*terminated*", "*review*", "*expire*", "*click*", "*view*", "*exceed*", "*clear*", "*only works*", "*failed*", "*deleted*")
- )
+ strings.ilike(.scan.ocr.raw,
+ "*password*",
+ "*document*",
+ "*voicemail*",
+ "*cache*",
+ "*fax*",
+ "*storage*",
+ "*quota*",
+ "*messages*"
+ )
+ and strings.ilike(.scan.ocr.raw,
+ "*terminated*",
+ "*review*",
+ "*expire*",
+ "*click*",
+ "*view*",
+ "*exceed*",
+ "*clear*",
+ "*only works*",
+ "*failed*",
+ "*deleted*"
+ )
)
)
+ )
)
-
and (
- any(ml.nlu_classifier(body.html.inner_text).intents,
- .name == "cred_theft" and .confidence in~ ("medium", "high")
- )
-
- or any(attachments,
- .file_type in ('png', 'jpeg', 'jpg', 'bmp')
- and any(file.explode(.),
- any(ml.nlu_classifier(.scan.ocr.raw).intents,
- .name == "cred_theft"
- )
- )
- )
-
- or any(ml.nlu_classifier(body.html.inner_text).entities,
- .name == "urgency"
+ any(ml.nlu_classifier(body.html.inner_text).intents,
+ .name == "cred_theft" and .confidence in~ ("medium", "high")
+ )
+ or any(attachments,
+ .file_type in $file_types_images
+ and any(file.explode(.),
+ any(ml.nlu_classifier(.scan.ocr.raw).intents, .name == "cred_theft")
+ )
+ )
+ or (
+ any(ml.nlu_classifier(body.html.inner_text).entities, .name == "urgency")
+ and not any(ml.nlu_classifier(body.current_thread.text).intents,
+ .name == "benign" and .confidence == "high"
)
+ )
)
-
- and sender.email.domain.root_domain not in $org_domains
-
and sender.email.domain.root_domain not in (
- "bing.com",
- "microsoft.com",
- "microsoftonline.com",
- "microsoftsupport.com",
- "microsoft365.com",
- "office.com",
- "onedrive.com",
- "sharepointonline.com",
- "yammer.com"
+ "bing.com",
+ "microsoft.com",
+ "microsoftonline.com",
+ "microsoftsupport.com",
+ "microsoft365.com",
+ "office.com",
+ "onedrive.com",
+ "sharepointonline.com",
+ "yammer.com"
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_notion_file_share.yml b/detection-rules/link_notion_file_share.yml
index c77e215dfca..8491cd00bac 100644
--- a/detection-rules/link_notion_file_share.yml
+++ b/detection-rules/link_notion_file_share.yml
@@ -7,22 +7,53 @@ type: "rule"
severity: "medium"
source: |
type.inbound
- and any(body.links, .href_url.domain.root_domain =~ 'notion.so'
- and (strings.ilike(.href_url.url, '*shared*', '*document*', '*secure*', '*office*', '*important*', '*wants-to*', '*share*', '*statement*')
- or strings.ilike(.display_url.url, '*shared*', '*document*', '*secure*', '*office*', '*important*', '*wants-to*', '*share*', '*statement*')
- or strings.ilike(.display_text, '*shared*', '*document*', '*secure*', '*office*', '*important*', '*wants-to*', '*share*', '*statement*')))
+ and any(body.links,
+ .href_url.domain.root_domain =~ 'notion.so'
+ and (
+ strings.ilike(.href_url.url,
+ '*shared*',
+ '*document*',
+ '*secure*',
+ '*office*',
+ '*important*',
+ '*wants-to*',
+ '*share*',
+ '*statement*'
+ )
+ or strings.ilike(.display_url.url,
+ '*shared*',
+ '*document*',
+ '*secure*',
+ '*office*',
+ '*important*',
+ '*wants-to*',
+ '*share*',
+ '*statement*'
+ )
+ or strings.ilike(.display_text,
+ '*shared*',
+ '*document*',
+ '*secure*',
+ '*office*',
+ '*important*',
+ '*wants-to*',
+ '*share*',
+ '*statement*'
+ )
+ )
+ )
and sender.email.domain.domain != 'mail.notion.so'
// first-time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_office365_suspicious_app_authorization.yml b/detection-rules/link_office365_suspicious_app_authorization.yml
index 8a6eceb0163..73dd96e9165 100644
--- a/detection-rules/link_office365_suspicious_app_authorization.yml
+++ b/detection-rules/link_office365_suspicious_app_authorization.yml
@@ -9,8 +9,10 @@ type: "rule"
severity: "high"
source: |
type.inbound
- and any(body.links, .href_url.domain.domain == 'login.microsoftonline.com'
- and strings.ilike(.href_url.query_params, '*offline_access*', '*.readwrite*', '*.read*'))
+ and any(body.links,
+ .href_url.domain.domain == 'login.microsoftonline.com'
+ and strings.ilike(.href_url.query_params, '*offline_access*', '*.readwrite*', '*.read*')
+ )
attack_types:
- "Credential Phishing"
detection_methods:
diff --git a/detection-rules/link_outlook_left_to_right_exploit.yml b/detection-rules/link_outlook_left_to_right_exploit.yml
index 5de1c572dc0..7089f3c794e 100644
--- a/detection-rules/link_outlook_left_to_right_exploit.yml
+++ b/detection-rules/link_outlook_left_to_right_exploit.yml
@@ -6,7 +6,7 @@ references:
type: "rule"
severity: "medium"
source: |
- type.inbound
+ type.inbound
// this regex contains a Unicode U+200E character (may not be visible in many clients)
and regex.contains(body.html.raw, 'base.{0,100}/>')
attack_types:
diff --git a/detection-rules/link_qr_code_suspicious_language_fts.yml b/detection-rules/link_qr_code_suspicious_language_fts.yml
index 286d56d4be6..9b000eade0c 100644
--- a/detection-rules/link_qr_code_suspicious_language_fts.yml
+++ b/detection-rules/link_qr_code_suspicious_language_fts.yml
@@ -10,41 +10,47 @@ source: |
// check image attachments for QR code, will want to add message.screenshot functionality here when it's ready
and any(attachments,
- .file_type in~ ('bmp', 'png', 'jpg', 'jpeg', 'gif')
- and any(file.explode(.), .scan.qr.type == "url"
+ .file_type in $file_types_images
+ and any(file.explode(.),
+ .scan.qr.type == "url"
- // recipient email address is present in the URL, a common tactic used in credential phishing attacks and the url is not in $org_domains
- and any(recipients.to, strings.icontains(..scan.qr.data, .email.email))
- and .scan.qr.url.domain.root_domain not in $org_domains
- )
+ // recipient email address is present in the URL, a common tactic used in credential phishing attacks and the url is not in $org_domains
+ and any(recipients.to, strings.icontains(..scan.qr.data, .email.email))
+ and .scan.qr.url.domain.root_domain not in $org_domains
+ )
)
// NLU has identified cred_theft language with high confidence
and (
- any(ml.nlu_classifier(coalesce(body.html.display_text, body.plain.raw)).intents, .name == "cred_theft" and .confidence == "high")
- or
- // the attachment contains suspicious strings
- (
- any(attachments,
- .file_type in~ ('bmp', 'png', 'jpg', 'jpeg', 'gif', 'pdf')
- and any(file.explode(.),
- any(.scan.strings.strings, regex.icontains(.,
- '(\b2fa\b|\bQ.?R\.?\s?\b|MFA|Muti[ -]?Factor Auth(entication)?)'))
- )
+ any(ml.nlu_classifier(body.current_thread.text).intents,
+ .name == "cred_theft" and .confidence == "high"
+ )
+ or
+ // the attachment contains suspicious strings
+ (
+ any(attachments,
+ (.file_type in $file_types_images or .file_type == "pdf")
+ and any(file.explode(.),
+ any(.scan.strings.strings,
+ regex.icontains(.,
+ '(\b2fa\b|\bQ.?R\.?\s?\b|MFA|Muti[ -]?Factor Auth(entication)?)'
+ )
+ )
)
)
+ )
)
// first-time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/link_undisclosed_recipients_credphish.yml b/detection-rules/link_undisclosed_recipients_credphish.yml
index 12650b125a5..3b10024fcee 100644
--- a/detection-rules/link_undisclosed_recipients_credphish.yml
+++ b/detection-rules/link_undisclosed_recipients_credphish.yml
@@ -6,19 +6,18 @@ severity: "medium"
source: |
type.inbound
and (
- // No Recipients
- length(recipients.to) == 0
- or all(recipients.to, .display_name == "Undisclosed recipients")
+ // No Recipients
+ length(recipients.to) == 0
+ or all(recipients.to, .display_name == "Undisclosed recipients")
)
and length(recipients.cc) == 0
and length(recipients.bcc) == 0
and (
- any(body.links,
- any([beta.linkanalysis(.)],
- .credphish.disposition == "phishing"
- and .credphish.confidence in ("medium", "high")
- )
- )
+ any(body.links,
+ any([beta.linkanalysis(.)],
+ .credphish.disposition == "phishing" and .credphish.confidence in ("medium", "high")
+ )
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/lookalike_sender_domain.yml b/detection-rules/lookalike_sender_domain.yml
index c36d1af53bf..95b02a44186 100644
--- a/detection-rules/lookalike_sender_domain.yml
+++ b/detection-rules/lookalike_sender_domain.yml
@@ -5,24 +5,23 @@ type: "rule"
severity: "high"
source: |
type.inbound
-
and any($org_domains,
- // this rule can be duplicated in order to tune the threshold
- strings.ilevenshtein(sender.email.domain.domain, .) == 1
+ // this rule can be duplicated in order to tune the threshold
+ strings.ilevenshtein(sender.email.domain.domain, .) == 1
)
// first-time sender and unsolicited
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- and sender.email.email not in $recipient_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- and sender.email.domain.domain not in $recipient_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ and sender.email.email not in $recipient_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ and sender.email.domain.domain not in $recipient_domains
+ )
)
attack_types:
- "BEC/Fraud"
diff --git a/detection-rules/mass_campaign_recipient_address_new_sender.yml b/detection-rules/mass_campaign_recipient_address_new_sender.yml
index 28cfdbd4ca9..92faf055f48 100644
--- a/detection-rules/mass_campaign_recipient_address_new_sender.yml
+++ b/detection-rules/mass_campaign_recipient_address_new_sender.yml
@@ -10,7 +10,6 @@ type: "rule"
severity: "medium"
source: |
type.inbound
-
and length(recipients.to) + length(recipients.bcc) + length(recipients.cc) == 1
// exclude To: Undisclosed recipients:;
@@ -19,35 +18,31 @@ source: |
// first-time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
-
and (
- any(recipients.to,
- strings.icontains(subject.subject, .email.email) or
- strings.icontains(subject.subject, .email.local_part)
- )
+ any(recipients.to,
+ strings.icontains(subject.subject, .email.email)
+ or strings.icontains(subject.subject, .email.local_part)
+ )
)
and any([body.html.inner_text, body.plain.raw],
- any(recipients.to, strings.icontains(.., .email.email))
+ any(recipients.to, strings.icontains(.., .email.email))
)
- and any(body.links,
- any(recipients.to, strings.icontains(..href_url.query_params, .email.email))
+ and any(body.links, any(recipients.to, strings.icontains(..href_url.query_params, .email.email)))
+ and any(ml.nlu_classifier(coalesce(body.html.display_text, body.plain.raw)).intents,
+ .name in ("cred_theft") and .confidence == "high"
+ )
+ and any(ml.nlu_classifier(body.current_thread.text).intents,
+ .name in ("cred_theft") and .confidence == "high"
)
-
- and any(ml.nlu_classifier(coalesce(
- body.html.display_text, body.plain.raw)).intents,
- .name in ("cred_theft") and .confidence == "high"
- )
-
- // we could add additional logic here, such as suspicious subject, url shortener, sus link, etc.
attack_types:
- "Credential Phishing"
tactics_and_techniques:
diff --git a/detection-rules/open_redirect_atdmt.yml b/detection-rules/open_redirect_atdmt.yml
index 759e44ed73c..efe49b5b5f4 100644
--- a/detection-rules/open_redirect_atdmt.yml
+++ b/detection-rules/open_redirect_atdmt.yml
@@ -9,7 +9,9 @@ authors:
severity: "medium"
source: |
type.inbound
- and any(body.links, .href_url.domain.domain == 'ad.atdmt.com' and strings.ilike(.href_url.path, '*/c*'))
+ and any(body.links,
+ .href_url.domain.domain == 'ad.atdmt.com' and strings.ilike(.href_url.path, '*/c*')
+ )
attack_types:
- "Credential Phishing"
- "Malware/Ransomware"
diff --git a/detection-rules/open_redirect_avast.yml b/detection-rules/open_redirect_avast.yml
index dec9e0aa290..5ff4fcde8b6 100644
--- a/detection-rules/open_redirect_avast.yml
+++ b/detection-rules/open_redirect_avast.yml
@@ -5,8 +5,8 @@ severity: "medium"
source: |
type.inbound
and any(body.links,
- .href_url.domain.root_domain == "avast.com"
- and strings.contains(.href_url.query_params, "DisplayRedirectCustomPage")
+ .href_url.domain.root_domain == "avast.com"
+ and strings.contains(.href_url.query_params, "DisplayRedirectCustomPage")
)
and sender.email.domain.root_domain != "avast.com"
and (
diff --git a/detection-rules/open_redirect_googleweblight.yml b/detection-rules/open_redirect_googleweblight.yml
index 6efa7b7a8a3..d6a06881541 100644
--- a/detection-rules/open_redirect_googleweblight.yml
+++ b/detection-rules/open_redirect_googleweblight.yml
@@ -7,9 +7,8 @@ authors:
severity: "medium"
source: |
type.inbound
- and any(body.links,
- .href_url.domain.domain == 'googleweblight.com' and
- strings.ilike(.href_url.url, '*/i?u=*')
+ and any(body.links,
+ .href_url.domain.domain == 'googleweblight.com' and strings.ilike(.href_url.url, '*/i?u=*')
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/open_redirect_hhs.yml b/detection-rules/open_redirect_hhs.yml
index 5556fe70450..8116faf98f5 100644
--- a/detection-rules/open_redirect_hhs.yml
+++ b/detection-rules/open_redirect_hhs.yml
@@ -8,7 +8,9 @@ severity: "medium"
source: |
type.inbound
and any(body.links,
- .href_url.domain.domain == 'dcis.hhs.gov' and strings.ilike(.href_url.query_params, '*service*'))
+ .href_url.domain.domain == 'dcis.hhs.gov'
+ and strings.ilike(.href_url.query_params, '*service*')
+ )
attack_types:
- "Credential Phishing"
- "Malware/Ransomware"
diff --git a/detection-rules/open_redirect_linkedin.yml b/detection-rules/open_redirect_linkedin.yml
index d5e063483f3..aae9a04e205 100644
--- a/detection-rules/open_redirect_linkedin.yml
+++ b/detection-rules/open_redirect_linkedin.yml
@@ -9,17 +9,20 @@ severity: "medium"
source: |
type.inbound
and (
- (
- sender.email.domain.root_domain != "linkedin.com"
- and any(body.links, .href_url.domain.root_domain == 'linkedin.com' and .href_url.path == '/slink')
- and any(body.links, strings.ilike(.href_url.query_params, 'code=*'))
- )
- or any(attachments, .file_type == "pdf"
- and any(file.explode(.),
- any(.scan.url.urls, .domain.root_domain == 'linkedin.com' and .path == '/slink')
- and any(.scan.url.urls, strings.ilike(.query_params, 'code=*'))
- )
+ (
+ sender.email.domain.root_domain != "linkedin.com"
+ and any(body.links,
+ .href_url.domain.root_domain == 'linkedin.com' and .href_url.path == '/slink'
)
+ and any(body.links, strings.ilike(.href_url.query_params, 'code=*'))
+ )
+ or any(attachments,
+ .file_type == "pdf"
+ and any(file.explode(.),
+ any(.scan.url.urls, .domain.root_domain == 'linkedin.com' and .path == '/slink')
+ and any(.scan.url.urls, strings.ilike(.query_params, 'code=*'))
+ )
+ )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/open_redirect_mcgill.yml b/detection-rules/open_redirect_mcgill.yml
index c11b91eb90e..46421291bb8 100644
--- a/detection-rules/open_redirect_mcgill.yml
+++ b/detection-rules/open_redirect_mcgill.yml
@@ -5,7 +5,9 @@ type: "rule"
severity: "low"
source: |
type.inbound
- and any(body.links, .href_url.domain.domain == 'myalumni.mcgill.ca' and .href_url.path =~ '/redirect.aspx')
+ and any(body.links,
+ .href_url.domain.domain == 'myalumni.mcgill.ca' and .href_url.path =~ '/redirect.aspx'
+ )
and any(body.links, strings.ilike(.href_url.query_params, '*tokenUrl=*'))
and sender.email.domain.root_domain != 'mcgill.ca'
attack_types:
diff --git a/detection-rules/open_redirect_msn.yml b/detection-rules/open_redirect_msn.yml
index ecaf61f8506..3a4325a7493 100644
--- a/detection-rules/open_redirect_msn.yml
+++ b/detection-rules/open_redirect_msn.yml
@@ -12,9 +12,9 @@ severity: "medium"
source: |
type.inbound
and any(body.links,
- .href_url.domain.root_domain == "msn.com"
- and .href_url.path =~ "/en-gb/lifestyle/rf-best-products-uk/redirect"
- and strings.icontains(.href_url.query_params, "url")
+ .href_url.domain.root_domain == "msn.com"
+ and .href_url.path =~ "/en-gb/lifestyle/rf-best-products-uk/redirect"
+ and strings.icontains(.href_url.query_params, "url")
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/open_redirect_panera_bread.yml b/detection-rules/open_redirect_panera_bread.yml
index acf8a71a3ed..14078365c5e 100644
--- a/detection-rules/open_redirect_panera_bread.yml
+++ b/detection-rules/open_redirect_panera_bread.yml
@@ -7,6 +7,7 @@ type: "rule"
severity: "medium"
source: |
type.inbound
+ and 0 < length(body.links) < 10
and any(body.links, .href_url.domain.domain == 't.e1.panerabread.com' and .href_url.path =~ '/r/')
and sender.email.domain.root_domain != 'panerabread.com'
attack_types:
diff --git a/detection-rules/open_redirect_slack.yml b/detection-rules/open_redirect_slack.yml
index f2c7632c34c..f90a0f79c2c 100644
--- a/detection-rules/open_redirect_slack.yml
+++ b/detection-rules/open_redirect_slack.yml
@@ -5,8 +5,12 @@ type: "rule"
severity: "low"
source: |
type.inbound
+ and 0 < length(body.links) < 10
and sender.email.domain.root_domain not in~ ('atlassian.net', 'slack.com', 'soundtrap.com')
- and any(body.links, .href_url.domain.domain == 'slack-redir.net' and strings.ilike(.href_url.query_params, '*url=*'))
+ and any(body.links,
+ .href_url.domain.domain == 'slack-redir.net'
+ and strings.ilike(.href_url.query_params, '*url=*')
+ )
attack_types:
- "Credential Phishing"
- "Malware/Ransomware"
diff --git a/detection-rules/open_redirect_snapchat.yml b/detection-rules/open_redirect_snapchat.yml
index 20f76e0e19d..05f28d48f0d 100644
--- a/detection-rules/open_redirect_snapchat.yml
+++ b/detection-rules/open_redirect_snapchat.yml
@@ -6,9 +6,9 @@ authors:
- twitter: "vector_sec"
severity: "medium"
source: |
- type.inbound and
- any(body.links, .href_url.domain.domain == "click.snapchat.com") and
- sender.email.domain.root_domain != "snapchat.com"
+ type.inbound
+ and any(body.links, .href_url.domain.domain == "click.snapchat.com")
+ and sender.email.domain.root_domain != "snapchat.com"
attack_types:
- "Credential Phishing"
- "Malware/Ransomware"
diff --git a/detection-rules/open_redirect_ticketmaster.yml b/detection-rules/open_redirect_ticketmaster.yml
index 49c98050f58..62627f0cd19 100644
--- a/detection-rules/open_redirect_ticketmaster.yml
+++ b/detection-rules/open_redirect_ticketmaster.yml
@@ -7,7 +7,9 @@ type: "rule"
severity: "medium"
source: |
type.inbound
- and any(body.links, .href_url.domain.domain == 'links.engage.ticketmaster.com' and .href_url.path =~ '/ctt')
+ and any(body.links,
+ .href_url.domain.domain == 'links.engage.ticketmaster.com' and .href_url.path =~ '/ctt'
+ )
and sender.email.domain.root_domain != 'ticketmaster.com'
and headers.return_path.domain.root_domain != "ticketmaster.com"
attack_types:
diff --git a/detection-rules/open_redirect_usapdc.yml b/detection-rules/open_redirect_usapdc.yml
new file mode 100644
index 00000000000..92b69306be2
--- /dev/null
+++ b/detection-rules/open_redirect_usapdc.yml
@@ -0,0 +1,20 @@
+name: "Open redirect: U.S. Antarctic Program Data Center (USAP-DC)"
+description: |
+ Message contains use of the U.S. Antarctic Program Data Center (USAP-DC) open redirect.
+type: "rule"
+severity: "medium"
+source: |
+ type.inbound
+ and any(body.links,
+ .href_url.domain.root_domain == "usap-dc.org"
+ and .href_url.path =~ "/tracker"
+ and strings.starts_with(.href_url.query_params, "type=dataset&url=http")
+ )
+attack_types:
+ - "Credential Phishing"
+ - "Malware/Ransomware"
+tactics_and_techniques:
+ - "Open redirect"
+detection_methods:
+ - "URL analysis"
+id: "c499d041-1e95-52a5-bc7e-857376e1a873"
diff --git a/detection-rules/open_redirect_youtube.yml b/detection-rules/open_redirect_youtube.yml
index 3edbb9797ee..908c6eeb252 100644
--- a/detection-rules/open_redirect_youtube.yml
+++ b/detection-rules/open_redirect_youtube.yml
@@ -7,7 +7,10 @@ authors:
- twitter: "vector_sec"
source: |
type.inbound
- and any(body.links, .href_url.domain.root_domain == "youtube.com" and strings.icontains(.href_url.url, "attribution_link?"))
+ and any(body.links,
+ .href_url.domain.root_domain == "youtube.com"
+ and strings.icontains(.href_url.url, "attribution_link?")
+ )
and sender.email.domain.root_domain != "youtube.com"
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/paypal_invoice_abuse.yml b/detection-rules/paypal_invoice_abuse.yml
index 90549fbc2f0..84b7aa9634a 100644
--- a/detection-rules/paypal_invoice_abuse.yml
+++ b/detection-rules/paypal_invoice_abuse.yml
@@ -14,31 +14,33 @@ source: |
and not any(headers.hops, .authentication_results.dmarc == "fail")
and strings.ilike(body.html.display_text, "*seller note*")
and (
- (
- //phone number but not 800 number
- regex.contains(body.html.inner_text, '[\s:,-]\+?\d{1,2}[\s:,-]\(?([2-7][0-9]{2}|80[1-9]|8[1-9][0-9])\)?[\s:,-]\d{3}[\s:,-]\d{4}\b')
- and (
- 4 of (
- strings.ilike(body.html.inner_text, '*you did not*'),
- strings.ilike(body.html.inner_text, '*subscription*'),
- strings.ilike(body.html.inner_text, '*antivirus*'),
- strings.ilike(body.html.inner_text, '*order*'),
- strings.ilike(body.html.inner_text, '*support*'),
- strings.ilike(body.html.inner_text, '*receipt*'),
- strings.ilike(body.html.inner_text, '*invoice*'),
- strings.ilike(body.html.inner_text, '*call*'),
- strings.ilike(body.html.inner_text, '*cancel*'),
- strings.ilike(body.html.inner_text, '*renew*'),
- strings.ilike(body.html.inner_text, '*refund*'),
- strings.ilike(body.html.inner_text, '*+1*'),
- strings.ilike(body.html.inner_text, '*help*desk*')
- )
- )
- )
- or (
- //Unicode confusables words obfuscated in note
- regex.contains(body.html.inner_text, '\+𝟭|𝗽𝗮𝘆𝗺𝗲𝗻𝘁|𝗛𝗲𝗹𝗽 𝗗𝗲𝘀𝗸|𝗿𝗲𝗳𝘂𝗻𝗱|𝗮𝗻𝘁𝗶𝘃𝗶𝗿𝘂𝘀|𝗰𝗮𝗹𝗹|𝗰𝗮𝗻𝗰𝗲𝗹')
- )
+ (
+ // phone number but not 800 number
+ regex.contains(body.html.inner_text,
+ '[\s:,-]\+?\d{1,2}[\s:,-]\(?([2-7][0-9]{2}|80[1-9]|8[1-9][0-9])\)?[\s:,-]\d{3}[\s:,-]\d{4}\b'
+ )
+ and (
+ 4 of (
+ strings.ilike(body.html.inner_text, '*you did not*'),
+ strings.ilike(body.html.inner_text, '*subscription*'),
+ strings.ilike(body.html.inner_text, '*antivirus*'),
+ strings.ilike(body.html.inner_text, '*order*'),
+ strings.ilike(body.html.inner_text, '*support*'),
+ strings.ilike(body.html.inner_text, '*receipt*'),
+ strings.ilike(body.html.inner_text, '*invoice*'),
+ strings.ilike(body.html.inner_text, '*call*'),
+ strings.ilike(body.html.inner_text, '*cancel*'),
+ strings.ilike(body.html.inner_text, '*renew*'),
+ strings.ilike(body.html.inner_text, '*refund*'),
+ strings.ilike(body.html.inner_text, '*+1*'),
+ strings.ilike(body.html.inner_text, '*help*desk*')
+ )
+ )
+ )
+ or (
+ // Unicode confusables words obfuscated in note
+ regex.contains(body.html.inner_text, '\+𝟭|𝗽𝗮𝘆𝗺𝗲𝗻𝘁|𝗛𝗲𝗹𝗽 𝗗𝗲𝘀𝗸|𝗿𝗲𝗳𝘂𝗻𝗱|𝗮𝗻𝘁𝗶𝘃𝗶𝗿𝘂𝘀|𝗰𝗮𝗹𝗹|𝗰𝗮𝗻𝗰𝗲𝗹')
+ )
)
attack_types:
- "BEC/Fraud"
diff --git a/detection-rules/punycode_sender_domain.yml b/detection-rules/punycode_sender_domain.yml
index fc010ad69d5..5a56d624e3d 100644
--- a/detection-rules/punycode_sender_domain.yml
+++ b/detection-rules/punycode_sender_domain.yml
@@ -9,7 +9,8 @@ references:
type: "rule"
severity: "high"
source: |
- type.inbound and strings.ilike(sender.email.domain.domain, "*xn--*")
+ type.inbound
+ and strings.ilike(sender.email.domain.domain, "*xn--*")
attack_types:
- "Credential Phishing"
- "Malware/Ransomware"
diff --git a/detection-rules/recipients_undisclosed_compauth_check.yml b/detection-rules/recipients_undisclosed_compauth_check.yml
index 2a6d2c4bbc8..bf7b2ffbd88 100644
--- a/detection-rules/recipients_undisclosed_compauth_check.yml
+++ b/detection-rules/recipients_undisclosed_compauth_check.yml
@@ -4,34 +4,28 @@ type: "rule"
severity: "medium"
source: |
type.inbound
- and (
- length(recipients.to) == 0
- or all(recipients.to, .display_name == "Undisclosed recipients")
- )
+ and (length(recipients.to) == 0 or all(recipients.to, .display_name == "Undisclosed recipients"))
and length(recipients.cc) == 0
and length(recipients.bcc) == 0
and 2 of (
- (
- any(headers.hops,
- .authentication_results.compauth.verdict is not null
- and .authentication_results.compauth.verdict not in ("pass", "softpass")
- )
- ),
- (
- any(ml.nlu_classifier(coalesce(
- body.html.display_text, body.plain.raw)).intents,
- .name in ("bec", "cred_theft")
- and .confidence == "high"
- )
- ),
- (
- any(body.links,
- any([beta.linkanalysis(.)],
- .credphish.disposition == "phishing"
- and .credphish.confidence in ("high")
- )
+ (
+ any(headers.hops,
+ .authentication_results.compauth.verdict is not null
+ and .authentication_results.compauth.verdict not in ("pass", "softpass")
+ )
+ ),
+ (
+ any(ml.nlu_classifier(body.current_thread.text).intents,
+ .name in ("bec", "cred_theft") and .confidence == "high"
+ )
+ ),
+ (
+ any(body.links,
+ any([beta.linkanalysis(.)],
+ .credphish.disposition == "phishing" and .credphish.confidence in ("high")
)
)
+ )
)
detection_methods:
- "Content analysis"
diff --git a/detection-rules/recipients_undisclosed_free_subdomain_host.yml b/detection-rules/recipients_undisclosed_free_subdomain_host.yml
index 192c3709b64..0554bc90112 100644
--- a/detection-rules/recipients_undisclosed_free_subdomain_host.yml
+++ b/detection-rules/recipients_undisclosed_free_subdomain_host.yml
@@ -5,18 +5,32 @@ type: "rule"
severity: "medium"
source: |
type.inbound
-
- and any(body.links,
- .href_url.domain.root_domain in $free_subdomain_hosts
- and .href_url.domain.subdomain is not null
- and .href_url.domain.subdomain != "www"
- )
- and (
- length(recipients.to) == 0
- or all(recipients.to, .display_name == "Undisclosed recipients")
+ and any(body.links,
+ .href_url.domain.root_domain in $free_subdomain_hosts
+ and .href_url.domain.subdomain is not null
+ and .href_url.domain.subdomain != "www"
)
+ and (length(recipients.to) == 0 or all(recipients.to, .display_name == "Undisclosed recipients"))
and length(recipients.cc) == 0
and length(recipients.bcc) == 0
+
+ // negate listmailers & benign threads
+ and not (
+ any(headers.hops, any(.fields, .name == "List-Unsubscribe"))
+ or any(ml.nlu_classifier(body.current_thread.text).intents,
+ .name == "benign" and .confidence == "high"
+ )
+ )
+ and (
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
+ )
tactics_and_techniques:
- "Free subdomain host"
detection_methods:
diff --git a/detection-rules/recipients_undisclosed_nlu_cred_theft_low_rep_links.yml b/detection-rules/recipients_undisclosed_nlu_cred_theft_low_rep_links.yml
index 50ab9cacd78..6c0073e7007 100644
--- a/detection-rules/recipients_undisclosed_nlu_cred_theft_low_rep_links.yml
+++ b/detection-rules/recipients_undisclosed_nlu_cred_theft_low_rep_links.yml
@@ -4,25 +4,20 @@ type: "rule"
severity: "medium"
source: |
type.inbound
- and (
- length(recipients.to) == 0
- or all(recipients.to, .display_name == "Undisclosed recipients")
- )
+ and (length(recipients.to) == 0 or all(recipients.to, .display_name == "Undisclosed recipients"))
and length(recipients.cc) == 0
and length(recipients.bcc) == 0
- and any(body.links, .href_url.domain.domain not in $tranco_1m)
-
+ and any(body.links, .href_url.domain.root_domain not in $tranco_1m)
and (
- any(body.links, regex.icontains(.display_text,
- '(view|click|download|goto)?(attachment|download|file|online|document)s?')
+ any(body.links,
+ regex.icontains(.display_text,
+ '(view|click|download|goto)?(attachment|download|file|online|document)s?'
+ )
or all(body.links, regex.contains(.display_text, "^[A-Z ]+$"))
- )
+ )
)
-
- and any(ml.nlu_classifier(coalesce(
- body.html.display_text, body.plain.raw)).intents,
- .name in ("cred_theft")
- and .confidence in ("medium", "high")
+ and any(ml.nlu_classifier(body.current_thread.text).intents,
+ .name in ("cred_theft") and .confidence in ("medium", "high")
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/sender_new_from_domain_first_time_sender.yml b/detection-rules/sender_new_from_domain_first_time_sender.yml
index 61bf772d666..ba5fbdbf256 100644
--- a/detection-rules/sender_new_from_domain_first_time_sender.yml
+++ b/detection-rules/sender_new_from_domain_first_time_sender.yml
@@ -7,14 +7,14 @@ source: |
type.inbound
and beta.whois(sender.email.domain).days_old <= 10
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
tags:
- "Attack surface reduction"
diff --git a/detection-rules/spam_campaign_excessive_display_text_with_keywords.yml b/detection-rules/spam_campaign_excessive_display_text_with_keywords.yml
index ad1dbaa3f82..55e02712629 100644
--- a/detection-rules/spam_campaign_excessive_display_text_with_keywords.yml
+++ b/detection-rules/spam_campaign_excessive_display_text_with_keywords.yml
@@ -8,22 +8,19 @@ severity: "low"
source: |
type.inbound
and length(body.links) > 0
- and any(body.links, length(.display_text) >3000)
-
- and any(
- body.links, regex.icontains(.display_text, '(\bPassword:)', 'Hi.{0,5}Welcome\b')
- )
+ and any(body.links, length(.display_text) > 3000)
+ and any(body.links, regex.icontains(.display_text, '(\bPassword:)', 'Hi.{0,5}Welcome\b'))
// first-time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
+ )
attack_types:
- "Spam"
detection_methods:
diff --git a/detection-rules/spam_new_domain_emojis.yml b/detection-rules/spam_new_domain_emojis.yml
new file mode 100644
index 00000000000..8b01256663d
--- /dev/null
+++ b/detection-rules/spam_new_domain_emojis.yml
@@ -0,0 +1,45 @@
+name: "Spam: New link domain (<=10d) and emojis"
+description: |
+ Detects spam from freemail senders, where the linked domain is less than 10 days old and emojis present.
+type: "rule"
+severity: "medium"
+source: |
+ type.inbound
+
+ // sender is a freemail
+ and sender.email.domain.root_domain in $free_email_providers
+
+ // linked domain is less than 10 days old
+ and any(body.links, beta.whois(.href_url.domain).days_old < 10)
+
+ // has an emoji in the subject or body
+ and (
+ regex.contains(body.plain.raw,
+ '[\x{1F300}-\x{1F5FF}\x{1F600}-\x{1F64F}\x{1F680}-\x{1F6FF}\x{1F700}-\x{1F77F}\x{1F780}-\x{1F7FF}\x{1F900}-\x{1F9FF}\x{2600}-\x{26FF}\x{2700}-\x{27BF}\x{2300}-\x{23FF}]'
+ )
+ or regex.contains(subject.subject,
+ '[\x{1F300}-\x{1F5FF}\x{1F600}-\x{1F64F}\x{1F680}-\x{1F6FF}\x{1F700}-\x{1F77F}\x{1F780}-\x{1F7FF}\x{1F900}-\x{1F9FF}\x{2600}-\x{26FF}\x{2700}-\x{27BF}\x{2300}-\x{23FF}]'
+ )
+ )
+
+ // first-time sender
+ and (
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
+ )
+attack_types:
+ - "Spam"
+tactics_and_techniques:
+ - "Free email provider"
+detection_methods:
+ - "Content analysis"
+ - "Sender analysis"
+ - "URL analysis"
+ - "Whois"
+id: "33677993-9c21-54e6-8633-e03b2063e332"
diff --git a/detection-rules/spam_url_shortener_emojis.yml b/detection-rules/spam_url_shortener_emojis.yml
index 9e06b64f841..e793b36b770 100644
--- a/detection-rules/spam_url_shortener_emojis.yml
+++ b/detection-rules/spam_url_shortener_emojis.yml
@@ -10,30 +10,31 @@ source: |
and sender.email.domain.root_domain in $free_email_providers
// has a URL shortener
- and any(body.links,
- .href_url.domain.root_domain in $url_shorteners
- )
+ and any(body.links, .href_url.domain.root_domain in $url_shorteners)
// short body, basically just the URL
and length(body.plain.raw) < 100
// has an emoji in the subject or body
and (
- regex.contains(body.plain.raw, '[\x{1F300}-\x{1F5FF}\x{1F600}-\x{1F64F}\x{1F680}-\x{1F6FF}\x{1F700}-\x{1F77F}\x{1F780}-\x{1F7FF}\x{1F900}-\x{1F9FF}\x{2600}-\x{26FF}\x{2700}-\x{27BF}\x{2300}-\x{23FF}]')
- or regex.contains(subject.subject, '[\x{1F300}-\x{1F5FF}\x{1F600}-\x{1F64F}\x{1F680}-\x{1F6FF}\x{1F700}-\x{1F77F}\x{1F780}-\x{1F7FF}\x{1F900}-\x{1F9FF}\x{2600}-\x{26FF}\x{2700}-\x{27BF}\x{2300}-\x{23FF}]')
-
+ regex.contains(body.plain.raw,
+ '[\x{1F300}-\x{1F5FF}\x{1F600}-\x{1F64F}\x{1F680}-\x{1F6FF}\x{1F700}-\x{1F77F}\x{1F780}-\x{1F7FF}\x{1F900}-\x{1F9FF}\x{2600}-\x{26FF}\x{2700}-\x{27BF}\x{2300}-\x{23FF}]'
+ )
+ or regex.contains(subject.subject,
+ '[\x{1F300}-\x{1F5FF}\x{1F600}-\x{1F64F}\x{1F680}-\x{1F6FF}\x{1F700}-\x{1F77F}\x{1F780}-\x{1F7FF}\x{1F900}-\x{1F9FF}\x{2600}-\x{26FF}\x{2700}-\x{27BF}\x{2300}-\x{23FF}]'
+ )
)
// first-time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
attack_types:
- "Spam"
diff --git a/detection-rules/spoof_dropbox.yml b/detection-rules/spoof_dropbox.yml
index 32e7d3076d6..e7b73da04f8 100644
--- a/detection-rules/spoof_dropbox.yml
+++ b/detection-rules/spoof_dropbox.yml
@@ -6,7 +6,9 @@ severity: "medium"
source: |
type.inbound
and sender.email.domain.root_domain == 'dropbox.com'
- and any(distinct(headers.hops, .authentication_results.dmarc is not null), strings.ilike(.authentication_results.dmarc, "*fail"))
+ and any(distinct(headers.hops, .authentication_results.dmarc is not null),
+ strings.ilike(.authentication_results.dmarc, "*fail")
+ )
// mitigates situations where an ESG misconfiguration could cause auth failures
and not strings.ends_with(headers.message_id, ".dropbox.com>")
attack_types:
diff --git a/detection-rules/spoofable_internal_domain_suspicious_signals.yml b/detection-rules/spoofable_internal_domain_suspicious_signals.yml
index d9c07b3caf2..442aa897331 100644
--- a/detection-rules/spoofable_internal_domain_suspicious_signals.yml
+++ b/detection-rules/spoofable_internal_domain_suspicious_signals.yml
@@ -16,61 +16,62 @@ source: |
// doesn't match an org display name (generic)
// we could make this more generic later
and sender.display_name not in $org_display_names
-
and any(headers.hops,
- // find the hop Authentication-results for the org domain
- .authentication_results.dmarc_details.from.domain in $org_domains
+ // find the hop Authentication-results for the org domain
+ .authentication_results.dmarc_details.from.domain in $org_domains
- // internal domain is spoofable
- and .authentication_results.dmarc_details.verdict == "none"
- and .authentication_results.spf == "none"
- and .authentication_results.compauth.verdict not in ("pass", "softpass")
+ // internal domain is spoofable
+ and .authentication_results.dmarc_details.verdict == "none"
+ and .authentication_results.spf == "none"
+ and .authentication_results.compauth.verdict not in ("pass", "softpass")
)
-
and 3 of (
- (
- // low reputation / suspicious link
- any(body.links,
- .href_url.domain.root_domain not in $org_domains
- and (
- .href_url.domain.root_domain not in $tranco_1m
- or .href_url.domain.domain in $free_file_hosts
- or .href_url.domain.root_domain in $free_subdomain_hosts
- or .href_url.domain.domain in $url_shorteners
- )
-
+ (
+ // low reputation / suspicious link
+ any(body.links,
+ .href_url.domain.root_domain not in $org_domains
+ and (
+ .href_url.domain.root_domain not in $tranco_1m
+ or .href_url.domain.domain in $free_file_hosts
+ or .href_url.domain.root_domain in $free_subdomain_hosts
+ or .href_url.domain.domain in $url_shorteners
)
- ),
- (
- // sender domain matches no body domains
- length(body.links) > 0
- and all(body.links,
+ )
+ ),
+ (
+ // sender domain matches no body domains
+ length(body.links) > 0
+ and all(body.links,
.href_url.domain.root_domain != sender.email.domain.root_domain
and .href_url.domain.root_domain not in $org_domains
- )
- ),
- (
- // suspicious domain in headers
- any(headers.domains,
- // it's not an org domain
- .root_domain not in $org_domains
+ )
+ ),
+ (
+ // suspicious domain in headers
+ any(headers.domains,
+ // it's not an org domain
+ .root_domain not in $org_domains
- // low reputation
- and .root_domain not in $alexa_1m
-
- // no one has sent an email to it before
- and .root_domain not in $recipient_domains
- )
- ),
- (
- // suspicious language
- any(ml.nlu_classifier(coalesce(
- body.html.display_text, body.plain.raw)).intents,
- .name != "benign" and .confidence == "high"
- )
- ),
+ // low reputation
+ and .root_domain not in $alexa_1m
+ // no one has sent an email to it before
+ and .root_domain not in $recipient_domains
+ )
+ ),
+ (
+ // suspicious language
+ any(ml.nlu_classifier(body.current_thread.text).intents,
+ .name != "benign" and .confidence == "high"
+ )
+ ),
+ (
+ // suspicious language
+ any(ml.nlu_classifier(coalesce(body.html.display_text, body.plain.raw)).intents,
+ .name != "benign" and .confidence == "high"
+ )
+ ),
)
tags:
- "Attack surface reduction"
diff --git a/detection-rules/stripe_invoice_abuse.yml b/detection-rules/stripe_invoice_abuse.yml
index 673d28d72b2..a0bc1e14d57 100644
--- a/detection-rules/stripe_invoice_abuse.yml
+++ b/detection-rules/stripe_invoice_abuse.yml
@@ -6,22 +6,22 @@ description: |
type: "rule"
severity: "medium"
source: |
- type.inbound
+ type.inbound
and length(attachments) == 2
and sender.email.domain.root_domain == "stripe.com"
and any(headers.hops, .authentication_results.dmarc == "pass")
-
- and any(attachments, .file_extension == "pdf"
- and any(file.explode(.),
- length(filter(.scan.strings.strings, strings.ilike(.,
- "*Btc Purchase*",
- "*suspicious activity*",
- "*get in touch with us straight once*",
- "*your phone number*",
- "*due deducted*",
- "*merchant security service center*",
- ))) >= 4
- )
+ and any(attachments,
+ .file_extension == "pdf"
+ and any(file.explode(.),
+ 4 of (
+ strings.ilike(.scan.ocr.raw, "*Btc Purchase*"),
+ strings.ilike(.scan.ocr.raw, "*suspicious activity*"),
+ strings.ilike(.scan.ocr.raw, "*get in touch with us straight once*"),
+ strings.ilike(.scan.ocr.raw, "*your phone number*"),
+ strings.ilike(.scan.ocr.raw, "*due deducted*"),
+ strings.ilike(.scan.ocr.raw, "*merchant security service center*"),
+ )
+ )
)
attack_types:
- "BEC/Fraud"
diff --git a/detection-rules/suspicious_request_for_quote_html_smuggling.yml b/detection-rules/suspicious_request_for_quote_html_smuggling.yml
index 616f8ce02c5..68ad24bda48 100644
--- a/detection-rules/suspicious_request_for_quote_html_smuggling.yml
+++ b/detection-rules/suspicious_request_for_quote_html_smuggling.yml
@@ -9,57 +9,54 @@ source: |
// RFP/RFQ language
and 1 of (
- (
- regex.icontains(coalesce(body.html.display_text, body.plain.raw), '(discuss.{0,15}purchas(e|ing))')
- ),
- (
- regex.icontains(coalesce(body.html.display_text, body.plain.raw), '(sign(ed?)|view).{0,10}(purchase order)|Request for a Quot(e|ation)')
- ),
- (
- regex.icontains(coalesce(body.html.display_text, body.plain.raw), '(please|kindly).{0,30}quote')
- ),
- (
- regex.icontains(subject.subject, '(request for (purchase|quot(e|ation))|\bRFQ\b|\bRFP\b)')
- ),
- (
- any(attachments, regex.icontains(.file_name, "(purchase.?order|Quot(e|ation))"))
- ),
- (
- any(ml.nlu_classifier(coalesce(
- body.html.display_text, body.plain.raw)).entities, .name == "request")
- and
- any(ml.nlu_classifier(coalesce(
- body.html.display_text, body.plain.raw)).entities,.name == "urgency")
- ),
- (
- any(ml.nlu_classifier(coalesce(
- body.html.display_text, body.plain.raw)).tags,.name == "purchase_order" and .confidence == "high")
- )
+ regex.icontains(body.current_thread.text,
+ '(discuss.{0,15}purchas(e|ing))'
+ ),
+ regex.icontains(body.current_thread.text,
+ '(sign(ed?)|view).{0,10}(purchase order)|Request for a Quot(e|ation)'
+ ),
+ regex.icontains(body.current_thread.text, '(please|kindly).{0,30}quote'),
+ regex.icontains(subject.subject, '(request for (purchase|quot(e|ation))|\bRFQ\b|\bRFP\b)'),
+ any(attachments, regex.icontains(.file_name, "(purchase.?order|Quot(e|ation))")),
+ any(ml.nlu_classifier(body.current_thread.text).entities,
+ .name == "request"
+ )
+ and any(ml.nlu_classifier(body.current_thread.text).entities,
+ .name == "urgency"
+ ),
+ any(ml.nlu_classifier(body.current_thread.text).tags,
+ .name == "purchase_order" and .confidence == "high"
+ )
)
// HTML smuggling
- and any(attachments,
- (
- .file_extension in~ ("html", "htm", "shtml", "dhtml") or
- .file_extension in~ $file_extensions_common_archives or
- .file_type == "html"
- )
- and any(file.explode(.),
+ and any(attachments,
(
- length(filter(.scan.javascript.identifiers, strings.like (., "document", "write", "atob"))) == 3
- // usage: document['write'](atob)
- or any(.scan.strings.strings, strings.ilike(., "*document*write*atob*"))
- // usage: some_var = atob();
- or any(.scan.strings.strings, strings.ilike(., "*=*atob*;"))
- // usage: obfuscating "atob"
- or any(.scan.javascript.identifiers, strings.ilike(., '*ato\u0062*'))
- // usage: document.head.insertAdjacentHTML("beforeend", atob(...
- or
- any(.scan.strings.strings, strings.ilike(.,
- "*document*write*atob*",
- "*document*insertAdjacentHTML*atob*"))
+ .file_extension in~ ("html", "htm", "shtml", "dhtml")
+ or .file_extension in~ $file_extensions_common_archives
+ or .file_type == "html"
+ )
+ and any(file.explode(.),
+ (
+ length(filter(.scan.javascript.identifiers,
+ strings.like(., "document", "write", "atob")
+ )
+ ) == 3
+ // usage: document['write'](atob)
+ or any(.scan.strings.strings, strings.ilike(., "*document*write*atob*"))
+ // usage: some_var = atob();
+ or any(.scan.strings.strings, strings.ilike(., "*=*atob*;"))
+ // usage: obfuscating "atob"
+ or any(.scan.javascript.identifiers, strings.ilike(., '*ato\u0062*'))
+ // usage: document.head.insertAdjacentHTML("beforeend", atob(...
+ or any(.scan.strings.strings,
+ strings.ilike(.,
+ "*document*write*atob*",
+ "*document*insertAdjacentHTML*atob*"
+ )
+ )
+ )
)
- )
)
attack_types:
- "Credential Phishing"
diff --git a/detection-rules/suspicious_request_for_quote_or_purchase.yml b/detection-rules/suspicious_request_for_quote_or_purchase.yml
index 32845806c39..c7b6a9593ed 100644
--- a/detection-rules/suspicious_request_for_quote_or_purchase.yml
+++ b/detection-rules/suspicious_request_for_quote_or_purchase.yml
@@ -5,50 +5,46 @@ description: |
type: "rule"
severity: "medium"
source: |
- type.inbound
+ type.inbound
and 1 of (
- (
- (
- length(recipients.to) == 0 or
- all(recipients.to, .display_name == "Undisclosed recipients")
- )
- and length(recipients.cc) == 0
- and length(recipients.bcc) == 0
- ),
- (
- sender.email.domain.root_domain in $free_email_providers
- and any(headers.reply_to, .email.email != sender.email.email)
- and any(headers.reply_to, .email.email not in $recipient_emails)
- )
+ (
+ (length(recipients.to) == 0 or all(recipients.to, .display_name == "Undisclosed recipients"))
+ and length(recipients.cc) == 0
+ and length(recipients.bcc) == 0
+ ),
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and any(headers.reply_to, .email.email != sender.email.email)
+ and any(headers.reply_to, .email.email not in $recipient_emails)
+ )
)
-
and 2 of (
- (
- regex.icontains(coalesce(body.html.display_text, body.plain.raw), '(discuss.{0,15}purchas(e|ing))')
- ),
- (
- regex.icontains(coalesce(body.html.display_text, body.plain.raw), '(sign(ed?)|view).{0,10}(purchase order)|Request for a Quot(e|ation)')
- ),
- (
- regex.icontains(coalesce(body.html.display_text, body.plain.raw), '(please|kindly).{0,30}quote')
- ),
- (
- regex.icontains(subject.subject, '(request for (purchase|quot(e|ation))|\bRFQ\b|\bRFP\b)')
- ),
- (
- any(attachments, regex.icontains(.file_name, "(purchase.?order|Quot(e|ation))"))
- ),
- (
- any(ml.nlu_classifier(coalesce(
- body.html.display_text, body.plain.raw)).entities, .name == "request")
- and
- any(ml.nlu_classifier(coalesce(
- body.html.display_text, body.plain.raw)).entities,.name == "urgency")
- ),
- (
- any(ml.nlu_classifier(coalesce(
- body.html.display_text, body.plain.raw)).tags,.name == "purchase_order" and .confidence == "high")
+ (
+ regex.icontains(coalesce(body.html.display_text, body.plain.raw),
+ '(discuss.{0,15}purchas(e|ing))'
)
+ ),
+ (
+ regex.icontains(coalesce(body.html.display_text, body.plain.raw),
+ '(sign(ed?)|view).{0,10}(purchase order)|Request for a Quot(e|ation)'
+ )
+ ),
+ (regex.icontains(coalesce(body.html.display_text, body.plain.raw), '(please|kindly).{0,30}quote')),
+ (regex.icontains(subject.subject, '(request for (purchase|quot(e|ation))|\bRFQ\b|\bRFP\b)')),
+ (any(attachments, regex.icontains(.file_name, "(purchase.?order|Quot(e|ation))"))),
+ (
+ any(ml.nlu_classifier(coalesce(body.html.display_text, body.plain.raw)).entities,
+ .name == "request"
+ )
+ and any(ml.nlu_classifier(coalesce(body.html.display_text, body.plain.raw)).entities,
+ .name == "urgency"
+ )
+ ),
+ (
+ any(ml.nlu_classifier(coalesce(body.html.display_text, body.plain.raw)).tags,
+ .name == "purchase_order" and .confidence == "high"
+ )
+ )
)
attack_types:
- "BEC/Fraud"
diff --git a/detection-rules/suspicious_shipping_notification.yml b/detection-rules/suspicious_shipping_notification.yml
index 3d1f34b6141..e28ad6e655c 100644
--- a/detection-rules/suspicious_shipping_notification.yml
+++ b/detection-rules/suspicious_shipping_notification.yml
@@ -7,19 +7,24 @@ source: |
type.inbound
// contains at least 1 link
and length(body.links) > 0
-
and 3 of (
- strings.ilike(coalesce(body.html.display_text, body.plain.raw), "*(1)*"),
- strings.ilike(coalesce(body.html.display_text, body.plain.raw), "*waiting for delivery*"),
- strings.ilike(coalesce(body.html.display_text, body.plain.raw), "*delivery missed*"),
- strings.ilike(coalesce(body.html.display_text, body.plain.raw), "*tracking number*")
+ strings.ilike(coalesce(body.html.display_text, body.plain.raw), "*(1)*"),
+ strings.ilike(coalesce(body.html.display_text, body.plain.raw), "*waiting for delivery*"),
+ strings.ilike(coalesce(body.html.display_text, body.plain.raw), "*delivery missed*"),
+ strings.ilike(coalesce(body.html.display_text, body.plain.raw), "*tracking number*")
)
// urgent/time-sensitive language
- and any(ml.nlu_classifier(coalesce(body.html.display_text, body.plain.raw)).entities, .name == "urgency")
+ and any(ml.nlu_classifier(coalesce(body.html.display_text, body.plain.raw)).entities,
+ .name == "urgency"
+ )
// email is not personalized with recipients name
- and any(recipients.to, any(ml.nlu_classifier(coalesce(body.html.display_text, body.plain.raw)).entities, .text == ..email.local_part))
+ and any(recipients.to,
+ any(ml.nlu_classifier(coalesce(body.html.display_text, body.plain.raw)).entities,
+ .text == ..email.local_part
+ )
+ )
attack_types:
- "Credential Phishing"
- "Spam"
diff --git a/detection-rules/uri_handler_search_ms.yml b/detection-rules/uri_handler_search_ms.yml
index 3743df9390d..b5bc6a0e34f 100644
--- a/detection-rules/uri_handler_search_ms.yml
+++ b/detection-rules/uri_handler_search_ms.yml
@@ -10,11 +10,10 @@ type: "rule"
severity: "high"
source: |
type.inbound
- and any(attachments, .file_type == "html"
+ and any(attachments,
+ .file_type == "html"
and any(file.explode(.),
- any(.scan.strings.strings,
- regex.contains(., 'search-ms:query.*location:\\\\')
- )
+ any(.scan.strings.strings, regex.contains(., 'search-ms:query.*location:\\\\'))
)
)
attack_types:
diff --git a/detection-rules/urlhaus_malicious_dom_in_body_or_pdf.yml b/detection-rules/urlhaus_malicious_dom_in_body_or_pdf.yml
index f5f22f7b46a..7a39b636ba1 100644
--- a/detection-rules/urlhaus_malicious_dom_in_body_or_pdf.yml
+++ b/detection-rules/urlhaus_malicious_dom_in_body_or_pdf.yml
@@ -5,44 +5,45 @@ severity: "medium"
source: |
type.inbound
and (
- any(body.links,
- // filter potentially known good domains
- // prevents FPs on entries such as drive[.]google[.]com, or
- // other accidental pushes to the List
- .href_url.domain.domain not in $free_file_hosts and
- .href_url.domain.domain not in $tranco_1m and
- .href_url.domain.domain not in $umbrella_1m and
-
- // this ensures we don't flag on legit FQDNs that
- // aren't in the Tranco 1M, but their root domains are
- // eg: support[.]google[.]com
- .href_url.domain.root_domain not in $tranco_1m and
- .href_url.domain.root_domain not in $umbrella_1m and
- .href_url.domain.root_domain not in $free_subdomain_hosts and
+ any(body.links,
+ // filter potentially known good domains
+ // prevents FPs on entries such as drive[.]google[.]com, or
+ // other accidental pushes to the List
+ .href_url.domain.domain not in $free_file_hosts
+ and .href_url.domain.domain not in $tranco_1m
+ and .href_url.domain.domain not in $umbrella_1m
+ and
- .href_url.domain.root_domain in $abuse_ch_urlhaus_domains_trusted_reporters
- )
- or any(attachments, .file_type == "pdf"
- and any(file.explode(.),
- any(.scan.pdf.urls,
- // filter potentially known good domains
- // prevents FPs on entries such as drive[.]google[.]com, or
- // other accidental pushes to the List
- .domain.domain not in $free_file_hosts and
- .domain.domain not in $free_subdomain_hosts and
- .domain.domain not in $tranco_1m and
- .domain.domain not in $umbrella_1m and
+ // this ensures we don't flag on legit FQDNs that
+ // aren't in the Tranco 1M, but their root domains are
+ // eg: support[.]google[.]com
+ .href_url.domain.root_domain not in $tranco_1m
+ and .href_url.domain.root_domain not in $umbrella_1m
+ and .href_url.domain.root_domain not in $free_subdomain_hosts
+ and .href_url.domain.root_domain in $abuse_ch_urlhaus_domains_trusted_reporters
+ )
+ or any(attachments,
+ .file_type == "pdf"
+ and any(file.explode(.),
+ any(.scan.pdf.urls,
+ // filter potentially known good domains
+ // prevents FPs on entries such as drive[.]google[.]com, or
+ // other accidental pushes to the List
+ .domain.domain not in $free_file_hosts
+ and .domain.domain not in $free_subdomain_hosts
+ and .domain.domain not in $tranco_1m
+ and .domain.domain not in $umbrella_1m
+ and
- // this ensures we don't flag on legit FQDNs that
- // aren't in the Tranco 1M, but their root domains are
- // eg: support[.]google[.]com
- .domain.root_domain not in $tranco_1m and
- .domain.root_domain not in $umbrella_1m and
-
- .domain.domain in $abuse_ch_urlhaus_domains_trusted_reporters
- )
- )
- )
+ // this ensures we don't flag on legit FQDNs that
+ // aren't in the Tranco 1M, but their root domains are
+ // eg: support[.]google[.]com
+ .domain.root_domain not in $tranco_1m
+ and .domain.root_domain not in $umbrella_1m
+ and .domain.domain in $abuse_ch_urlhaus_domains_trusted_reporters
+ )
+ )
+ )
)
tags:
- "Abusech: URLhaus"
diff --git a/detection-rules/vip_impersonation_attack_surface_reduction.yml b/detection-rules/vip_impersonation_attack_surface_reduction.yml
index 7b1babdc6ee..34f8fe317c9 100644
--- a/detection-rules/vip_impersonation_attack_surface_reduction.yml
+++ b/detection-rules/vip_impersonation_attack_surface_reduction.yml
@@ -12,38 +12,37 @@ type: "rule"
severity: "high"
source: |
type.inbound
-
and any($org_vips, .display_name == sender.display_name)
-
and (
- // ignore personal <> work emails
- // where the sender and mailbox's display name are the same
- length(recipients.to) > 1 or length(recipients.cc) > 1
- or sender.display_name != mailbox.display_name
+ // ignore personal <> work emails
+ // where the sender and mailbox's display name are the same
+ length(recipients.to) > 1
+ or length(recipients.cc) > 1
+ or sender.display_name != mailbox.display_name
)
// first-time sender
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $sender_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $sender_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $sender_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $sender_domains
+ )
)
// unsolicited
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
+ )
)
tags:
- "Attack surface reduction"
diff --git a/discovery-rules/attachment_any_eml.yml b/discovery-rules/attachment_any_eml.yml
index 2f89130a4bd..a679cfd4a98 100644
--- a/discovery-rules/attachment_any_eml.yml
+++ b/discovery-rules/attachment_any_eml.yml
@@ -7,6 +7,5 @@ authors:
- twitter: "und3rf10w"
source: |
type.inbound
- and any(attachments,
- .file_extension in~ ('eml')
- )
+ and any(attachments, .file_extension =~ 'eml')
+
diff --git a/discovery-rules/attachment_suspicious_macro.yml b/discovery-rules/attachment_suspicious_macro.yml
index 9889e45ea8f..104e5592972 100644
--- a/discovery-rules/attachment_suspicious_macro.yml
+++ b/discovery-rules/attachment_suspicious_macro.yml
@@ -4,9 +4,24 @@ description: |
type: "rule"
source: |
type.inbound
- and any(attachments, .file_extension in~ ("doc", "docm", "docx", "dot", "dotm", "pptm", "ppsm", "xlm", "xls", "xlsb", "xlsm", "xlt", "xltm")
- and ml.macro_classifier(.).malicious
- and ml.macro_classifier(.).confidence in ("low", "medium", "high")
+ and any(attachments,
+ .file_extension in~ (
+ "doc",
+ "docm",
+ "docx",
+ "dot",
+ "dotm",
+ "pptm",
+ "ppsm",
+ "xlm",
+ "xls",
+ "xlsb",
+ "xlsm",
+ "xlt",
+ "xltm"
+ )
+ and ml.macro_classifier(.).malicious
+ and ml.macro_classifier(.).confidence in ("low", "medium", "high")
)
tags:
- "Suspicious attachment"
diff --git a/discovery-rules/attachment_with_free_subdomain_host_unsolicited.yml b/discovery-rules/attachment_with_free_subdomain_host_unsolicited.yml
index a08e89838d3..cf44a8835dd 100644
--- a/discovery-rules/attachment_with_free_subdomain_host_unsolicited.yml
+++ b/discovery-rules/attachment_with_free_subdomain_host_unsolicited.yml
@@ -6,23 +6,27 @@ description: |
type: "rule"
source: |
type.inbound
- and any(attachments, .file_extension in~ ("pdf")
- and any(file.explode(.),
- any(.scan.url.urls, .domain.root_domain in $free_subdomain_hosts
- and .domain.subdomain is not null
- and .domain.subdomain != "www"
- and .domain.domain != "sts.amazonaws.com"
- and .domain.root_domain != "zendesk.com"))
+ and any(attachments,
+ .file_extension in~ ("pdf")
+ and any(file.explode(.),
+ any(.scan.url.urls,
+ .domain.root_domain in $free_subdomain_hosts
+ and .domain.subdomain is not null
+ and .domain.subdomain != "www"
+ and .domain.domain != "sts.amazonaws.com"
+ and .domain.root_domain != "zendesk.com"
+ )
+ )
)
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
+ )
)
tags:
- "Suspicious attachment"
diff --git a/discovery-rules/attachment_with_url_shortener_unsolicited.yml b/discovery-rules/attachment_with_url_shortener_unsolicited.yml
index 1b620eae1a2..3eb8801dc5a 100644
--- a/discovery-rules/attachment_with_url_shortener_unsolicited.yml
+++ b/discovery-rules/attachment_with_url_shortener_unsolicited.yml
@@ -4,19 +4,19 @@ description: |
type: "rule"
source: |
type.inbound
- and any(attachments, .file_extension in~ ("pdf")
- and any(file.explode(.),
- any(.scan.url.urls, .domain.root_domain in $url_shorteners))
+ and any(attachments,
+ .file_extension in~ ("pdf")
+ and any(file.explode(.), any(.scan.url.urls, .domain.root_domain in $url_shorteners))
)
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
+ )
)
tags:
- "Suspicious attachment"
diff --git a/discovery-rules/impersonation_dmarc_failure_high_cred_phish_conclusion.yml b/discovery-rules/impersonation_dmarc_failure_high_cred_phish_conclusion.yml
index 8a49da15d7a..9a3232e8b74 100644
--- a/discovery-rules/impersonation_dmarc_failure_high_cred_phish_conclusion.yml
+++ b/discovery-rules/impersonation_dmarc_failure_high_cred_phish_conclusion.yml
@@ -4,11 +4,11 @@ type: "rule"
severity: "high"
source: |
type.inbound
- and any(distinct(headers.hops, .authentication_results.dmarc is not null), strings.ilike(.authentication_results.dmarc, "*fail"))
- and any(ml.nlu_classifier(coalesce(
- body.html.display_text, body.plain.raw)).intents,
- .name in ("cred_theft")
- and .confidence == "high"
+ and any(distinct(headers.hops, .authentication_results.dmarc is not null),
+ strings.ilike(.authentication_results.dmarc, "*fail")
+ )
+ and any(ml.nlu_classifier(coalesce(body.html.display_text, body.plain.raw)).intents,
+ .name in ("cred_theft") and .confidence == "high"
)
tags:
- "Brand impersonation"
diff --git a/discovery-rules/impersonation_github_sawfish.yml b/discovery-rules/impersonation_github_sawfish.yml
index 7be38dc9928..9a7aaf84a83 100644
--- a/discovery-rules/impersonation_github_sawfish.yml
+++ b/discovery-rules/impersonation_github_sawfish.yml
@@ -13,44 +13,59 @@ source: |
or headers.return_path.domain.root_domain != 'github.com'
)
and 2 of (
- regex.icontains(body.plain.raw, '.*account activity.*', '.*your activity.*', '.*suspicious api call.*'),
- regex.icontains(body.html.inner_text, '.*account activity.*', '.*your activity.*', '.*suspicious api call.*'),
- regex.icontains(subject.subject, '.*account activity.*', '.*your activity.*', '.*suspicious api call.*')
+ regex.icontains(body.plain.raw,
+ '.*account activity.*',
+ '.*your activity.*',
+ '.*suspicious api call.*'
+ ),
+ regex.icontains(body.html.inner_text,
+ '.*account activity.*',
+ '.*your activity.*',
+ '.*suspicious api call.*'
+ ),
+ regex.icontains(subject.subject,
+ '.*account activity.*',
+ '.*your activity.*',
+ '.*suspicious api call.*'
+ )
)
and 1 of (
strings.ilike(sender.display_name, '*github*'),
strings.ilike(sender.email.email, '*github*'),
strings.ilike(subject.subject, '*github*')
- )
- or any(body.links, .href_url.domain.root_domain in
- ('secure-git.org',
- 'auth-glthub.com',
- 'secure-glthub.com',
- 'githb.net',
- 'github-team.com',
- 'githubb.net',
- 'aws-update.net',
- 'corp-github.com',
- 'ensure-https.com',
- 'git-hub.co',
- 'git-secure-service.in',
- 'githb.co',
- 'glt-app.net',
- 'glt-hub.com',
- 'glthub.co',
- 'glthub.info',
- 'glthub.net',
- 'glthubb.info',
- 'glthube.app',
- 'glthubs.com',
- 'glthubs.info',
- 'glthubs.net',
- 'glthubse.info',
- 'slack-app.net',
- 'ssl-connection.net',
- 'sso-github.com',
- 'sts-github.com',
- 'tsl-github.com'))
+ )
+ or any(body.links,
+ .href_url.domain.root_domain in (
+ 'secure-git.org',
+ 'auth-glthub.com',
+ 'secure-glthub.com',
+ 'githb.net',
+ 'github-team.com',
+ 'githubb.net',
+ 'aws-update.net',
+ 'corp-github.com',
+ 'ensure-https.com',
+ 'git-hub.co',
+ 'git-secure-service.in',
+ 'githb.co',
+ 'glt-app.net',
+ 'glt-hub.com',
+ 'glthub.co',
+ 'glthub.info',
+ 'glthub.net',
+ 'glthubb.info',
+ 'glthube.app',
+ 'glthubs.com',
+ 'glthubs.info',
+ 'glthubs.net',
+ 'glthubse.info',
+ 'slack-app.net',
+ 'ssl-connection.net',
+ 'sso-github.com',
+ 'sts-github.com',
+ 'tsl-github.com'
+ )
+ )
and sender.email.email not in $recipient_emails
tags:
- "Brand impersonation"
diff --git a/discovery-rules/invoice_from_freemail_sender.yml b/discovery-rules/invoice_from_freemail_sender.yml
index c96433c412b..1b85e6d8f3f 100644
--- a/discovery-rules/invoice_from_freemail_sender.yml
+++ b/discovery-rules/invoice_from_freemail_sender.yml
@@ -9,14 +9,14 @@ source: |
and sender.email.domain.root_domain in $free_email_providers
// Unsolicited (has my organization ever sent an email to this sender?)
and (
- (
- sender.email.domain.root_domain in $free_email_providers
- and sender.email.email not in $recipient_emails
- )
- or (
- sender.email.domain.root_domain not in $free_email_providers
- and sender.email.domain.domain not in $recipient_domains
- )
+ (
+ sender.email.domain.root_domain in $free_email_providers
+ and sender.email.email not in $recipient_emails
+ )
+ or (
+ sender.email.domain.root_domain not in $free_email_providers
+ and sender.email.domain.domain not in $recipient_domains
+ )
)
tags:
- "Invoice fraud"
diff --git a/discovery-rules/outbound_to_disposable.yml b/discovery-rules/outbound_to_disposable.yml
index 29a62a837a7..a8ddfac6e1c 100644
--- a/discovery-rules/outbound_to_disposable.yml
+++ b/discovery-rules/outbound_to_disposable.yml
@@ -4,14 +4,22 @@ description: |
type: "rule"
severity: "low"
source: |
- type.outbound and
- any([recipients.to, recipients.cc, recipients.bcc],
- any(., .email.domain.domain in $disposable_email_providers and
+ type.outbound
+ and any([recipients.to, recipients.cc, recipients.bcc],
+ any(.,
+ .email.domain.domain in $disposable_email_providers
+ and
- // once lists can be updated from Feeds, we can drop this,
- // as the update has been made to the upstream disposable list
- .email.domain.root_domain not in ("craigslist.org", "gmai.com", "gmal.com", "gmial.com", "spamarrest.com")
- )
+ // once lists can be updated from Feeds, we can drop this,
+ // as the update has been made to the upstream disposable list
+ .email.domain.root_domain not in (
+ "craigslist.org",
+ "gmai.com",
+ "gmal.com",
+ "gmial.com",
+ "spamarrest.com"
+ )
+ )
)
tags:
- "DLP"
diff --git a/discovery-rules/url_shortener_from_suspicious_sender_tld.yml b/discovery-rules/url_shortener_from_suspicious_sender_tld.yml
index a9c4338c761..227159d5264 100644
--- a/discovery-rules/url_shortener_from_suspicious_sender_tld.yml
+++ b/discovery-rules/url_shortener_from_suspicious_sender_tld.yml
@@ -6,10 +6,10 @@ severity: "low"
source: |
type.inbound
and sender.email.domain.tld in $suspicious_tlds
- and any(body.links,
- .href_url.domain.domain in $url_shorteners
- // exempting legitimate Google Maps shortener
- and not strings.ilike(.href_url.url, "http?://goo.gl/maps*")
+ and any(body.links,
+ .href_url.domain.domain in $url_shorteners
+ // exempting legitimate Google Maps shortener
+ and not strings.ilike(.href_url.url, "http?://goo.gl/maps*")
)
and sender.email.email not in $recipient_emails
tags:
diff --git a/insights/attachments/malware_bazaar.yml b/insights/attachments/malware_bazaar.yml
new file mode 100644
index 00000000000..ec3a443a929
--- /dev/null
+++ b/insights/attachments/malware_bazaar.yml
@@ -0,0 +1,6 @@
+name: "MalwareBazaar: Malicious attachment hash (trusted reporters)"
+type: "query"
+source: map(filter(attachments, (.sha256 in $abuse_ch_malwarebazaar_sha256_trusted_reporters)), .file_name)
+severity: "high"
+tags:
+ - "Attachments"
diff --git a/insights/headers/utc_offset.yml b/insights/headers/utc_offset.yml
new file mode 100644
index 00000000000..758befd7fa1
--- /dev/null
+++ b/insights/headers/utc_offset.yml
@@ -0,0 +1,7 @@
+name: "UTC offset of sender"
+type: "query"
+source: |
+ headers.date_original_offset
+severity: "informational"
+tags:
+ - "Headers"