工作上設定cloudflare logpush to MS Sentinel SIEM時,不論是官方或是網路上的文件,甚至是AI對此問題的說明,都不夠詳細,設不起來,後來找了cloudflare廠商協助後才成功,就把過程記錄下來,供後人搜尋。
Microsoft Sentinel
connector setting of “Cloudflare (Preview) (using Azure Functions)”
說明:將Cloudflare
WAF log 連接到MS Sentinel收容,供後續使用Sentinel
analytic rule產生告警或建立Workbook與log分析。
前提:有Cloudflare、MS sentinel之resource group相關權限。Sentinel已設定完成並使用中。
Step by Step
1.
於MS sentinel content hub安裝Cloudflare connector
2.
Cloudflare connector設定:
點擊上圖中Deploy to Azure,自動於RG下建立Function APP, Storage account。但storage container name與connection String (上圖黃色) 在這時還無法得知,所以過程中先隨便輸入。
3.
於新的Storage Account下,建新的Container給Cloudflare log存放。此例的container name是 “cloudflarelog”
4. 點擊cloudflarelog container右邊的 ”…”,產生SAS。
Permission = Write
Expiry = 5
years ( cloudflare 文件建議)
Blob SAS URL:先複製至notepad
5.
Cloudflare Function APP環境參數修改:
找到新建立的cloudflare Function APP,於setting中:
l 修改CONTAINER_NAME參數:此例的container name
→ cloudflarelog
l 修改AZURE_STORAGE_CONNECTION_STRING參數:找到下圖中Cloudflare Storage
account內的key1 connection string,複製貼入。
6.
Cloudflare logpush設定:Enable
Logpush to Microsoft Azure · Cloudflare Logs docs
l 登入cloudflare portal,如下圖logpush → “Create
a Logpush job”。需Enterprise plan,可全域或每個domain分別設定 (建議) 。
l 選擇logpush目的地Azure,下圖中SAS URL欄位貼上先前第4步的 “Blob SAS URL”,Path欄填上自訂易辨識的名稱 (bucket)。
l 選擇想要Sentinel收容的log,可直接選預設值,後續再修改即可。