반응형


OS : IBM AIX 5.3 64 bit


프로젝트 홈페이지 : http://www.rootkit.nl/projects/rootkit_hunter.html
소스 다운로드 : http://sourceforge.net/projects/rkhunter/

이글을 쓰는 시점에 rootkit hunter 은 1.3.8 까지 나와있었다.

어느날 AIX 시스템내에 뭔가 불순한(?) 움직이 포착되었다...

뭐... 대부분 AIX 시스템 내부로 구축할 정도면

약간(?)의 규모 이상이라고 생각되며,

차라리 거대한 시스템이라면 방화벽, 네트워크 장비 정책등 훌륭히 갖추어 졌겠지만,

항상 문제는 아주 작지도 아주 크지도 않은 어설픈 시스템에 해당되는 사항이다.

3일동안 열심히 삽질했다...

1.3.8 버젼을 설치하고나선... 안되는것이었다 -_-ㅋ

아래와 같이

> rkhunter -c
Invalid BINDIR configuration option: Invalid directory found: .

업데이트도 해보고 갖은 것을 모두 해봤지만, 실행이 되질 않았따. -_-...

결국은 포기하고 그 이전버젼을 다운로드 받으려고 하는 순간.... 소스포지에서는 1.3.8버젼 밖에 안되는것이었다... 헉 -_-...

그래서 1.3.6을 어렵게 구해서 해보니 잘되었다.... -_-... 내 3일 ㅜㅜ

설치 방법과 절차이다.

1. 시스템 필요 요소
    - 호환되는 시스템이어야 한다.(홈페이지참조) -> 거의 리눅스 계열은 다 된다고 보면 됨..
    - BASH 쉘

2. 사전 준비
    a. BASH 쉘 설치하기
        - www.ibm.com 으로 가서 검색을 열심히 하면 찾을수 있다 -_-... 매번 헷갈린다. 이문서의 제일 위에 있는 bash-3.0-1.aix5.1.ppc.rpm 파일을 다운로드 받아 서버로 전송한다.
        - rpm 으로 되어 있기 때문에
          root로
          rpm -ivh bash-3.0-1.aix5.1.ppc.rpm 명령을 통해 설치하면 끝.... 
          $> bash 입력
          $> echo $SHELL ==> bash가 나오면 정상 설치 완료
     b. lynx or wget 등 설치하기
         - 검색 정보에 대한 데이터베이스를 웹을 통해 가지고 오는데 위의 해당 프로그램들이 설치되어 있지 않으면
           정보를 update하지 못한다.
         - rpm파일로 되어 있기 때문에 위의 a의 내용 참고
     c. rkhunter-1.3.6.tar.gz 파일을 설치하기(root로 실행)
         - 서버로 upload 로드 뒤
         - gzip 명령을 통해 압축을 푼다.
            gzip -d rkhunter-1.3.6.tar.gz
         - tar로 묶여져 있는 파일을 푼다.
            tar xvf rkhunter-1.3.6.tar
         - 설치하기
            위의 tar를 풀면 rkhunter-1.3.6 디렉토리 안에
            installer.sh 파일이 존재하며
           다음과 같이 간단히 설치할수 있다.
           $> installer.sh --install
            /usr/local/bin/rkhunter 파일이 생성된다.(기본 설치시...)
 $> installer.sh --install
Checking system for:
 Rootkit Hunter installer files: found
 A web file download command: wget found
Starting installation:
 Checking installation directory "/usr/local": it exists and is writable.
 Checking installation directories:
  Directory /usr/local/share/doc/rkhunter-1.3.6: creating: OK
  Directory /usr/local/share/man/man8: exists and is writable.
  Directory /etc: exists and is writable.
  Directory /usr/local/bin: exists and is writable.
  Directory /usr/local/lib: exists and is writable.
  Directory /var/lib: exists and is writable.
  Directory /usr/local/lib/rkhunter/scripts: creating: OK
  Directory /var/lib/rkhunter/db: creating: OK
  Directory /var/lib/rkhunter/tmp: creating: OK
  Directory /var/lib/rkhunter/db/i18n: creating: OK
 Installing check_modules.pl: OK
 Installing filehashmd5.pl: OK
 Installing filehashsha1.pl: OK
 Installing filehashsha.pl: OK
 Installing stat.pl: OK
 Installing readlink.sh: OK
 Installing backdoorports.dat: OK
 Installing mirrors.dat: OK
 Installing programs_bad.dat: OK
 Installing suspscan.dat: OK
 Installing rkhunter.8: OK
 Installing ACKNOWLEDGMENTS: OK
 Installing CHANGELOG: OK
 Installing FAQ: OK
 Installing LICENSE: OK
 Installing README: OK
 Installing language support files: OK
 Installing rkhunter: OK
 Installing rkhunter.conf: OK
Installation complete

3. 유해 사항을 검색해 보기
  $> /usr/local/bin/rkhunter -c (root로 실행) 명령을 통해 유해사항을 검색가능하며, /var/log/rkhunter.log 파일에 모든 사항이 상세하게 기재된다.

 [ Rootkit Hunter version 1.3.6 ]

Checking system commands...

  Performing 'strings' command checks
    Checking 'strings' command                               [ Warning ]

  Performing 'shared libraries' checks
    Checking for preloading variables                        [ None found ]
    Checking for preloaded libraries                         [ None found ]
    Checking LD_LIBRARY_PATH variable                        [ Not found ]

  Performing file properties checks
    Checking for prerequisites                               [ Warning ]
    /usr/bin/awk                                             [ OK ]
    /usr/bin/basename                                        [ OK ]
    /usr/bin/bash                                            [ OK ]
    /usr/bin/cat                                             [ OK ]
    /usr/bin/chmod                                           [ OK ]
    /usr/bin/chown                                           [ OK ]
    /usr/bin/cp                                              [ OK ]
    /usr/bin/csh                                             [ OK ]
    /usr/bin/cut                                             [ OK ]
    /usr/bin/date                                            [ OK ]
    /usr/bin/df                                              [ OK ]
    /usr/bin/diff                                            [ OK ]
    /usr/bin/dirname                                         [ OK ]
    /usr/bin/du                                              [ OK ]
    /usr/bin/echo                                            [ OK ]
    /usr/bin/ed                                              [ OK ]
    /usr/bin/egrep                                           [ OK ]

생략 .............

System checks summary
=====================

File properties checks...
    Required commands check failed
    Files checked: 95
    Suspect files: 7

Rootkit checks...
    Rootkits checked : 234
    Possible rootkits: 1
    Rootkit names    : Possible rootkit component

Applications checks...
    Applications checked: 3
    Suspect applications: 2

The system checks took: 40 minutes and 18 seconds

All results have been written to the log file (/var/log/rkhunter.log)

One or more warnings have been found while checking the system.
Please check the log file (/var/log/rkhunter.log)



반응형

'OS > AIX' 카테고리의 다른 글

AIX 서버 시간 설정 하기  (0) 2012.08.06
AIX VNC 설정하기  (2) 2012.07.26
IBM JVM -Xloratio 옵션  (0) 2011.03.03
날짜 관련 얻기  (0) 2011.03.02
AIX 5.3 OPENSSH INSTALL  (0) 2011.02.16

+ Recent posts