email.body_md5 matches on md5 hash generated from email body
This keyword maps to the EVE field email.body_md5
It is a sticky buffer
Supports prefiltering
Ticket: #7587
@ -222,3 +222,29 @@ Example of a signature that would alert if a packet contains the MIME field ``re
..container:: example-rule
alert smtp any any -> any any (msg:"Test mime email received"; :example-rule-emphasis:`email.received; content:"from [65.201.218.30] (helo=COZOXORY.club)by 173-66-46-112.wash.fios.verizon.net with esmtpa (Exim 4.86)(envelope-from )id 71cF63a9for mirjam@abrakadabra.ch\; Mon, 29 Jul 2019 17:01:45 +0000";` sid:1;)
email.body_md5
--------------
Matches the ``md5`` hash generated from an email body.
This keyword only works if config option
``app-layer.protocols.smtp.mime.body-md5`` is enabled or auto.
It should be used with ``requires: keyword email.body_md5;``
Syntax::
email.body_md5; content:"<content to match against>";
``email.body_md5`` is a 'sticky buffer' and can be used as a ``fast_pattern``.
This keyword maps to the EVE field ``email.body_md5``.
Example
^^^^^^^
Example of a signature that would alert if the hash ``ed00c81b85fa455d60e19f1230977134``
is generated from an email body:
..container:: example-rule
alert smtp any any -> any any (msg:"Test mime email body_md5"; :example-rule-emphasis:`requires: keyword email.body_md5; email.body_md5; content:"ed00c81b85fa455d60e19f1230977134";` sid:1;)