Cops 열기


COPS(Computerrized Oracle and Passward System)는 UNIX system 의 보안점검 프로그램이다. COPS 패키지는 보안을 조사해 주는 실제 프로그램들과 설치방법&작동방법&결과를 해석하는 도큐먼트들로 구성되어 있다. COPS는 root가 아닌 일반user도 사용할 수 있으며 또한 COPS는 단지 보안문제에 대하여 알려주기만 할 뿐 수정을 해 주지는 않는다.

Cops의 능력 Cops는 root 상황에서 실행되며, 아래의 사항들을 check하여 시스템 관리자에게 security vulnerability의 가능성이 있다는 것을 알려줄 뿐이며 실제의 correction은 관리자가 직접 행하여야 한다.

cops의 특징 Cops는 shell상태에서 check할 수 있는 많은 부분을 모두 check해 줌으로서 시스템 관리자는 최종적으로 나온 결과물을 보고 자기의 기호에 따라 수정을 해주면 된다. 반면 이것은 일일이 손으로 다 해줘야 하므로 오히려 어려울 수가 있다.
Cops이후에 나온 도구들 대부분이 checking과 함께 수정 기능도 같이 제공해 주는데도 불구하고 Cops가 쓰이는 이유는 설치와 사용 이 손쉽기 때문이다.

cops의단점 Cops는 network security에 대해서는 전혀 check하지 못한다.
UNIX시스템이 바로 network computer라는 개념 에 비추었을 때, 어떤 한 시스템의 security점검을 cops만으로 한다는 것은 부족한 감이 있다. 이런 점들은 다른 점검도구들과 같이 사용 함으로써 system의 security를 꾀한다.


Cops를 깔아보자...



Cops는 shell/perl script이므로 특별한 컴파일 과정이 필요 없다. 단지 awk,sed,grep 등의 utility들이 제대로 갖추어져 있는 유닉스 시스템이면 족하다.

kus.kaist.ac.kr(sparc20,SunOS5.4)의 file system을 예로 들어 본다.

ftp://ftp.cert-kr.or.kr/pub/Security/tool/cops_104.tar.Z
위의 주소 말고도 Cops를 구할 수 있다. click!

$ pwd
/kus/security_tools
$ zcat cops_104.tar.Z : tar fx -
$ cd cops_104


// 그리고 makefile 을 편집한다.

INSTALL_DIR=/kus/security_tools/cops_104 -> current directory


//다음 부분의 path 가 모두 맞는지 확인한다.

#
#Where the programs are....
#
CHMOD=/bin/chmod
TEST=/usr/ucb/test
MKDIR=/bin/mkdir
CP=/bin/cp
CC=/usr/ucb/cc
RM=/bin/rm



//이상이 없으면,아래와 같이 실행


$ make all
$ make install



// 그러면 install이 끝난다.
// 인스톨이 완료되면 아래와 같이 cops 파일을 변경한다.


vi cops

########################
# Change these lines!
########################
SECURE=/kus/security_tools/cops_104 SECURE_USERS="[email protected]"
//SECURE부분을 cops가 install된 directory로 변경
//SECURE_USERSMS결과받을 사람의 email,일반적으로 시스템관리자




Cops는 어디에 있을까?


ftp://ftp.cert-kr.or.kr/pub/Security/tool/cops_104.tar.Z
ftp://ftp.kaist.ac.kr/.1/Linux/system/Admin/cops.104.tgz (Linux)

ftp://ring.kotel.co.kr/pub/security/doc/COPS.PS
ftp://ring.kotel.co.kr/pub/security/doc/cops.tar.Z



Cops Source




Cops의 사용법


$ pwd
kus/security_tools/cops_104
$ cops <
--- 시간이 많이 걸림
$ ls -al result*
-rw-r--r-- 1 root other 953 11월 29일 22:58 result.5011
$ cat result.5011
arning! /etc/security is _World_ readable!
Warning! /etc/mnttab is _World_ writable!
Warning! /etc/named.boot is _World_ writable!
Warning! /usr/adm/spellhist is _World_ writable!
Warning! /usr/adm/vold.log is _World_ writable!
Warning! /usr/local/bin/screen-3.6.2 is _World_ writable!
Warning! /usr/local/bin/screen.old is _World_ writable!
Warning! File /etc/mnttab (in /etc/rc2.d/SO1MOUNTFSYS) is _World_ writable!
Warning! File /var/adm/log/asppp.log (in /etc/rc.d/S47asppp) is _World_ writable!
Warning! File /dev/ip (in /etc/rc2.d/S69inet) is _World_ writable!
Warning! File /dev/tcp (in /etc/rc2.d/S69inet) is _World_ writable!
Warning! File /etc/named.boot (in /etc/rc2.d/S72inetsvc) is _World_ writable!
Warning! User nuucp's home directory /var/spool/uucppublic is _World_ writable!
Warning! Password file, line 7, user smtp has uid = 0 and is not root smtp:x:0:0:mail daemon user:/:/bin/false
Warning! /etc/ftpusers should exist!