Changeset 192 for trunk/RHEL4

Show
Ignore:
Timestamp:
04/29/08 10:35:18 (9 months ago)
Author:
slawrence
Message:

- Combined audit.conf and kickstart audit.rules
- Prevented RHEL4 from running stigs after rpm installation
- Fixed installation scripts to include cat4 stigs

Files:

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 top 
    2 # to bottom. A '#' denotes comments. The rules are basically 
    3 # the auditctl commandline parameters. 
    4  
    51# Remove existing rules 
    62-D 
     
    95-e 1 
    106 
    11 # Increase kernel buffer size 
     7# Increase buffer size to handle the increased number of messages. 
    128-b 8192 
    139 
     
    1511-f 2 
    1612 
    17 
    18 # Audit1: audit accesses to security relevant files 
    19 
     13-w /bin/login -p x 
     14-w /bin/logout -p x 
    2015 
    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 
    2250-w /etc/passwd -p wa 
    2351-w /etc/shadow -p wa 
    2452-w /etc/group  -p wa 
    25  
    26 # pam configuration 
     53-w /etc/ssh/sshd_config 
    2754-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 
    3458-w /var/run/utmp 
    3559-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 
    3661 
    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  
    632632        # Remove any existing rules 
    633633        -D 
     634 
     635        # Enable auditing 
     636        -e 1 
     637 
    634638        # Increase buffer size to handle the increased number of messages. 
    635639        -b 8192 
     640 
     641        # Failure of auditd causes a kernel panic 
     642        -f 2 
     643 
    636644EOF 
    637645 
     
    651659        -w /bin/login -p x 
    652660        -w /bin/logout -p x  
     661 
    653662EOF 
    654663 
     
    657666## successful use of chown/chmod) 
    658667cat <<-EOF >> /etc/audit.rules 
     668        # DAC permission changes 
    659669        -a exit,always -S chmod -S chown -S chown32 -S fchmod -S fchown -S fchown32 -S lchown -S lchown32 
     670 
    660671EOF 
    661672 
     
    663674## unauthorized access attempts to files (unsuccessful) 
    664675cat <<-EOF >> /etc/audit.rules 
     676        # unauthorized file access attempts 
    665677        -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 
    666679EOF 
    667680 
     
    669682## use of privileged commands (unsuccessful and successful) 
    670683cat <<-EOF >> /etc/audit.rules 
     684        # privileged commands 
    671685        -a exit,always -S chroot -S mount -S umount -S umount2 -S adjtimex -S kill 
    672686        -w /usr/sbin/pwck 
     
    682696        -w /usr/bin/setfacl 
    683697        -w /usr/bin/chacl 
     698 
    684699EOF 
    685700 
     
    687702## files and programs deleted by the user (successful and unsuccessful) 
    688703cat <<-EOF >> /etc/audit.rules 
     704        # deleting files 
    689705        -a exit,always -S unlink -S rmdir 
     706 
    690707EOF 
    691708 
     
    693710## all system administration actions 
    694711cat <<-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 
    699732        -a exit,always -S acct -S reboot -S sched_setparam -S sched_setscheduler -S setdomainname -S setrlimit -S settimeofday -S stime -S swapon 
     733 
    700734EOF 
    701735 
     
    703737## all security personnel actions 
    704738cat <<-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 
    706741        -w /bin/su 
     742 
    707743EOF 
    708744 
  • trunk/RHEL4/scripts/Makefile

    r100 r192  
    2222        test -d $(DESTDIR)$(SHAREDIR)/scripts/stig-fix/cat3 || install -m 755 -d \ 
    2323                $(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 
    2426 
    2527 
     
    4143        install -m 700 stig-fix/cat2/*.sh $(DESTDIR)$(SHAREDIR)/scripts/stig-fix/cat2  
    4244        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  
    4346 
    4447        # Patch installer  
  • trunk/RHEL4/scripts/installer.in

    r100 r192  
    9393InstallMan 
    9494InstallStig 
    95 RunStigFixes 
     95#RunStigFixes 
  • trunk/RHEL4/scripts/stig-fix/cat2/gen002660.sh

    r179 r192  
    1010        # Remove any existing rules 
    1111        -D 
     12 
     13        # Enable auditing 
     14        -e 1 
     15 
    1216        # Increase buffer size to handle the increased number of messages. 
    1317        -b 8192 
     18 
     19        # Failure of auditd causes a kernel panic 
     20        -f 2 
     21 
    1422EOF 
    1523 
  • trunk/RHEL4/scripts/stig-fix/cat2/gen002720.sh

    r179 r192  
    99        -w /bin/login -p x 
    1010        -w /bin/logout -p x 
     11 
    1112EOF 
  • trunk/RHEL4/scripts/stig-fix/cat2/gen002740.sh

    r187 r192  
    88echo '===================================================' 
    99cat <<-EOF >> /etc/audit.rules 
     10        # DAC permission changes 
    1011        -a exit,always -S chmod -S chown -S chown32 -S fchmod -S fchown -S fchown32 -S lchown -S lchown32 
     12 
    1113EOF 
  • trunk/RHEL4/scripts/stig-fix/cat2/gen002760.sh

    r187 r192  
    77echo '===================================================' 
    88cat <<-EOF >> /etc/audit.rules 
     9        # unauthorized file access attempts 
    910        -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 
    1012EOF 
  • trunk/RHEL4/scripts/stig-fix/cat2/gen002780.sh

    r187 r192  
    77echo '===================================================' 
    88cat <<-EOF >> /etc/audit.rules 
     9        # privileged commands 
    910        -a exit,always -S chroot -S mount -S umount -S umount2 -S adjtimex -S kill 
    1011        -w /usr/sbin/pwck 
     
    2021        -w /usr/bin/setfacl 
    2122        -w /usr/bin/chacl 
     23 
    2224EOF 
  • trunk/RHEL4/scripts/stig-fix/cat2/gen002800.sh

    r187 r192  
    77echo '===================================================' 
    88cat <<-EOF >> /etc/audit.rules 
     9        # deleting files 
    910        -a exit,always -S unlink -S rmdir 
     11 
    1012EOF 
  • trunk/RHEL4/scripts/stig-fix/cat2/gen002820.sh

    r187 r192  
    77echo '===================================================' 
    88cat <<-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 
    1229        -a exit,always -S acct -S reboot -S sched_setparam -S sched_setscheduler -S setdomainname -S setrlimit -S settimeofday -S stime -S swapon 
     30 
    1331EOF 
  • trunk/RHEL4/scripts/stig-fix/cat2/gen002840.sh

    r187 r192  
    77echo '===================================================' 
    88cat <<-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 
    1011        -w /bin/su 
     12 
    1113EOF