Hi,
I had to collect and put your responses from the mailing list into this email, because I didn't get the reply messages in my email. Anyway, What I was trying to accomplish was to write a rule that fires when executable files are downloaded from any web server. For that, I put .exe file in a web server and requested that file via httpfrom the machine that runs Snort. After removing the "flow:to_server,established" from the rule, the rule fired but from your responses, I think I was not doing it the right way. Could you suggest me a better way? Also, in which rule files are the emerging threat rules 2000419 and 2015744?
-Thanks all guys
This is the response from waldo kitty. FWIW: this rule will not detect .exe files only... what it detects is the content of ".exe" in any traffic being *sent to a server*... this post should fire this rule if snort is looking at your mail server's connection when this message arrives... in fact, every message in this thread should have fired your rule when they hit your smtp server if snort is in the right place to see it...
The VRT ruleset contains rules looking for PE files also... Sent from the iRoad On May 4, 2013, at 7:18, James Lay <digit...@gmail.com
> wrote: > Ho are you trying to test? Also check out Emerging Threat rules 2000419 and \ > 2015744 for more info on rules that hit on exe. > James > > On May 4, 2013, at 5:46 AM, tarik shalo <tarik...@gmail.com> wrote: > > > Hello, > > > > I wrote the following rule to test if Snort fires when any executable files are \ > > downloaded. However, the rule is not firing for some reason. Any help or other \ > > option to accomplish the same goal, pls? > > alert any any -> any any (msg: ".exe found"; flow:to_server,established; \ > > content:".exe"; nocase;classtype:policy-violation;sid:10000056;rev:1; ) > > -Shalo
Try flow:from_server,established; and instead of the string ".exe" try content:"|4d 5a|"; which is equivalent to the text string "MZ" found at the beginning of most PE files.
On May 4, 2013 7:30 PM, "waldo kitty" <wkit...@windstream.net> wrote:
>
> On 5/4/2013 16:34, tarik shalo wrote:
> > Hi,
> >
> > I had to collect and put your responses from the mailing list into this
> > email, because I didn't get the reply messages in my email.
>
> i don't know how others do it but i only reply to the list unless special
> circumstances are in play... you should be getting all messages from the list...
> if you aren't, you might want to check our spam bucket ;)
>
> > Anyway, What I was trying to accomplish was to write a rule that fires when
> > executable files are downloaded from any web server. For that, I put .exe
> > file in a web server and requested that file via httpfrom the machine that
> > runs Snort. After removing the"flow:to_server,established" from the rule,
> > the rule fired but from your responses, I think I was not doing it the right
> > way. Could you suggest me a better way?
>
> well, the thing is that detecting the extension is not going to be complete...
> you need to detect the binary signature(s)... some DOS/Winwhatever EXEs start
> with MZ while most of todays stuff starts with PE but there's a bit more to it
> than just that...
>
> additionally, it is not just a "content" detection anywhere like in headers
> which your rule would catch... VRT has numerous rules which work for detecting
> items like this... in particular, the file-executable.rules which set flowbits
> (without an alert) indicating that such a file was detected and then other rules
> are used to detect if the flowbit is set as well as looking at other aspects of
> the data to determine if an alert should be fired for policy violations or
> malware or such...
>
> so basically, you cannot detect an EXE file simply by looking for ".exe" in the
> traffic... you have to detect the signature of an executable binary... that
> means looking inside binary files to see what is uniform to be used for detection...
>
> > Also, in which rule files are the emerging threat rules 2000419 and 2015744?
>
> those are in the Emerging Threats rules set... it is distributed by Emerging
> Threats and completely separate from the VRT rules...
>
Try flow:from_server,established; and instead of the string ".exe" try content:"|4d 5a|"; which is equivalent to the text string "MZ" found at the beginning of most PE files.
I’ve been able to find the 2000419 rule within the emerging threats rule file, however, I have not been able to find the 2015744 rule. I have spent some time searching and after no success thought I’d ask for some assistance. This is the link I used:
http://rules.emergingthreats.net/open/snort-2.9.0/emerging-all.rules
Thanks for the help.
Brian
From: Caleb Jaren [mailto:tropism...@gmail.com]
Sent: Sunday, May 05, 2013 1:52 AM
To: waldo kitty
Cc: snort...@lists.sourceforge.net
Subject: Re: [Snort-users] .exe
Try flow:from_server,established; and instead of the string ".exe" try content:"|4d 5a|"; which is equivalent to the text string "MZ" found at the beginning of most PE files.
On May 4, 2013 7:30 PM, "waldo kitty" <wkit...@windstream.net> wrote:
that rule you can't find may be in the ET Pro set... you should perhaps ask
about this in the emerging threats list unless one of us who use ET's offerings
can confirm that it is in their Pro set... i cannot at this time as i don't
(yet) use the Pro set from ET or VRT...
--
NOTE: No off-list assistance is given without prior approval.
Please keep mailing list traffic on the list unless
private contact is specifically requested and granted.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________