Blame SOURCES/audit-2.3.3-uid-1000.patch

ade036
diff -urp audit-2.3.3.orig/contrib/stig.rules audit-2.3.3/contrib/stig.rules
ade036
--- audit-2.3.3.orig/contrib/stig.rules	2014-03-18 13:07:27.658515740 -0400
ade036
+++ audit-2.3.3/contrib/stig.rules	2014-03-18 13:08:25.979510829 -0400
ade036
@@ -16,7 +16,7 @@
ade036
 ## NOTE:
ade036
 ## 1) if this is being used on a 32 bit machine, comment out the b64 lines
ade036
 ## 2) These rules assume that login under the root account is not allowed.
ade036
-## 3) It is also assumed that 500 represents the first usable user account. To
ade036
+## 3) It is also assumed that 1000 represents the first usable user account. To
ade036
 ##    be sure, look at UID_MIN in /etc/login.defs.
ade036
 ## 4) If these rules generate too much spurious data for your tastes, limit the
ade036
 ## the syscall file rules with a directory, like -F dir=/etc
ade036
@@ -102,22 +102,22 @@
ade036
 
ade036
 ##- Discretionary access control permission modification (unsuccessful
ade036
 ## and successful use of chown/chmod)
ade036
--a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod
ade036
--a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=500 -F auid!=4294967295 -k perm_mod
ade036
--a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod
ade036
--a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=500 -F auid!=4294967295 -k perm_mod
ade036
--a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=500 -F auid!=4294967295 -k perm_mod
ade036
--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
ade036
+-a always,exit -F arch=b32 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod
ade036
+-a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_mod
ade036
+-a always,exit -F arch=b32 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod
ade036
+-a always,exit -F arch=b64 -S chown -S fchown -S fchownat -S lchown -F auid>=1000 -F auid!=4294967295 -k perm_mod
ade036
+-a always,exit -F arch=b32 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod
ade036
+-a always,exit -F arch=b64 -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod
ade036
 
ade036
 ##- Unauthorized access attempts to files (unsuccessful) 
ade036
--a always,exit -F arch=b32 -S creat -S open -S openat -S open_by_handle_at -S truncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access
ade036
--a always,exit -F arch=b32 -S creat -S open -S openat -S open_by_handle_at -S truncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access
ade036
--a always,exit -F arch=b64 -S creat -S open -S openat -S open_by_handle_at -S truncate -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -k access
ade036
--a always,exit -F arch=b64 -S creat -S open -S openat -S open_by_handle_at -S truncate -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -k access
ade036
+-a always,exit -F arch=b32 -S creat -S open -S openat -S open_by_handle_at -S truncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access
ade036
+-a always,exit -F arch=b32 -S creat -S open -S openat -S open_by_handle_at -S truncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access
ade036
+-a always,exit -F arch=b64 -S creat -S open -S openat -S open_by_handle_at -S truncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k access
ade036
+-a always,exit -F arch=b64 -S creat -S open -S openat -S open_by_handle_at -S truncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access
ade036
 
ade036
 ##- Use of privileged commands (unsuccessful and successful)
ade036
 ## use find /bin -type f -perm -04000 2>/dev/null and put all those files in a rule like this
ade036
--a always,exit -F path=/bin/ping -F perm=x -F auid>=500 -F auid!=4294967295 -k privileged
ade036
+-a always,exit -F path=/bin/ping -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged
ade036
 
ade036
 ##- Use of print command (unsuccessful and successful) 
ade036
 
ade036
@@ -125,14 +125,14 @@
ade036
 ## You have to mount media before using it. You must disable all automounting
ade036
 ## so that its done manually in order to get the correct user requesting the
ade036
 ## export
ade036
--a always,exit -F arch=b32 -S mount -F auid>=500 -F auid!=4294967295 -k export
ade036
--a always,exit -F arch=b64 -S mount -F auid>=500 -F auid!=4294967295 -k export
ade036
+-a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=4294967295 -k export
ade036
+-a always,exit -F arch=b64 -S mount -F auid>=1000 -F auid!=4294967295 -k export
ade036
 
ade036
 ##- System startup and shutdown (unsuccessful and successful)
ade036
 
ade036
 ##- Files and programs deleted by the user (successful and unsuccessful)
ade036
--a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k delete
ade036
--a always,exit -F arch=b64 -S unlink -S unlinkat -S rename -S renameat -F auid>=500 -F auid!=4294967295 -k delete
ade036
+-a always,exit -F arch=b32 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete
ade036
+-a always,exit -F arch=b64 -S unlink -S unlinkat -S rename -S renameat -F auid>=1000 -F auid!=4294967295 -k delete
ade036
 
ade036
 ##- All system administration actions 
ade036
 ##- All security personnel actions
ade036
@@ -160,10 +160,6 @@
ade036
 #-a always,exit -F arch=b32 -S ptrace -F a0=6 -k register-injection
ade036
 #-a always,exit -F arch=b64 -S ptrace -F a0=6 -k register-injection
ade036
 
ade036
-## Optional - could be an attempt to bypass audit or simply legacy program
ade036
-#-a always,exit -F arch=b32 -S personality -F a0!=4294967295 -k bypass
ade036
-#-a always,exit -F arch=b64 -S personality -F a0!=4294967295 -k bypass
ade036
-
ade036
 ## Optional - might want to watch module insertion
ade036
 #-w /sbin/insmod -p x -k modules
ade036
 #-w /sbin/rmmod -p x -k modules
ade036
@@ -174,7 +170,7 @@
ade036
 #-a always,exit -F arch=b64 -S delete_module -k module-unload
ade036
 
ade036
 ## Optional - admin may be abusing power by looking in user's home dir
ade036
-#-a always,exit -F dir=/home -F uid=0 -F auid>=500 -F auid!=4294967295 -C auid!=obj_uid -F key=power-abuse
ade036
+#-a always,exit -F dir=/home -F uid=0 -F auid>=1000 -F auid!=4294967295 -C auid!=obj_uid -F key=power-abuse
ade036
 
ade036
 ## Optional - log container creation  
ade036
 #-a always,exit -F arch=b32 -S clone -F a0&2080505856 -k container-create
ade036
diff -urp audit-2.3.3.orig/docs/audit.rules.7 audit-2.3.3/docs/audit.rules.7
ade036
--- audit-2.3.3.orig/docs/audit.rules.7	2014-03-18 13:07:29.580515578 -0400
ade036
+++ audit-2.3.3/docs/audit.rules.7	2014-03-18 13:07:58.584513136 -0400
ade036
@@ -76,10 +76,10 @@ After the syscall is specified, you woul
ade036
 .B \-F
ade036
 options that fine tune what to match against. Rather than list all the valid field types here, the reader should look at the auditctl man page which has a full listing of each field and what it means. But its worth mentioning a couple things.
ade036
 
ade036
-The audit system considers uids to be unsigned numbers. The audit system uses the number \-1 to indicate that a loginuid is not set. This means that when its printed out, it looks like 4294967295. If you write a rule that you wanted try to get the valid users of the system, you need to look in /etc/login.defs to see where user accounts start. For example, if UID_MIN is  500, then you would also need to take into account that the unsigned representation of \-1 is higher than 500. So you would address this with the following piece of a rule:
ade036
+The audit system considers uids to be unsigned numbers. The audit system uses the number \-1 to indicate that a loginuid is not set. This means that when its printed out, it looks like 4294967295. If you write a rule that you wanted try to get the valid users of the system, you need to look in /etc/login.defs to see where user accounts start. For example, if UID_MIN is  1000, then you would also need to take into account that the unsigned representation of \-1 is higher than 1000. So you would address this with the following piece of a rule:
ade036
 
ade036
 .nf
ade036
-\-F auid>=500 \-F auid!=4294967295
ade036
+\-F auid>=1000 \-F auid!=4294967295
ade036
 .fi
ade036
 
ade036
 These individual checks are "anded" and both have to be true.