iT邦幫忙

2021 iThome 鐵人賽

DAY 13
0
Security

你用雲端,還敢談資安?AWS資安服務佈署之路系列 第 13

Day13: GuardDuty結果匯出至S3、發送告警Email設定

如何把GuardDuty找到的結果匯出到S3儲存

GuardDuty找到的結果會保留90天,如果想要長時間儲存可以將找出的結果匯出到S3

  1. 側邊選單選setting
    https://ithelp.ithome.com.tw/upload/images/20210925/20124610tpTWxgcgGY.png

  2. 選擇Findings export options ,這裡可以選多久要傳輸到S3,預設是6小時然後按 Configure now
    https://ithelp.ithome.com.tw/upload/images/20210925/20124610ZXfkE2SBS0.png

3.這裡你可以選擇已經建好的S3 Bucket或是新建一個新的,為了加密找出的結果你可以先到KMS建立一把key,建立完成後就可以在這裡選擇,之後就會定期將結果傳到S3儲存了
https://ithelp.ithome.com.tw/upload/images/20210925/20124610zwzPMBGIIn.png

如何設定GuardDuty結果告警透過SNS傳送到email

GuardDuty有跟Amazon Eventbridge整合,Eventbridge可以將GuardDuty找到的結果傳送到其他服務進行自動化的回應,例如:Lambda function、 Amazon EC2 Systems Manager automation以及SNS等。

1.到SNS服務側邊選Topic然後按Create topic
https://ithelp.ithome.com.tw/upload/images/20210925/20124610w30YlNBI1e.png

2.選Standard,然後輸入名稱,之後按create topic
https://ithelp.ithome.com.tw/upload/images/20210925/20124610emnCnwBZK9.png
https://ithelp.ithome.com.tw/upload/images/20210925/201246103nO84VhQok.png

3.在側邊選單選Subscription,之後按Create subscription
https://ithelp.ithome.com.tw/upload/images/20210925/20124610EDoD0bIOh5.png

4.Topic ARN選擇剛剛建立的Topic,Protocol 選Email,Endpoint選擇你想要寄送的Email,之後就華到最下面按Create subscription。按完後系統會寄一封驗證信到你的信箱,請到您剛剛輸入的信箱按下確認
https://ithelp.ithome.com.tw/upload/images/20210925/20124610bdpjhySRdY.png

5.到Amazon EventBridge服務按 Create rule
https://ithelp.ithome.com.tw/upload/images/20210925/20124610NSd38CFPe6.png

6.在Define Pattern選Event pattern,然後選Pre-defined pattern by service,Service Provider選AWS;Service name選GuardDuty;Event type選GuardDuty Finding
https://ithelp.ithome.com.tw/upload/images/20210925/201246100tG2UUr2dR.png
https://ithelp.ithome.com.tw/upload/images/20210925/20124610oH8fItvGHb.png

7.在select target的地方選SNS topic,Topic選剛剛建立的topic GuardDuty,並將configure input展開
https://ithelp.ithome.com.tw/upload/images/20210925/20124610po8IQ67a3l.png

8.展開後選Input transformer,選這個選項可以幫您在傳送GuardDuty結果幫你轉換成好閱讀的文字
https://ithelp.ithome.com.tw/upload/images/20210925/20124610j3Jl5kPSrJ.png

Input Path 輸入


{
    "severity": "$.detail.severity",
    "Finding_ID": "$.detail.id",
    "Finding_Type": "$.detail.type",
    "region": "$.region",
    "Finding_description": "$.detail.description"
}
                            

Input Template輸入

“You have a severity <severity> GuardDuty finding type <Finding_Type> in the <region> region.”
“Finding Description:”
“<Finding_description>. “
“For more details open the GuardDuty console at https://console.aws.amazon.com/guardduty/home?region=<region>#/findings?search=id%3D<Finding_ID>”

9.最後按下Create就完成了

小結
GuardDuty在AWS資安偵測上其實是個很全面的服務,服務如其名,就像在你家外面請了一個保全,幫你針對DNS、CloudTrail、VPC Flowlog持續監控,並依照嚴重的等級來歸類資安事件,讓雲端維運人員能快速地將問題解決。


上一篇
Day12: GuardDuty單一帳號/Org.佈建、測試結果產生
下一篇
Day14: Inspector簡介
系列文
你用雲端,還敢談資安?AWS資安服務佈署之路30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言