Skip to content

Commit

Permalink
Swapping .received_spf verdictfor .authentication_results.spf (#954)
Browse files Browse the repository at this point in the history
  • Loading branch information
morriscode authored Nov 13, 2023
1 parent 2feb783 commit b0f8854
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ source: |
),
(
// SPF failure
any(distinct(headers.hops, .received_spf.verdict is not null),
strings.ilike(.received_spf.verdict, "*fail")
any(distinct(headers.hops, .authentication_results.spf is not null),
strings.ilike(.authentication_results.spf, "*fail")
)
),
)
Expand Down
4 changes: 2 additions & 2 deletions detection-rules/impersonation_blockchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ source: |
or strings.ilike(sender.email.domain.domain, '*blockchain.com*')
or any(body.links, strings.ilevenshtein(.href_url.domain.root_domain, 'blockchain') == 1)
)
and any(distinct(headers.hops, .received_spf.verdict is not null),
strings.like(.received_spf.verdict, "*fail")
and any(distinct(headers.hops, .authentication_results.spf is not null),
strings.like(.authentication_results.spf, "*fail")
)
and sender.email.domain.root_domain not in~ (
'blockchain.com',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ source: |
.authentication_results.dmarc_details.from.domain in $org_domains
// internal domain is spoofable
and .authentication_results.dmarc_details.verdict == "none"
and .authentication_results.dmarc == "none"
and .authentication_results.spf == "none"
and .authentication_results.compauth.verdict not in ("pass", "softpass")
)
Expand Down
2 changes: 1 addition & 1 deletion insights/authentication/spf_any_fail.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "SPF: Fail"
type: "query"
source: |
any(distinct(headers.hops, .received_spf.verdict is not null), strings.ilike(.received_spf.verdict, "*fail"))
any(distinct(headers.hops, .authentication_results.spf is not null), strings.ilike(.authentication_results.spf, "*fail"))
severity: "medium"
tags:
- "Sender authentication"
2 changes: 1 addition & 1 deletion signals/authentication/authentication_spf_error.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Authentication: SPF Error"
type: "query"
source: |
any(distinct(headers.hops, .received_spf.verdict is not null), strings.ilike(.received_spf.verdict, "*error"))
any(distinct(headers.hops, .authentication_results.spf is not null), strings.ilike(.authentication_results.spf, "*error"))
2 changes: 1 addition & 1 deletion signals/authentication/authentication_spf_failure.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Authentication: SPF Failure"
type: "query"
source: |
any(distinct(headers.hops, .received_spf.verdict is not null), strings.ilike(.received_spf.verdict, "*fail"))
any(distinct(headers.hops, .authentication_results.spf is not null), strings.ilike(.authentication_results.spf, "*fail"))

0 comments on commit b0f8854

Please sign in to comment.