A security engineer is configuring a mechanism to send an alert when three or more failed sign-in attempts to the AWS Management Console occur during a 5-minute period. The security engineer creates a trail in AWS CloudTrail to assist in this work.
Which solution will meet these requirements?
A. In CloudTrail, turn on Insights events on the trail. Configure an alarm on the insight with eventName matching ConsoleLogin and errorMessage matching "Failed authentication''. Configure a threshold of 3 and a period of 5 minutes.
B. Configure CloudTrail to send events to Amazon CloudWatch Logs. Create a metric filter for the relevant log group. Create a filter pattern with eventName matching ConsoleLogin and errorMessage matching "Failed authentication". Create a CloudWatch alarm with a threshold of 3 and a period of 5 minutes.
C. Create an Amazon Athena table from the CloudTrail events. Run a query for eventName matching ConsoleLogin and for errorMessage matching "Failed authentication". Create a notification action from the query to send an Amazon Simple Notification Service (Amazon SNS) notification when the count equals 3 within a period of 5 minutes.
D. In AWS Identity and Access Management Access Analyzer, create a new analyzer. Configure the analyzer to send an Amazon Simple Notification Service (Amazon SNS) notification when a failed sign-in event occurs 3 times for any IAM user within a period of 5 minutes.
B
一名安全工程師正在配置一種機(jī)制,當(dāng)在 5 分鐘內(nèi)發(fā)生 3 次或更多 AWS 管理控制臺登錄失敗嘗試時發(fā)送警報(bào)。該安全工程師在 AWS CloudTrail 中創(chuàng)建了一個跟蹤以協(xié)助完成此項(xiàng)工作。需要選擇一種解決方案,通過 CloudTrail 跟蹤數(shù)據(jù),在 5 分鐘內(nèi)檢測到 3 次或以上控制臺登錄失敗時觸發(fā)警報(bào)。哪個解決方案將滿足這些要求?
AWS CloudTrail:用于記錄 AWS 賬戶中的 API 調(diào)用和相關(guān)事件。
CloudWatch Logs:可以接收和存儲來自不同來源(如 CloudTrail)的日志,并支持通過指標(biāo)過濾器創(chuàng)建自定義指標(biāo)和警報(bào)。
Amazon Athena:是一種交互式查詢服務(wù),允許使用標(biāo)準(zhǔn) SQL 直接查詢存儲在 Amazon S3 中的數(shù)據(jù)。
AWS Identity and Access Management (IAM) Access Analyzer:用于分析 AWS 資源上的訪問權(quán)限,幫助識別意外的訪問權(quán)限。
技巧:排除明顯錯誤選項(xiàng),在沒有明顯錯誤的選項(xiàng)中選擇最合理的選項(xiàng)。
A. 不正確。在 CloudTrail 中,在跟蹤上啟用 Insights 事件。針對洞察(insight)配置一個警報(bào),eventName 匹配 ConsoleLogin 且 errorMessage 匹配“Failed authentication”。配置閾值為 3,周期為 5 分鐘。CloudTrail Insights 主要用于檢測異常的 API 使用模式,而不是專門針對特定事件(如登錄失敗)進(jìn)行計(jì)數(shù)和警報(bào)。
B. 正確。配置 CloudTrail 將事件發(fā)送到 Amazon CloudWatch Logs。為相關(guān)的日志組創(chuàng)建一個指標(biāo)過濾器。創(chuàng)建一個過濾模式,eventName 匹配 ConsoleLogin 且 errorMessage 匹配“Failed authentication”。創(chuàng)建一個 CloudWatch 警報(bào),閾值為 3,周期為 5 分鐘。該方案通過將 CloudTrail 事件發(fā)送到 CloudWatch Logs,可以使用指標(biāo)過濾器對特定事件進(jìn)行計(jì)數(shù),并設(shè)置警報(bào),當(dāng)在指定周期內(nèi)達(dá)到閾值時觸發(fā)警報(bào),符合題目要求。
C. 不正確。從 CloudTrail 事件創(chuàng)建一個 Amazon Athena 表。運(yùn)行一個查詢,eventName 匹配 ConsoleLogin 且 errorMessage 匹配“Failed authentication”。當(dāng)在 5 分鐘內(nèi)計(jì)數(shù)等于 3 時,從查詢創(chuàng)建一個通知操作以發(fā)送 Amazon Simple Notification Service (Amazon SNS) 通知。
使用該方案,雖然 Athena 可以查詢 CloudTrail 事件,但需要額外的邏輯來定時運(yùn)行查詢并檢測計(jì)數(shù)是否達(dá)到閾值,不如 CloudWatch Logs 的指標(biāo)過濾器和警報(bào)直接和方便,不是最佳解決方案。
D. 不正確。在 AWS Identity and Access Management Access Analyzer 中,創(chuàng)建一個新的分析器。配置分析器,當(dāng)在任何 IAM 用戶在 5 分鐘內(nèi)發(fā)生 3 次失敗的登錄事件時,發(fā)送 Amazon Simple Notification Service (Amazon SNS) 通知
IAM Access Analyzer 主要用于分析訪問權(quán)限,而不是用于檢測登錄失敗事件并發(fā)送警報(bào)。