On Tue, 17 Apr 2018, Benny Pedersen wrote:

Paul Stead skrev den 2018-04-17 21:41:

I have a plugin already developed which already extracts attachments
and can check the MD5/SHA1 against a DNS resolver, the logic to add
SHA256 support would be simple and easy to add.

make cache into sqlite, where cache negative and possitive is configured in local.cf for that plugin, default cache time could be 86400 secs for positive hits, and for negative hits 3600 so it keeps live quiries low

One detail to bear in mind is that the number of engines that detect a hash as hostile will change over time. I was envisioning something like banded DNS, where it returns 127.0.0.1 for 1-5 engines, 127.0.0.2 for 6-10 and 127.0.0.4 for more than ten, with the SA score increasing with the more engines calling it hostile.

This would prompt the lower bands to be cached for shorter than the higher bands.

It might be prudent to keep an independent history of the hashes, so that a negative hit for a hash we've seen once in the last 15 minutes is cached more briefly than a negative hit for a hash we've seen a dozen times in the last two days. This would balance the query load against VirusTotal not having seen a new payload yet.

--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 [email protected]    FALaholic #11174     pgpk -a [email protected]
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  Our government should bear in mind the fact that the American
  Revolution was touched off by the then-current government
  attempting to confiscate firearms from the people.
-----------------------------------------------------------------------
 2 days until the 243rd anniversary of The Shot Heard 'Round The World

Reply via email to