DOP-C02 练习题

DOP-C02 题目讲解:泄露响应:先遏制,再留证

DOP-C02 练习题讲解。答案 A。泄露密钥正在发起 RunInstances,需要针对这把密钥和关联实例执行响应。

DOP-C02 免费试练题 · 考证匠讲解

题目

A company's security team detects that an IAM access key has been compromised and is being used to launch unauthorized EC2 instances. The DevOps engineer needs to implement an automated response that immediately stops the unauthorized activity and preserves forensic evidence. Which solution meets these requirements?

A. Create an Amazon EventBridge rule that detects RunInstances API calls from the compromised key via CloudTrail. Trigger a Systems Manager Automation runbook that disables the IAM access key, stops the unauthorized instances (does not terminate), and creates snapshots of the EBS volumes.
B. Create an AWS Config rule that detects non-compliant EC2 instances. Configure an automatic remediation action that terminates the instances and deletes the IAM access key.
C. Enable Amazon GuardDuty and configure it to send findings to Amazon EventBridge. Create a Lambda function that terminates all EC2 instances launched in the last hour and rotates all IAM access keys.
D. Create a CloudWatch alarm on the EC2 RunInstances API call count. When the alarm triggers, send an SNS notification to the security team for manual investigation.

答案

答案 A。泄露密钥正在发起 RunInstances,需要针对这把密钥和关联实例执行响应。

拆题

  • 泄露密钥正在发起 RunInstances,需要针对这把密钥和关联实例执行响应。
  • 停止实例与快照保留磁盘证据,比直接终止更符合取证要求;易失内存证据仍需另行考虑。
  • 禁用长期密钥不保证已签发 STS 会话立即失效,完整遏制还需审查临时会话与异常权限。

每个选项为什么对、为什么错

  • A(正确):CloudTrail 提供调用身份,EventBridge 触发受控 runbook;禁用密钥、停止关联实例、保存磁盘快照同时满足遏制和证据保存。
  • B:终止实例可能删除根卷,删除密钥也影响追查;Config 检测不直接等同于识别受损调用身份。
  • C:终止最近一小时所有实例会误伤正常工作,轮换全部密钥影响范围过大,并破坏证据。
  • D:邮件人工响应速度不确定,无法满足自动立即遏制的要求。

放到具体场景里

教学例子:CloudTrail 事件记录某 accessKeyId 在异常 Region 创建两台实例。响应先记录事件、实例 ID 和卷 ID,再禁用该密钥、隔离并停止这两台实例,为其卷创建证据快照。正常发布创建的第三台实例不在关联范围中,不能一并删除。

检查对象本例条件或动作结果与边界
定位accessKeyId 与实例 ID限定响应范围
遏制禁用密钥、隔离实例另查现有临时会话
取证记录事件并保存快照快照不包含内存

遇到同类题的判断顺序

  1. 识别身份:按 CloudTrail 身份与资源关联。
  2. 收紧权限:禁用密钥并检查现有会话。
  3. 保留磁盘:停止或隔离后按取证流程保存快照。
  4. 调查恢复:检查权限、账单与其他 Region 后恢复服务。
结论:自动响应要有证据关联和最小影响范围,不能把“自动”理解成批量删除。

参考资料

继续练这门考试

同一门考试的免费试练题都附这样的完整讲解,做完再看讲解。