There seems a compiler option to use inotify or auditd to monitor the desired folder.
I understand auditd has substantial overhead to SYSCALL usec/call, and this is why read/write are not included and wazuh tried to use open instead to judge the file is changed or not roughly. By default, inotify is used. Would you mind tell me more about it and any restriction of inotify?
#define REALTIME_MONITOR_FLAGS IN_MODIFY|IN_ATTRIB|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF
You can see it in the code here
There seems a compiler option to use inotify or auditd to monitor the desired folder.
I understand auditd has substantial overhead to SYSCALL usec/call, and this is why read/write are not included and wazuh tried to use open instead to judge the file is changed or not roughly. By default, inotify is used. Would you mind tell me more about it and any restriction of inotify?
#define REALTIME_MONITOR_FLAGS IN_MODIFY|IN_ATTRIB|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF
You can see it in the code here
HiThere seems a compiler option to use inotify or auditd to monitor the desired folder. I understand auditd has substantial overhead to SYSCALL usec/call, and this is why read/write are not included and wazuh tried to use open instead to judge the file is changed or not roughly. By default, inotify is used. Would you mind tell me more about it and any restriction of inotify? for example, it does not report which user/process is manipulating the file.RegardsHai
I tried "top |grep audit" when running wazuh agent on Linux, and there is no appearance of any audit related process - auditd, audispd, or kaudit.
[root@workerCentos test_wazuh]# auditctl -vauditctl version 2.8.4
[root@workerCentos test_wazuh]# ps aux | grep auditroot 110 0.0 0.0 0 0 ? S 12:46 0:00 [kauditd]root 31019 0.0 0.0 55520 908 ? S<sl 13:06 0:00 /sbin/auditdroot 31436 0.0 0.0 112716 988 pts/0 R+ 13:23 0:00 grep --color=auto audit
<!-- File integrity monitoring --><syscheck><disabled>no</disabled>
<!-- Frequency that syscheck is executed default every 12 hours --><frequency>43200</frequency>
<scan_on_start>yes</scan_on_start>
<!-- Directories to check (perform all possible verifications) --><directories check_all="yes" whodata="yes">/etc/test_wazuh</directories> <!--This line sets the /etc/test_wazuh directory to be monitored with Whodata,using inotify + auditd-->
And from syscheckd_audit.c, it looks auditd is doing the same thing as inotify.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+unsubscribe@googlegroups.com.