<div dir="ltr">Thank you, this helped.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 18, 2013 at 2:45 AM, Anoop Saldanha <span dir="ltr"><<a href="mailto:anoopsaldanha@gmail.com" target="_blank">anoopsaldanha@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, Jul 17, 2013 at 4:53 AM, Theodore Elhourani<br>
<<a href="mailto:theodore.elhourani@gmail.com">theodore.elhourani@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I am trying to generate alerts for multiple failed ftp logins. The rules I<br>
> am using are<br>
><br>
><br>
> (1) alert tcp any any -> any any (msg:"incorrect login attempt -- count<br>
> logins !"; content:"incorrect"; flowint:loginfail, +, 1; sid:101;)<br>
> (2) alert tcp any any -> any any (msg:"Two login attempts fail in a Stream";<br>
> content:"incorrect"; flowint:loginfail, ==, 2; sid:102;)<br>
><br>
><br>
> I tried using<br>
><br>
> (3) alert tcp any any -> any any (msg:"Two or more login attempts fail in a<br>
> Stream"; content:"incorrect"; flowint:loginfail, >, 1; sid:103;)<br>
><br>
> to alert for more than one failed login attempt.<br>
><br>
> I haven't been able to generate an alert using both (2) and (3). At least<br>
> three failed login attempts occur in a single stream.<br>
><br>
> Surricata is generating an alert when an alertall rule like this one is<br>
> used:<br>
> alert tcp any any -> any any (msg:"Two login attempts fail in a Stream";<br>
> content:"incorrect";)<br>
><br>
> Can someone tell me what is missing in the rules? The client/server capture<br>
> is attached for reference.<br>
><br>
<br>
</div></div>I think attaching a dsize:>0; to the first rule should fix this issue.<br>
<br>
Why the content:"incorrenct" on the second rule?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
-------------------------------<br>
Anoop Saldanha<br>
<a href="http://www.poona.me" target="_blank">http://www.poona.me</a><br>
-------------------------------<br>
</font></span></blockquote></div><br></div>