Lesson 1 of 6 Incident Response and Forensics

Preparing Access, Tools and Procedures Before an Incident

This lesson explains the preparation that most incident response work depends on: having the right access, tools, logs and rehearsed procedures ready before an incident happens.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the phases of the incident response lifecycle.
  • Identify the access, tools and data responders need in advance.
  • Describe the external help available, such as AWS Security Incident Response.
  • Design an incident responder role that is safe to keep in every account.

The incident response lifecycle

Incident response is most effective when it follows a defined process rather than improvised actions. The AWS Security Incident Response Guide follows the lifecycle in NIST Special Publication 800-61. Preparation puts people, tools and access in place before anything happens. Detection and analysis confirm that an incident has occurred and establish its scope. Containment stops further damage, eradication removes the cause, recovery restores normal service, and post-incident activity records lessons learned so that controls improve. Each phase should be documented in playbooks, so responders know what to do under pressure. The following list summarises the phases and the role of playbooks.

  1. Preparation

    Put responder access, tools, logging and playbooks in place before an incident.

  2. Detection and analysis

    Confirm that an incident has occurred and establish its scope.

  3. Containment

    Stop the damage from spreading while preserving evidence.

  4. Eradication

    Remove the cause, such as malware, persistence or a leaked credential.

  5. Recovery

    Restore normal service from trusted sources and watch for reinfection.

  6. Post-incident activity

    Record lessons learned and improve controls.

Write a playbook per scenario (compromised credentials, exposed S3 data, compromised instance or container, ransomware, DDoS) with roles, communications and escalation.

Put in order

The incident response lifecycle

Exam skills 2.1.1

Arrange the phases of the NIST SP 800-61 lifecycle that the AWS Security Incident Response Guide follows.

Log in to try this activity Interactive activities are free with an account.

Access, tools and data

Most problems during incident response are discovered too late to fix: responders lack access, the logs that would show what happened were never collected, or there is nowhere safe to analyse evidence. Preparation therefore concentrates on three areas. Responders need pre-approved roles that they can assume immediately, with strong authentication and alerts on their use. Analysis needs an isolated environment, usually a dedicated forensics account. And detection services and logging must already be running, because data that was not collected cannot be recovered after an incident. The following list describes the necessary preparations.

  • Pre-provision incident responder and break-glass roles with strong MFA, short sessions and alerts on use: no standing privileges, no access requests mid-incident.
  • A dedicated forensics account with analysis tools and an isolated network, allowed to receive snapshots and use the needed KMS keys.
  • Enable GuardDuty, Security Hub, Detective, Inspector and logging everywhere before they are needed: uncollected logs cannot be analysed later.
  • Limit blast radius in advance with multiple accounts, least privilege, segmentation and SCPs.

The following diagram shows how an incident responder role that exists in every account is assumed, what it can do and how its use is seen.

An incident responder role that is safe to keep in every account. It can be assumed only from the security account, only by the incident response group's IAM Identity Center role, only with MFA and with the person's source identity recorded; its permissions cover response actions only, and every use notifies the security channel.
The scenario is illustrative.
Select all that apply

Preparing before the incident

Exam skills 2.1.2

Pick the preparations that must be in place before an incident.

Log in to try this activity Interactive activities are free with an account.

External help

Organisations do not have to handle serious incidents alone. The AWS Security Incident Response service monitors and triages findings from GuardDuty and other sources, manages cases with the customer's team, and provides access to the AWS Customer Incident Response Team (CIRT) for investigation and recovery support. For DDoS attacks, Shield Advanced customers can engage the Shield Response Team (SRT), which can create WAF rules on their behalf, and proactive engagement lets the SRT contact the customer when health checks show an application is affected. Both must be set up in advance, including the permissions the SRT needs, because arranging access in the middle of an attack wastes time.

True or false

Getting help from AWS

Exam skills 2.1.2

Check what AWS response services provide and what they need in advance.

Log in to try this activity Interactive activities are free with an account.
Worked example

An incident responder role that is safe to keep

Responders need powerful access during an incident but should hold none day to day. A role in every account (deployed with a StackSet) can be assumed only from the security account, only with MFA, and only by the incident response group, with the person's identity recorded:

{
  "Effect": "Allow",
  "Principal": { "AWS": "arn:aws:iam::555555555555:root" },
  "Action": ["sts:AssumeRole", "sts:SetSourceIdentity"],
  "Condition": {
    "Bool": { "aws:MultiFactorAuthPresent": "true" },
    "ArnLike": { "aws:PrincipalArn": "arn:aws:iam::555555555555:role/aws-reserved/sso.amazonaws.com/*/AWSReservedSSO_IncidentResponder_*" },
    "StringLike": { "sts:SourceIdentity": "*@example.com" }
  }
}

An EventBridge rule on AssumeRole events for this role notifies the security channel every time it is used, so use outside an incident is visible immediately. The role's permissions are scoped to response actions (isolate, snapshot, revoke sessions, read logs) rather than full administrator access.

Check yourself

Where should evidence be analysed during an investigation?

Show answer

In a dedicated forensics account, isolated from the affected accounts.

Exam Tips

Remember for the exam

  • To give responders access without standing privileges, pre-create break-glass roles with alerting.
  • An isolated place to analyse evidence is a dedicated forensics account.
  • Expert help during an active security event comes from AWS Security Incident Response and the AWS CIRT.
  • Enable logging and detection before incidents happen.
  • The lifecycle is preparation, detection and analysis, containment, eradication, recovery, and lessons learned.