I am using ossec v2.3 on server and I have a exception in module
rootchchek:
<rootcheck>
..............
<ignore>/tmp/</ignore>
</rootcheck>
I have restarted de daemon, but I am receiving alerts about changes in
directory /tmp.
It isn't incorrect this sitaxy in osssec.conf ?
Thanks.
Albert.
rootcheck doesn't discriminate as it's goal is to look for files and configuration that would be consistent with the presence of a rootkit.
The ignore setting is only valid in the <syscheck> directive, like this
<syscheck>
<directories check_all=yes>/etc,/usr/bin,/usr/sbin</directories>
<ignore>/tmp/</ignore>
</syscheck>
however, the ignore would only make sense if you want to ignore a directory deeper in the hierarchy, like this
<syscheck>
<directories check_all="yes">/tmp</directories>
...
<ignore>/tmp/dir1/dir2/dir3</ignore>
</syscheck>
because you don't care about file changes in that specific location, but you do in all other subfolders of /tmp.
Hope this helps,
Kind Regards,
Wim
'/opt/.snapshot/hourly.5/.... ...../format'. Hidden from stats, but showing up on readdir. Possible kernel level rootkit.
OSSEC HIDS Notification.
2010 Jan 12 07:53:45
Received From: server->rootcheck
Rule: 510 fired (level 7) -> "Host-based anomaly detection event (rootcheck)."
Portion of the log(s):
File '/tmp/home_nfs/.snapshot/hourly.5/home/xxx/file.txt' is owned by root and has written permissions to anyone.
--END OF NOTIFICATION
Received From: xxx->rootcheck
Rule: 510 fired (level 7) -> "Host-based anomaly detection event (rootcheck)."
Portion of the log(s):
File '/dev/cpuset/xx@575792/memory_spread_slab' present on /dev. Possible hidden file.
Received From: xxx->rootcheck
Rule: 510 fired (level 7) -> "Host-based anomaly detection event (rootcheck)."
Portion of the log(s):
File '/dev/cpuset/xx@575792/memory_spread_page' present on /dev. Possible hidden file.
A rule would be better for this:
<rule id="100201" level="0">
<if_sid>510<if_sid>
<match>File '/tmp/home_nfs/.snapshot</match>
<description>Ignoring .snapshot dir..</description>
</rule>
Thanks,
--
Daniel B. Cid
dcid ( at ) ossec.net