
So here's the new rule:
alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"New, invalid TCP
Connection"; program: kernel; content: "New,invalid"; content: "TCP";
parse_ip; parse_port; normalize: kernel; classtype: tcp-connection;
sid: 6000000; rev:1;)
and the matching kernel-normalize.rulebase:
prefix=
rule=: SRC=%src-ip:ipv4% DST=%dst-ip:ipv4% SPT=%src-port:number% DPT=
%dst-port:number%
Hey Clark!So here's what I got in sagan.conf:normalize: kernel, $RULE_PATH/kernel-normalize.rulebaseinclude $RULE_PATH/kernel.rulesAnd I've tried:alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"New, invalid TCP Connection"; program: kernel; content: "New,invalid"; content: "TCP"; parse_ip; parse_port; classtype: tcp-connection; sid: 6000000; rev:1;)andalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"New, invalid TCP Connection"; program: kernel; content: "New,invalid"; content: "TCP"; normalize: kernel; classtype: tcp-connection; sid: 6000000; rev:1;)With parse_ip; parse_port I get:With the second one I get the segfault.So parse_ip is working for the first IP, but not the ports, and possible not the last IP. This machine is a router…2 nics, so I'm thinking maybe I need to specify the nic with the external IP address, since that's actually where I'm seeing these firewall hits. Thanks Clark.
Also, this is actually more of a liblognorm issue that Sagan. Also,
Rainer
(the author) might also have some ideas as well.
That mailing list is at:
http://lists.adiscon.net/mailman/listinfo/lognorm
Again, I'll look at it ASAP.

Champ,
Could it be possible that netfilter is inserting a space for Ubuntu
after the 0? The above unparsed data shows:
<snip> RES=0x00 SYN URGP=0 "]
Did Sagan insert that space? Or no? I've tried changing:
URGP=%urgp:number%
to
URGP=%urgp:word%
but so far no go.
