Ryu's Tech

Suricata IDS/IPS [...]

Ryusstory 2016. 12. 9. 14:39

IPS 구성 방법

1. bridge -> nfqueue 로 보낼수 없음

IPS 구현 실패

 

 

2. af_packet -> 패킷복사 but 동일 네트워크의 다른 호스트 영향 있어보임

suricata -c [yaml file] --af-packet

 

 

 

3. nfqueue -> nat와 함께 처리

suricata -c [yaml file] -q 0

선행 조건으로 iptables 에서 FORWARDING 패킷을 nfqueue로 보내야 함.

그리고 동작확인은 iptables -vnL을 통해 해당 CHAIN으로 패킷 카운팅 확인 필요.

 

 

위 구성방법에 대한 자세한 설명은 차후에...

 

 

 

 

 

 

 

 

 

구축 시 에러메세지

 

suricata.yaml 파일내

unix-command:

  enabled : auto --> no

 

아래와 같은 에러 발생 시 

localhost kernel: traps: Suricata-Main[2129] trap invalid opcode ip:5ae60d sp:7ffe968b93d0 error:0 in suricata[400000+246000]

 

./configure 에 아래 옵션으로 해결

 

./configure --disable-gccmarch-native [other options]

 

 

 

 

아래와 같은 에러 발생 시 
<Warning> - [ERRCODE: SC_ERR_INITIALIZATION(45)] - Unix socket: UNIX socket bind(/var/run/suricata/suricata-command.socket) error: No such file or directory
<Error> - [ERRCODE: SC_ERR_INITIALIZATION(45)] - Unable to create unix command socket
<Error> - [ERRCODE: SC_ERR_THREAD_INIT(49)] - thread "US" closed on initialization.
<Error> - [ERRCODE: SC_ERR_INITIALIZATION(45)] - Engine initialization failed, aborting...

 

suricata.yaml 파일내에

unix-command:

  enabled : auto

  enabled : no

로 변경하여 해결