iT邦幫忙

第 12 屆 iThome 鐵人賽

DAY 8
0
Elastic Stack on Cloud

一目了然的資訊保健系列 第 8

8-Filebeat-Suricata

  • 分享至 

  • xImage
  •  

這章繼續把Elastic 的SIEM資料補足

Host events

https://ithelp.ithome.com.tw/upload/images/20200908/20077752Z5YbeApq2M.png
Winlogbeat、Elastic Endpoint Security、Filebeat、Auditbeat 安裝方式大同小異,這裡不在重複說明

Network events

https://ithelp.ithome.com.tw/upload/images/20200908/200777528gz4mXlbjC.png
Packetbeat 需要額外安裝npcap

Filebeat在網路事件可以接收Netflow, Suricata, Zeek等資料,底下介紹Suricata安裝

Suricata

https://ithelp.ithome.com.tw/upload/images/20200908/20077752jHf3BJ0Yni.jpg
狐獴是細尾獴屬的唯一物種,屬食肉目獴科,居住在南非、納米比亞及安哥拉西南部的喀拉哈里沙漠。

Suricata is a free and open source, mature, fast and robust network threat detection engine.

Suricata是開源(GPLv2)的IDS/IPS,同類型的有Snort,最主要的差異是Suricata為多線程的,比Snort可以支援更高的流量,與Snort Rule格式差不多,可以直接使用

比較及相關介紹可以參考網管人-開源Suricata入侵偵測 揪出網路攻擊與異常行為
http://www.netadmin.com.tw/netadmin/zh-tw/technology/F332544D7A274E8AAAF7D0295328B744?page=1
https://ithelp.ithome.com.tw/upload/images/20200908/20077752iF56xxUNzS.jpg

安裝

有Windows版的安裝包
https://suricata-ids.org/download/

重點: Suricata (Stable) version is 5.0.3 需要搭配npcap-0.992才不會跳錯誤

設定
C:\Program Files\Suricata\suricata.yaml

預設不需要調整是可以直接執行

下載Rule: https://rules.emergingthreats.net/open/suricata/rules/
進階CVE Rule: https://github.com/ptresearch/AttackDetection

Rule的路徑及讀取的rule file

default-rule-path: C:\\Program Files\\Suricata\\rules\\
 
rule-files:
 - botcc.rules

執行

suricata.exe -c suricata.yaml -i 192.168.137.10

Fileatbeat

啟用Suricat模組

.\filebeat.exe modules enable suricata

將路徑設定上去即可

#==========================  Modules configuration =============================
filebeat.modules:
 
#------------------------------- Suricata Module -------------------------------
- module: suricata
  # All logs
  eve:
    enabled: true
 
    # Set custom paths for the log files. If left empty,
    # Filebeat will choose the paths depending on your OS.
    var.paths:
      - C:\Program Files\Suricata\log\eve.json

測試一下拿nikto掃一下網站,查看eve.json有資料了
https://ithelp.ithome.com.tw/upload/images/20200908/20077752gfLOIQtKvm.png

fast是觸發rule告警地簡易描述
https://ithelp.ithome.com.tw/upload/images/20200908/20077752BmvNwj2gXY.png

eve.json找到該條event sid
https://ithelp.ithome.com.tw/upload/images/20200908/20077752Xz30hROa0u.png

反查處發的Rule規則
https://ithelp.ithome.com.tw/upload/images/20200908/20077752JJCX41Xy7d.png

Kibana-Security

到Security -> Overview確認資料進入
https://ithelp.ithome.com.tw/upload/images/20200908/20077752Ic61zFtkVn.png

查看Detections有偵測到異常行為
https://ithelp.ithome.com.tw/upload/images/20200908/20077752wB9yAjtJMx.png

展開來看詳細說明
https://ithelp.ithome.com.tw/upload/images/20200908/20077752KbcSG9mWVF.png

Web Application Suspicious點下去跳轉到Detections Rule,這條規則是Elastic的規則,並非suricata的
https://ithelp.ithome.com.tw/upload/images/20200908/20077752FZV9RgfQE3.png

至Github查看可能的Rule設定
https://github.com/elastic/detection-rules/blob/main/rules/apm/apm_403_response_to_a_post.toml


上一篇
7-Elastic Endpoint Security
下一篇
9-SIEM
系列文
一目了然的資訊保健30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言