yes...<br>but ot all of the rules (i doubt you need jpeg and png fies)..<br><br>alert http any any -> any any (msg:"FILEMAGIC pdf";<br>
flow:established,to_server; filemagic:"PDF document"; filestore;<br>
sid:9; rev:1;)<br><br>there is you pdf :) rule<br><br>but in general you should follow the guide here:<br><a href="https://redmine.openinfosecfoundation.org/projects/suricata/wiki/MD5">https://redmine.openinfosecfoundation.org/projects/suricata/wiki/MD5</a><br>
<br>thanks<br><br><div class="gmail_quote">On Tue, Feb 19, 2013 at 12:31 PM, C. L. Martinez <span dir="ltr"><<a href="mailto:carlopmart@gmail.com" target="_blank">carlopmart@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Perfect!!. Do you mean to use ET-files.rules to accomplish this?? In<br>
this file, appears:<br>
<br>
#alert http any any -> any any (msg:"FILEEXT JPG file claimed";<br>
fileext:"jpg"; sid:1; rev:1;)<br>
#alert http any any -> any any (msg:"FILEMAGIC jpg(1)";<br>
flow:established,to_server; filemagic:"JPEG image data"; filestore;<br>
sid:10; rev:1;)<br>
#alert http any any -> any any (msg:"FILEMAGIC jpg(2)";<br>
flow:established,to_server; filemagic:"JFIF"; filestore; sid:11;<br>
rev:1;)<br>
#alert http any any -> any any (msg:"FILEMAGIC short";<br>
flow:established,to_server; filemagic:"very short file (no magic)";<br>
filestore; sid:12; rev:1;)<br>
#alert http any any -> any any (msg:"FILE store all"; filestore;<br>
noalert; sid:15; rev:1;)<br>
#alert http any any -> any any (msg:"FILE magic"; filemagic:"JFIF";<br>
filestore; noalert; sid:16; rev:1;)<br>
#alert http any any -> any any (msg:"FILE magic"; filemagic:"PNG";<br>
filestore; noalert; sid:17; rev:1;)<br>
#alert http any any -> any any (msg:"FILE magic -- windows";<br>
flow:established,to_client; filemagic:"executable for MS Windows";<br>
filestore; sid:18; rev:1;)<br>
#alert http any any -> any any (msg:"FILE tracking PNG (1x1 pixel)<br>
(1)"; filemagic:"PNG image data, 1 x 1,"; sid:19; rev:1;)<br>
#alert http any any -> any any (msg:"FILE tracking PNG (1x1 pixel)<br>
(2)"; filemagic:"PNG image data, 1 x 1|00|"; sid:20; rev:1;)<br>
#alert http any any -> any any (msg:"FILE tracking GIF (1x1 pixel)";<br>
filemagic:"GIF image data, version 89a, 1 x 1|00|"; sid:21; rev:1;)<br>
#alert http any any -> any any (msg:"FILE pdf claimed, but not pdf";<br>
flow:established,to_client; fileext:"pdf"; filemagic:!"PDF document";<br>
filestore; sid:22; rev:1;)<br>
#alert http any any -> any any (msg:"FILE magic"; filemagic:"GIF";<br>
filestore; noalert; sid:23; rev:2;)<br>
#alert http any any -> any any (msg:"FILEEXT BMP file claimed";<br>
fileext:"bmp"; sid:3; rev:1;)<br>
#alert http any any -> any any (msg:"FILESTORE jpg";<br>
flow:established,to_server; fileext:"jpg"; filestore; sid:6; rev:1;)<br>
#alert http any any -> any any (msg:"FILESTORE pdf";<br>
flow:established,to_server; fileext:"pdf"; filestore; sid:8; rev:1;)<br>
#alert http any any -> any any (msg:"FILEMAGIC pdf";<br>
flow:established,to_server; filemagic:"PDF document"; filestore;<br>
sid:9; rev:1;)<br>
<br>
But, where suricata stores this type of file when these rules are enabled??<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Tue, Feb 19, 2013 at 11:11 AM, Peter Manev <<a href="mailto:petermanev@gmail.com">petermanev@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I would suggest using "filestore" on the office/pdf file rules ..... then<br>
> probably a script that just feeds the files form the /var/log/files dir to<br>
> clamav ?<br>
><br>
> thanks<br>
><br>
> On Tue, Feb 19, 2013 at 10:30 AM, C. L. Martinez <<a href="mailto:carlopmart@gmail.com">carlopmart@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi all,<br>
>><br>
>> I would like to deploy some type of file carving technique (automated<br>
>> or not) in my actual infrastructure (three suricata sensors with full<br>
>> pcap traffic captured). In this first stage, I am only interested in<br>
>> office (word and excel files) and pdf files (and only that comes via<br>
>> http requests) and sends them to a clamav process or analyze using<br>
>> cuckoo sandbox.<br>
>><br>
>> I see somethig like this in<br>
>> <a href="https://home.regit.org/2012/10/defend-your-network-from-word/" target="_blank">https://home.regit.org/2012/10/defend-your-network-from-word/</a>, but my<br>
>> sensors are in IDS mode.<br>
>><br>
>> Somebody have tried something like this?? Any tip or example??<br>
>><br>
>> Thanks.<br>
>> _______________________________________________<br>
>> Suricata IDS Users mailing list: <a href="mailto:oisf-users@openinfosecfoundation.org">oisf-users@openinfosecfoundation.org</a><br>
>> Site: <a href="http://suricata-ids.org" target="_blank">http://suricata-ids.org</a> | Support: <a href="http://suricata-ids.org/support/" target="_blank">http://suricata-ids.org/support/</a><br>
>> List: <a href="https://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users" target="_blank">https://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users</a><br>
>> OISF: <a href="http://www.openinfosecfoundation.org/" target="_blank">http://www.openinfosecfoundation.org/</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Regards,<br>
> Peter Manev<br>
_______________________________________________<br>
Suricata IDS Users mailing list: <a href="mailto:oisf-users@openinfosecfoundation.org">oisf-users@openinfosecfoundation.org</a><br>
Site: <a href="http://suricata-ids.org" target="_blank">http://suricata-ids.org</a> | Support: <a href="http://suricata-ids.org/support/" target="_blank">http://suricata-ids.org/support/</a><br>
List: <a href="https://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users" target="_blank">https://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users</a><br>
OISF: <a href="http://www.openinfosecfoundation.org/" target="_blank">http://www.openinfosecfoundation.org/</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div>Regards,</div>
<div>Peter Manev</div>