Learn Domain 2: Incident Response (AWS SCS-C03) with Interactive Flashcards
Master key concepts in Domain 2: Incident Response through our interactive flashcard system. Click on each card to reveal detailed explanations and enhance your understanding.
Incident Response in AWS
Incident Response in AWS is a critical component of the AWS Certified Security – Specialty (SCS-C02) exam, falling under Domain 1: Threat Detection and Incident Response. It refers to the structured approach for identifying, containing, eradicating, and recovering from security events within AWS environments.
AWS Incident Response follows a lifecycle model that includes: **Preparation**, **Detection and Analysis**, **Containment**, **Eradication and Recovery**, and **Post-Incident Activity**.
**Preparation** involves setting up the right tools and access controls beforehand. This includes configuring AWS CloudTrail for API logging, enabling Amazon GuardDuty for threat detection, setting up AWS Config for resource tracking, and creating IAM roles specifically for incident responders.
**Detection and Analysis** leverages services like Amazon GuardDuty, AWS Security Hub, Amazon Detective, and CloudWatch Alarms to identify anomalies and potential threats. These services aggregate findings and provide actionable intelligence.
**Containment** strategies in AWS include isolating compromised EC2 instances by modifying security groups, revoking IAM credentials, restricting S3 bucket access, and using VPC Network ACLs to block malicious traffic. AWS enables automated containment through Lambda functions triggered by EventBridge rules.
**Eradication and Recovery** involves removing threats by terminating compromised resources, rotating credentials, patching vulnerabilities, and restoring from clean backups or snapshots. AWS CloudFormation helps rebuild infrastructure from known-good templates.
**Post-Incident Activity** includes conducting root cause analysis, updating runbooks, and improving detection capabilities based on lessons learned.
Key AWS services for incident response include AWS Organizations for account isolation, AWS Step Functions for orchestrating automated response workflows, and Amazon S3 with object lock for preserving forensic evidence. The concept of automation is central—AWS encourages building automated playbooks using services like Systems Manager Automation and Lambda to reduce response times.
A best practice is maintaining a dedicated forensics account where compromised resources can be analyzed in isolation, ensuring evidence integrity while minimizing impact on production environments.
Compromised EC2 Instances
Compromised EC2 Instances represent a critical security concern in AWS environments and are a key topic in the SCS-C02 exam under Threat Detection and Incident Response. A compromised EC2 instance occurs when an unauthorized party gains access to or control over an instance, typically through vulnerabilities, misconfigurations, stolen credentials, or malware.
**Detection Methods:**
AWS provides several services to detect compromised instances. **Amazon GuardDuty** is the primary tool, generating findings such as unusual API calls, cryptocurrency mining activity, communication with known command-and-control servers, DNS exfiltration, or unauthorized port probing. **AWS CloudTrail** logs API activity that may reveal suspicious behavior, while **VPC Flow Logs** can identify abnormal network traffic patterns. **AWS Security Hub** aggregates findings across services for centralized visibility.
**Common Indicators of Compromise:**
- Unusual outbound network traffic (data exfiltration)
- Spikes in CPU utilization (cryptomining)
- Communication with malicious IP addresses
- Unexpected IAM credential usage from the instance
- Unauthorized changes to security groups or configurations
**Incident Response Steps:**
1. **Capture metadata and evidence** — Take snapshots of EBS volumes, capture memory dumps, and record instance metadata for forensic analysis.
2. **Isolate the instance** — Replace the security group with a restrictive forensic security group that blocks all inbound/outbound traffic (except forensic access), but do NOT terminate the instance immediately to preserve evidence.
3. **Protect related resources** — Invalidate and rotate any IAM temporary credentials associated with the instance role using the IAM console to revoke active sessions.
4. **Investigate** — Analyze CloudTrail logs, VPC Flow Logs, and GuardDuty findings. Perform offline forensic analysis on EBS snapshots.
5. **Eradicate and recover** — Terminate the compromised instance, deploy a clean replacement from a trusted AMI, patch vulnerabilities, and strengthen security controls.
6. **Post-incident review** — Document lessons learned and update security policies.
Automation through **AWS Lambda**, **Step Functions**, and **EventBridge** can streamline response workflows, enabling rapid containment when GuardDuty detects threats.
Compromised IAM Credentials
Compromised IAM Credentials represent a critical security threat in AWS environments where an unauthorized party gains access to IAM user access keys, secret keys, session tokens, or console passwords. This is a key topic under Domain 1 of the SCS-C02 exam.
**Detection Methods:**
AWS provides several services to detect compromised credentials:
- **AWS GuardDuty** identifies unusual API calls, unauthorized access patterns, and flags findings like `UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration` when credentials are used from external IP addresses.
- **AWS CloudTrail** logs all API activity, enabling detection of suspicious actions such as API calls from unusual geographic locations or unfamiliar IP addresses.
- **AWS Access Analyzer** helps identify resources shared with external entities and validates IAM policies.
- **Amazon Detective** assists in investigating the root cause and scope of credential compromise.
**Common Indicators of Compromise:**
- API calls from unrecognized IP addresses or regions
- Unusual resource provisioning (e.g., launching crypto-mining instances)
- Changes to IAM policies or security configurations
- Access patterns outside normal business hours
- Credentials exposed in public repositories (detected by AWS Health events or GuardDuty)
**Incident Response Steps:**
1. **Identify** the compromised credentials using GuardDuty findings or CloudTrail analysis.
2. **Disable/Rotate** the compromised credentials immediately — deactivate access keys, revoke temporary session credentials by adding a deny-all inline policy or revoking sessions.
3. **Assess Impact** by reviewing CloudTrail logs to determine what actions were performed with the compromised credentials.
4. **Remediate** any unauthorized changes such as rogue resources, modified policies, or backdoor accounts created by the attacker.
5. **Prevent Recurrence** by enforcing MFA, implementing least-privilege policies, using AWS Organizations SCPs, enabling credential rotation, and setting up automated alerting through EventBridge rules triggered by GuardDuty findings.
For temporary credentials (STS tokens), you must revoke active sessions since simply rotating keys won't invalidate them. Understanding these response procedures is essential for the SCS-C02 exam.
Incident Response Plans and Runbooks
Incident Response Plans (IRPs) and runbooks are core topics in SCS-C03 Domain 2. An IRP is a high-level, organization-wide document that defines how security events are detected, triaged, contained, eradicated, recovered from, and reviewed. It aligns with the NIST SP 800-61 lifecycle and the AWS Security Incident Response Guide.
Key IRP elements include:
- Roles and responsibilities, such as incident commander, communications lead, legal, and technical responders.
- Escalation paths and severity classifications.
- Communication plans and contact lists, including AWS Support and the AWS Customer Incident Response Team (CIRT).
- Regulatory notification requirements.
In AWS, the plan should also reflect the shared responsibility model and multi-account structures managed through AWS Organizations. It should cover pre-provisioned access, such as break-glass IAM roles and a dedicated forensics account.
Runbooks (and playbooks) are tactical, step-by-step procedures for specific scenarios. Examples include compromised IAM access keys, publicly exposed S3 buckets, crypto-mining EC2 instances, and unexpected root account usage. A runbook for a compromised EC2 instance might include these steps:
1. Capture instance metadata.
2. Enable termination protection.
3. Isolate the instance with a restrictive security group.
4. Detach it from Auto Scaling groups and deregister it from load balancers.
5. Snapshot EBS volumes and capture memory.
6. Tag the resource for investigation.
AWS supports runbook automation through several services. These include AWS Systems Manager Automation documents, AWS Systems Manager Incident Manager response plans, AWS Step Functions, and Lambda functions. Amazon EventBridge rules can trigger these actions in response to GuardDuty, Security Hub, or AWS Config findings. Automation reduces mean time to respond and limits human error, while ensuring consistent execution.
Exam tips:
- Plans must be tested through tabletop exercises, game days, and simulations.
- Preparation includes enabling logging, such as CloudTrail, VPC Flow Logs, and Route 53 Resolver query logs, before incidents occur.
- Post-incident reviews feed lessons learned back into updated plans and runbooks.
Expect scenario questions asking which automated response is most efficient, or which preparatory step best enables effective forensic analysis.
Preparing Services for Incidents
Preparing Services for Incidents is a core topic in Domain 2 of SCS-C03. It focuses on configuring AWS environments before an event occurs, so responders can detect, investigate, contain, and recover quickly and reliably.
1. Logging and visibility: Enable AWS CloudTrail in all Regions and accounts through an organization trail. Turn on log file integrity validation and deliver logs to a centralized, protected Amazon S3 bucket using S3 Object Lock and restrictive bucket policies. Also enable VPC Flow Logs, Route 53 Resolver query logs, ELB and CloudFront access logs, S3 data events, and Amazon CloudWatch Logs for applications. Retain logs long enough to support investigations and compliance.
2. Detection services: Activate Amazon GuardDuty, AWS Security Hub, Amazon Inspector, Amazon Macie, AWS Config rules, and IAM Access Analyzer. Manage them through a delegated administrator account in AWS Organizations. Amazon Detective helps analysts visualize relationships between entities during investigations.
3. Responder access: Pre-provision least-privilege incident response IAM roles, break-glass procedures, and cross-account roles from a dedicated security account. IAM Identity Center permission sets simplify this. Responders must be able to work even if normal credentials are compromised.
4. Forensic readiness: Build an isolated forensics account and VPC, hardened AMIs with forensic tools, and automation to snapshot Amazon EBS volumes, capture memory, and isolate instances. Configure AWS KMS key policies so encrypted snapshots can be shared with the forensics account. Use consistent resource tagging for ownership and criticality.
5. Automation and playbooks: Route GuardDuty and Security Hub findings through Amazon EventBridge to AWS Lambda, AWS Step Functions, or Systems Manager Automation runbooks. These can swap security groups, revoke IAM sessions, or disable access keys. Document playbooks aligned with NIST SP 800-61 and the AWS Security Incident Response Guide.
6. Recovery: Use AWS Backup with Vault Lock, cross-Region and cross-account copies, and AWS CloudFormation templates for clean rebuilds.
7. Testing: Run tabletop exercises, game days, and AWS Fault Injection Service experiments, and consider the AWS Security Incident Response service.
Exam tip: favor centralized, automated, multi-account, and tamper-resistant solutions.
Testing an Incident Response Plan
Testing an Incident Response (IR) plan confirms that people, processes, and technology work together when a real security event occurs in AWS. For the SCS-C03 exam, understand that an untested plan creates false confidence. Testing reveals gaps in permissions, tooling, communication, and runbooks before attackers do.
Key testing methods:
1. Tabletop exercises: These are discussion-based walkthroughs where security, legal, operations, and leadership talk through a scenario, such as compromised IAM access keys or a public S3 bucket. They clarify roles, escalation paths, and decision points at low cost.
2. Simulations and game days: These are hands-on exercises in non-production or isolated accounts that inject realistic events. AWS Fault Injection Service can introduce disruptions. Sample findings from Amazon GuardDuty (CreateSampleFindings) and AWS Security Hub test detection-to-response pipelines built on Amazon EventBridge, AWS Lambda, and AWS Systems Manager Automation runbooks.
3. Red team and purple team exercises: These use adversary emulation to measure detection coverage and response effectiveness. They must follow the AWS penetration testing policy for permitted services.
What to validate:
- Access: Break-glass roles, cross-account forensic roles, and IAM Identity Center permissions function as expected.
- Tooling: Forensic AMIs, isolated forensic VPCs, EBS snapshot automation, and memory capture tools are ready.
- Logging: AWS CloudTrail, VPC Flow Logs, DNS query logs, and S3 access logs are enabled, retained, and queryable through Amazon Athena or Amazon Detective.
- Automation: Containment playbooks execute correctly. Examples include isolating EC2 instances with restrictive security groups, disabling access keys, and revoking active sessions.
- Communication: Contact lists, AWS Support escalation, and Amazon SNS notification channels work as intended.
After each test, hold a lessons-learned review. Measure metrics such as mean time to detect (MTTD) and mean time to respond (MTTR), update runbooks, and track remediation items until they are closed. Repeat tests on a regular schedule and after major architectural changes. The AWS Security Incident Response Guide recommends iterative, scheduled exercises to continuously mature readiness.
Automated Incident Remediation
Automated Incident Remediation in AWS uses event-driven services to detect, contain, and fix security issues with minimal human intervention. This reduces mean time to respond (MTTR) and limits the blast radius of an incident. For the SCS-C03 exam, you should understand the common architecture. Detection sources generate findings, Amazon EventBridge routes them, and automation targets carry out the remediation.
Detection sources include the following:
- Amazon GuardDuty for threat detection
- AWS Security Hub for aggregated findings and posture controls
- AWS Config for configuration compliance
- Amazon Inspector for vulnerabilities
- Amazon Macie for sensitive data exposure
- AWS CloudTrail for API activity
These services publish events to EventBridge, where rules filter events by finding type, severity, account, or resource.
Remediation targets include the following:
- AWS Lambda functions for custom logic
- AWS Systems Manager Automation runbooks for predefined or custom actions
- AWS Step Functions for multi-step workflows with approval gates
- Amazon SNS for notifications
AWS Config supports remediation through SSM documents, with automatic or manual execution and configurable retries. Security Hub custom actions send selected findings to EventBridge so analysts can trigger a response. The Automated Security Response on AWS solution provides prebuilt playbooks.
Typical remediation actions include:
- Isolating a compromised EC2 instance by replacing its security group with a restrictive one
- Creating EBS snapshots for forensics
- Deactivating exposed IAM access keys
- Attaching deny-all policies to compromised roles and revoking active sessions
- Enabling S3 Block Public Access
- Enforcing encryption
- Adding malicious IPs to AWS WAF or AWS Network Firewall block lists
Key best practices:
- Preserve evidence before altering resources.
- Grant remediation roles least privilege.
- Test runbooks in non-production accounts.
- Use AWS Organizations with a delegated administrator for multi-account coverage.
- Log every automated action through CloudTrail.
- Require human approval for high-impact actions to prevent outages caused by false positives.
Exam tip: When a question emphasizes speed, scale, or consistency, favor EventBridge with Lambda or SSM Automation. When it emphasizes configuration drift or compliance, favor AWS Config rules with remediation actions. When it requires analyst judgment, favor Security Hub custom actions or Step Functions with approval steps.
Capturing Logs as Forensic Artifacts
In AWS incident response, logs are critical forensic artifacts. Investigators use them to reconstruct attacker activity, build timelines, and support legal or compliance requirements. For the SCS-C03 exam, you must know which logs to capture, how to preserve their integrity, and how to store them securely.
Key log sources include:
- AWS CloudTrail: API activity and account actions.
- VPC Flow Logs: network traffic metadata.
- Amazon Route 53 Resolver query logs: DNS lookups.
- Elastic Load Balancing, Amazon CloudFront, and Amazon S3 server access logs.
- AWS Config: resource configuration history.
- Operating system and application logs collected through the Amazon CloudWatch agent.
Amazon GuardDuty findings and AWS Security Hub data add further context.
Integrity is essential. Enable CloudTrail log file integrity validation. It creates SHA-256 hashed digest files that prove logs were not altered. Store logs in a dedicated, centralized log archive account managed through AWS Organizations, and restrict access with strict bucket policies and service control policies. Enable versioning, then apply S3 Object Lock in compliance mode for write-once-read-many (WORM) protection. Encrypt logs with AWS KMS customer managed keys and tightly control the key policies.
During an incident, preserve ephemeral data quickly. Logs stored on EC2 instances can be lost if an instance is terminated, so collect them before containment actions such as isolation or termination. Capture EBS snapshots and memory images alongside the logs. Maintain chain of custody by recording artifact hashes and documenting who accessed each artifact, when, and why.
For analysis, you can use:
- Amazon Athena to query logs stored in S3.
- CloudWatch Logs Insights.
- CloudTrail Lake.
- Amazon Detective to visualize relationships between resources and activity.
Amazon Security Lake normalizes logs into the Open Cybersecurity Schema Framework (OCSF) for centralized investigation.
Exam tips:
- Favor automated, centralized, immutable, and encrypted log collection established before incidents occur.
- Set retention periods that meet compliance requirements.
- Separate forensic and log archive accounts from production workloads to prevent tampering.
- Prefer prevention controls such as Object Lock and integrity validation over detective controls alone when evidence protection is required.
Searching and Correlating Logs for Security Events
Searching and correlating logs is a core Incident Response skill in SCS-C03. It covers how you collect evidence, identify indicators of compromise, and reconstruct attacker activity across AWS services.
Key log sources include AWS CloudTrail for API activity (who did what, when, and from where), VPC Flow Logs for network traffic metadata, and Route 53 Resolver query logs for DNS lookups. Other sources are S3 server access logs, Elastic Load Balancing and CloudFront access logs, AWS WAF logs, and application or OS logs shipped through the CloudWatch agent.
Searching tools: Amazon CloudWatch Logs Insights provides a purpose-built query language to filter, parse, and aggregate log events in near real time. Amazon Athena runs SQL against logs stored in S3. It suits CloudTrail and Flow Logs at scale, especially when the data is partitioned. CloudTrail Lake offers managed, immutable event data stores that you query with SQL, with multi-account and multi-Region aggregation. Amazon OpenSearch Service supports full-text search and dashboards for SIEM-like analysis.
Correlation tools: Amazon Detective builds a behavior graph from CloudTrail, VPC Flow Logs, GuardDuty findings, and EKS audit logs. Investigators can pivot between entities such as IAM roles, IP addresses, and EC2 instances to visualize scope and timeline. AWS Security Hub aggregates and normalizes findings using the AWS Security Finding Format (ASFF). Amazon Security Lake centralizes logs in Open Cybersecurity Schema Framework (OCSF) format, which enables consistent cross-source queries and third-party SIEM integration.
Correlation techniques: Join events on common fields such as access key ID, principal ARN, source IP, instance ID, and timestamps. For example, a GuardDuty finding on unusual API calls can be traced in CloudTrail to a specific access key. That key's activity can then be matched to Flow Logs showing large outbound transfers that indicate data exfiltration.
Exam tips: Centralize logs in a dedicated security account using AWS Organizations. Enable CloudTrail log file integrity validation, and protect logs with S3 Object Lock and KMS encryption. Choose Detective for root-cause investigation and Athena for ad hoc SQL queries. Keep timestamps in UTC so timelines remain accurate.
Validating Findings: Scope and Impact
In SCS-C03 Domain 2, validating findings means confirming that an alert represents a genuine security event, then determining how far it reaches and how much harm it could cause before choosing containment and remediation actions. Detectors such as Amazon GuardDuty, AWS Security Hub, Amazon Inspector, Amazon Macie, and IAM Access Analyzer generate findings, but not every finding is malicious. Some are false positives caused by approved penetration tests, new deployment patterns, or legitimate administrative activity. Responders must triage efficiently so they neither waste effort nor overlook a real compromise.
Validation starts with context. Review the finding details, severity, affected resource, and actor. Correlate evidence across sources: AWS CloudTrail for API calls and identity usage, VPC Flow Logs for network connections, Route 53 Resolver query logs for DNS activity, S3 server access logs, and application or OS logs. Amazon Detective is especially useful because it builds behavior graphs that link IAM principals, IP addresses, EC2 instances, and time windows. This helps analysts see whether activity deviates from an established baseline.
Scope answers the question "what else is affected?" Determine which accounts, Regions, roles, access keys, instances, containers, and data stores the actor touched. Trace lateral movement, such as chained role assumptions or newly created IAM users. Use Amazon Athena or CloudTrail Lake to query logs across an AWS Organization, and use Security Hub cross-account and cross-Region aggregation to view related findings together.
Impact answers the question "how bad is it?" Assess data sensitivity using Macie classification. Confirm whether exfiltration occurred by reviewing S3 GetObject volume or unusual egress traffic. Evaluate cost impact from cryptomining. Check for persistence mechanisms such as modified policies, Lambda backdoors, or altered security groups. Also weigh compliance, legal, and business consequences.
Accurate scope and impact drive a proportionate response. Confirmed benign findings can be handled with GuardDuty suppression rules. When compromise is confirmed, escalate, isolate resources, revoke sessions, and preserve evidence. Exam questions often reward choosing services that correlate and investigate before taking disruptive action.
Containment, Eradication and Recovery
Containment, Eradication and Recovery are the core response phases of the NIST incident response lifecycle. AWS adopts this lifecycle in its Security Incident Response Guide, and SCS-C03 Domain 2 tests these phases heavily.
CONTAINMENT limits the blast radius while preserving evidence.
- EC2: Isolate the instance by replacing its security groups with a restrictive "isolation" group that has no inbound or outbound rules. Existing tracked connections may persist, so add network ACL deny rules for full isolation. Detach the instance from Auto Scaling groups, deregister it from load balancers, and enable termination protection. Capture EBS snapshots and volatile memory before making further changes.
- IAM: Deactivate compromised access keys and attach an explicit deny policy such as AWSDenyAll. Use "Revoke active sessions" on the role, which adds a deny condition based on aws:TokenIssueTime. Apply SCPs for organization-wide restrictions.
- S3: Tighten bucket policies and enable Block Public Access.
- Automation: EventBridge rules triggered by GuardDuty or Security Hub findings can invoke Lambda or Step Functions for fast, consistent containment.
ERADICATION removes the root cause and attacker artifacts.
- Analyze evidence in an isolated forensic account using CloudTrail, VPC Flow Logs, Amazon Detective, and Athena queries.
- Delete unauthorized IAM users, roles, and policies. Remove malicious Lambda functions, rogue instances, and backdoor resources, checking all Regions.
- Rotate secrets with Secrets Manager and replace exposed credentials and KMS keys.
- Patch vulnerabilities through Systems Manager Patch Manager, then validate remediation with Amazon Inspector.
RECOVERY restores normal operations safely.
- Rebuild workloads from known-good, hardened AMIs or infrastructure as code such as CloudFormation, rather than cleaning compromised hosts.
- Restore data from AWS Backup or versioned S3 objects and verify its integrity.
- Monitor closely with GuardDuty, CloudWatch, and AWS Config rules to detect reinfection.
- Return traffic gradually as confidence grows.
Exam tips:
- Favor automated, scalable responses.
- Preserve forensic evidence before terminating resources.
- Use dedicated forensic accounts.
- Prefer replacement over repair, in line with immutable infrastructure principles.
- Feed post-incident lessons learned back into the preparation phase.
Root Cause Analysis with Amazon Detective
Amazon Detective supports root cause analysis (RCA) during incident response. It collects and correlates log data so security teams can see how an event unfolded. For SCS-C03, remember that Detective does not generate threat detections itself. It investigates findings from Amazon GuardDuty, AWS Security Hub, and other sources, answering questions such as who did what, from where, and when.
Data sources: Once enabled, Detective ingests AWS CloudTrail management events, VPC Flow Logs, and GuardDuty findings. Optional source packages add Amazon EKS audit logs and AWS security findings aggregated by Security Hub. Detective uses its own independent data streams, so you do not need to configure trails or flow logs separately for it. The data feeds a behavior graph, a linked model of entities such as IAM users, roles, EC2 instances, IP addresses, and user agents. The graph covers up to one year of history.
RCA workflow:
1. Start from a GuardDuty or Security Hub finding and pivot into Detective with the Investigate option.
2. Review entity profiles that compare baseline behavior with anomalies, such as new geolocations, unusual API calls, or traffic spikes.
3. Widen the scope time to examine activity before the alert and identify initial access.
4. Use finding groups, which cluster related findings and entities into one attack chain mapped to MITRE ATT&CK tactics. Generative AI summaries can explain these groups in plain language.
5. Run Detective Investigations on IAM users or roles to surface indicators of compromise, such as impossible travel, flagged IP addresses, and suspicious TTPs.
Multi-account: Use a delegated administrator account through AWS Organizations to centralize investigations across member accounts.
Exam tips: Choose Detective when a scenario asks for visualizing relationships, determining the scope or root cause of a finding, or investigating historical behavior with minimal operational effort. Choose GuardDuty for detection, Athena for custom log queries, and Systems Manager or Lambda for remediation. Detective is regional and charges based on the volume of data ingested.