On Mon, Aug 19, 2013 at 10:02 AM, <
rew...@gmail.com> wrote:
> Hi,
>
Hi Rew,
see inline for comment/missing information.
> Definitely I'm doing something wrong, but after days of searching I can't
> find what. The only info I found is to have the gen-msg and sid-msg up to
> date.
> The gen-msg.map and sid-msg.map are up to date, currently using pulledpork
> to update the rules.
>
> First time when I start barnyard, the mysql database is getting populated
> with all the entries from gen-msg.map
> I can see them with "SELECT * FROM signature;"
>
> Then the preprocessor alarms are coming up, barnyard2 is adding them in the
> database as Snort Alert [x.x.xxx]
Which version of barnyard2 are you running?
>
> barnyard2[25615]: INFO [dbProcessSignatureInformation()]: [Event: 89] with
> [gid: 129] [sid: 18] [rev: 1] [classification: 3] [priority: 2] was not
> found in barnyard2 signature cache, this could lead to display
> inconsistency.
>
The message above from syslog is incomplete, could you paste the
complete message
this could help understand which code path is used and why.
> After this I'm grepping the gen-msg.map file for sig id 129 and manually
> changing it in the database.
>
How was the row looking before and after you changed it?
> Now if I look again in the database I have this signature twice, once added
> when barnyard started first time and once when the alarm came up for the
> first time.
>
But you mentionned above that you did issue a query to change
something in a row,
which row did you manually change and what was the query used?
> +--------+--------------+-------------------------------------------------------+--------------+---------+---------+---------+--------------+
> | sig_id | sig_class_id | sig_name
> | sig_priority | sig_rev | sig_sid | sig_gid | events_count |
> +--------+--------------+-------------------------------------------------------+--------------+---------+---------+---------+--------------+
> | 128 | 0 | stream5: Data sent on stream after TCP Reset
> received | 3 | 1 | 18 | 129 | 0 |
> | 534 | 3 | stream5: Data sent on stream after TCP Reset
> received | 2 | 1 | 18 | 129 | 169 |
> +--------+--------------+-------------------------------------------------------+--------------+---------+---------+---------+--------------+
>
> The difference is the signature priority, but no idea where from these
> priorities are coming. Within gen-msg you have only the gid and sid of the
> signature. Is this the reason the alarm signature is added a second time?
> Any idea what's happening here ?
>
Priority and classification, those are defined for preprocessor in
preprocessor.rule and in the preprocessor code it self.
-elz