AWS - Cognito Enum

ゼロからヒーローまでのAWSハッキングを学ぶ htARTE(HackTricks AWS Red Team Expert)

HackTricksをサポートする他の方法:

Cognito

Amazon Cognitoは、Webおよびモバイルアプリケーションでの認証、承認、およびユーザー管理に使用されます。ユーザーは、ユーザー名とパスワードを直接使用するか、Facebook、Amazon、Google、またはAppleなどのサードパーティを介してサインインする柔軟性があります。

Amazon Cognitoの中心となる主要なコンポーネントは次のとおりです:

  1. ユーザープール:これらは、アプリのユーザー向けに設計されたディレクトリで、サインアップおよびサインイン機能を提供します。

  2. アイデンティティプール:これらのプールは、ユーザーに異なるAWSサービスへのアクセス権を承認するのに重要です。これらは直接サインインまたはサインアッププロセスには関与しませんが、認証後のリソースアクセスには重要です。

ユーザープール

Cognitoユーザープールとは何かを学ぶには、次を確認してください:

pageCognito User Pools

アイデンティティプール

Cognitoアイデンティティプールとは何かを学ぶには、次を確認してください:

pageCognito Identity Pools

列挙

# List Identity Pools
aws cognito-identity list-identity-pools --max-results 60
aws cognito-identity describe-identity-pool --identity-pool-id "eu-west-2:38b294756-2578-8246-9074-5367fc9f5367"
aws cognito-identity list-identities --identity-pool-id <ident-pool-id> --max-results 60
aws cognito-identity get-identity-pool-roles --identity-pool-id <ident-pool-id>

# Identities Datasets
## Get dataset of identity id (inside identity pool)
aws cognito-sync list-datasets --identity-pool-id <ident-pool-id> --identity-id <ident-id>
## Get info of the dataset
aws cognito-sync describe-dataset --identity-pool-id <value> --identity-id <value> --dataset-name <value>
## Get dataset records
aws cognito-sync list-records --identity-pool-id <value> --identity-id <value> --dataset-name <value>

# User Pools
## Get pools
aws cognito-idp list-user-pools --max-results 60

## Get users
aws cognito-idp list-users --user-pool-id <user-pool-id>

## Get groups
aws cognito-idp list-groups --user-pool-id <user-pool-id>

## Get users in a group
aws cognito-idp list-users-in-group --user-pool-id <user-pool-id> --group-name <group-name>

## List App IDs of a user pool
aws cognito-idp list-user-pool-clients --user-pool-id <user-pool-id>

## List configured identity providers for a user pool
aws cognito-idp list-identity-providers --user-pool-id <user-poo

## List user import jobs
aws cognito-idp list-user-import-jobs --user-pool-id <user-pool-id> --max-results 60

## Get MFA config of a user pool
aws cognito-idp get-user-pool-mfa-config --user-pool-id <user-pool-id>

## Get risk configuration
aws cognito-idp describe-risk-configuration --user-pool-id <user-pool-id>

Identity Pools - Unauthenticated Enumeration

Identity Pool ID知っているだけで、認証されていないユーザーに関連付けられたロールの資格情報を取得することができるかもしれません(存在する場合)。こちらで確認

User Pools - Unauthenticated Enumeration

Cognito内で有効なユーザー名を知らなくても、通常はソースコード内に見つかるAppクライアントIDを知っているだけで、有効なユーザー名を列挙したり、パスワードをBFしたり、新しいユーザーを登録することができるかもしれません。こちらで確認

Privesc

pageAWS - Cognito Privesc

Unauthenticated Access

pageAWS - Cognito Unauthenticated Enum

Persistence

pageAWS - Cognito Persistence
htARTE(HackTricks AWS Red Team Expert)を使って、ゼロからヒーローまでAWSハッキングを学びましょう!

HackTricksをサポートする他の方法:

最終更新