Aws Cognito

AWS Cognito is an AWS-managed service for authentication, authorization, and user management.

  1. A user signs in through Cognito User Pools (authentication) or via a federated IdP (Google, Facebook, SAML, etc.).

  2. Cognito Identity Pools can then exchange this identity for temporary AWS credentials (from STS — Security Token Service).

  3. These credentials (Access Key ID, Secret Access Key, and Session Token) let the app directly call AWS services (e.g., S3, DynamoDB, API Gateway) with limited IAM roles/policies.

Tools

  • Cognito Scannerarrow-up-right - A CLI tool for executing attacks on cognito such as Unwanted account creation, Account Oracle and Identity Pool escalation.

    # Installation
    $ pip install cognito-scanner
    # Usage
    $ cognito-scanner --help
    # Get information about how to use the unwanted account creation script
    $ cognito-scanner account-creation --help
    # For more details go to https://github.com/padok-team/cognito-scanner

Identity Pool ID

  • User Pools : User pools allow sign-in and sign-up functionality

  • Identity Pools : Identity pools allow authenticated and unauthenticated users to access AWS resources using temporary credentials

Once you have the Cognito Identity Pool Id token, you can proceed further and fetch Temporary AWS Credentials for an unauthenticated role using the identified tokens.

AWS Cognito Commands

Get User Information

Admin Authentication

List User Groups

Sign up

Modify Attributes

References

Last updated