diff options
author | Yoann Vandoorselaere <yoann@mandriva.com> | 1999-11-30 15:47:11 +0000 |
---|---|---|
committer | Yoann Vandoorselaere <yoann@mandriva.com> | 1999-11-30 15:47:11 +0000 |
commit | 6993d7456f2e542095deec62549d467e6e9a7057 (patch) | |
tree | 0ab7fbc7733b95c70c32012bf84a42354082bf72 /init-sh | |
parent | 79c42eeb075ae7d7bbb3b03165267d5ebe81bb63 (diff) | |
download | msec-6993d7456f2e542095deec62549d467e6e9a7057.tar msec-6993d7456f2e542095deec62549d467e6e9a7057.tar.gz msec-6993d7456f2e542095deec62549d467e6e9a7057.tar.bz2 msec-6993d7456f2e542095deec62549d467e6e9a7057.tar.xz msec-6993d7456f2e542095deec62549d467e6e9a7057.zip |
Many cron security check added.
Now report what it does ( msec ).
Diffstat (limited to 'init-sh')
-rwxr-xr-x | init-sh/level1.sh | 35 | ||||
-rwxr-xr-x | init-sh/level2.sh | 37 | ||||
-rwxr-xr-x | init-sh/level3.sh | 37 | ||||
-rwxr-xr-x | init-sh/level4.sh | 31 | ||||
-rwxr-xr-x | init-sh/level5.sh | 29 |
5 files changed, 112 insertions, 57 deletions
diff --git a/init-sh/level1.sh b/init-sh/level1.sh index b54b85b..2fef869 100755 --- a/init-sh/level1.sh +++ b/init-sh/level1.sh @@ -20,22 +20,33 @@ AddRules "tty4" /etc/securetty quiet AddRules "tty5" /etc/securetty quiet AddRules "tty6" /etc/securetty -# Suid Check -echo "Updating file check variable :" +# Security check +echo "Updating file check variable : " echo -e "\t- Check suid root file : no." -AddRules "CHECK_SUID_ROOT=no" /etc/security/msec/security.conf quiet -echo -e "\t- Check suid goup file : no." -AddRules "CHECK_SUID_GROUP=no" /etc/security/msec/security.conf quiet + AddRules "CHECK_SUID_ROOT=no" /etc/security/msec/security.conf quiet +echo -e "\t- Check suid root file integrity (backdoor check) : no." + AddRules "CHECK_SUID_MD5=no" /etc/security/msec/security.conf quiet +echo -e "\t- Check suid group file : no." + AddRules "CHECK_SUID_GROUP=no" /etc/security/msec/security.conf quiet echo -e "\t- Check world writable file : no." -AddRules "CHECK_WRITABLE=no" /etc/security/msec/security.conf quiet + AddRules "CHECK_WRITABLE=no" /etc/security/msec/security.conf quiet echo -e "\t- Check unowned file : no." -AddRules "CHECK_UNOWNED=no" /etc/security/msec/security.conf quiet + AddRules "CHECK_UNOWNED=no" /etc/security/msec/security.conf quiet echo -e "\t- Check promiscuous mode : no." -AddRules "CHECK_PROMISC=no" /etc/security/msec/security.conf quiet -echo -e "\t- Security warning on tty : no." -AddRules "TTY_WARN=no" /etc/security/msec/security.conf quiet -echo -e "\t- Security warning in syslog : yes." -AddRules "SYSLOG_WARN=yes" /etc/security/msec/security.conf + AddRules "CHECK_PROMISC=no" /etc/security/msec/security.conf quiet +echo -e "\t- Check listening port : no." + AddRules "CHECK_OPEN_PORT=no" /etc/security/msec/security.conf quiet +echo -e "\t- Check for dangerous .[sr]hosts file : no." + AddRules "CHECK_RHOST=no" /etc/security/msec/security.conf quiet +echo -e "\t- Check passwd file integrity : no." + AddRules "CHECK_PASSWD=no" /etc/security/msec/security.conf quiet +echo -e "\t- Check shadow file integrity : no." + AddRules "CHECK_SHADOW=no" /etc/security/msec/security.conf quiet +echo -e "\t- Security warning on tty : \"no\" :" + AddRules "TTY_WARN=no" /etc/security/msec/security.conf quiet +echo -e "\t- Security warning in syslog : \"no\" :" + AddRules "SYSLOG_WARN=no" /etc/security/msec/security.conf +# end security check # lilo update echo -n "Running lilo to record new config : " diff --git a/init-sh/level2.sh b/init-sh/level2.sh index b9385f9..ec80c5d 100755 --- a/init-sh/level2.sh +++ b/init-sh/level2.sh @@ -20,22 +20,33 @@ AddRules "tty4" /etc/securetty quiet AddRules "tty5" /etc/securetty quiet AddRules "tty6" /etc/securetty -# security.conf -echo "Updating file check variable :" +# Security check +echo "Updating file check variable : " echo -e "\t- Check suid root file : yes." -AddRules "CHECK_SUID_ROOT=yes" /etc/security/msec/security.conf quiet -echo -e "\t- Check suid goup file : no." -AddRules "CHECK_SUID_GROUP=no" /etc/security/msec/security.conf quiet -echo -e "\t- Check world writable file : no." -AddRules "CHECK_WRITABLE=no" /etc/security/msec/security.conf quiet + AddRules "CHECK_SUID_ROOT=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check suid root file integrity (backdoor check) : yes." + AddRules "CHECK_SUID_MD5=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check suid group file : yes." + AddRules "CHECK_SUID_GROUP=no" /etc/security/msec/security.conf quiet +echo -e "\t- Check world writable file : yes." + AddRules "CHECK_WRITABLE=yes" /etc/security/msec/security.conf quiet echo -e "\t- Check unowned file : no." -AddRules "CHECK_UNOWNED=no" /etc/security/msec/security.conf quiet + AddRules "CHECK_UNOWNED=no" /etc/security/msec/security.conf quiet echo -e "\t- Check promiscuous mode : no." -AddRules "CHECK_PROMISC=no" /etc/security/msec/security.conf quiet -echo -e "\t- Security warning on tty : no." -AddRules "TTY_WARN=no" /etc/security/msec/security.conf quiet -echo -e "\t- Security warning in syslog : yes." -AddRules "SYSLOG_WARN=yes" /etc/security/msec/security.conf + AddRules "CHECK_PROMISC=no" /etc/security/msec/security.conf quiet +echo -e "\t- Check listening port : no." + AddRules "CHECK_OPEN_PORT=no" /etc/security/msec/security.conf quiet +echo -e "\t- Check for dangerous .[sr]hosts file : no." + AddRules "CHECK_RHOST=no" /etc/security/msec/security.conf quiet +echo -e "\t- Check passwd file integrity : no." + AddRules "CHECK_PASSWD=no" /etc/security/msec/security.conf quiet +echo -e "\t- Check shadow file integrity : no." + AddRules "CHECK_SHADOW=no" /etc/security/msec/security.conf quiet +echo -e "\t- Security warning on tty : \"no\" :" + AddRules "TTY_WARN=no" /etc/security/msec/security.conf quiet +echo -e "\t- Security warning in syslog : \"yes\" :" + AddRules "SYSLOG_WARN=yes" /etc/security/msec/security.conf +# end security check # lilo update echo -n "Running lilo to record new config : " diff --git a/init-sh/level3.sh b/init-sh/level3.sh index bfb71ea..29ea9b7 100755 --- a/init-sh/level3.sh +++ b/init-sh/level3.sh @@ -24,22 +24,33 @@ AddRules "tty4" /etc/securetty quiet AddRules "tty5" /etc/securetty quiet AddRules "tty6" /etc/securetty quiet -# / +# Security check echo "Updating file check variable : " echo -e "\t- Check suid root file : yes." -AddRules "CHECK_SUID_ROOT=yes" /etc/security/msec/security.conf quiet -echo -e "\t- Check suid goup file : yes." -AddRules "CHECK_SUID_GROUP=yes" /etc/security/msec/security.conf quiet + AddRules "CHECK_SUID_ROOT=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check suid root file integrity (backdoor check) : yes." + AddRules "CHECK_SUID_MD5=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check suid group file : no." + AddRules "CHECK_SUID_GROUP=no" /etc/security/msec/security.conf quiet echo -e "\t- Check world writable file : yes." -AddRules "CHECK_WRITABLE=yes" /etc/security/msec/security.conf quiet -echo -e "\t- Check unowned file : yes." -AddRules "CHECK_UNOWNED=yes" /etc/security/msec/security.conf quiet -echo -e "\t- Check promiscuous mode : \"no\" :" -AddRules "CHECK_PROMISC=no" /etc/security/msec/security.conf quiet -echo -e "\t- Security warning on tty : \"no\" :" -AddRules "TTY_WARN=no" /etc/security/msec/security.conf quiet -echo -e "\t- Security warning on syslog : \"yes\" :" -AddRules "SYSLOG_WARN=yes" /etc/security/msec/security.conf + AddRules "CHECK_WRITABLE=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check unowned file : no." + AddRules "CHECK_UNOWNED=no" /etc/security/msec/security.conf quiet +echo -e "\t- Check promiscuous mode : no." + AddRules "CHECK_PROMISC=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check listening port : yes." + AddRules "CHECK_OPEN_PORT=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check for dangerous .[sr]hosts file : yes." + AddRules "CHECK_RHOST=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check passwd file integrity : yes." + AddRules "CHECK_PASSWD=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check shadow file integrity : yes." + AddRules "CHECK_SHADOW=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Security warning on tty : \"yes\" :" + AddRules "TTY_WARN=no" /etc/security/msec/security.conf quiet +echo -e "\t- Security warning in syslog : \"yes\" :" + AddRules "SYSLOG_WARN=yes" /etc/security/msec/security.conf +# end security check # Crontab echo "Adding permission check in crontab (scheduled every midnight) :" diff --git a/init-sh/level4.sh b/init-sh/level4.sh index c3e0e5e..421c5e0 100755 --- a/init-sh/level4.sh +++ b/init-sh/level4.sh @@ -34,22 +34,33 @@ AddRules "tty4" /etc/securetty quiet AddRules "tty5" /etc/securetty quiet AddRules "tty6" /etc/securetty -# Suid check +# Security check echo "Updating file check variable : " echo -e "\t- Check suid root file : yes." -AddRules "CHECK_SUID_ROOT=yes" /etc/security/msec/security.conf quiet -echo -e "\t- Check suid goup file : yes." -AddRules "CHECK_SUID_GROUP=yes" /etc/security/msec/security.conf quiet + AddRules "CHECK_SUID_ROOT=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check suid root file integrity (backdoor check) : yes." + AddRules "CHECK_SUID_MD5=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check suid group file : yes." + AddRules "CHECK_SUID_GROUP=yes" /etc/security/msec/security.conf quiet echo -e "\t- Check world writable file : yes." -AddRules "CHECK_WRITABLE=yes" /etc/security/msec/security.conf quiet + AddRules "CHECK_WRITABLE=yes" /etc/security/msec/security.conf quiet echo -e "\t- Check unowned file : yes." -AddRules "CHECK_UNOWNED=yes" /etc/security/msec/security.conf quiet + AddRules "CHECK_UNOWNED=yes" /etc/security/msec/security.conf quiet echo -e "\t- Check promiscuous mode : yes." -AddRules "CHECK_PROMISC=yes" /etc/security/msec/security.conf quiet + AddRules "CHECK_PROMISC=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check listening port : yes." + AddRules "CHECK_OPEN_PORT=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check for dangerous .[sr]hosts file : yes." + AddRules "CHECK_RHOST=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check passwd file integrity : yes." + AddRules "CHECK_PASSWD=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check shadow file integrity : yes." + AddRules "CHECK_SHADOW=yes" /etc/security/msec/security.conf quiet echo -e "\t- Security warning on tty : \"yes\" :" -AddRules "TTY_WARN=yes" /etc/security/msec/security.conf quiet -echo -e "\t- Security warning in syslog : \"yes\" :" -AddRules "SYSLOG_WARN=yes" /etc/security/msec/security.conf + AddRules "TTY_WARN=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Security warning in syslog : \"yes\" :" + AddRules "SYSLOG_WARN=yes" /etc/security/msec/security.conf +# end security check # Check every 1 minutes for promisc problem echo "Adding promisc check in crontab (scheduled every minutes) :" diff --git a/init-sh/level5.sh b/init-sh/level5.sh index a39944e..0b60c2d 100755 --- a/init-sh/level5.sh +++ b/init-sh/level5.sh @@ -25,22 +25,33 @@ echo "Login as root is denied : " echo "Modified file : /etc/securetty..." echo -e "done.\n\n" -# Suid check +# Security check echo "Updating file check variable : " echo -e "\t- Check suid root file : yes." -AddRules "CHECK_SUID_ROOT=yes" /etc/security/msec/security.conf quiet -echo -e "\t- Check suid goup file : yes." -AddRules "CHECK_SUID_GROUP=yes" /etc/security/msec/security.conf quiet + AddRules "CHECK_SUID_ROOT=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check suid root file integrity (backdoor check) : yes." + AddRules "CHECK_SUID_MD5=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check suid group file : yes." + AddRules "CHECK_SUID_GROUP=yes" /etc/security/msec/security.conf quiet echo -e "\t- Check world writable file : yes." -AddRules "CHECK_WRITABLE=yes" /etc/security/msec/security.conf quiet + AddRules "CHECK_WRITABLE=yes" /etc/security/msec/security.conf quiet echo -e "\t- Check unowned file : yes." -AddRules "CHECK_UNOWNED=yes" /etc/security/msec/security.conf quiet + AddRules "CHECK_UNOWNED=yes" /etc/security/msec/security.conf quiet echo -e "\t- Check promiscuous mode : yes." -AddRules "CHECK_PROMISC=yes" /etc/security/msec/security.conf quiet + AddRules "CHECK_PROMISC=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check listening port : yes." + AddRules "CHECK_OPEN_PORT=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check for dangerous .[sr]hosts file : yes." + AddRules "CHECK_RHOST=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check passwd file integrity : yes." + AddRules "CHECK_PASSWD=yes" /etc/security/msec/security.conf quiet +echo -e "\t- Check shadow file integrity : yes." + AddRules "CHECK_SHADOW=yes" /etc/security/msec/security.conf quiet echo -e "\t- Security warning on tty : \"yes\" :" -AddRules "TTY_WARN=yes" /etc/security/msec/security.conf quiet + AddRules "TTY_WARN=yes" /etc/security/msec/security.conf quiet echo -e "\t- Security warning in syslog : \"yes\" :" -AddRules "SYSLOG_WARN=yes" /etc/security/msec/security.conf + AddRules "SYSLOG_WARN=yes" /etc/security/msec/security.conf +# end security check ################ Crontab things ################### # Check every 1 minutes for promisc problem |