AWS - Cognito Enum

Leer AWS-hacking vanaf nul tot held met htARTE (HackTricks AWS Red Team Expert)!

Ander maniere om HackTricks te ondersteun:

Cognito

Amazon Cognito word gebruik vir outentifikasie, magtiging, en gebruikersbestuur in web- en mobiele toepassings. Dit gee gebruikers die buigsaamheid om in te teken deur óf direk te gebruik maak van 'n gebruikersnaam en wagwoord óf onmiddellik deur 'n derde party, insluitend Facebook, Amazon, Google, of Apple.

Kern tot Amazon Cognito is twee primêre komponente:

  1. Gebruikerspoele: Hierdie is gidsen ontwerp vir jou app-gebruikers, wat aanmeldings- en intekenfunksies bied.

  2. Identiteitspoele: Hierdie poele is instrumenteel in magtiging van gebruikers om verskillende AWS-diens te benader. Hulle is nie direk betrokke by die inteken- of aanmeldingsproses nie, maar is noodsaaklik vir hulpbrontoegang na outentifikasie.

Gebruikerspoele

Om te leer wat 'n Cognito-gebruikerspoel is, kyk na:

pageCognito User Pools

Identiteitspoele

Om te leer wat 'n Cognito Identiteitspoel is, kyk na:

pageCognito Identity Pools

Enumerasie

# 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>

Identiteitspoelle - Ongeauthentiseerde Opsomming

Net deur die Identiteitspoel-ID te ken, kan jy moontlik die geloofsbriewe van die rol wat aan nie-geauthentiseerde gebruikers gekoppel is, kry (indien enige). Kyk hier hoe.

Gebruikerspoelle - Ongeauthentiseerde Opsomming

Selfs as jy nie 'n geldige gebruikersnaam ken binne Cognito nie, kan jy moontlik geldige gebruikersname opsom, BF die wagwoorde van selfs 'n nuwe gebruiker registreer deur net die App-kliënt-ID te ken (wat gewoonlik in die bronkode gevind word). Kyk hier hoe.

Privesc

pageAWS - Cognito Privesc

Ongeauthentiseerde Toegang

pageAWS - Cognito Unauthenticated Enum

Volharding

pageAWS - Cognito Persistence
Leer AWS-hacking vanaf nul tot held met htARTE (HackTricks AWS Red Team Expert)!

Ander maniere om HackTricks te ondersteun:

Last updated