So on my_server alert 31151 is triggered which then triggers 100103,
and those log messages are discarded.
> <!-- WEAKEN standard rule on my_server -->
> <rule id="100102" level="10" frequency="20" timeframe="120">
> <hostname>my_server</hostname>
> <if_matched_sid>31101</if_matched_sid>
> <same_source_ip />
> <description>Mutiple web server 400 error codes </
> description>
> <description>from same source ip.</description>
> <group>web_scan,recon,</group>
> </rule>
>
They never make it to this rule. You probably need to have this rule
in the set before 31151.
In order to define a rule before 31151, I have to put it in web_rules.xml, which is not a good idea, I guess.
This is totally untested (and if you test it you should report back
;)), but you could add 31151 to local_rules.xml with the overwrite
option:
<rule id="31151" level="10" frequency="10" timeframe="120" overwrite="yes">
<if_matched_sid>31101</if_matched_sid>
<same_source_ip />
<description>Mutiple web server 400 error codes </description>
<description>from same source ip.</description>
<group>web_scan,recon,</group>
</rule>
I'm not sure that will "fix" the order, but it's worth a shot.
of course I could create one rule with one hostname and another one with all other hostname, but if I forget a new server in that rule, it will not be protected by this rule.
for example with these two rules:
<rule id="31151" level="10" frequency="120" timeframe="10" overwrite="yes">
<if_matched_sid>31101</if_matched_sid>
<same_source_ip />
<hostname>no_dev_server_1</hostname>
<hostname>no_dev_server_2</hostname>
<hostname>no_dev_server_3</hostname>
<description>Mutiple web server 400 error codes </description>
<description>from same source ip.</description>
<group>web_scan,recon,</group>
</rule>
<rule id="100103" level="10" frequency="120" timeframe="120">
<if_matched_sid>31101</if_matched_sid>
<same_source_ip />
<hostname>development_server</hostname>
<description>Mutiple web server 400 error codes </description>
<description>from same source ip.</description>
<group>web_scan,recon,</group>
</rule>
Is there another solution to it? I hope and guess that this situation is quite common. Companies do have different security requirements for different servers.
You could try using a cdb list, but there isn't really any negation options.