How to enable additional audit logging?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















We use Auditd to monitor specific changes on Linux systems. Majority of our rules come from CIS Benchmark guidelines and then few are added specifically to monitor certain command executions.



We have only seen the following record types so far:



PATH, SYSCALL, CWD, AVC, EXECVE, USER_CMD, USER_LOGIN, USER_AUTH


As per the this link, there are several interesting types which would be crucial to monitor. Few which seem important in our environment are



KERNEL, ADD_USER, ADD_GROUP, MAC_STATUS, NETFILTER_CFG.


Based on the rules mentioned below, can anyone assist in figuring out if these events are being monitored and just haven't been triggered yet, or is the current ruleset incomplete?



-a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change 
-a always,exit -F arch=b64 -S clock_settime -k time-change
-w /etc/localtime -p wa -k time-change
-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 -S setdomainname -k 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/sysconfig/network -p wa -k system-locale
-w /etc/selinux/ -p wa -k MAC-policy
-w /var/log/faillog -p wa -k logins
-w /var/log/lastlog -p wa -k logins
-w /var/log/tallylog -p wa -k logins
-w /var/log/btmp -p wa -k session
-w /var/run/utmp -p wa -k session
-w /var/log/wtmp -p wa -k session
-a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod
-a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod
-a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod
-a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access
-a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access
-a always,exit -F arch=b64 -S mount -F auid>=500 -F auid!=4294967295 -k mounts
-a always,exit -F arch=b64 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k delete
-w /etc/sudoers -p wa -k scope
-w /var/log/sudo.log -p wa -k actions
-w /sbin/insmod -p x -k modules
-w /sbin/rmmod -p x -k modules
-w /sbin/modprobe -p x -k modules
-a always,exit -F arch=b64 -S init_module -S delete_module -k modules
-a always,exit -F path=/bin/su -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
-a always,exit -F path=/bin/ping6 -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
-a always,exit -F path=/sbin/unix_chkpwd -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
-a always,exit -F path=/sbin/pam_timestamp_check -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
-a always,exit -F path=/sbin/mount.nfs -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged


Few command specific rules:



-a exit,always -F arch=b64 -S execve -F path=/bin/rm 
-a exit,always -F arch=b64 -S execve -F path=/bin/chmod
-a exit,always -F arch=b64 -S execve -F path=/bin/chgrp
-a exit,always -F arch=b64 -S execve -F path=/bin/chown


Data we are currently getting from above rules is extremely helpful and valuable. How to take audit logging a step further?










share|improve this question






























    2















    We use Auditd to monitor specific changes on Linux systems. Majority of our rules come from CIS Benchmark guidelines and then few are added specifically to monitor certain command executions.



    We have only seen the following record types so far:



    PATH, SYSCALL, CWD, AVC, EXECVE, USER_CMD, USER_LOGIN, USER_AUTH


    As per the this link, there are several interesting types which would be crucial to monitor. Few which seem important in our environment are



    KERNEL, ADD_USER, ADD_GROUP, MAC_STATUS, NETFILTER_CFG.


    Based on the rules mentioned below, can anyone assist in figuring out if these events are being monitored and just haven't been triggered yet, or is the current ruleset incomplete?



    -a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change 
    -a always,exit -F arch=b64 -S clock_settime -k time-change
    -w /etc/localtime -p wa -k time-change
    -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 -S setdomainname -k 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/sysconfig/network -p wa -k system-locale
    -w /etc/selinux/ -p wa -k MAC-policy
    -w /var/log/faillog -p wa -k logins
    -w /var/log/lastlog -p wa -k logins
    -w /var/log/tallylog -p wa -k logins
    -w /var/log/btmp -p wa -k session
    -w /var/run/utmp -p wa -k session
    -w /var/log/wtmp -p wa -k session
    -a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod
    -a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod
    -a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod
    -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access
    -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access
    -a always,exit -F arch=b64 -S mount -F auid>=500 -F auid!=4294967295 -k mounts
    -a always,exit -F arch=b64 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k delete
    -w /etc/sudoers -p wa -k scope
    -w /var/log/sudo.log -p wa -k actions
    -w /sbin/insmod -p x -k modules
    -w /sbin/rmmod -p x -k modules
    -w /sbin/modprobe -p x -k modules
    -a always,exit -F arch=b64 -S init_module -S delete_module -k modules
    -a always,exit -F path=/bin/su -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
    -a always,exit -F path=/bin/ping6 -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
    -a always,exit -F path=/sbin/unix_chkpwd -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
    -a always,exit -F path=/sbin/pam_timestamp_check -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
    -a always,exit -F path=/sbin/mount.nfs -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged


    Few command specific rules:



    -a exit,always -F arch=b64 -S execve -F path=/bin/rm 
    -a exit,always -F arch=b64 -S execve -F path=/bin/chmod
    -a exit,always -F arch=b64 -S execve -F path=/bin/chgrp
    -a exit,always -F arch=b64 -S execve -F path=/bin/chown


    Data we are currently getting from above rules is extremely helpful and valuable. How to take audit logging a step further?










    share|improve this question


























      2












      2








      2


      1






      We use Auditd to monitor specific changes on Linux systems. Majority of our rules come from CIS Benchmark guidelines and then few are added specifically to monitor certain command executions.



      We have only seen the following record types so far:



      PATH, SYSCALL, CWD, AVC, EXECVE, USER_CMD, USER_LOGIN, USER_AUTH


      As per the this link, there are several interesting types which would be crucial to monitor. Few which seem important in our environment are



      KERNEL, ADD_USER, ADD_GROUP, MAC_STATUS, NETFILTER_CFG.


      Based on the rules mentioned below, can anyone assist in figuring out if these events are being monitored and just haven't been triggered yet, or is the current ruleset incomplete?



      -a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change 
      -a always,exit -F arch=b64 -S clock_settime -k time-change
      -w /etc/localtime -p wa -k time-change
      -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 -S setdomainname -k 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/sysconfig/network -p wa -k system-locale
      -w /etc/selinux/ -p wa -k MAC-policy
      -w /var/log/faillog -p wa -k logins
      -w /var/log/lastlog -p wa -k logins
      -w /var/log/tallylog -p wa -k logins
      -w /var/log/btmp -p wa -k session
      -w /var/run/utmp -p wa -k session
      -w /var/log/wtmp -p wa -k session
      -a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod
      -a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod
      -a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod
      -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access
      -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access
      -a always,exit -F arch=b64 -S mount -F auid>=500 -F auid!=4294967295 -k mounts
      -a always,exit -F arch=b64 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k delete
      -w /etc/sudoers -p wa -k scope
      -w /var/log/sudo.log -p wa -k actions
      -w /sbin/insmod -p x -k modules
      -w /sbin/rmmod -p x -k modules
      -w /sbin/modprobe -p x -k modules
      -a always,exit -F arch=b64 -S init_module -S delete_module -k modules
      -a always,exit -F path=/bin/su -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
      -a always,exit -F path=/bin/ping6 -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
      -a always,exit -F path=/sbin/unix_chkpwd -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
      -a always,exit -F path=/sbin/pam_timestamp_check -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
      -a always,exit -F path=/sbin/mount.nfs -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged


      Few command specific rules:



      -a exit,always -F arch=b64 -S execve -F path=/bin/rm 
      -a exit,always -F arch=b64 -S execve -F path=/bin/chmod
      -a exit,always -F arch=b64 -S execve -F path=/bin/chgrp
      -a exit,always -F arch=b64 -S execve -F path=/bin/chown


      Data we are currently getting from above rules is extremely helpful and valuable. How to take audit logging a step further?










      share|improve this question
















      We use Auditd to monitor specific changes on Linux systems. Majority of our rules come from CIS Benchmark guidelines and then few are added specifically to monitor certain command executions.



      We have only seen the following record types so far:



      PATH, SYSCALL, CWD, AVC, EXECVE, USER_CMD, USER_LOGIN, USER_AUTH


      As per the this link, there are several interesting types which would be crucial to monitor. Few which seem important in our environment are



      KERNEL, ADD_USER, ADD_GROUP, MAC_STATUS, NETFILTER_CFG.


      Based on the rules mentioned below, can anyone assist in figuring out if these events are being monitored and just haven't been triggered yet, or is the current ruleset incomplete?



      -a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change 
      -a always,exit -F arch=b64 -S clock_settime -k time-change
      -w /etc/localtime -p wa -k time-change
      -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 -S setdomainname -k 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/sysconfig/network -p wa -k system-locale
      -w /etc/selinux/ -p wa -k MAC-policy
      -w /var/log/faillog -p wa -k logins
      -w /var/log/lastlog -p wa -k logins
      -w /var/log/tallylog -p wa -k logins
      -w /var/log/btmp -p wa -k session
      -w /var/run/utmp -p wa -k session
      -w /var/log/wtmp -p wa -k session
      -a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod
      -a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod
      -a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod
      -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access
      -a always,exit -F arch=b64 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access
      -a always,exit -F arch=b64 -S mount -F auid>=500 -F auid!=4294967295 -k mounts
      -a always,exit -F arch=b64 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k delete
      -w /etc/sudoers -p wa -k scope
      -w /var/log/sudo.log -p wa -k actions
      -w /sbin/insmod -p x -k modules
      -w /sbin/rmmod -p x -k modules
      -w /sbin/modprobe -p x -k modules
      -a always,exit -F arch=b64 -S init_module -S delete_module -k modules
      -a always,exit -F path=/bin/su -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
      -a always,exit -F path=/bin/ping6 -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
      -a always,exit -F path=/sbin/unix_chkpwd -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
      -a always,exit -F path=/sbin/pam_timestamp_check -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
      -a always,exit -F path=/sbin/mount.nfs -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged


      Few command specific rules:



      -a exit,always -F arch=b64 -S execve -F path=/bin/rm 
      -a exit,always -F arch=b64 -S execve -F path=/bin/chmod
      -a exit,always -F arch=b64 -S execve -F path=/bin/chgrp
      -a exit,always -F arch=b64 -S execve -F path=/bin/chown


      Data we are currently getting from above rules is extremely helpful and valuable. How to take audit logging a step further?







      centos linux-kernel linux-audit






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 9 at 12:24









      Rui F Ribeiro

      41.9k1483142




      41.9k1483142










      asked Jun 8 '16 at 22:10









      AbhiAbhi

      786




      786




















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f288556%2fhow-to-enable-additional-audit-logging%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f288556%2fhow-to-enable-additional-audit-logging%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown






          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay