본문 바로가기
  • AI (Artificial Intelligence)
Security/Barnyard

Barnyard 설치 & 설정

by 로샤스 2014. 3. 31.

barnyard는 Snort가 기본적으로 갖고 있는 출력 기능을 Snort 대신 해주는 도구이다.

Snort의 목적은 탐지하는 기능이다. 그렇기 때문에 출력하는 기능을 외주를 준다고 생각하면 된다.

그렇게 되면 Snort는 패킷을 탐지하고 분석하는 기능만을 중점적으로 하기 때문에 좀 더 효율적인 운영이 가능하다.

 

그래서 snort.conf 파일에서 수정한 output database 부분은 주석처리를 하고

barnyard에서 database 부분을 설정해서 사용하는 것이다.

 

 

barnyard도 압출 풀고 설치하는 과정은 똑같지만, mysql이 들어가는게 다른 부분이다.

./configure --with-mysql && make && make install

그리고 /usr/local/barnyard2-1.9 아래 /etc/barnyard2.conf를 /etc/snort/로 복사해준다.

 

/etc/snort/barnyard2.conf 파일에서 config hostname을 localhost로 수정, interface가 eth0 인지 확인

 

barnyard2 구동시에는 waldo 파일이 필요하다.

cp /dev/null /var/log/snort/barnyard2.waldo

mkdir /var/log/barnyard2

 

 

 

설치 후 구동 명령

/usr/local/bin/barnyard2 -c /etc/snort/barnyard2.conf -d /var/log/snort -f snort.log -w /var/log/snort/barnyard2.waldo

으로 실행한다.

 

Running in Continuous mode

 

        --== Initializing Barnyard2 ==--

Initializing Input Plugins!

Initializing Output Plugins!

Parsing config file "/etc/snort/barnyard2.conf"

Log directory = /var/log/barnyard2

 

        --== Initialization Complete ==--

 

  ______   -*> Barnyard2 <*-

 / ,,_  \  Version 2.1.9 (Build 263)

 |o"  )~|  By the SecurixLive.com Team: http://www.securixlive.com/about.php

 + '''' +  (C) Copyright 2008-2010 SecurixLive.

 

           Snort by Martin Roesch & The Snort Team: http://www.snort.org/team.html

           (C) Copyright 1998-2007 Sourcefire Inc., et al.

 

WARNING: Ignoring corrupt/truncated waldofile '/var/log/snort/barnyard2.waldo'

Opened spool file '/var/log/snort//snort.log.1361771616'

Waiting for new data

 

barnyard2를 띄워놓고 snort를 실행시키면 Database로 캡쳐된 패킷이 저장된다.

 

 

 

 

 

 

 

 

 

 

 

출처 : http://gonisec.tistory.com/6

 

 

 

 

 

 

 

 

 

'Security > Barnyard' 카테고리의 다른 글

barnyard2 test based on ubuntu 13.04  (0) 2014.03.31
barnyard2 데몬 만들기  (0) 2014.03.31
barnyard2 syslog 설정  (0) 2014.03.31
barnyard2 설치  (0) 2014.03.31
Barnyard2 설치  (1) 2014.03.31

댓글