<div dir="ltr">Yeah, the sig loads in 3.2 fine. Turns out that this will do a filestore exactly as the sig is written! So this looks like it just won't work in 3.1.3 for some reason. Sorry for all the trouble. I will look into this a little more.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 10, 2017 at 1:07 PM, Cooper F. Nelson <span dir="ltr"><<a href="mailto:cnelson@ucsd.edu" target="_blank">cnelson@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yeah unfortunately I'm not an expert on libmagic, so I don't know what<br>
the limitations are.<br>
<br>
What version of suricata are you running? Victor Julien has said that<br>
your sig loads fine for him, which if it works implies you can now do<br>
file extraction using hyperscan, instead of libmagic. So, for example,<br>
you could add the 'filestore' keyword to the 'ET POLICY PE EXE or DLL<br>
Windows file download HTTP' and avoid the overhead of libmagic entirely.<br>
<br>
I just tested this on v3.2.1 and it's working for PE http downloads!<br>
This is a *huge* win as libmagic kills performance.<br>
<br>
This is documented, but I guess I missed this as a feature addition.<br>
<br>
> <a href="http://suricata.readthedocs.io/en/latest/rules/file-keywords.html?highlight=filestore" rel="noreferrer" target="_blank">http://suricata.readthedocs.<wbr>io/en/latest/rules/file-<wbr>keywords.html?highlight=<wbr>filestore</a><br>
<br>
I'm copying Victor as you should probably put a note in the<br>
documentation to avoid using the 'libmagic' keyword, as it really<br>
impacts performance on a busy sensor.<br>
<br>
-Coop<br>
<span class="im HOEnZb"><br>
On 3/10/2017 9:36 AM, erik clark wrote:<br>
> There is a giant problem with using a magic entry though. I have<br>
> absolutely no idea where in the file that packed statement would be; It<br>
> might be 30 bytes in, it might be 300 bytes in, or more. Because of<br>
> this, I have no offset I can provide to begin looking for the string.<br>
> Even when I specifiy it with<br>
<br>
<br>
</span><div class="HOEnZb"><div class="h5">--<br>
Cooper Nelson<br>
Network Security Analyst<br>
UCSD ITS Security Team<br>
<a href="mailto:cnelson@ucsd.edu">cnelson@ucsd.edu</a> x41042<br>
<br>
</div></div></blockquote></div><br></div>