다음은 Snort 스키마 일부.
select a.timestamp, b.sig_name, inet_ntoa(c.ip_src), inet_ntoa(c.ip_dst), unhex(d.data_payload)from event a, signature b, iphdr c, data dwhere a.signature = b.sig_idand a.sid = c.sid and a.cid = c.cidand a.sid = d.sid and a.cid = d.cid
프로토콜별 조회 결과를 합쳐야 함.
select a.timestamp, b.sig_name, inet_ntoa(c.ip_src), inet_ntoa(c.ip_dst), e.tcp_sport, e.tcp_dport, unhex(d.data_payload)from event a, signature b, iphdr c, data d, tcphdr ewhere a.signature = b.sig_idand a.sid = c.sid and a.cid = c.cidand a.sid = d.sid and a.cid = d.cidand a.sid = e.sid and a.cid = e.cidunion allselect a.timestamp, b.sig_name, inet_ntoa(c.ip_src), inet_ntoa(c.ip_dst), null, null, unhex(d.data_payload)from event a, signature b, iphdr c, data d, icmphdr ewhere a.signature = b.sig_idand a.sid = c.sid and a.cid = c.cidand a.sid = d.sid and a.cid = d.cidand a.sid = e.sid and a.cid = e.cid
union 쿼리 사용 시 필드 맞추는 거 까먹지 말자.
관련 글
댓글 없음:
댓글 쓰기