차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
| rhel_서버_보안_점검_가이드 [2015/01/19 04:46] – [2단계 문단 제목] zzung | rhel_서버_보안_점검_가이드 [2015/12/10 01:15] (현재) – zzung | ||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| ====== RedHat Enterprise Linux Server 취약점 보안 가이드 ====== | ====== RedHat Enterprise Linux Server 취약점 보안 가이드 ====== | ||
| - | ====== | + | ====== |
| ===== 패스워드 복잡성 설정 ===== | ===== 패스워드 복잡성 설정 ===== | ||
| - | | + | 패스워드 변경 시 해당 OS 버전에 따라 적용해야 하는 lib 가 따로 존재 한다.\\ |
| + | 해당 버전은 아래 경로에서 확인 할 수 있다.\\ | ||
| + | < | ||
| + | [root@test ~]# cat / | ||
| + | </ | ||
| + | <color red>* 주의 : /etc/pam.d/ 폴더 안에 있는 파일을 수정하게 되면, 로그인하는 계정 부터는 바로 적용이 됨</ | ||
| + | * 운영체제 별 모듈(lib파일) 확인하는 경로 | ||
| + | |운영체제|경로| | ||
| + | |32bit|cd / | ||
| + | |64bit|cd / | ||
| + | ==== 계정 잠금 임계 값 설정 | ||
| + | ++++ system-auth| | ||
| + | <file vim system-auth> | ||
| + | [root@test ~]# cat / | ||
| + | #%PAM-1.0 | ||
| + | # This file is auto-generated. | ||
| + | # User changes will be destroyed the next time authconfig is run. | ||
| + | auth required | ||
| + | auth required | ||
| + | auth sufficient | ||
| + | auth sufficient | ||
| + | auth requisite | ||
| + | auth required | ||
| + | account | ||
| + | account | ||
| + | account | ||
| + | account | ||
| + | account | ||
| + | |||
| + | password | ||
| + | password | ||
| + | password | ||
| + | |||
| + | session | ||
| + | session | ||
| + | session | ||
| + | session | ||
| + | </ | ||
| + | ++++ | ||
| + | **적용 후 테스트 방법** \\ | ||
| + | 테스트 계정을 생성 한 후 유저 계정으로 로그인 시도합니다. | ||
| + | ++++ test| | ||
| + | <code vim> | ||
| + | [test1@test ~]$ su - test1 | ||
| + | Password: | ||
| + | su: incorrect password | ||
| + | [test1@test ~]$ su - test1 | ||
| + | Password: | ||
| + | su: incorrect password | ||
| + | [test1@test ~]$ su - test1 | ||
| + | Password: | ||
| + | su: incorrect password | ||
| + | [test1@test ~]$ su - test1 | ||
| + | Account locked due to 4 failed logins // 4번째 틀림 | ||
| + | Password: | ||
| + | su: incorrect password | ||
| + | [test1@test ~]$ su - test1 | ||
| + | Account locked due to 5 failed logins // 5번째 정상적인 비밀번호 입력시에도 로그인이 되지 않는다. | ||
| + | Password: | ||
| + | su: incorrect password | ||
| + | |||
| + | [root@test ~]# pam_tally2 | ||
| + | Login | ||
| + | test1 | ||
| + | |||
| + | [root@test ~]# pam_tally2 --reset | ||
| + | Login | ||
| + | test1 | ||
| + | [root@test ~]# pam_tally2 | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | ==== 계정 패스워드 최소길이 / | ||
| + | ++++ password 설정| | ||
| + | <code vim login.defs> | ||
| + | [root@test ~]# vim / | ||
| + | # | ||
| + | # Please note that the parameters in this configuration file control the | ||
| + | # behavior of the tools from the shadow-utils component. None of these | ||
| + | # tools uses the PAM mechanism, and the utilities that use PAM (such as the | ||
| + | # passwd command) should therefore be configured elsewhere. Refer to | ||
| + | # / | ||
| + | # | ||
| + | |||
| + | # *REQUIRED* | ||
| + | # | ||
| + | # home directory. | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | MAIL_DIR / | ||
| + | # | ||
| + | |||
| + | # Password aging controls: | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | PASS_MAX_DAYS 99999 // 패스워드 변경 없이 최대 사용기간 설정 | ||
| + | PASS_MIN_DAYS 0 | ||
| + | PASS_MIN_LEN 5 | ||
| + | PASS_WARN_AGE 7 | ||
| + | |||
| + | # | ||
| + | # Min/max values for automatic uid selection in useradd | ||
| + | # | ||
| + | UID_MIN | ||
| + | UID_MAX 60000 | ||
| + | |||
| + | # | ||
| + | # Min/max values for automatic gid selection in groupadd | ||
| + | # | ||
| + | GID_MIN | ||
| + | GID_MAX 60000 | ||
| + | |||
| + | # | ||
| + | # If defined, this command is run when removing a user. | ||
| + | # It should remove any at/ | ||
| + | # the user to be removed (passed as the first argument). | ||
| + | # | ||
| + | # | ||
| + | |||
| + | # | ||
| + | # If useradd should create home directories for users by default | ||
| + | # On RH systems, we do. This option is overridden with the -m flag on | ||
| + | # useradd command line. | ||
| + | # | ||
| + | CREATE_HOME yes | ||
| + | |||
| + | # The permission mask is initialized to this value. If not specified, | ||
| + | # the permission mask will be initialized to 022. | ||
| + | UMASK 077 | ||
| + | |||
| + | # This enables userdel to remove user groups if no members exist. | ||
| + | # | ||
| + | USERGROUPS_ENAB yes | ||
| + | |||
| + | # Use SHA512 to encrypt password. | ||
| + | ENCRYPT_METHOD SHA512 | ||
| + | </ | ||
| + | ++++ | ||