Hi, I'm facing a problem with configuring system auditing in Wazuh. I have configured audit rules and added the keys to wazuh, but they only log syscalls containing the key, discarding the rest of log from the same event, which contains more useful data like the name of file created or modified. For example, for creating a file in /etc/init.d, wazuh alert is:
Is it even possible to do in Wazuh to get all this data into alert? My configurations:
-a never,user -F subj_type=crond_t
-a never,exit -S all -F subj_type=crond_t
-a never,exit -F arch=b32 -S adjtimex -F auid=-1 -F subj_type=chronyd_t
-a never,exit -F arch=b64 -S adjtimex -F auid=-1 -F subj_type=chronyd_t
-a never,exit -F arch=b32 -S all -F path=/opt/filebeat -F key=filebeat
-a always,exit -F arch=b64 -S adjtimex,settimeofday -F key=time-change
-a always,exit -F arch=b32 -S stime,settimeofday,adjtimex -F key=time-change
-a always,exit -F arch=b64 -S clock_settime -F key=time-change
-a always,exit -F arch=b32 -S clock_settime -F key=time-change
-w /etc/localtime -p wa -k time-change
-w /etc/cron.allow -p wa -k cron
-w /etc/cron.deny -p wa -k cron
-w /etc/cron.d -p wa -k cron
-w /etc/cron.daily -p wa -k cron
-w /etc/cron.hourly -p wa -k cron
-w /etc/cron.monthly -p wa -k cron
-w /etc/cron.weekly -p wa -k cron
-w /etc/crontab -p wa -k cron
-w /var/spool/cron -p rwxa -k cron
-w /bin/systemctl -p x -k systemd
-w /etc/systemd -p wa -k systemd
-w /usr/lib/systemd -p wa -k systemd
-w /etc/group -p wa -k identity
-w /etc/passwd -p wa -k identity
-w /etc/gshadow -p wa -k identity
-w /etc/shadow -p wa -k identity
-w /etc/security/opasswd -p wa -k identity
-a always,exit -F arch=b64 -S sethostname,setdomainname -F key=system-locale
-a always,exit -F arch=b32 -S sethostname,setdomainname -F key=system-locale
-w /etc/issue -p wa -k system-locale
-w /etc/
issue.net -p wa -k system-locale
-w /etc/hosts -p wa -k system-locale
-w /etc/inittab -p wa -k init
-w /etc/init.d -p wa -k init
-w /etc/init -p wa -k init
-w /etc/selinux -p wa -k MAC-policy
-w /usr/share/selinux -p wa -k MAC-policy
-w /var/log/lastlog -p wa -k logins
-w /var/run/faillock -p wa -k logins
-w /var/run/utmp -p wa -k session
-w /var/log/wtmp -p wa -k logins
-w /var/log/btmp -p wa -k logins
-a always,exit -F arch=b64 -S mount -F auid>=1000 -F auid!=-1 -F key=mounts
-a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=-1 -F key=mounts
-w /etc/sudoers -p wa -k scope
-w /etc/sudoers.d -p wa -k scope
-w /var/log/sudo.log -p wa -k actions
-a always,exit -S all -F path=/sbin/insmod -F perm=x -F auid!=-1 -F key=modules
-a always,exit -S all -F path=/sbin/rmmod -F perm=x -F auid!=-1 -F key=modules
-a always,exit -S all -F path=/sbin/modprobe -F perm=x -F auid!=-1 -F key=modules
-w /etc/ssh/sshd_config -p wa -k sshd
-w /etc/ssh/sshd_config.d -p wa -k sshd
-w /usr/sbin/groupadd -p x -k group_modification
-w /usr/sbin/groupmod -p x -k group_modification
-w /usr/sbin/addgroup -p x -k group_modification
-w /usr/sbin/useradd -p x -k user_modification
-w /usr/sbin/userdel -p x -k user_modification
-w /usr/sbin/usermod -p x -k user_modification
-w /usr/sbin/adduser -p x -k user_modification
-a always,exit -F arch=b64 -S init_module,delete_module -F auid!=-1 -F key=modules
-a always,exclude -F msgtype=CWD
-a always,exclude -F msgtype=CRYPTO_KEY_USER
And is there any way to pass username instead of userid to wazuh? Similiar to when you check logs with ausearch -i command. Thanks in advance for any help