Skip to main content
Back
IntrusionAWS
11 min read

DangerDev: an exposed AWS admin key, backdoor roles and SES phishing

Victim
An unnamed Invictus client
When
Not stated; activity ran over about a monthDisclosed Jan 31, 2024
Entry
An accidentally exposed long-term access key of an IAM user with Administrator Access. Where the key was exposed, and how the actor found it, is not stated.

Invictus Incident Response describes an AWS account in which an accidentally exposed long-term access key of an IAM user with Administrator Access was used over about a month; where the key was exposed is not stated. The actor created an administrator user named DangerDev, launched GPU instances, added access keys and two roles trusted by outside AWS accounts, and deleted users and keys. A support case to raise the Amazon SES sending quota, for phishing and spam from an account that did not use SES, led to the discovery.

What happened

External Parties
Actor AWS accounts
AWS Trust & Safety
Phishing recipients
+ 1 more
Internet
AWS IAM and APIlong-term access key
Victim AWS Account
Compute Created by the Actor
Exposed Admin Key
DangerDev Admin User
Backdoor Roles and Keys
SES Sending Identities
GPU EC2 Instances
Open Security Group
Lightsail Instance

Replaying the DangerDev intrusion, disclosed January 2024

  1. 1

    An exposed admin key

    Date not stated; about the first two weeks

    An exposed long-term admin access key is used from the internet, reads SES and IAM, and creates the DangerDev user with a console password and AdministratorAccess.

  2. 2

    Testing the access

    Date not stated; about one week

    Through the console, the DangerDev user creates a default VPC and a security group open for RDP, then launches a t2.micro test instance and p3.16xlarge GPU instances.

  3. 3

    Backdoors

    Date not stated; after about two quiet weeks

    After about two quiet weeks, the actor adds a user named to look like an SES SMTP user, new access keys and two roles trusted by outside AWS accounts, makes one role an administrator, then deletes users and keys and reads GuardDuty findings.

  4. 4

    Phishing, domains and a last instance

    Date not stated; the last phase

    The actor gets the SES sending quota raised through a support case and sends phishing and spam, registers four PayPal-like domains, and runs a Lightsail instance with another user's key as access is removed.

Impact

Over about a month the actor held administrator access to the account through a new user, new keys and roles trusted by outside AWS accounts. It ran GPU instances for mining, sent phishing and spam through SES, registered four PayPal-like domains and briefly ran a Lightsail instance. The costs and the volume of mail are not stated.

Outcome

Where the provider's controls fit

On AWS, the controls that fit are organization policies. They bind only the member accounts of an organization, and the sources do not say whether your account was one, so each control here bounds a step and none is certain to refuse it. In a member account, a service control policy that denies IAM user calls without MFA covers every call signed with the exposed long-term key. Service control policies that keep network creation, instance launches and GuardDuty findings to approved roles cover the DangerDev user's security group and first instances; the sources do not name the identity behind the later launches or the findings reads. Policies that keep user, key, role and deletion rights to approved administrators bound the rest, since the sources do not say which identity made those calls. A resource control policy that admits only your organization's callers covers the role assumption from the actor's own account, and denying Amazon SES and Amazon Lightsail where you do not use them covers the phishing mail and the last instance; the sources say the client did not use SES and do not say whether it used Lightsail. Resource control policies and VPC Block Public Access came in late 2024, after the incident. Where the key was exposed is not stated.

Could this have been prevented?

In hindsight, no control would have stopped it. 14 controls would have limited how far it went. The counts below are control assessments, not attack stages: several can address the same step. The same replay with the controls in place before the incident shows where each phase would have been refused or bounded.

0
Prevented
14
Contained
0
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.

External Parties
Actor AWS accounts
AWS Trust & Safety
Phishing recipients
+ 1 more
Internet
AWS IAM and APIlong-term access key
Victim AWS Account
Compute Created by the Actor
Exposed Admin Key
DangerDev Admin User
Backdoor Roles and Keys
SES Sending Identities
GPU EC2 Instances
Open Security Group
Lightsail Instance

Replaying the DangerDev intrusion, disclosed January 2024

1 · An exposed admin key

3 Contained6 on other clouds

2 · Testing the access

3 Contained6 on other clouds

3 · Backdoors

5 Contained9 on other clouds

4 · Phishing, domains and a last instance

3 Contained

Key facts

  • In the first two weeks the exposed key ran only SES GetSendQuota and ListIdentities, on two separate days, then ListUsers about two weeks later
  • The key created the IAM user DangerDev with a console password and attached the AWS managed AdministratorAccess policy; most later activity used that user
  • Through the console, the DangerDev user opened a new security group for RDP from outside and launched a t2.micro test instance and three p3.16xlarge instances; account limits caused a launch problem, and one machine ran for about an hour
  • The actor created two roles trusted by outside AWS accounts, with names close to existing roles, assumed one from its own account and attached AdministratorAccess to it
  • The actor had the SES sending quota raised through a support case and sent phishing for cryptocurrency exchange credentials and spam; that support case led to the discovery
  • The actor registered four PayPal-like domains through Route 53; they were short-lived and quickly taken offline

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. 1.
    The curious case of DangerDev@protonmail.meInvictus Incident Response · Jan 31, 2024 · ResearchEntry vector, API calls in order, phase durations, IAM user and role persistence, external account trust, EC2 and GPU instances, Lightsail, SES and Route 53 abuse, defense evasion, discovery of the incident
  2. 2.
    Inside a AWS Incident with Invictus: Analyzing the Attack for Detection InsightsAnvilogic · Feb 8, 2024 · ResearchSummary of the Invictus findings

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.

More cloud attack breakdowns

All breakdowns