Snort 룰 추가

Snort 룰 추가하는 방법에 대해 알아보도록 하자. 우선 스노트 룰 작성법은 이후에 다시 설명하도록 하고 간단하게 아래의 룰을 추가해 보도록 하자.

일단 룰이 위치할 경로는 C:\Snort\rules 폴더 이하이다. 해당 폴더 이하에 smb2.rules 라는 이름으로 파일을 새로 만든 후 아래의 내용으로 파일을 저장하자.

alert tcp any any -> any any (msg:"SMB2_DOS_EXPLOIT"; content:"|ff 53 4d 42 72 00 00 00 00|"; sid:100000;)

참고로 위 룰은 Vista/2008/Windows 7 SMB2 BSOD 0Day에 관한 탐지룰이다.

파일을 생성했으면 설정파일(C:\Snort\etc\snort.conf) 에서 룰을 추가해 준다. 추가 방법은 아래의 내용처럼 Snort 설정파일에서 Step 6 부분을 찾아 하단에 생성시킨 파일을 추가하도록 한다.

####################################################################
# Step #6: Customize your rule set
#
# Up to date snort rules are available at http://www.snort.org
#
# The snort web site has documentation about how to write your own custom snort
# rules.

#=========================================
# Include all relevant rulesets here 
# 
# The following rulesets are disabled by default:
#
#   web-attacks, backdoor, shellcode, policy, porn, info, icmp-info, virus,
#   chat, multimedia, and p2p
#            
# These rules are either site policy specific or require tuning in order to not
# generate false positive alerts in most enviornments.
# 
# Please read the specific include file for more information and
# README.alert_order for how rule ordering affects how alerts are triggered.
#=========================================

include $RULE_PATH/smb2.rules

추가를 했다면 이제 Snort를 재실행 하여 C:\Snort\log 폴더 이하에 alert.ids 파일을 확인힌다.

마지막으로 이번에 아래 사이트를 우연히 알게 되어 스노트 룰을 공부해볼까 하여 스노트 설치법 부터 룰 추가 방법까지 공부한 내용을 정리하여 보았다. 새로운 취약점이 나올때 마다 스노트 룰을 작성하는 연습을 해봐야 겠다 -_-

스노트 룰 관련 사이트 : http://snortrules.wordpress.com

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다