- Newest
- Most votes
- Most comments
Hello.
How can we determine how SES was accessed?
First, we need to determine whether "authentication credentials were leaked" or "authentication credentials were sound, but the SES caller (application/server) itself was compromised".
The fact that the breach recurred even after rotating keys/IAM users after the previous breach suggests that the source of the leak may not be the keys themselves, but rather the environment in which the keys are generated, stored, and used (servers, CI/CD, repositories, etc.).
CloudTrail only tracks email sending methods using Amazon SES via AWS SDKs and APIs; sending via SMTP is not recorded.
https://docs.aws.amazon.com/ses/latest/dg/logging-using-cloudtrail.html
Email sending activity via SES SMTP Interface is not logged to CloudTrail events. For comprehensive activity logging, use the latest SES APIs in the SES API Reference and SES API v2 Reference.
Therefore, you need to enable the logging function on the Amazon SES side to record the data.
https://docs.aws.amazon.com/ses/latest/dg/monitor-sending-activity.html
How should we investigate credential exposure?
Since the issue recurred even after the rotation, it will be necessary to check the storage location and distribution channels.
For example, check your GitHub repository and the access history to the server in question to see if there were any suspicious accesses.
Should we avoid long-lived SES SMTP credentials?
Since long-term valid SMTP credentials/IAM access keys can be misused indefinitely if leaked, it is generally recommended to rotate them regularly or avoid using them altogether.
If your application runs on AWS (EC2/ECS/EKS/Lambda), you can also send emails from Amazon SES using IAM roles (instance profiles/task roles) and the AWS SDK.
https://docs.aws.amazon.com/ja_jp/ses/latest/APIReference/API_SendEmail.html
If you need to call SES from outside AWS in an on-premises/multi-cloud environment, you can also configure it to issue temporary credentials based on X.509 certificates using IAM Roles Anywhere.
https://aws.amazon.com/jp/blogs/security/extend-aws-iam-roles-to-workloads-outside-of-aws-with-iam-roles-anywhere/
What is the recommended incident-response procedure before requesting SES reinstatement?
- Identification of the breach route (e.g., "SMTP authentication information was output in plain text to GitHub Actions logs, and logs for the past 6 months were viewable as artifacts in the public repository," etc., specific root cause)
- Evidence that the access route was blocked (scrubbing of repository history, migration to CI Secret management, deletion and concealment of relevant logs)
- Permanent architectural changes (migration to IAM roles, or migration plan and milestones if not yet completed)
- Adding detection mechanisms (GuardDuty enabled, CloudWatch alarm thresholds, SES Event Publishing settings screenshot)
- Record of invalidating and reissuing all authentication credentials after a breach.
The above-mentioned measures will likely be necessary.
Also, the following document concerns the misuse of IAM users; please review it as it may be helpful.
https://repost.aws/knowledge-center/potential-account-compromise
Relevant content
asked a year ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 9 months ago
