On Tue, Feb 12, 2013 at 1:53 PM, Dustin Lenz <
dus...@netjitsu.net> wrote:
> I know very old post here but I wanted to resurrect it and see if support
> for TACACS+ (tac_plus) logs has been added to OSSEC.
>
> Thanks,
>
> Dustin
>
Let's see what ossec-logtest tells us:
2013/02/12 15:00:17 ossec-testrule: INFO: Reading local decoder file.
2013/02/12 15:00:17 ossec-testrule: INFO: Started (pid: 27252).
ossec-testrule: Type one log per line.
**Phase 1: Completed pre-decoding.
full event: 'Wed Feb 6 11:23:44 2008 192.101.200
cisco-user1 tty2 192.168.101.2 stop task_id=322
timezone=UTC service=shell start_time=1202268224 priv-lvl=15
cmd=configure terminal <cr>'
hostname: 'arrakis'
program_name: '(null)'
log: 'Wed Feb 6 11:23:44 2008 192.101.200 cisco-user1
tty2 192.168.101.2 stop task_id=322 timezone=UTC
service=shell start_time=1202268224 priv-lvl=15 cmd=configure
terminal <cr>'
**Phase 2: Completed decoding.
No decoder matched.
So it doesn't look like it.
I don't know what you would like to see decoded, but here is a quick
and dirty decoder (replace "TAB" with actual tabs):
<decoder name="tacacs">
<prematch>^\S+ \S+\s+\d+ \d\d:\d\d:\d\d
\d\d\d\dTAB\S+TAB\S+TABtty\d+</prematch>
<regex>^\S+ \S+\s+\d+ \d\d:\d\d:\d\d \d\d\d\d \S+TAB\S+TABtty\d+)
(\S+)TAB(\S+)TAB</regex>
<order>extra_data, srcip, action</order>
</decoder>
This produces:
**Phase 1: Completed pre-decoding.
full event: 'Wed Feb 6 11:23:44 2008 192.101.200
cisco-user1 tty2 192.168.101.2 stop task_id=322
timezone=UTC service=shell start_time=1202268224 priv-lvl=15
cmd=configure terminal <cr>'
hostname: 'arrakis'
program_name: '(null)'
log: 'Wed Feb 6 11:23:44 2008 192.101.200 cisco-user1
tty2 192.168.101.2 stop task_id=322 timezone=UTC
service=shell start_time=1202268224 priv-lvl=15 cmd=configure
terminal <cr>'
**Phase 2: Completed decoding.
decoder: 'tacacs'
extra_data: 'tty2'
srcip: '192.168.101.2'
action: 'stop'
I just used 1 log sample, and had to guess where the tabs were, so
this might not work in production. Feel free to send me an actual log
file (you can send to me personally if you don't want them public,
please obfuscate IPs/usernames) so I have something better to work
with, or send your final decoders/rules.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ossec-list" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
ossec-list+...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>