AWS - Cognito Enum

htARTE (HackTricks AWS Red Team 전문가)로부터 AWS 해킹을 제로부터 전문가까지 배우세요!

HackTricks를 지원하는 다른 방법:

Cognito

Amazon Cognito은 웹 및 모바일 애플리케이션에서 인증, 권한 부여 및 사용자 관리에 사용됩니다. 사용자는 사용자 이름과 암호 또는 Facebook, Amazon, Google 또는 Apple을 포함한 제3자를 통해 간접적으로 로그인할 수 있는 유연성을 제공합니다.

Amazon Cognito의 핵심 구성 요소는 다음과 같습니다:

  1. 사용자 풀(User Pools): 앱 사용자를 위한 디렉터리로, 가입 및 로그인 기능을 제공합니다.

  2. 아이덴티티 풀(Identity Pools): 이러한 풀은 사용자가 다른 AWS 서비스에 액세스할 수 있도록 권한을 부여하는 데 중요합니다. 이러한 풀은 로그인 또는 가입 프로세스에 직접 관여하지는 않지만 인증 후 리소스 액세스에 중요합니다.

사용자 풀(User pools)

Cognito 사용자 풀이 무엇인지 알아보려면:

pageCognito User Pools

아이덴티티 풀(Identity pools)

Cognito 아이덴티티 풀이 무엇인지 알아보려면:

pageCognito Identity Pools

Enumeration

# 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 - 미인증 열거

Identity Pool ID만 알고 있다면, 미인증 사용자에 연결된 역할의 자격 증명을 얻을 수도 있습니다. 여기에서 확인하세요.

User Pools - 미인증 열거

Cognito 내에서 유효한 사용자 이름을 모르더라도, 일반적으로 소스 코드에서 찾을 수 있는 App client ID만 알고 있다면, 유효한 사용자 이름을 열거하거나, 비밀번호를 BF하거나, 심지어 새 사용자를 등록할 수도 있습니다. 여기에서 확인하세요.

Privesc

pageAWS - Cognito Privesc

미인증 액세스

pageAWS - Cognito Unauthenticated Enum

지속성

pageAWS - Cognito Persistence
htARTE (HackTricks AWS Red Team Expert)를 통해 제로부터 영웅까지 AWS 해킹 배우기

HackTricks를 지원하는 다른 방법:

最終更新