<p>Also, could just make it a requirement, unless you're distributing bins only.</p>
<div class="gmail_quote">On Mar 23, 2012 1:22 PM, "Victor Julien" <<a href="mailto:victor@inliniac.net">victor@inliniac.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
ET recently started using Suricata's filemagic keyword to determine<br>
certain file types in HTTP. Martin and I identified a serious issue with<br>
the concept. The problem is that for the file classification Suricata<br>
relies on libmagic and it's file definitions. It turns out that there is<br>
some variance between libmagic versions.<br>
<br>
For example and Window exec we played with, on my system (Ubuntu 11.10,<br>
libmagic1 5.04-5ubuntu3) returns:<br>
<br>
"PE32 executable for MS Windows (GUI) Intel 80386 32-bit"<br>
<br>
However, on Martin's SUSE install it returns:<br>
<br>
"MS-DOS executable PE  for MS Windows (GUI) Intel 80386 32-bit"<br>
<br>
This made SID 2000419 False Negative for Martin.<br>
<br>
We have tried loading the more recent Ubuntu magic definitions in<br>
Suricata on the SUSE system, but this failed to work as the format is<br>
different. So distributing a set of magic definitions with ET is not<br>
feasible.<br>
<br>
One option would be to have several rules, one for each version of the<br>
magic definition, but at this point I don't know how many variations<br>
exist. This is probably a maintenance nightmare anyway.<br>
<br>
Another option would be to make the match more generic, but this may<br>
still FN with unknown variations and may FP if it's too broad.<br>
<br>
So I think at this point it's best to revert the filemagic rules to<br>
their originals.<br>
<br>
In the future we may consider distributing libmagic with Suricata, like<br>
we do with libhtp, so that we know for sure that everyone runs the same<br>
version. This may not sit well with distributions shipping Suricata though.<br>
<br>
Ideas / comments are welcome.<br>
<br>
--<br>
---------------------------------------------<br>
Victor Julien<br>
<a href="http://www.inliniac.net/" target="_blank">http://www.inliniac.net/</a><br>
PGP: <a href="http://www.inliniac.net/victorjulien.asc" target="_blank">http://www.inliniac.net/victorjulien.asc</a><br>
---------------------------------------------<br>
<br>
_______________________________________________<br>
Emerging-sigs mailing list<br>
<a href="mailto:Emerging-sigs@lists.emergingthreats.net">Emerging-sigs@lists.emergingthreats.net</a><br>
<a href="http://lists.emergingthreats.net/mailman/listinfo/emerging-sigs" target="_blank">http://lists.emergingthreats.net/mailman/listinfo/emerging-sigs</a><br>
<br>
Support Emerging Threats! Subscribe to Emerging Threats Pro <a href="http://www.emergingthreatspro.com" target="_blank">http://www.emergingthreatspro.com</a><br>
The ONLY place to get complete premium rulesets for Snort 2.4.0 through Current!<br>
</blockquote></div>