Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add decoder for UFW logs #649

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion decoders/0140-kernel_decoders.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Example:
<decoder name="iptables-OpenWRT">
<parent>kernel</parent>
<type>firewall</type>
<prematch>^[\d+.\d+] \S+\.*IN=</prematch>
<prematch>^[\d+.\d+] \S+\(\.*IN=</prematch>
<regex>^[\d+.\d+] (\S*)\(</regex>
<order>action</order>
</decoder>
Expand All @@ -123,6 +123,41 @@ Example:
<order>srcport,dstport</order>
</decoder>

<!-- UFW firewall
Example:
- Nov 18 13:39:49 UFW kernel: [10051.313745] [UFW BLOCK] IN=eth0 OUT= MAC=c2:56:27:73:33:cf:c4:f0:81:b0:93:24:08:00 SRC=205.205.205.205 DST=192.168.8.100 LEN=44 TOS=0x00 PREC=0x00 TTL=128 ID=43131 PROTO=UDP SPT=40952 DPT=23 LEN=194
- Nov 18 13:39:49 UFW kernel: [10051.313745] [UFW BLOCK] IN=eth0 OUT= MAC=01:00:5e:00:00:01:00:17:08:ae:7a:40:08:00 SRC=205.205.205.205 DST=192.168.8.100 LEN=44 TOS=0x00 PREC=0x00 TTL=1 ID=4949 PROTO=2
-->

<decoder name="iptables-UFW">
<parent>kernel</parent>
<type>firewall</type>
<prematch>^[\d+.\d+] [UFW \S+] IN=</prematch>
<regex>^[\d+.\d+] [UFW (\S+)]</regex>
<order>action</order>
</decoder>

<decoder name="iptables-UFW">
<parent>kernel</parent>
<type>firewall</type>
<regex offset="after_regex">SRC=(\S+) DST=(\S+)</regex>
<order>srcip,dstip</order>
</decoder>

<decoder name="iptables-UFW">
<parent>kernel</parent>
<type>firewall</type>
<regex offset="after_regex">PROTO=(\w+)</regex>
<order>protocol</order>
</decoder>

<decoder name="iptables-UFW">
<parent>kernel</parent>
<type>firewall</type>
<regex offset="after_regex">SPT=(\d+) DPT=(\d+) </regex>
<order>srcport,dstport</order>
</decoder>

<!-- apparmor
- Jun 24 10:35:29 hostname kernel: [49787.970285] audit: type=1400 audit(1403598929.839:88986): apparmor="ALLOWED" operation="getattr" profile="/usr/sbin/dovecot//null-1//null-2//null-4a6" name="/home/admin/mails/new/" pid=19973 comm="imap" requested_mask="r" denied_mask="r" fsuid=1003 ouid=1003
- Jul 14 11:03:47 hostname kernel: [ 8665.951930] type=1400 audit(1405328627.702:54): apparmor="DENIED" operation="open" profile="/usr/bin/evince" name="/etc/xfce4/defaults.list" pid=16418 comm="evince" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Expand Down