<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Texto de globo Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-language:EN-US;}
span.EstiloCorreo17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.TextodegloboCar
{mso-style-name:"Texto de globo Car";
mso-style-priority:99;
mso-style-link:"Texto de globo";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="CA" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ve this custom rule:<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:CA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:CA">...<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="RU" style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:CA">alert udp [$EXTERNAL_NET,!$GOOGLE_DNS] 53 -> [$HOME_NET,!$DNS_SERVERS] any (msg:"Possible atac DNS"; threshold: type both, track by_dst, count 600, seconds
60; classtype:attempted-dos; sid:101111009; rev:5;)</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:CA">...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:CA"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">And this definition on suricata.yaml:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"># Holds variables that would be used by the engine.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">vars:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"> # Holds the address group vars that would be passed in a Signature.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"> # These would be retrieved during the Signature address parsing stage.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"> address-groups:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"> HOME_NET: "[x.x.x.x/24]"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"> GOOGLE_DNS: "[8.8.8.8,8.8.4.4]"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"> EXTERNAL_NET: "!$HOME_NET"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"> HTTP_SERVERS: "$HOME_NET"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"> SMTP_SERVERS: "$HOME_NET"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"> SQL_SERVERS: "$HOME_NET"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"> DNS_SERVERS: "[a.a.a.a,b.b.b.b,c.c.c.c,d.d.d.d]"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"> TELNET_SERVERS: "$HOME_NET"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">...<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">However, there are alerts like these:<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">08/27/2014-10:33:37.344581 [**] [1:101111009:5] Possible atac DNS [**] [Classification: Attempted Denial of Service] [Priority: 2] {UDP} 8.8.8.8:53 -> a.b.c.d:52721<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">08/27/2014-10:33:48.511591 [**] [1:101111009:5] Possible atac DNS [**] [Classification: Attempted Denial of Service] [Priority: 2] {UDP} 8.8.8.8:53 -> a.b.c.d:35899<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">...<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m expecting to totally ignore packets whith IP source 8.8.8.8. What I’m doing wrong?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ve also tried<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas;mso-fareast-language:CA">
</span><span lang="RU" style="font-size:9.0pt;font-family:Consolas;mso-fareast-language:CA">[$EXTERNAL_NET,!</span><span style="font-size:9.0pt;font-family:Consolas;mso-fareast-language:CA">[8.8.8.8,8.8.4.4]</span><span lang="RU" style="font-size:9.0pt;font-family:Consolas;mso-fareast-language:CA">]</span><span style="font-size:9.0pt;font-family:Consolas;mso-fareast-language:CA"><o:p></o:p></span></p>
<p class="MsoNormal">Instead of:<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas;mso-fareast-language:CA"></span><span style="font-size:9.0pt;font-family:Consolas;mso-fareast-language:CA"> <span lang="RU">[$EXTERNAL_NET,!$GOOGLE_DNS]</span></span><span style="font-size:10.0pt"><o:p></o:p></span></p>
<p class="MsoNormal">With the same result.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Each time I modify the rule, I increment REV number and restart suricata.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you very much,<o:p></o:p></p>
<p class="MsoNormal">Xavier Romero<o:p></o:p></p>
</div>
</body>
</html>