Skip to content

Commit

Permalink
Merge branch 'main' into bfilar.sender_domain_whois_signal
Browse files Browse the repository at this point in the history
  • Loading branch information
bfilar authored Sep 18, 2023
2 parents b8e2ac9 + bf62f17 commit fd754b0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions detection-rules/impersonation_amazon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ source: |
and sender.email.domain.root_domain in $free_email_providers
)
)
// negate listservs
and not (
any(headers.hops, any(.fields, .name == "List-Unsubscribe"))
and strings.contains(sender.display_name, "via")
)
and sender.email.domain.root_domain not in~ (
'amazon.com',
'amazon.com.au',
'amazon.com.be',
'amazon.co.uk',
'amazon.de',
'amazon.es',
Expand Down
5 changes: 5 additions & 0 deletions detection-rules/impersonation_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ source: |
or strings.ilike(sender.email.email, '*github*')
or strings.ilevenshtein(sender.email.domain.sld, 'github') <= 1
)
// negating listservs
and not (
any(headers.hops, any(.fields, .name == "List-Unsubscribe"))
and strings.contains(sender.display_name, "via")
)
and sender.email.domain.root_domain not in (
'github.com',
'gitlab.com',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ source: |
// 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)
.email.domain.valid
and strings.icontains(..href_url.url, .email.local_part)
and strings.icontains(..href_url.url, .email.domain.domain)
)
)
Expand All @@ -290,12 +291,12 @@ source: |
and (
// freemail providers should never be sending this type of email
sender.email.domain.domain in $free_email_providers
// if not freemail, it's suspicious if the sender's root domain
// doesn't match any links in the body
or all(body.links, .href_url.domain.root_domain != sender.email.domain.root_domain)
)
// first-time sender
and (
(
Expand Down

0 comments on commit fd754b0

Please sign in to comment.