CIS-Linux Centos7最新基线标准进行系统层面基线检测

CIS-Linux Centos7最新基线标准进行系统层面基线检测


按照CIS-Linux Centos7最新基线标准进行系统层面基线检测

[if !supportLists]· [endif]· 检查项:系统crontab权限设置 加固建议:依次执行:rm -f /etc/cron.deny rm -f /etc/at.deny touch /etc/cron.allow touch /etc/at.allow chmod 0600 /etc/cron.allow chmod 0600 /etc/at.allow

[if !supportLists]· [endif]· 检查项:禁止转发ICMP重定向报文 加固建议:执行sysctl -w net.ipv4.conf.all.send_redirects=0,再查看/etc/sysctl.conf中是否存在net.ipv4.conf.all.send_redirects=0,不存在则添加

[if !supportLists]· [endif]· 检查项:禁止转发ICMP重定向报文 加固建议:执行sysctl -w net.ipv4.conf.default.send_redirects=0,再查看/etc/sysctl.conf中是否存在net.ipv4.conf.default.send_redirects=0,不存在则添加

[if !supportLists]· [endif]· 检查项:禁止包含源路由的ip包 加固建议:执行sysctl -w net.ipv4.conf.all.accept_redirects=0,再查看/etc/sysctl.conf中是否存在net.ipv4.conf.all.accept_redirects=0,不存在则添加

[if !supportLists]· [endif]· 检查项:禁止包含源路由的ip包 加固建议:执行sysctl -w net.ipv4.conf.default.accept_redirects=0,再查看/etc/sysctl.conf中是否存在net.ipv4.conf.default.accept_redirects=0,不存在则添加

[if !supportLists]· [endif]· 检查项:禁止转发安全ICMP重定向报文 加固建议:执行sysctl -w net.ipv4.conf.all.secure_redirects=0,再查看/etc/sysctl.conf中是否存在net.ipv4.conf.all.secure_redirects=0,不存在则添加

[if !supportLists]· [endif]· 检查项:禁止转发安全ICMP重定向报文 加固建议:执行sysctl -w net.ipv4.conf.default.secure_redirects=0,再查看/etc/sysctl.conf中是否存在net.ipv4.conf.default.secure_redirects=0,不存在则添加

[if !supportLists]· [endif]· 检查项:启用反转地址路径过滤 加固建议:执行sysctl -w net.ipv4.conf.all.rp_filter=1,再查看/etc/sysctl.conf中是否存在net.ipv4.conf.all.rp_filter=1,不存在则添加

[if !supportLists]· [endif]· 检查项:启用反转地址路径过滤 加固建议:执行sysctl -w net.ipv4.conf.default.rp_filter=1,再查看/etc/sysctl.conf中是否存在net.ipv4.conf.default.rp_filter=1,不存在则添加

[if !supportLists]· [endif]· 检查项:禁止ipv6路由广播 加固建议:执行sysctl -w net.ipv6.conf.all.accept_ra=0,再查看/etc/sysctl.conf中是否存在net.ipv6.conf.all.accept_ra=0,不存在则添加

[if !supportLists]· [endif]· 检查项:禁止ipv6路由广播 加固建议:执行sysctl -w net.ipv6.conf.default.accept_ra=0,再查看/etc/sysctl.conf中是否存在net.ipv6.conf.default.accept_ra=0,不存在则添加

[if !supportLists]· [endif]· 检查项:禁止ipv6路由重定向 加固建议:执行sysctl -w net.ipv6.conf.all.accept_redirects=0,再查看/etc/sysctl.conf中是否存在net.ipv6.conf.all.accept_redirects=0,不存在则添加

[if !supportLists]· [endif]· 检查项:禁止ipv6路由重定向 加固建议:执行sysctl -w net.ipv6.conf.default.accept_redirects=0,再查看/etc/sysctl.conf中是否存在net.ipv6.conf.default.accept_redirects=0,不存在则添加

[if !supportLists]· [endif]· 检查项:SSHD强制使用V2安全协议 加固建议:在/etc/ssh/sshd_config中取消Protocol注释符号#

[if !supportLists]· [endif]· 检查项:SSHD仅记录ssh用户登录活动 加固建议:在/etc/ssh/sshd_config中取消LogLevel INFO注释符号#

[if !supportLists]· [endif]· 检查项:SSHD仅记录ssh用户登录活动 加固建议:在/etc/ssh/sshd_config中取消MaxAuthTries注释符号#,设置自定义最大密码尝试失败次数

[if !supportLists]· [endif]· 检查项:清理主机远程登录历史主机记录 加固建议:在/etc/ssh/sshd_config中取消IgnoreRhosts yes注释符号#

[if !supportLists]· [endif]· 检查项:禁止主机认证登录 加固建议:在/etc/ssh/sshd_config中取消HostbasedAuthentication no注释符号#

[if !supportLists]· [endif]· 检查项:禁止root直接登录 加固建议:在/etc/ssh/sshd_config中PermitRootLogin 值设置为no

[if !supportLists]· [endif]· 检查项:禁止空密码用户登录 加固建议:在/etc/ssh/sshd_config中取消PermitEmptyPasswords no注释符号#

[if !supportLists]· [endif]· 检查项:禁止用户修改环境变量 加固建议:在/etc/ssh/sshd_config中取消PermitUserEnvironment no注释符号#

[if !supportLists]· [endif]· 检查项:设置输入密码间隔时间 加固建议:在/etc/ssh/sshd_config中取消LoginGraceTime前注释符,同时设置输入密码时间间隔秒数

[if !supportLists]· [endif]· 检查项:设置用户密码最小长度 加固建议:在/etc/security/pwquality.conf中取消minlen注释符号#,同时设置最小密码长度建议10位以上

[if !supportLists]· [endif]· 检查项:设置用户密码数字位数 加固建议:在/etc/security/pwquality.conf中取消dcredit注释符号#,同时设置为负数建议-1最少包含1位数字

[if !supportLists]· [endif]· 检查项:设置用户密码大写字母位数 加固建议:在/etc/security/pwquality.conf中取消ucredit注释符号#,同时设置为负数建议-1最少包含1位大写字母

[if !supportLists]· [endif]· 检查项:设置用户密码小写字母位数 加固建议:在/etc/security/pwquality.conf中取消lcredit注释符号#,同时设置为负数建议-1最少包含1位小写字母

[if !supportLists]· [endif]· 检查项:设置用户密码特殊字符位数 加固建议:在/etc/security/pwquality.conf中取消ocredit注释符号#,同时设置为负数建议-1最少包含1位特殊字符

[if !supportLists]· [endif]· 检查项:密码授权新密码与老密码不能重复 加固建议:在/etc/pam.d/password-auth中添加:password sufficient pam_unix.so remember=3 ,remember的值表示此次设置密码与过去3次不同

[if !supportLists]· [endif]· 检查项:系统授权新密码与老密码不能重复 加固建议:在/etc/pam.d/system-auth中添加:password sufficient pam_unix.so remember=3 ,remember的值表示此次设置密码与过去3次不同

[if !supportLists]· [endif]· 检查项:rsyslog日志文件权限配置 加固建议:在/etc/rsyslog.conf中添加:$FileCreateMode 0640

[if !supportLists]· [endif]· 检查项:强制密码失效时间 加固建议:在/etc/login.defs 设置强制密码失效时间,建议值365

[if !supportLists]· [endif]· 检查项:密码修改最小间隔时间 加固建议:在/etc/login.defs 设置密码修改最小间隔时间,建议值7

[if !supportLists]· [endif]· 检查项:设置有密码账户不活动最大时间 加固建议:使用如下命令设置有密码账户不活动最大时间值:useradd -D -f 90,建议值90

[if !supportLists]· [endif]· 检查项:检查/boot/grub2/grub.cfg文件ACL属性 加固建议:执行:chmod 0600 /boot/grub2/grub.cfg

[if !supportLists]· [endif]· 检查项:检查/etc/crontab文件ACL属性 加固建议:执行:chmod 0600 /etc/crontab

[if !supportLists]· [endif]· 检查项:检查/etc/cron.hourly文件ACL属性 加固建议:执行:chmod 0600 /etc/cron.hourly

[if !supportLists]· [endif]· 检查项:检查/etc/cron.daily文件ACL属性 加固建议:执行:chmod 0600 /etc/cron.daily

[if !supportLists]· [endif]· 检查项:检查/etc/cron.weekly 文件ACL属性 加固建议:执行:chmod 0600 /etc/cron.weekly

[if !supportLists]· [endif]· 检查项:检查/etc/cron.monthly 文件ACL属性 加固建议:执行:chmod 0600 /etc/cron.monthly

[if !supportLists]· [endif]· 检查项:检查/etc/cron.d 文件ACL属性 加固建议:执行:chmod 0600 /etc/cron.d

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容