[Bro-Dev] [JIRA] (BIT-1507) Intel framework does not match mail addresses properly

Jan Grashoefer (JIRA) jira at bro-tracker.atlassian.net
Wed Dec 9 11:15:00 PST 2015


    [ https://bro-tracker.atlassian.net/browse/BIT-1507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=23300#comment-23300 ] 

Jan Grashoefer commented on BIT-1507:
-------------------------------------

Having a look at this issue I noticed another problem with SMTP: Bro assumes that e.g. the To-field contains a comma-separated list of mail-addresses. According to [RFC 5322|https://tools.ietf.org/html/rfc5322#section-3.6.3] there is also the possibility to use groups (see below).
{code}
To: "Test Group":<member1 at example.com>,<member2 at example.com>;
{code}
Regarding groups I am not sure whether they can be nested. If I am not mistaken, the [grammar|https://tools.ietf.org/html/rfc5322#section-3.4] in the RFC would allow nested groups. But for my understanding this is not desired for the Destination Address Fields:
{quote}
the field name, which is either "To", "Cc", or "Bcc", followed by a comma-separated list of one or more addresses (either mailbox or group syntax)
{quote}

That leads to two questions for me:
# Would it be sufficient for Bro to extract just the addresses (usually whats inside < and >) without full names (description quoted with " )?
# If full names are desired, should Bro support nested group-syntax?

I think option 1 (just log the plain addresses) should be sufficient, because if someone is interested in more details, he could have a look at the raw headers himself.

What do you think about that?

> Intel framework does not match mail addresses properly
> ------------------------------------------------------
>
>                 Key: BIT-1507
>                 URL: https://bro-tracker.atlassian.net/browse/BIT-1507
>             Project: Bro Issue Tracker
>          Issue Type: Problem
>          Components: Bro
>    Affects Versions: 2.4
>         Environment: All
>            Reporter: Jan Grashoefer
>            Priority: Low
>              Labels: intel-framework
>
> Some time ago someone in #bro asked for matching mail addresses using the intel-framework. We realized, that the [seen-script|https://github.com/bro/bro/blob/master/scripts/policy/frameworks/intel/seen/smtp.bro] seems to contain a bug: Using {code}split_string_n(mail_address, /<.+>/, T, 1){code} to extract a mail address misses the last character and does not respect the possibility of multiple addresses.
> I will add a pcap later.



--
This message was sent by Atlassian JIRA
(v7.1.0-OD-02-030#71001)


More information about the bro-dev mailing list