Re: [mailop] (Mis)use of DKIM's length tag and it's impact on DMARC and BIMI

2024-05-19 Thread Vsevolod Stakhov via mailop

On 17/05/2024 15:12, Taavi Eomäe via mailop wrote:

Hi!

As part of coordinated disclosure, I am sharing it here as well. In 
short, using the approach described below, attackers can replace the 
entire contents of a letter, in a way the letters still pass DKIM’s 
cryptographic checks. This also means these forged letters can be easily 
replayed to reach their victims. This subverts many of the expectations 
operators have about DKIM signatures, DMARC and BIMI.


Although some of these dangers have been known for a while (some parts 
are even described in the RFC itself), things like the threat landscape, 
our approach and the extent to which this can be abused have changed. In 
our opinion previously suggested and (rarely) implemented mitigations do 
not reduce these risks sufficiently.


We hope that with some cooperation from mail operators improved defense 
measures can be implemented to strengthen DKIM for everyone.



A longer description with images is available here: 
https://www.zone.eu/blog/2024/05/17/bimi-and-dmarc-cant-save-you/




After some thinking, I have decided[1] that Rspamd should reject DKIM 
signatures where l tag covers less than 90% of the message body. I hope 
it should reduce the potential attack surface.


[1]: https://github.com/rspamd/rspamd/pull/4975
___
mailop mailing list
mailop@mailop.org
https://list.mailop.org/listinfo/mailop


Re: [mailop] (Mis)use of DKIM's length tag and it's impact on DMARC and BIMI

2024-05-19 Thread Alessandro Vesely via mailop

On Sat 18/May/2024 19:37:44 +0200 Dave Crocker via mailop wrote:

On 5/17/2024 7:12 AM, Taavi Eomäe via mailop wrote:


We hope that with some cooperation from mail operators improved defense 
measures can be implemented to strengthen DKIM for everyone.


As I recall, the original intent was to permit successful use of DKIM in spite 
of mailing lists' addition of footer text.



Ironically, to verify a DKIM signature after MLM transformation is more 
difficult, IME, if the original signature had l= than otherwise.  The reason is 
that using l= implies signing Content-Type:, which is a technical field that 
MLMs /need/ to change, and recovering its original value requires too much 
guesswork.


Best
Ale
--





___
mailop mailing list
mailop@mailop.org
https://list.mailop.org/listinfo/mailop