In its November 9 research on ARTEX in AWS, Datadog Security Labs describes a cluster of activity that needed no stolen keys at all. The agents found public Amazon Cognito user pools, signed themselves up, signed in, and used an identity pool to turn those sign-ins into AWS credentials. Then they tried ListBuckets, ListSecrets, ListFunctions and more. Every call failed, because the identity pool's role had no permissions.
That last sentence is the whole story. The attacker got AWS credentials by filling in a sign-up form. The only thing that stopped it was what the role behind those credentials was allowed to do.
How Cognito turns a sign-up into AWS credentials
Cognito has two parts that are easy to blur together.
A user pool is a user directory. If self-service sign-up is on, anyone can create an account with the SignUp API. AWS controls this with one setting, AllowAdminCreateUserOnly: when it's false, "users can register themselves."
An identity pool provides temporary AWS credentials for guests (unauthenticated) and for users who signed in. Each identity type maps to an IAM role, and the credentials carry that role's permissions.
Put a public user pool in front of an identity pool and you get a vending machine: create an account, sign in, receive AWS credentials for the "authenticated" role. That's how mobile and web apps are meant to talk to AWS directly. But in that setup, "authenticated" means "has an account," and anyone can have an account.
What ARTEX did
According to Datadog, the agents self-registered with SignUp, then used InitiateAuth, RespondToAuthChallenge, GetUser and GetTokensFromRefreshToken, and obtained AWS credentials. Their activity appears in CloudTrail under the CognitoIdentityCredentials role session name. A spike came on October 26 and 27.
One target had a pre sign-up Lambda trigger that checked the tenant's domain and rejected several attempts. The agent kept trying different values.
With credentials in hand, it ran read-only discovery: ListBuckets, GetBucket*, ListSecrets, DescribeParameters, ListTopics, DescribeLogGroups, GetRestApis, DescribeRepositories, ListFunctions20150331 and ListUserPools. All failed.
Wiz saw a related pattern in its report on ARTEX and Storm-0940: Cognito InitiateAuth, ForgotPassword and ResendConfirmationCode calls that mirrored account-recovery abuse against other apps, and SignUp calls with rotating user agents from programmatic clients such as boto and python-urllib, to "provision new identities directly." Wiz says most of those attempts failed. Okta saw agents run the same kind of registration and recovery probing against hundreds of Okta and Auth0 tenants.
Where the path breaks
Each step of this path has a control. You only need one to hold, but you should know which ones you have.
Step 1: can strangers sign up? If your app doesn't need public registration (an internal tool, a partner portal, an admin app), set AllowAdminCreateUserOnly to true. If it does need it, accept that every authenticated permission is effectively public.
Step 2: does the sign-up gate hold? A pre sign-up Lambda trigger can reject registrations, as one did here. Remember that the agent probed it with different values, so test it the same way. AWS also notes that a pre sign-up trigger can confirm users automatically, without any code sent to their email or phone. Make sure yours doesn't do that by accident.
Step 3: what does the identity pool hand out? Check both roles. For guests, AWS's role guidance says unauthenticated permissions "should be more restrictive than those for authenticated identities." In the enhanced flow, Cognito also applies a scope-down session policy to guest credentials, but that policy still allows services such as S3, DynamoDB, Lambda and CloudWatch Logs, so your role's own policy is what decides. If you don't need guest access, deactivate it.
Step 4: is the basic flow off? With the basic (classic) flow active, AWS says callers can "bypass the role selections you made" and call AssumeRoleWithWebIdentity directly. The guest scope-down policy doesn't apply there either. Keep it off unless you have a specific reason.
Step 5: does the role trust only your pool? AWS requires the aud condition on these trust policies today, but older roles may predate that rule. A role meant for signed-in users should check both the pool and the sign-in state:
"Condition": {
"StringEquals": { "cognito-identity.amazonaws.com:aud": "<your-identity-pool-id>" },
"ForAnyValue:StringLike": { "cognito-identity.amazonaws.com:amr": "authenticated" }
}
Step 6: what can the role actually do? This is where ARTEX stopped, and where you want it to stop. Scope access to each user's own data with the ${cognito-identity.amazonaws.com:sub} policy variable, as in AWS's examples, and grant no List* or Describe* across the account. If you use role rules, set the role resolution to deny credentials when no rule matches, rather than falling back to the default authenticated role.
What to do this week
- List every user pool and check
AllowAdminCreateUserOnly. Flag every pool where self sign-up is on and ask whether it needs to be. - List every identity pool, with its guest access status, basic flow status, and both role ARNs.
- Read the permissions of each role as if a stranger held them, because one can.
- Turn on
PreventUserExistenceErrorson app clients, so sign-in and password reset don't confirm which accounts exist. Note thatSignUpstill reports a taken username; AWS describes how alias attributes reduce that for email and phone numbers. - Hunt in CloudTrail for
CognitoIdentityCredentialssessions callingList*orDescribe*APIs, bursts ofSignUp, and repeatedForgotPasswordorResendConfirmationCodecalls from one source.
The short version
In this case the controls held, and the reason is worth saying plainly: someone gave the identity pool role no permissions it didn't need. That's not luck. It's the one setting in this path that still protects you when every other gate has been passed.
We're building Antivenom to check paths like this one end to end. An AI red team, run only against your own systems and with your permission, signs up the way an agent would, takes the credentials and proves what they reach. The AI blue team narrows the role, and the red team retests. For a related case of public access that outlives its purpose, read public buckets on day 400.