|
|
70a102 |
diff -ur audit-2.4.1.orig/contrib/stig.rules audit-2.4.1/contrib/stig.rules
|
|
|
70a102 |
--- audit-2.4.1.orig/contrib/stig.rules 2014-10-27 16:54:03.000000000 -0400
|
|
|
70a102 |
+++ audit-2.4.1/contrib/stig.rules 2014-10-28 14:21:39.896827577 -0400
|
|
|
70a102 |
@@ -19,7 +19,7 @@
|
|
|
70a102 |
## NOTE:
|
|
|
70a102 |
## 1) if this is being used on a 32 bit machine, comment out the b64 lines
|
|
|
70a102 |
## 2) These rules assume that login under the root account is not allowed.
|
|
|
70a102 |
-## 3) It is also assumed that 500 represents the first usable user account. To
|
|
|
70a102 |
+## 3) It is also assumed that 1000 represents the first usable user account. To
|
|
|
70a102 |
## be sure, look at UID_MIN in /etc/login.defs.
|
|
|
70a102 |
## 4) If these rules generate too much spurious data for your tastes, limit the
|
|
|
70a102 |
## the syscall file rules with a directory, like -F dir=/etc
|
|
|
70a102 |
@@ -106,22 +106,22 @@
|
|
|
70a102 |
|
|
|
70a102 |
##- Discretionary access control permission modification (unsuccessful
|
|
|
70a102 |
## and successful use of chown/chmod)
|
|
|
70a102 |
--a always,exit -F arch=b32 -S chmod,fchmod,fchmodat -F auid>=500 -F auid!=4294967295 -F key=perm_mod
|
|
|
70a102 |
--a always,exit -F arch=b64 -S chmod,fchmod,fchmodat -F auid>=500 -F auid!=4294967295 -F key=perm_mod
|
|
|
70a102 |
--a always,exit -F arch=b32 -S lchown,fchown,chown,fchownat -F auid>=500 -F auid!=4294967295 -F key=perm_mod
|
|
|
70a102 |
--a always,exit -F arch=b64 -S chown,fchown,lchown,fchownat -F auid>=500 -F auid!=4294967295 -F key=perm_mod
|
|
|
70a102 |
--a always,exit -F arch=b32 -S setxattr,lsetxattr,fsetxattr,removexattr,lremovexattr,fremovexattr -F auid>=500 -F auid!=4294967295 -F key=perm_mod
|
|
|
70a102 |
--a always,exit -F arch=b64 -S setxattr,lsetxattr,fsetxattr,removexattr,lremovexattr,fremovexattr -F auid>=500 -F auid!=4294967295 -F key=perm_mod
|
|
|
70a102 |
+-a always,exit -F arch=b32 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=4294967295 -F key=perm_mod
|
|
|
70a102 |
+-a always,exit -F arch=b64 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=4294967295 -F key=perm_mod
|
|
|
70a102 |
+-a always,exit -F arch=b32 -S lchown,fchown,chown,fchownat -F auid>=1000 -F auid!=4294967295 -F key=perm_mod
|
|
|
70a102 |
+-a always,exit -F arch=b64 -S chown,fchown,lchown,fchownat -F auid>=1000 -F auid!=4294967295 -F key=perm_mod
|
|
|
70a102 |
+-a always,exit -F arch=b32 -S setxattr,lsetxattr,fsetxattr,removexattr,lremovexattr,fremovexattr -F auid>=1000 -F auid!=4294967295 -F key=perm_mod
|
|
|
70a102 |
+-a always,exit -F arch=b64 -S setxattr,lsetxattr,fsetxattr,removexattr,lremovexattr,fremovexattr -F auid>=1000 -F auid!=4294967295 -F key=perm_mod
|
|
|
70a102 |
|
|
|
70a102 |
##- Unauthorized access attempts to files (unsuccessful)
|
|
|
70a102 |
--a always,exit -F arch=b32 -S open,creat,truncate,openat,open_by_handle_at -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -F key=access
|
|
|
70a102 |
--a always,exit -F arch=b32 -S open,creat,truncate,openat,open_by_handle_at -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -F key=access
|
|
|
70a102 |
--a always,exit -F arch=b64 -S open,truncate,creat,openat,open_by_handle_at -F exit=-EACCES -F auid>=500 -F auid!=4294967295 -F key=access
|
|
|
70a102 |
--a always,exit -F arch=b64 -S open,truncate,creat,openat,open_by_handle_at -F exit=-EPERM -F auid>=500 -F auid!=4294967295 -F key=access
|
|
|
70a102 |
+-a always,exit -F arch=b32 -S open,creat,truncate,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -F key=access
|
|
|
70a102 |
+-a always,exit -F arch=b32 -S open,creat,truncate,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -F key=access
|
|
|
70a102 |
+-a always,exit -F arch=b64 -S open,truncate,creat,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -F key=access
|
|
|
70a102 |
+-a always,exit -F arch=b64 -S open,truncate,creat,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -F key=access
|
|
|
70a102 |
|
|
|
70a102 |
##- Use of privileged commands (unsuccessful and successful)
|
|
|
70a102 |
## use find /bin -type f -perm -04000 2>/dev/null and put all those files in a rule like this
|
|
|
70a102 |
--a always,exit -F path=/bin/ping -F perm=x -F auid>=500 -F auid!=4294967295 -F key=privileged
|
|
|
70a102 |
+-a always,exit -F path=/bin/ping -F perm=x -F auid>=1000 -F auid!=4294967295 -F key=privileged
|
|
|
70a102 |
|
|
|
70a102 |
##- Use of print command (unsuccessful and successful)
|
|
|
70a102 |
|
|
|
70a102 |
@@ -129,14 +129,14 @@
|
|
|
70a102 |
## You have to mount media before using it. You must disable all automounting
|
|
|
70a102 |
## so that its done manually in order to get the correct user requesting the
|
|
|
70a102 |
## export
|
|
|
70a102 |
--a always,exit -F arch=b32 -S mount -F auid>=500 -F auid!=4294967295 -F key=export
|
|
|
70a102 |
--a always,exit -F arch=b64 -S mount -F auid>=500 -F auid!=4294967295 -F key=export
|
|
|
70a102 |
+-a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=4294967295 -F key=export
|
|
|
70a102 |
+-a always,exit -F arch=b64 -S mount -F auid>=1000 -F auid!=4294967295 -F key=export
|
|
|
70a102 |
|
|
|
70a102 |
##- System startup and shutdown (unsuccessful and successful)
|
|
|
70a102 |
|
|
|
70a102 |
##- Files and programs deleted by the user (successful and unsuccessful)
|
|
|
70a102 |
--a always,exit -F arch=b32 -S unlink,unlinkat,rename,renameat -F auid>=500 -F auid!=4294967295 -F key=delete
|
|
|
70a102 |
--a always,exit -F arch=b64 -S unlink,unlinkat,rename,renameat -F auid>=500 -F auid!=4294967295 -F key=delete
|
|
|
70a102 |
+-a always,exit -F arch=b32 -S unlink,unlinkat,rename,renameat -F auid>=1000 -F auid!=4294967295 -F key=delete
|
|
|
70a102 |
+-a always,exit -F arch=b64 -S unlink,unlinkat,rename,renameat -F auid>=1000 -F auid!=4294967295 -F key=delete
|
|
|
70a102 |
|
|
|
70a102 |
##- All system administration actions
|
|
|
70a102 |
##- All security personnel actions
|
|
|
70a102 |
@@ -175,7 +175,7 @@
|
|
|
70a102 |
#-a always,exit -F arch=b64 -S delete_module -F key=module-unload
|
|
|
70a102 |
|
|
|
70a102 |
## Optional - admin may be abusing power by looking in user's home dir
|
|
|
70a102 |
-#-a always,exit -F dir=/home -F uid=0 -F auid>=500 -F auid!=4294967295 -C auid!=obj_uid -F key=power-abuse
|
|
|
70a102 |
+#-a always,exit -F dir=/home -F uid=0 -F auid>=1000 -F auid!=4294967295 -C auid!=obj_uid -F key=power-abuse
|
|
|
70a102 |
|
|
|
70a102 |
## Optional - log container creation
|
|
|
70a102 |
#-a always,exit -F arch=b32 -S clone -F a0&0x7C020000 -F key=container-create
|
|
|
70a102 |
diff -ur audit-2.4.1.orig/docs/audit.rules.7 audit-2.4.1/docs/audit.rules.7
|
|
|
70a102 |
--- audit-2.4.1.orig/docs/audit.rules.7 2014-10-27 16:54:03.000000000 -0400
|
|
|
70a102 |
+++ audit-2.4.1/docs/audit.rules.7 2014-10-28 14:23:00.014833616 -0400
|
|
|
70a102 |
@@ -76,10 +76,10 @@
|
|
|
70a102 |
.B \-F
|
|
|
70a102 |
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.
|
|
|
70a102 |
|
|
|
70a102 |
-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:
|
|
|
70a102 |
+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:
|
|
|
70a102 |
|
|
|
70a102 |
.nf
|
|
|
70a102 |
-\-F auid>=500 \-F auid!=4294967295
|
|
|
70a102 |
+\-F auid>=1000 \-F auid!=4294967295
|
|
|
70a102 |
.fi
|
|
|
70a102 |
|
|
|
70a102 |
These individual checks are "anded" and both have to be true.
|