06. 파일 및 디렉터리 소유자 설정 06. 파일 및 디렉터리 소유자 설정 os를 막 깔아놓고 나서는 문제가 없으나 주기적으로 체크해주어야 한다. 아래는 예시다. ■ 대상 OS : SunOS, Linux, AIX, HP-UX ■ 취약점 개요 - 소유자가 존재하지 않는 파일 및 디렉토리는 현재 권한이 없는 자(퇴직, 전직, 휴직 등)의 소유였거나, 관리 소홀로 인해 생긴 파일일 가능성이 있음. - 만약 중요 파일 및 디렉토리일 경우 문제가 발생할 수 있으므로 관리가 필요함. ■ 보안대책 - 양호 : 소유자가 존재하지 않은 파일 및 디렉토리가 존재하지 않는 경우 - 취약 : 소유자가 존재하지 않은 파일 및 디렉토리가 존재하는 경우 ■ 조치방법 - 소유자가 존재하지 않은 파일 및 디렉토리 삭제, 또는, 소유자 변경 ■ 보안설정 방법 ◆ OS별 점.. 더보기 05. root홈, 패스 디렉터리 권한 및 패스 설정 05. root홈, 패스 디렉터리 권한 및 패스 설정 centos7 최소설치 후 디폴트 상태는 양호상태이다. [root@centos7 mhpark]# echo $PATH /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin [root@centos7 mhpark]# ■ 대상 OS : SunOS, Linux, AIX, HP-UX ■ 취약점 개요 - root 계정의 PATH 환경변수에 "." (현재 디렉토리 지칭)이 포함되어 있으면, root 계정의 인가자로 인해 비의도적으로 현재 디렉토리에 위치하고 있는 명령어가 실행될 수 있음 - 즉 "."이 /usr/bin 이나 /bin, /sbin 등 명령어들이 위치하고 있는 디렉토리보다 우선하여.. 더보기 04. 패스워드 파일 보호 04. 패스워드 파일 보호 [root@centos7 mhpark]# cat /etc/passwd root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin oper.. 더보기 03. 계정 잠금 (임계값) 설정 03. 계정 잠금 (임계값) 설정 root@centos7 mhpark]# cat /etc/pam.d/system-auth #%PAM-1.0 # This file is auto-generated. # User changes will be destroyed the next time authconfig is run. auth required pam_env.so auth required pam_faildelay.so delay=2000000 auth sufficient pam_unix.so nullok try_first_pass auth requisite pam_succeed_if.so uid >= 1000 quiet_success auth required pam_deny.so account required p.. 더보기 02. 패스워드 복합성 설정(및 정책) [root@centos7 mhpark]# cat /etc/login.defs # # 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 # /etc/pam.d/system-auth for more information. # # *REQUIRED* # .. 더보기 01. root 계정 원격 접속 제한 01. root 계정 원격 접속 제한 - centos6.x 에 있던 pam.d 설정은 없어지고 securetty 값을 확인해야 한다. ※ /etc/securetty : Telnet이나 ssh등 터미널 접근을 제어하는 설정 파일이다. /etc/securetty 파일 내 pts/x 관련 설정이 존재하는 경우에는 pam 모듈과는 상관없이 root 계정 접속을 허용하므로 반드시 securetty 파일에서 pts/x 관련 설정을 제거 할 필요가 있다. tty(terminal-teletype) : 서버와 연겨된 모니터, 키보드 등을 통해 사용자가 콘솔로 직접 로그인함 pts(pseudo-terminal) : 가상터미널로서 telnet이나 ssh 터미널 등을 지칭한다. a : cat /etc/securetty | g.. 더보기 이전 1 2 3 4 다음