Changeset 192
- Timestamp:
- 04/29/08 10:35:18 (7 months ago)
- Files:
-
- trunk/RHEL4/conf/audit/audit.rules (modified) (3 diffs)
- trunk/RHEL4/kickstart/clip.ks (modified) (9 diffs)
- trunk/RHEL4/scripts/Makefile (modified) (2 diffs)
- trunk/RHEL4/scripts/installer.in (modified) (1 diff)
- trunk/RHEL4/scripts/stig-fix/cat2/gen002660.sh (modified) (1 diff)
- trunk/RHEL4/scripts/stig-fix/cat2/gen002720.sh (modified) (1 diff)
- trunk/RHEL4/scripts/stig-fix/cat2/gen002740.sh (modified) (1 diff)
- trunk/RHEL4/scripts/stig-fix/cat2/gen002760.sh (modified) (1 diff)
- trunk/RHEL4/scripts/stig-fix/cat2/gen002780.sh (modified) (2 diffs)
- trunk/RHEL4/scripts/stig-fix/cat2/gen002800.sh (modified) (1 diff)
- trunk/RHEL4/scripts/stig-fix/cat2/gen002820.sh (modified) (1 diff)
- trunk/RHEL4/scripts/stig-fix/cat2/gen002840.sh (modified) (1 diff)
- trunk/RHEL5.1/conf/audit/audit.rules (modified) (3 diffs)
- trunk/RHEL5.1/kickstart/clip.ks (modified) (9 diffs)
- trunk/RHEL5.1/scripts/Makefile (modified) (1 diff)
- trunk/RHEL5.1/scripts/installer.in (modified) (1 diff)
- trunk/RHEL5.1/scripts/stig-fix/cat2/gen002660.sh (modified) (1 diff)
- trunk/RHEL5.1/scripts/stig-fix/cat2/gen002720.sh (modified) (1 diff)
- trunk/RHEL5.1/scripts/stig-fix/cat2/gen002740.sh (modified) (1 diff)
- trunk/RHEL5.1/scripts/stig-fix/cat2/gen002760.sh (modified) (1 diff)
- trunk/RHEL5.1/scripts/stig-fix/cat2/gen002780.sh (modified) (2 diffs)
- trunk/RHEL5.1/scripts/stig-fix/cat2/gen002800.sh (modified) (1 diff)
- trunk/RHEL5.1/scripts/stig-fix/cat2/gen002820.sh (modified) (1 diff)
- trunk/RHEL5.1/scripts/stig-fix/cat2/gen002840.sh (modified) (1 diff)
- trunk/RHEL5/conf/audit/audit.rules (modified) (3 diffs)
- trunk/RHEL5/kickstart/clip.ks (modified) (9 diffs)
- trunk/RHEL5/scripts/Makefile (modified) (1 diff)
- trunk/RHEL5/scripts/installer.in (modified) (1 diff)
- trunk/RHEL5/scripts/stig-fix/cat2/gen002660.sh (modified) (1 diff)
- trunk/RHEL5/scripts/stig-fix/cat2/gen002720.sh (modified) (1 diff)
- trunk/RHEL5/scripts/stig-fix/cat2/gen002740.sh (modified) (1 diff)
- trunk/RHEL5/scripts/stig-fix/cat2/gen002760.sh (modified) (1 diff)
- trunk/RHEL5/scripts/stig-fix/cat2/gen002780.sh (modified) (2 diffs)
- trunk/RHEL5/scripts/stig-fix/cat2/gen002800.sh (modified) (1 diff)
- trunk/RHEL5/scripts/stig-fix/cat2/gen002820.sh (modified) (1 diff)
- trunk/RHEL5/scripts/stig-fix/cat2/gen002840.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/RHEL4/conf/audit/audit.rules
r1 r192 1 # This is a sample rule set. The rules are executed from top2 # to bottom. A '#' denotes comments. The rules are basically3 # the auditctl commandline parameters.4 5 1 # Remove existing rules 6 2 -D … … 9 5 -e 1 10 6 11 # Increase kernel buffer size7 # Increase buffer size to handle the increased number of messages. 12 8 -b 8192 13 9 … … 15 11 -f 2 16 12 17 # 18 # Audit1: audit accesses to security relevant files 19 # 13 -w /bin/login -p x 14 -w /bin/logout -p x 20 15 21 # watch passwd databases 16 # DAC permission changes 17 -a exit,always -S chmod -S chown -S chown32 -S fchmod -S fchown -S fchown32 -S lchown -S lchown32 18 19 # unauthorized file access attempts 20 -a exit,always -F success=0 -S open -S mknod -S pipe -S mkdir -S creat -S truncate -S truncate64 -S ftruncate -S ftruncate64 21 22 # privileged commands 23 -a exit,always -S chroot -S mount -S umount -S umount2 -S adjtimex -S kill 24 -w /usr/sbin/pwck 25 -w /bin/chgrp 26 -w /usr/bin/newgrp 27 -w /usr/sbin/groupadd 28 -w /usr/sbin/groupmod 29 -w /usr/sbin/groupdel 30 -w /usr/sbin/useradd 31 -w /usr/sbin/userdel 32 -w /usr/sbin/usermod 33 -w /usr/bin/chage 34 -w /usr/bin/setfacl 35 -w /usr/bin/chacl 36 37 # deleting files 38 -a exit,always -S unlink -S rmdir 39 40 # system administration actions 41 # these two lines could be the cause of problems with filling audit logs and preventing system usage after installation 42 -w /var/log/audit/audit.log 43 -w /var/log/audit/audit[1-4].log 44 -w /var/log/messages 45 -w /var/log/lastlog 46 -w /var/log/faillog 47 -w /etc/auditd.conf -p wa 48 -w /etc/audit.rules -p wa 49 -w /etc/selinux/config -p wa 22 50 -w /etc/passwd -p wa 23 51 -w /etc/shadow -p wa 24 52 -w /etc/group -p wa 25 26 # pam configuration 53 -w /etc/ssh/sshd_config 27 54 -w /etc/pam.d 28 29 # auditd configuration 30 #-w /etc/auditd.conf 31 #-w /etc/audit.rules 32 33 # watch utmp,wtmp 55 -w /etc/login.defs 56 -w /etc/rc.d/init.d 57 -w /etc/inittab -p wa 34 58 -w /var/run/utmp 35 59 -w /var/run/wtmp 60 -a exit,always -S acct -S reboot -S sched_setparam -S sched_setscheduler -S setdomainname -S setrlimit -S settimeofday -S stime -S swapon 36 61 37 # watch system log files 38 -w /var/log/messages 39 -w /var/log/audit/audit.log 40 -w /var/log/audit/audit[1-4].log 41 42 # watch audit subsystem's configuration files 43 -w /etc/auditd.conf -p wa 44 -w /etc/audit.rules -p wa 45 46 # SELinux configuration 47 -w /etc/selinux/config -p wa 48 49 # login records 50 -w /var/log/lastlog 51 -w /var/log/faillog 52 53 # login configuration 54 -w /etc/login.defs 55 56 # init configuration 57 -w /etc/rc.d/init.d 58 -w /etc/inittab -p wa 59 60 # sshd configuration 61 -w /etc/ssh/sshd_config 62 63 # audit creating new directories 64 -a exit,always -S mkdir -F auid!=0 65 66 # audit chmod,chown for non-root users 67 -a exit,always -S chmod -S fchmod -F auid!=0 68 -a exit,always -S chown -S fchown -S lchown -F auid!=0 69 70 # changes to security labels 71 -a exit,always -S setxattr -S lsetxattr -S fsetxattr 72 -a exit,always -S removexattr -S lremovexattr -S fremovexattr 62 # security personnel actions 63 -a exit,always -S init_module -S delete_module -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr 64 -w /bin/su trunk/RHEL4/kickstart/clip.ks
r186 r192 632 632 # Remove any existing rules 633 633 -D 634 635 # Enable auditing 636 -e 1 637 634 638 # Increase buffer size to handle the increased number of messages. 635 639 -b 8192 640 641 # Failure of auditd causes a kernel panic 642 -f 2 643 636 644 EOF 637 645 … … 651 659 -w /bin/login -p x 652 660 -w /bin/logout -p x 661 653 662 EOF 654 663 … … 657 666 ## successful use of chown/chmod) 658 667 cat <<-EOF >> /etc/audit.rules 668 # DAC permission changes 659 669 -a exit,always -S chmod -S chown -S chown32 -S fchmod -S fchown -S fchown32 -S lchown -S lchown32 670 660 671 EOF 661 672 … … 663 674 ## unauthorized access attempts to files (unsuccessful) 664 675 cat <<-EOF >> /etc/audit.rules 676 # unauthorized file access attempts 665 677 -a exit,always -F success=0 -S open -S mknod -S pipe -S mkdir -S creat -S truncate -S truncate64 -S ftruncate -S ftruncate64 678 666 679 EOF 667 680 … … 669 682 ## use of privileged commands (unsuccessful and successful) 670 683 cat <<-EOF >> /etc/audit.rules 684 # privileged commands 671 685 -a exit,always -S chroot -S mount -S umount -S umount2 -S adjtimex -S kill 672 686 -w /usr/sbin/pwck … … 682 696 -w /usr/bin/setfacl 683 697 -w /usr/bin/chacl 698 684 699 EOF 685 700 … … 687 702 ## files and programs deleted by the user (successful and unsuccessful) 688 703 cat <<-EOF >> /etc/audit.rules 704 # deleting files 689 705 -a exit,always -S unlink -S rmdir 706 690 707 EOF 691 708 … … 693 710 ## all system administration actions 694 711 cat <<-EOF >> /etc/audit.rules 695 # This line could be the cause of problems with filling audit logs and preventing system usage after installation 696 -w /var/log/audit/ 697 -w /etc/auditd.conf 698 -w /etc/audit.rules 712 # system administration actions 713 # these two lines could be the cause of problems with filling audit logs and preventing system usage after installation 714 -w /var/log/audit/audit.log 715 -w /var/log/audit/audit[1-4].log 716 -w /var/log/messages 717 -w /var/log/lastlog 718 -w /var/log/faillog 719 -w /etc/auditd.conf -p wa 720 -w /etc/audit.rules -p wa 721 -w /etc/selinux/config -p wa 722 -w /etc/passwd -p wa 723 -w /etc/shadow -p wa 724 -w /etc/group -p wa 725 -w /etc/ssh/sshd_config 726 -w /etc/pam.d 727 -w /etc/login.defs 728 -w /etc/rc.d/init.d 729 -w /etc/inittab -p wa 730 -w /var/run/utmp 731 -w /var/run/wtmp 699 732 -a exit,always -S acct -S reboot -S sched_setparam -S sched_setscheduler -S setdomainname -S setrlimit -S settimeofday -S stime -S swapon 733 700 734 EOF 701 735 … … 703 737 ## all security personnel actions 704 738 cat <<-EOF >> /etc/audit.rules 705 -a exit,always -S init_module -S delete_module 739 # security personnel actions 740 -a exit,always -S init_module -S delete_module -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr 706 741 -w /bin/su 742 707 743 EOF 708 744 trunk/RHEL4/scripts/Makefile
r100 r192 22 22 test -d $(DESTDIR)$(SHAREDIR)/scripts/stig-fix/cat3 || install -m 755 -d \ 23 23 $(DESTDIR)$(SHAREDIR)/scripts/stig-fix/cat3 24 test -d $(DESTDIR)$(SHAREDIR)/scripts/stig-fix/cat4 || install -m 755 -d \ 25 $(DESTDIR)$(SHAREDIR)/scripts/stig-fix/cat4 24 26 25 27 … … 41 43 install -m 700 stig-fix/cat2/*.sh $(DESTDIR)$(SHAREDIR)/scripts/stig-fix/cat2 42 44 install -m 700 stig-fix/cat3/*.sh $(DESTDIR)$(SHAREDIR)/scripts/stig-fix/cat3 45 install -m 700 stig-fix/cat4/*.sh $(DESTDIR)$(SHAREDIR)/scripts/stig-fix/cat4 43 46 44 47 # Patch installer trunk/RHEL4/scripts/installer.in
r100 r192 93 93 InstallMan 94 94 InstallStig 95 RunStigFixes95 #RunStigFixes trunk/RHEL4/scripts/stig-fix/cat2/gen002660.sh
r179 r192 10 10 # Remove any existing rules 11 11 -D 12 13 # Enable auditing 14 -e 1 15 12 16 # Increase buffer size to handle the increased number of messages. 13 17 -b 8192 18 19 # Failure of auditd causes a kernel panic 20 -f 2 21 14 22 EOF 15 23 trunk/RHEL4/scripts/stig-fix/cat2/gen002720.sh
r179 r192 9 9 -w /bin/login -p x 10 10 -w /bin/logout -p x 11 11 12 EOF trunk/RHEL4/scripts/stig-fix/cat2/gen002740.sh
r187 r192 8 8 echo '===================================================' 9 9 cat <<-EOF >> /etc/audit.rules 10 # DAC permission changes 10 11 -a exit,always -S chmod -S chown -S chown32 -S fchmod -S fchown -S fchown32 -S lchown -S lchown32 12 11 13 EOF trunk/RHEL4/scripts/stig-fix/cat2/gen002760.sh
r187 r192 7 7 echo '===================================================' 8 8 cat <<-EOF >> /etc/audit.rules 9 # unauthorized file access attempts 9 10 -a exit,always -F success=0 -S open -S mknod -S pipe -S mkdir -S creat -S truncate -S truncate64 -S ftruncate -S ftruncate64 11 10 12 EOF trunk/RHEL4/scripts/stig-fix/cat2/gen002780.sh
r187 r192 7 7 echo '===================================================' 8 8 cat <<-EOF >> /etc/audit.rules 9 # privileged commands 9 10 -a exit,always -S chroot -S mount -S umount -S umount2 -S adjtimex -S kill 10 11 -w /usr/sbin/pwck … … 20 21 -w /usr/bin/setfacl 21 22 -w /usr/bin/chacl 23 22 24 EOF trunk/RHEL4/scripts/stig-fix/cat2/gen002800.sh
r187 r192 7 7 echo '===================================================' 8 8 cat <<-EOF >> /etc/audit.rules 9 # deleting files 9 10 -a exit,always -S unlink -S rmdir 11 10 12 EOF trunk/RHEL4/scripts/stig-fix/cat2/gen002820.sh
r187 r192 7 7 echo '===================================================' 8 8 cat <<-EOF >> /etc/audit.rules 9 -w /var/log/audit/ 10 -w /etc/auditd.conf 11 -w /etc/audit.rules 9 # system administration actions 10 # these two lines could be the cause of problems with filling audit logs and preventing system usage after installation 11 -w /var/log/audit/audit.log 12 -w /var/log/audit/audit[1-4].log 13 -w /var/log/messages 14 -w /var/log/lastlog 15 -w /var/log/faillog 16 -w /etc/auditd.conf -p wa 17 -w /etc/audit.rules -p wa 18 -w /etc/selinux/config -p wa 19 -w /etc/passwd -p wa 20 -w /etc/shadow -p wa 21 -w /etc/group -p wa 22 -w /etc/ssh/sshd_config 23 -w /etc/pam.d 24 -w /etc/login.defs 25 -w /etc/rc.d/init.d 26 -w /etc/inittab -p wa 27 -w /var/run/utmp 28 -w /var/run/wtmp 12 29 -a exit,always -S acct -S reboot -S sched_setparam -S sched_setscheduler -S setdomainname -S setrlimit -S settimeofday -S stime -S swapon 30 13 31 EOF trunk/RHEL4/scripts/stig-fix/cat2/gen002840.sh
r187 r192 7 7 echo '===================================================' 8 8 cat <<-EOF >> /etc/audit.rules 9 -a exit,always -S init_module -S delete_module 9 # security personnel actions 10 -a exit,always -S init_module -S delete_module -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr 10 11 -w /bin/su 12 11 13 EOF trunk/RHEL5.1/conf/audit/audit.rules
r1 r192 1 # This is a sample rule set. The rules are executed from top 2 # to bottom. A '#' denotes comments. The rules are basically 3 # the auditctl commandline parameters. 4 5 # Remove existing rules 1 # Remove any existing rules 6 2 -D 7 3 … … 9 5 -e 1 10 6 11 # Increase kernel buffer size7 # Increase buffer size to handle the increased number of messages. 12 8 -b 8192 13 9 … … 15 11 -f 2 16 12 17 # 18 # Audit1: audit accesses to security relevant files 19 # 13 -w /bin/login -p x 14 -w /bin/logout -p x 20 15 21 # watch passwd databases 16 # DAC permission changes 17 -a exit,always -S chmod -S chown -S chown32 -S fchmod -S fchown -S fchown32 -S lchown -S lchown32 18 19 # unauthorized file access attempts 20 -a exit,always -F success=0 -S open -S mknod -S pipe -S mkdir -S creat -S truncate -S truncate64 -S ftruncate -S ftruncate64 21 22 # privileged commands 23 -a exit,always -S chroot -S mount -S umount -S umount2 -S adjtimex -S kill 24 -w /usr/sbin/pwck 25 -w /bin/chgrp 26 -w /usr/bin/newgrp 27 -w /usr/sbin/groupadd 28 -w /usr/sbin/groupmod 29 -w /usr/sbin/groupdel 30 -w /usr/sbin/useradd 31 -w /usr/sbin/userdel 32 -w /usr/sbin/usermod 33 -w /usr/bin/chage 34 -w /usr/bin/setfacl 35 -w /usr/bin/chacl 36 37 # deleting files 38 -a exit,always -S unlink -S rmdir 39 40 # system administration actions 41 # these two lines could be the cause of problems with filling audit logs and preventing system usage after installation 42 -w /var/log/audit/audit.log 43 -w /var/log/audit/audit[1-4].log 44 -w /var/log/messages 45 -w /var/log/lastlog 46 -w /var/log/faillog 47 -w /etc/audit/auditd.conf -p wa 48 -w /etc/audit/audit.rules -p wa 49 -w /etc/selinux/config -p wa 22 50 -w /etc/passwd -p wa 23 51 -w /etc/shadow -p wa 24 52 -w /etc/group -p wa 25 26 # pam configuration 53 -w /etc/ssh/sshd_config 27 54 -w /etc/pam.d 28 29 # auditd configuration 30 #-w /etc/auditd.conf 31 #-w /etc/audit.rules 32 33 # watch utmp,wtmp 55 -w /etc/login.defs 56 -w /etc/rc.d/init.d 57 -w /etc/inittab -p wa 34 58 -w /var/run/utmp 35 59 -w /var/run/wtmp 60 -a exit,always -S acct -S reboot -S sched_setparam -S sched_setscheduler -S setdomainname -S setrlimit -S settimeofday -S stime -S swapon 36 61 37 # watch system log files 38 -w /var/log/messages 39 -w /var/log/audit/audit.log 40 -w /var/log/audit/audit[1-4].log 62 # security personnel actions 63 -a exit,always -S init_module -S delete_module -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr 64 -w /bin/su 41 65 42 # watch audit subsystem's configuration files43 -w /etc/auditd.conf -p wa44 -w /etc/audit.rules -p wa45 46 # SELinux configuration47 -w /etc/selinux/config -p wa48 49 # login records50 -w /var/log/lastlog51 -w /var/log/faillog52 53 # login configuration54 -w /etc/login.defs55 56 # init configuration57 -w /etc/rc.d/init.d58 -w /etc/inittab -p wa59 60 # sshd configuration61 -w /etc/ssh/sshd_config62 63 # audit creating new directories64 -a exit,always -S mkdir -F auid!=065 66 # audit chmod,chown for non-root users67 -a exit,always -S chmod -S fchmod -F auid!=068 -a exit,always -S chown -S fchown -S lchown -F auid!=069 70 # changes to security labels71 -a exit,always -S setxattr -S lsetxattr -S fsetxattr72 -a exit,always -S removexattr -S lremovexattr -S fremovexattrtrunk/RHEL5.1/kickstart/clip.ks
r186 r192 643 643 # Remove any existing rules 644 644 -D 645 646 # Enable auditing 647 -e 1 648 645 649 # Increase buffer size to handle the increased number of messages. 646 650 -b 8192 651 652 # Failure of auditd causes a kernel panic 653 -f 2 654 647 655 EOF 648 656 … … 662 670 -w /bin/login -p x 663 671 -w /bin/logout -p x 672 664 673 EOF 665 674 … … 668 677 ## successful use of chown/chmod) 669 678 cat <<-EOF >> /etc/audit/audit.rules 679 # DAC permission changes 670 680 -a exit,always -S chmod -S chown -S chown32 -S fchmod -S fchown -S fchown32 -S lchown -S lchown32 681 671 682 EOF 672 683 … … 674 685 ## unauthorized access attempts to files (unsuccessful) 675 686 cat <<-EOF >> /etc/audit/audit.rules 687 # unauthorized file access attempts 676 688 -a exit,always -F success=0 -S open -S mknod -S pipe -S mkdir -S creat -S truncate -S truncate64 -S ftruncate -S ftruncate64 689 677 690 EOF 678 691 … … 680 693 ## use of privileged commands (unsuccessful and successful) 681 694 cat <<-EOF >> /etc/audit/audit.rules 695 # privileged commands 682 696 -a exit,always -S chroot -S mount -S umount -S umount2 -S adjtimex -S kill 683 697 -w /usr/sbin/pwck … … 693 707 -w /usr/bin/setfacl 694 708 -w /usr/bin/chacl 709 695 710 EOF 696 711 … … 698 713 ## files and programs deleted by the user (successful and unsuccessful) 699 714 cat <<-EOF >> /etc/audit/audit.rules 715 # deleting files 700 716 -a exit,always -S unlink -S rmdir 717 701 718 EOF 702 719 … … 704 721 ## all system administration actions 705 722 cat <<-EOF >> /etc/audit/audit.rules 706 # This line could be the cause of problems with filling audit logs and preventing system usage after installation 707 -w /var/log/audit/ 708 -w /etc/auditd.conf 709 -w /etc/audit 723 # system administration actions 724 # these two lines could be the cause of problems with filling audit logs and preventing system usage after installation 725 -w /var/log/audit/audit.log 726 -w /var/log/audit/audit[1-4].log 727 -w /var/log/messages 728 -w /var/log/lastlog 729 -w /var/log/faillog 730 -w /etc/audit/auditd.conf -p wa 731 -w /etc/audit/audit.rules -p wa 732 -w /etc/selinux/config -p wa 733 -w /etc/passwd -p wa 734 -w /etc/shadow -p wa 735 -w /etc/group -p wa 736 -w /etc/ssh/sshd_config 737 -w /etc/pam.d 738 -w /etc/login.defs 739 -w /etc/rc.d/init.d 740 -w /etc/inittab -p wa 741 -w /var/run/utmp 742 -w /var/run/wtmp 710 743 -a exit,always -S acct -S reboot -S sched_setparam -S sched_setscheduler -S setdomainname -S setrlimit -S settimeofday -S stime -S swapon 744 711 745 EOF 712 746 … … 714 748 ## all security personnel actions 715 749 cat <<-EOF >> /etc/audit/audit.rules 716 -a exit,always -S init_module -S delete_module 750 # security personnel actions 751 -a exit,always -S init_module -S delete_module -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr 717 752 -w /bin/su 753 718 754 EOF 719 755 trunk/RHEL5.1/scripts/Makefile
r189 r192 22 22 test -d $(DESTDIR)$(SHAREDIR)/scripts/stig-fix/cat3 || install -m 755 -d \ 23 23 $(DESTDIR)$(SHAREDIR)/scripts/stig-fix/cat3 24 test -d $(DESTDIR)$(SHAREDIR)/scripts/stig-fix/cat4 || install -m 755 -d \ 25 $(DESTDIR)$(SHAREDIR)/scripts/stig-fix/cat4 24 26 # test -d *.conf || install -m 644 *.conf \ 25 27 #$(DESTDIR)$(SYSCONFDIR) trunk/RHEL5.1/scripts/installer.in
r189 r192 38 38 39 39 InstallAudit() { 40 Copy $AUDITDIR/auditd.conf /etc/audit d.conf41 Copy $AUDITDIR/audit.rules /etc/audit .rules40 Copy $AUDITDIR/auditd.conf /etc/audit/auditd.conf 41 Copy $AUDITDIR/audit.rules /etc/audit/audit.rules 42 42 auditctl -R /etc/audit.rules 43 43 } trunk/RHEL5.1/scripts/stig-fix/cat2/gen002660.sh
r144 r192 10 10 # Remove any existing rules 11 11 -D 12 13 # Enable auditing 14 -e 1 15 12 16 # Increase buffer size to handle the increased number of messages. 13 17 -b 8192 18 19 # Failure of auditd causes a kernel panic 20 -f 2 21 14 22 EOF 15 23 trunk/RHEL5.1/scripts/stig-fix/cat2/gen002720.sh
r187 r192 9 9 -w /bin/login -p x 10 10 -w /bin/logout -p x 11 11 12 EOF trunk/RHEL5.1/scripts/stig-fix/cat2/gen002740.sh
r187 r192 8 8 echo '===================================================' 9 9 cat <<-EOF >> /etc/audit/audit.rules 10 # DAC permission changes 10 11 -a exit,always -S chmod -S chown -S chown32 -S fchmod -S fchown -S fchown32 -S lchown -S lchown32 12 11 13 EOF trunk/RHEL5.1/scripts/stig-fix/cat2/gen002760.sh
r187 r192 7 7 echo '===================================================' 8 8 cat <<-EOF >> /etc/audit/audit.rules 9 # unauthorized file access attempts 9 10 -a exit,always -F success=0 -S open -S mknod -S pipe -S mkdir -S creat -S truncate -S truncate64 -S ftruncate -S ftruncate64 11 10 12 EOF trunk/RHEL5.1/scripts/stig-fix/cat2/gen002780.sh
r187 r192 7 7 echo '===================================================' 8 8 cat <<-EOF >> /etc/audit/audit.rules 9 # privileged commands 9 10 -a exit,always -S chroot -S mount -S umount -S umount2 -S adjtimex -S kill 10 11 -w /usr/sbin/pwck … … 20 21 -w /usr/bin/setfacl 21 22 -w /usr/bin/chacl 23 22 24 EOF trunk/RHEL5.1/scripts/stig-fix/cat2/gen002800.sh
r187 r192 7 7 echo '===================================================' 8 8 cat <<-EOF >> /etc/audit/audit.rules 9 # deleting files 9 10 -a exit,always -S unlink -S rmdir 11 10 12 EOF trunk/RHEL5.1/scripts/stig-fix/cat2/gen002820.sh
r187 r192 7 7 echo '===================================================' 8 8 cat <<-EOF >> /etc/audit/audit.rules 9 -w /var/log/audit/ 10 -w /etc/auditd.conf 11 -w /etc/audit 9 # system administration actions 10 # these two lines could be the cause of problems with filling audit logs and preventing system usage after installation 11 -w /var/log/audit/audit.log 12 -w /var/log/audit/audit[1-4].log 13 -w /var/log/messages 14 -w /var/log/lastlog 15 -w /var/log/faillog 16 -w /etc/audit/auditd.conf -p wa 17 -w /etc/audit/audit.rules -p wa 18 -w /etc/selinux/config -p wa 19 -w /etc/passwd -p wa 20 -w /etc/shadow -p wa 21 -w /etc/group -p wa 22 -w /etc/ssh/sshd_config 23 -w /etc/pam.d 24 -w /etc/login.defs 25 -w /etc/rc.d/init.d 26 -w /etc/inittab -p wa 27 -w /var/run/utmp 28 -w /var/run/wtmp 12 29 -a exit,always -S acct -S reboot -S sched_setparam -S sched_setscheduler -S setdomainname -S setrlimit -S settimeofday -S stime -S swapon 30 13 31 EOF trunk/RHEL5.1/scripts/stig-fix/cat2/gen002840.sh
r187 r192 7 7 echo '===================================================' 8 8 cat <<-EOF >> /etc/audit/audit.rules 9 -a exit,always -S init_module -S delete_module 9 # security personnel actions 10 -a exit,always -S init_module -S delete_module -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr 10 11 -w /bin/su 12 11 13 EOF trunk/RHEL5/conf/audit/audit.rules
r1 r192 1 # This is a sample rule set. The rules are executed from top 2 # to bottom. A '#' denotes comments. The rules are basically 3 # the auditctl commandline parameters. 4 5 # Remove existing rules 1 # Remove any existing rules 6 2 -D 7 3 … … 9 5 -e 1 10 6 11 # Increase kernel buffer size7 # Increase buffer size to handle the increased number of messages. 12 8 -b 8192 13 9 … … 15 11 -f 2 16 12 17 # 18 # Audit1: audit accesses to security relevant files 19 # 13 -w /bin/login -p x 14 -w /bin/logout -p x 20 15 21 # watch passwd databases 16 # DAC permission changes 17 -a exit,always -S chmod -S chown -S chown32 -S fchmod -S fchown -S fchown32 -S lchown -S lchown32 18 19 # unauthorized file access attempts 20 -a exit,always -F success=0 -S open -S mknod -S pipe -S mkdir -S creat -S truncate -S truncate64 -S ftruncate -S ftruncate64 21 22 # privileged commands 23 -a exit,always -S chroot -S mount -S umount -S umount2 -S adjtimex -S kill 24 -w /usr/sbin/pwck 25 -w /bin/chgrp 26 -w /usr/bin/newgrp 27 -w /usr/sbin/groupadd 28 -w /usr/sbin/groupmod 29 -w /usr/sbin/groupdel 30 -w /usr/sbin/useradd 31 -w /usr/sbin/userdel 32 -w /usr/sbin/usermod 33 -w /usr/bin/chage 34 -w /usr/bin/setfacl 35 -w /usr/bin/chacl 36 37 # deleting files 38 -a exit,always -S unlink -S rmdir 39 40 # system administration actions 41 # these two lines could be the cause of problems with filling audit logs and preventing system usage after installation 42 -w /var/log/audit/audit.log 43 -w /var/log/audit/audit[1-4].log 44 -w /var/log/messages 45 -w /var/log/lastlog 46 -w /var/log/faillog 47 -w /etc/audit/auditd.conf -p wa 48 -w /etc/audit/audit.rules -p wa 49 -w /etc/selinux/config -p wa 22 50 -w /etc/passwd -p wa 23 51 -w /etc/shadow -p wa 24 52 -w /etc/group -p wa 25 26 # pam configuration 53 -w /etc/ssh/sshd_config 27 54 -w /etc/pam.d 28 29 # auditd configuration 30 #-w /etc/auditd.conf 31 #-w /etc/audit.rules 32 33 # watch utmp,wtmp 55 -w /etc/login.defs 56 -w /etc/rc.d/init.d 57 -w /etc/inittab -p wa 34 58 -w /var/run/utmp 35 59 -w /var/run/wtmp 60 -a exit,always -S acct -S reboot -S sched_setparam -S sched_setscheduler -S setdomainname -S setrlimit -S settimeofday -S stime -S swapon 36 61 37 # watch system log files 38 -w /var/log/messages 39 -w /var/log/audit/audit.log 40 -w /var/log/audit/audit[1-4].log 62 # security personnel actions 63 -a exit,always -S init_module -S delete_module -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr 64 -w /bin/su 41 65 42 # watch audit subsystem's configuration files43 -w /etc/auditd.conf -p wa44 -w /etc/audit.rules -p wa45 46 # SELinux configuration47 -w /etc/selinux/config -p wa48 49 # login records50 -w /var/log/lastlog51 -w /var/log/faillog52 53 # login configuration54 -w /etc/login.defs55 56 # init configuration57 -w /etc/rc.d/init.d58 -w /etc/inittab -p wa59 60 # sshd configuration61 -w /etc/ssh/sshd_config62 63 # audit creating new directories64 -a exit,always -S mkdir -F auid!=065 66 # audit chmod,chown for non-root users67 -a exit,always -S chmod -S fchmod -F auid!=068 -a exit,always -S chown -S fchown -S lchown -F auid!=069 70 # changes to security labels71 -a exit,always -S setxattr -S lsetxattr -S fsetxattr72 -a exit,always -S removexattr -S lremovexattr -S fremovexattrtrunk/RHEL5/kickstart/clip.ks
r186 r192 634 634 # Remove any existing rules 635 635 -D 636 637 # Enable auditing 638 -e 1 639 636 640 # Increase buffer size to handle the increased number of messages. 637 641 -b 8192 642 643 # Failure of auditd causes a kernel panic 644 -f 2 645 638 646 EOF 639 647 … … 653 661 -w /bin/login -p x 654 662 -w /bin/logout -p x 663 655 664 EOF 656 665 … … 659 668 ## successful use of chown/chmod) 660 669 cat <<-EOF >> /etc/audit/audit.rules 670 # DAC permission changes 661 671 -a exit,always -S chmod -S chown -S chown32 -S fchmod -S fchown -S fchown32 -S lchown -S lchown32 672 662 673 EOF 663 674 … … 665 676 ## unauthorized access attempts to files (unsuccessful) 666 677 cat <<-EOF >> /etc/audit/audit.rules 678 # unauthorized file access attempts 667 679 -a exit,always -F success=0 -S open -S mknod -S pipe -S mkdir -S creat -S truncate -S truncate64 -S ftruncate -S ftruncate64 680 668 681 EOF 669 682 … … 671 684 ## use of privileged commands (unsuccessful and successful) 672 685 cat <<-EOF >> /etc/audit/audit.rules 686 # privileged commands 673 687 -a exit,always -S chroot -S mount -S umount -S umount2 -S adjtimex -S kill 674 688 -w /usr/sbin/pwck … … 684 698 -w /usr/bin/setfacl 685 699 -w /usr/bin/chacl 700 686 701 EOF 687 702 … … 689 704 ## files and programs deleted by the user (successful and unsuccessful) 690 705 cat <<-EOF >> /etc/audit/audit.rules 706 # deleting files 691 707 -a exit,always -S unlink -S rmdir 708 692 709 EOF 693 710 … … 695 712 ## all system administration actions 696 713 cat <<-EOF >> /etc/audit/audit.rules 697 # This line could be the cause of problems with filling audit logs and preventing system usage after installation 698 -w /var/log/audit 699 -w /etc/auditd.conf 700 -w /etc/audit 714 # system administration actions 715 # these two lines could be the cause of problems with filling audit logs and preventing system usage after installation 716 -w /var/log/audit/audit.log 717 -w /var/log/audit/audit[1-4].log 718 -w /var/log/messages 719 -w /var/log/lastlog 720 -w /var/log/faillog 721 -w /etc/audit/auditd.conf -p wa 722 -w /etc/audit/audit.rules -p wa 723 -w /etc/selinux/config -p wa 724 -w /etc/passwd -p wa 725 -w /etc/shadow -p wa 726 -w /etc/group -p wa 727 -w /etc/ssh/sshd_config 728 -w /etc/pam.d 729 -w /etc/login.defs 730 -w /etc/rc.d/init.d 731 -w /etc/inittab -p wa 732 -w /var/run/utmp 733 -w /var/run/wtmp 701 734 -a exit,always -S acct -S reboot -S sched_setparam -S sched_setscheduler -S setdomainname -S setrlimit -S settimeofday -S stime -S swapon 735 702 736 EOF 703 737 … … 705 739 ## all security personnel actions 706 740 cat <<-EOF >> /etc/audit/audit.rules 707 -a exit,always -S init_module -S delete_module
