<div>Thank you Pavel for the excellent feedback.<br></div><div><br></div><div>Well, I really want to have option to specify sha1, sha256 and md5 in same message since I'm planning to use results from sources like VirusTotal which will be useful to correlate information like Aaron mention on that issue:<br></div><div><br></div><div>"assume you are given a hash (sha1) of a piece of malware and you want to find it in the events table. However, you only stored the md5 since that is what you received even though the sender sent you both fields (sha1 and md4 - such as the n6 feed). Then you can not ever find the right entry again."<br></div><div><br></div><div>I vote for:<br></div><div>{<br></div><div>    ...<br></div><div>    "malware.hash.md5": "<md5 hash>",<br></div><div>    "malware.hash.sha1": "<sha1 hash>",<br></div><div>    "malware.hash.sha256": "<sha256 hash>"<br></div><div>    ...<br></div><div>}<br></div><div><br></div><div>instead of:<br></div><div>{<br></div><div>    ...<br></div><div>    "malware.hash": "md5:<md5 hash>,sha1:<sha1 hash>,sha256:<sha256 hash>"<br></div><div>    ...<br></div><div>}<br></div><div><br></div><div>For me, we can evaluate this issue again when we start discuss Full-JSON vs "single value" format on mileston v1.1, but for now, I would go on the way that I showed.<br></div><div><br></div><div>What do you guys say?<br></div><div class="protonmail_signature_block "><div class="protonmail_signature_block-user "><br></div><div class="protonmail_signature_block-proton protonmail_signature_block-empty"><br></div></div><div><br></div><blockquote type="cite" class="protonmail_quote"><div>-------- Original Message --------<br></div><div>Subject: Re: [Intelmq-dev] IntelMQ Data Harmonization (DHO) - malware.hash key (issue 732)<br></div><div>Local Time: February 1, 2017 10:13 AM<br></div><div>UTC Time: February 1, 2017 10:13 AM<br></div><div>From: ph@cesnet.cz<br></div><div>To: Tomás Lima <synchroack@protonmail.ch><br></div><div>L. Aaron Kaplan <kaplan@cert.at>, intelmq-dev@lists.cert.at<br></div><div><br></div><div>Hi,<br></div><div> <br></div><div> hmm, looking into uri/url/urn terms, I have used the wrong one, sorry for<br></div><div> that. Because (from the name of the key in Idea) we know it is a hash, we<br></div><div> do not use "urn:" (or "urn:hash") prefix to keep things simple, so in<br></div><div> reality it is URI.<br></div><div> So we use hash name directly as a URI scheme.  As a scheme we use well<br></div><div> known hash names (md5, sha1), or reasonably descriptive name of unusual<br></div><div> hashes (btih for BitTorrent Info Hash, which can be encoded in various<br></div><div> ways), or just "hash:" as a fallback, where we do not know the internal<br></div><div> format of the hash (but we try not to overuse that and rather find out some<br></div><div> more unique/descriptive identifier). Example:<br></div><div> <br></div><div> Hash: [<br></div><div> "md5:5307d294b6ccd9854f2deed8c1628b72",<br></div><div> "sha1:LBPI666ED2QSWVD3VSO5BG5R54TE22QL",<br></div><div> "btih:QHQXPYWMACKDWKP47RRVIV7VOURXFE5Q",<br></div><div> "passwd:$1$Jrbw4gbM$Er6MejOKAXqT.VTII8vGV%2F"<br></div><div> ]<br></div><div> <br></div><div> So, to be precise, we do not try to overstandardize (various protocols we<br></div><div> might encounter in the future may use various convoluted types of hashes),<br></div><div> and in reality it is not even a real URI, because we do not register the<br></div><div> prefixes at IANA.<br></div><div> But for our intents and purposes it looks like a URI, quacks like a URI,<br></div><div> so we can keep things simple and work with that as with a URI. :)<br></div><div> <br></div><div> <br></div><div> Regarding lists/arrays - you have mentioned<br></div><div> https://github.com/certtools/intelmq/issues/394<br></div><div> <br></div><div> so if I understand well, you are considering multivalues for 1.1. From<br></div><div> that point of view, I would consider leaving the hash as single value for<br></div><div> 1.0 - as multiple identifiers for one content happen, but rarely; and you<br></div><div> are already keeping things simple with single source ip/single destination<br></div><div> ip, for example (of course only in case there is not somebody who _really_<br></div><div> needs the multivalue hash field).<br></div><div> Then in 1.1 you can work out list/multivalue issues and incorporate all<br></div><div> that in one go.<br></div><div> <br></div><div> -- Pavel<br></div><div> <br></div><div> P.S.: Maybe there are people here who don't know what I'm talking about<br></div><div> when referencing Idea, so here's what we are using:<br></div><div> https://idea.cesnet.cz/en/index<br></div><div> <br></div><div> > From: Tomás Lima <synchroack@protonmail.ch>, Date: Feb 01, 2017<br></div><div> ><br></div><div> >    Pavel, can you confirm in which "message" format are you currently using<br></div><div> >    URN? Is it like the following?<br></div><div> >    {<br></div><div> >        "malware.hash": [<br></div><div> >            "urn:hash::md5:5307d294b6ccd9854f2deed8c1628b72",<br></div><div> >            "urn:hash::sha1:LBPI666ED2QSWVD3VSO5BG5R54TE22QL"<br></div><div> >        ]<br></div><div> >    }<br></div><div> >    The current issue on IntelMQ is the fact that we cannot add list as<br></div><div> >    values but if it was that case, the proposal would suit perfectly.<br></div><div> >    Aaron and Sebastian, I see one issue:<br></div><div> >    If I have a bot like Virustotal which use malware.hash field to query the<br></div><div> >    API, how should I create the bot since the hashes are in one field comma<br></div><div> >    separated as you guys mentioned...? IMHO we should add one field per each<br></div><div> >    hash type (it does not change so quickly) and before the next hash type,<br></div><div> >    I expect that we as community have a final answer about Full-JSON support<br></div><div> >    or "single value" formats like we are currently supporting.<br></div><div> >    I think it's time to decide regarding the malware keys. How do you guys<br></div><div> >    want to proceed in the end?<br></div><div> > <br></div><div> >      -------- Original Message --------<br></div><div> >      Subject: Re: [Intelmq-dev] IntelMQ Data Harmonization (DHO) -<br></div><div> >      malware.hash key (issue 732)<br></div><div> >      Local Time: January 17, 2017 11:08 AM<br></div><div> >      UTC Time: January 17, 2017 11:08 AM<br></div><div> >      From: kaplan@cert.at<br></div><div> >      To: Sebastian Wagner <wagner@cert.at><br></div><div> >      intelmq-dev@lists.cert.at<br></div><div> >      > On 11 Jan 2017, at 10:36, Sebastian Wagner <wagner@cert.at> wrote:<br></div><div> >      ><br></div><div> >      > I also think that adding one field per hash type is not feasible as<br></div><div> >      > there are a lot of hash types and they change over time. That's why<br></div><div> >      we<br></div><div> >      > used malware.hash and the Crypt (C) names.<br></div><div> >      > I wasn't aware of URN at this time and it is definitely better -<br></div><div> >      easier<br></div><div> >      > to understand and supports more hash types. Consequently malware.hash<br></div><div> >      > needs to be a list (could be made comma separated for postgres?).<br></div><div> >      ><br></div><div> >      agreed<br></div><div> >      > Sebastian<br></div><div> >      ><br></div><div> >      ><br></div><div> >      > On 01/06/2017 09:47 AM, Pavel Kácha wrote:<br></div><div> >      >> Hi,<br></div><div> >      >><br></div><div> >      >> again, just speaking based on our experience - in a year or two<br></div><div> >      there<br></div><div> >      >> will be another set of popular hashes, and you will probably start<br></div><div> >      >> considering adding another explicit keys (malware.hash.newone) -<br></div><div> >      requiring<br></div><div> >      >> changing the harmonization in the process.<br></div><div> >      >> We have also found out that types hashes of hashes, which are not in<br></div><div> >      >> standard format, but have their own intrinsic unextractable<br></div><div> >      properties,<br></div><div> >      >> appear over the time. This could validate adding its own "name", for<br></div><div> >      >> example bittorrent BTIH hash.<br></div><div> >      >> We also thought that hash type is part of information, and thus<br></div><div> >      should be<br></div><div> >      >> part of data field, not key name.<br></div><div> >      >> So, we have just used one key, using solely URN namespace for adding<br></div><div> >      new<br></div><div> >      >> hash types.<br></div><div> >      >><br></div><div> >      >> (It is also necessary to say that one contents can be identified by<br></div><div> >      more<br></div><div> >      >> hashes, so you may find out over time that just single scalar field<br></div><div> >      may not<br></div><div> >      >> be enough. But I digress here. :) )<br></div><div> >      >><br></div><div> >      >> Cheers<br></div><div> >      >> -- Pavel<br></div><div> >      ><br></div><div> >      > --<br></div><div> >      > // Sebastian Wagner <wagner@cert.at> - T: +43 1 50564167201<br></div><div> >      > // CERT Austria - http://www.cert.at/<br></div><div> >      > // Eine Initiative der nic.at GmbH - http://www.nic.at/<br></div><div> >      > // Firmenbuchnummer 172568b, LG Salzburg<br></div><div> >      ><br></div><div> >      ><br></div><div> >      > _______________________________________________<br></div><div> >      > Intelmq-dev mailing list<br></div><div> >      > Intelmq-dev@lists.cert.at<br></div><div> >      > http://lists.cert.at/cgi-bin/mailman/listinfo/intelmq-dev<br></div><div> >      --<br></div><div> >      // CERT Austria<br></div><div> >      // L. Aaron Kaplan <kaplan@cert.at><br></div><div> >      // T: +43 1 505 64 16 78<br></div><div> >      // http://www.cert.at<br></div><div> >      // Eine Initiative der nic.at GmbH<br></div><div> >      // http://www.nic.at/ - Firmenbuchnummer 172568b, LG Salzburg<br></div><div> >      _______________________________________________<br></div><div> >      Intelmq-dev mailing list<br></div><div> >      Intelmq-dev@lists.cert.at<br></div><div> >      http://lists.cert.at/cgi-bin/mailman/listinfo/intelmq-dev<br></div><div> <br></div><div> > _______________________________________________<br></div><div> > Intelmq-dev mailing list<br></div><div> > Intelmq-dev@lists.cert.at<br></div><div> > http://lists.cert.at/cgi-bin/mailman/listinfo/intelmq-dev<br></div><div> <br></div></blockquote><div><br></div>