메뉴 건너뛰기

2014.02.27 11:57

Snort란

조회 수 7873 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
Snort란?
- snort는 실시간 트래픽 분석과 IP 네트워크 상에서 패킷 로깅이 가능한 가벼운(lightweight) 네트워크 침입탐지시스템이다.
snort는 프로토콜 분석, 내용 검색/매칭을 수행할 수 있으며 오버플로우, Stealth 포트스캔, CGI 공격, SMB 탐색, OS 확인 시도 등의 다양한 공격과 스캔을 탐지할 수 있다.

1. 필요한 파일이 2개 또는 3개 일 수 있다.
1) snort-2.1.0.tar.gz : www.snort.org에서 최신버젼을 받을 수 있다.
2) libpcap-0.7.2-1.i386.rpm : Linux9.0시디에서 구했다... www.rpmfind.com에서도 구할 수 있다.
3) pcre-4.5.tar.gz : ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ 에서 구할 수 있다.

2. 이제 설치해보도록 한다.

1) 적당한 위치에 파일들을 옮긴 후 그 위치로 이동한다.
root@localhost # mv./snort-2.1.0.tar.gz /usr/local/src
root@localhost # mv ./libpcap-* /usr/local/src
root@localhost # mv ./pcre-* /usr/local/src
root@localhost # cd /usr/local/src

2) libpcap을 설치한다.
root@localhost # rpm -Uvh libpcap-0.7.2-1.i386.rpm

3) snort의 압축을 해제 후, 이동시킨다. 그 후 해당 디렉토리로 이동.
root@localhost # tar xvfz snort-2.1.0.tar.gz
root@localhost # mv snort-2.1.0 /usr/local/snort
root@localhost # cd /usr/local/snort

4) configure , make , make install을 한번에 한다.
root@localhost # ./configure && make && make install
< tip: &&와 ;의 차이점 : &&로 명령어를 묶을경우 에러가 나면 실행을 중지하지만, ;로 묶을경우 무시하고 설치한다. >

5) 만약 여기서 에러가 난다면(pcre에러) pcre를 설치해야한다.
pcre의 설치는 간단하므로 간략하게만 설명한다.
압축해제 -> configure -> make -> make install
root@localhost # tar xvfz pcre-4.5.tar.gz
root@localhost # cd pcre-4.5
root@localhost # ./configure && make && make install

6) snort의 설치가 4)번처럼 잘 되었다면 로그 기록을 위한 설정이 필요하다.
A) 로그기록을 위한 디렉토리 설정
root@localhost # mkdir /var/log/snort
root@localhost # chmod 700 /var/log/snort
B) /usr/local/snort/etc/snort.conf 파일의 환경설정
ⓐ var HOME_NET 의 IP부분을 any -> 자기서버IP로 변경해준다.
ⓑ include $RULE_PATH/web-iis.rules 부분은 IIS를 위한 설정이므로, 주석처리한다. (#)

4. 실행

root@localhost # /usr/local/snort/src/snort -l /var/log/snort -A fast -c /usr/local/snort/etc/snort.conf -D -N

[ 명령어 설명 ]
-l : 로그 디렉토리 설정
-c : 설정파일
-A : 로그기록을 어떻게 할지 선택 full,none,fast 세가지가 있습니다.
-D : 데몬으로 동작을 의미
-N : 로그를 남기지 않고 경고메시지만 남긴다는 의미
※. -N 옵션을 주지 않으면 서버에 접근하는 아이피를 디렉토리로 만들어서 로그가 남게 된다.

snort 실행 옵션은 아래와 같습니다.

-A Set alert mode: fast, full, or none (alert file alerts only)
-a Display ARP packets
-b Log packets in tcpdump format (much faster!)
-c <rules> Use Rules File <rules>
-C Print out payloads with character data only (no hex)
-d Dump the Application Layer
-D Run Snort in background (daemon) mode
-e Display the second layer header info
-F <bpf> Read BPF filters from file <bpf>
-g <gname> Run snort gid as <gname> group (or gid) after initialization
-h <hn> Home network = <hn>
-i <if> Listen on interface <if>
-I Add Interface name to alert output
-l <ld> Log to directory <ld>
-n <cnt> Exit after receiving <cnt> packets
-N Turn off logging (alerts still work)
-o Change the rule testing order to Pass|Alert|Log
-O Obfuscate the logged IP addresses
-p Disable promiscuous mode sniffing
-P <snap> set explicit snaplen of packet (default: 1514)
-q Quiet. Don't show banner and status report
-r <tf> Read and process tcpdump file <tf>
-s Log alert messages to syslog
-S <n=v> Set rules file variable n equal to value v
-t <dir> Chroots process to <dir> after initialization
-u <uname> Run snort uid as <uname> user (or uid) after initialization
-v Be verbose
-V Show version number
-X Dump the raw packet data starting at the link layer

rule 파일은 http://www.snort.org/downloads/snortrules.tar.gz 에서 받으시면 되고
rule 에 대한 자세한 설명은 http://www.snort.org/cgi-bin/done.cgi 에서 확인 하실 수 있습니다.
} 참조 끝

5. snort에 의한 로그파일은 /var/log/snort에 쌓이게된다. ( alert )

  1. No Image

    리눅스 부팅 과정과 커널 패닉 조치요령

    Date2014.02.27 Views8107
    Read More
  2. No Image

    kernel panic 복구

    Date2014.02.27 Views9320
    Read More
  3. No Image

    centos 4.x 데몬

    Date2014.02.27 Views6875
    Read More
  4. No Image

    하드디스크의 속도와 성능테스트강좌 hdparm

    Date2014.02.27 Views7471
    Read More
  5. No Image

    Snort란

    Date2014.02.27 Views7873
    Read More
  6. No Image

    htaccess를 이용한 특정 디렉토리 접근 관리하기

    Date2014.02.27 Views7122
    Read More
  7. No Image

    외부 링크 제한하기

    Date2014.02.27 Views7952
    Read More
  8. No Image

    apache에서 전송 속도 제한하기

    Date2014.02.27 Views6940
    Read More
  9. No Image

    find 명령어로 특정 디렉토리 내 특정 파일들의 특정 문자열 일괄 변경

    Date2014.02.27 Views7195
    Read More
  10. No Image

    URL 포워딩 하는 방법

    Date2014.02.27 Views6958
    Read More
  11. No Image

    ssh timeout 설정

    Date2014.02.27 Views7726
    Read More
  12. No Image

    linux mcrypt 설치 (php 재컴파일 필요)

    Date2014.02.27 Views7824
    Read More
  13. No Image

    apache status 모듈 ( 모니터링 )

    Date2014.02.27 Views8496
    Read More
  14. No Image

    apache 로그정리 (logrotate)

    Date2014.02.27 Views7434
    Read More
  15. No Image

    linux 커널 파라메터 수정

    Date2014.02.27 Views7094
    Read More
  16. No Image

    Mysql 설치시 LinuxThreads 에러 메세지

    Date2014.02.27 Views7496
    Read More
  17. No Image

    리눅스 문자열 치환하기

    Date2014.02.27 Views7807
    Read More
  18. No Image

    suPHP로 웹서버 보안을 강화하자

    Date2014.02.27 Views8781
    Read More
  19. No Image

    CentOS 32Bit 운영체제에서 메모리 4G인식 시키는 방법

    Date2014.02.27 Views7103
    Read More
  20. No Image

    Linux LVM구성하기

    Date2014.02.27 Views8218
    Read More
Board Pagination Prev 1 ... 3 4 5 6 7 8 9 10 11 12 Next
/ 12

하단 정보를 입력할 수 있습니다

© k2s0o1d4e0s2i1g5n. All Rights Reserved