-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signals: additional contextual signals (#848)
- Loading branch information
Showing
12 changed files
with
90 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: "Body: Contains Shipping Language" | ||
type: "query" | ||
source: | | ||
regex.icontains(body.current_thread.text, | ||
"abandon.*package", | ||
"courier.*able", | ||
"missed.*shipping.*notification", | ||
"missed.shipment.notification", | ||
"unable.*deliver", | ||
"delivery.*attempt.*failed", | ||
"signed.*delivery", | ||
"status of your (.{314})? ?delivery", | ||
"delivery attempt", | ||
"delivery stopped for shipment", | ||
"fedex tracking", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: "Content: Body is an Inline Image" | ||
type: "query" | ||
source: | | ||
length(body.html.raw) < 200 | ||
and length(body.links) > 0 | ||
and strings.ilike(body.html.raw, "*img*cid*") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: "Headers: URLHaus Domain" | ||
type: "query" | ||
source: | | ||
any(headers.domains, | ||
.root_domain in $abuse_ch_urlhaus_domains_trusted_reporters | ||
and .root_domain not in $tranco_1m | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: "Link: Contains Recipient Email" | ||
type: "query" | ||
source: | | ||
any(body.links, any(recipients.to, strings.icontains(..href_url.query_params, .email.email))) | ||
any(body.links, any(recipients.to, strings.icontains(..href_url.url, .email.email))) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: "Link: URL with Unicode U+2044 (⁄) or U+2215 (∕) characters" | ||
type: "query" | ||
source: | | ||
regex.icontains(body.plain.raw, 'https?:\/\/[^\s⁄∕]+(?:\/[^\s⁄∕]+)*[⁄∕][^\s⁄∕]+') | ||
or any(body.links, regex.icontains(.href_url.url, 'https?:\/\/[^\s⁄∕]+(?:\/[^\s⁄∕]+)*[⁄∕][^\s⁄∕]+')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name: "Link: Count Unique Display Text" | ||
type: "query" | ||
source: | | ||
length(distinct(body.links, .href_url.url)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: "Link: Sender domain does not match any body links" | ||
type: "query" | ||
source: | | ||
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 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: "Link: IPFS" | ||
type: "query" | ||
source: | | ||
any(body.links, | ||
// Any body link domains contain "ipfs" | ||
strings.icontains(.href_url.domain.domain, "ipfs") | ||
// 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 | ||
) | ||
) | ||
) | ||
// adding negation block for legitimate domains with ipfs in their name | ||
and not sender.email.domain.domain in ("shipfsl.com") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: "Link: Same URL with different Display Texts" | ||
type: "query" | ||
source: | | ||
length(body.links) > 1 | ||
and length(distinct(body.links, .href_url.url)) == 1 | ||
and length(distinct(body.links, .display_text)) > 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name: "Sender: Display Name Contains Recipient Root Domain" | ||
type: "query" | ||
source: | | ||
any(recipients.to, strings.icontains(sender.display_name, .email.domain.root_domain)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
name: "Sender: Display Name Contains Email Address" | ||
type: "query" | ||
source: | | ||
regex.contains(sender.display_name, '[a-z0-9]+@[a-z]+') |