What happened
Replaying the Lambda and SES May 2022 intrusion
- 1
Caller identity
May 20, 2022AWS returned the role’s identity to an outside caller. Its IAM permissions refused the policy-list requests that followed.
- 2
Mail service access
May 20, 2022The account had no active SES use before the incident. Unit 42 attributed the phishing to use of the Lambda credentials and reported unexpected costs.
Impact
Unit 42 reported that phishing through Amazon SES left the account owner with unexpected costs. It gave no amount or recipient count.
Could this have been prevented?
Keep mail permissions out of functions that do not send mail
If your Lambda function needs no Amazon SES access, attach a permissions boundary to its execution role that explicitly denies SES and permits its legitimate work. Other workloads can still use mail. An alternative for the same mail activity is an AWS Organizations service control policy that denies SES across a member account that can operate without it.
Incident control assessments
- 2
- Prevented
- 0
- Contained
- 1
- Not covered
How it could have been prevented
The same replay with the controls in place. Green marks where a step is refused, blue where it is bounded, and red where no control reaches it. Open a row to read the control, why it acts, and its caveat.
Replaying the Lambda and SES May 2022 intrusion
1 · Caller identity
1 Not covered2 · Mail service access
2 PreventedKey facts
- Unit 42 traced the requests to an address outside the function’s environment.
- AWS denied both IAM policy-list requests. Most broader discovery requests and an attempt to create an IAM user also failed.
- Unit 42 reported unexpected costs for the account owner and risk to other organizations. It gave no recipient outcome.
- The last reported event concerned deletion of the SES identity. Unit 42 published the case on December 8, 2022.
Sources
Every fact in this breakdown comes from the public reporting below. The replay is a model of that reporting, not a reconstruction of the environment it describes.
- 1.Compromised Cloud Compute Credentials: Case Studies From the WildPalo Alto Networks Unit 42 · Dec 8, 2022 · ResearchAWS case only: Lambda role, external requests, permission denials, SES abuse and unexpected costs
- 2.GetCallerIdentityAmazon Web Services · undated · Vendor reportAWS states that caller identity is available even under an explicit deny
- 3.Service control policies (SCPs)Amazon Web Services · undated · Vendor reportOrganization member-account scope, explicit denies and exceptions
- 4.Identity and access management in Amazon SESAmazon Web Services · undated · Vendor reportSES authorization and the distinction between identity management and sending
- 5.Permissions boundaries for IAM entitiesAmazon Web Services · undated · Vendor reportThe effective role permissions, direct role-session grants and precedence of an explicit deny
The estate in the replay is illustrative and drawn at the level of attack stages; the victim's real environment is not public. Verdicts describe what a control does when it is in place before the incident. They are not an assessment of the victim's security program.