본문 바로가기

IT 엔지니어/Security

SNORT / IDS

IDS

Intrusion Detection System

[ IDS : 침입 탐지 시스템 ]

  • 네트워크나 시스템에서 발생하는 비정상적인 트래픽, 해킹 시도, 악성 공격 등을 감지하는 보안 솔루션
    • 트래픽 모니터링
    • 탐지 및 경고 (Alert)
    • 로그 기록

[ IDS vs IPS ]


[ 패키지 최신 버전 업데이트 ]

방화벽 OFF 후 순서대로 입력

# dnf -y update
# dnf -y install curl
# dnf -y install git
# dnf -y install pcre*
# dnf -y config-manager --set-enabled crb
# dnf -y install dnf-plugins-core
# dnf -y install epel-release
# dnf -y upgrade

# init 6

# vi /etc/ld.so.conf.d/local.conf

/usr/local/lib

/usr/local/lib64

# ldconfig


SNORT 3

IDS / IPS

[ SNORT 설치 ]

[ 컴파일 및 설치 ]

# cd centos9-snort3/
# sh installer.sh

[ 설정 파일 구성 ]

# vi /usr/local/snort/etc/snort/snort.lua

24 HOME_NET = '192.168.10.0/24'

192 variables = default_variables,

193 rules = [[

include /usr/local/snort/etc/snort/local.rules

]]

→ local.rules - 파일 이름은 마음대로

[ RULE 설정 ]

# cd /usr/local/snort/etc/snort

# vi local.rules

(ICMP)

alert icmp any 192.168.10.150 -> $HOME_NET any(msg:"Ping Detected~~";sid:1000001;rev:1;)

(FTP)

alert tcp any any -> $HOME_NET 21(msg:"FTP Detected";sid:1000001;rev:1)

(HTTP)

alert tcp 192.168.10.200 any -> $HOME_NET 80(msg:"HTTP Detected";sid:1000003;rev:1;)

→ $HOME_NET : 내부 네트워크 (보호하고자 하는 네트워크)

[ SNORT 실행 ]

# snort -c /usr/local/snort/etc/snort/snort.lua -i ens160 -A alert_fast

→ 실행은 snort 설정 파일로 (Rule 설정 파일 X)

< 결과 >

150번 서버에서 Ping 돌리면 50번 서버에 입력한 문구 출력됨

같은 대역 모든 서버에서 FTP 접근하면 50번에 문구 출력됨

200번 서버에서 HTTP 접근하면 50번에 문구 출력됨

 

'IT 엔지니어 > Security' 카테고리의 다른 글

Directory Indexing  (0) 2025.04.11
SNORT RULEs  (0) 2025.04.10
IPTABLES / UTM  (0) 2025.04.04
Security 4 STEP  (0) 2025.04.01
IPSEC  (0) 2025.03.30