AWS - Cognito Enum
Tip
Μάθετε & εξασκηθείτε στο AWS Hacking:
HackTricks Training AWS Red Team Expert (ARTE)
Μάθετε & εξασκηθείτε στο GCP Hacking:HackTricks Training GCP Red Team Expert (GRTE)
Μάθετε & εξασκηθείτε στο Az Hacking:HackTricks Training Azure Red Team Expert (AzRTE)
Υποστηρίξτε το HackTricks
- Δείτε τα subscription plans!
- Εγγραφείτε στο 💬 Discord group ή την telegram group ή ακολουθήστε μας στο Twitter 🐦 @hacktricks_live.
- Μοιραστείτε τα hacking tricks υποβάλλοντας PRs στα HackTricks και HackTricks Cloud github repos.
Cognito
Το Amazon Cognito χρησιμοποιείται για authentication, authorization, and user management σε διαδικτυακές και κινητές εφαρμογές. Επιτρέπει στους χρήστες την ευελιξία να συνδέονται είτε άμεσα χρησιμοποιώντας ένα user name and password είτε έμμεσα μέσω ενός third party, συμπεριλαμβανομένων των Facebook, Amazon, Google ή Apple.
Κεντρικά στο Amazon Cognito βρίσκονται δύο κύρια στοιχεία:
- User Pools: Αυτοί είναι κατάλογοι σχεδιασμένοι για τους χρήστες της εφαρμογής σας, προσφέροντας sign-up and sign-in functionalities.
- Identity Pools: Αυτές οι πισίνες είναι καθοριστικές για authorizing users to access different AWS services. Δεν εμπλέκονται άμεσα στη διαδικασία sign-in ή sign-up αλλά είναι κρίσιμες για την πρόσβαση σε πόρους μετά την authentication.
User pools
Για να μάθετε τι είναι ένα Cognito User Pool check:
Identity pools
Για να μάθετε τι είναι ένα Cognito Identity Pool check:
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-pool-id>
## 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
Απλά γνωρίζοντας το ID της Identity Pool μπορεί να είστε σε θέση να πάρετε διαπιστευτήρια του ρόλου που σχετίζεται με τους μη αυθεντικοποιημένους χρήστες (αν υπάρχουν). Δείτε πώς εδώ.
User Pools - Unauthenticated Enumeration
Ακόμα και αν δεν γνωρίζετε ένα έγκυρο όνομα χρήστη μέσα στο Cognito, μπορεί να είστε σε θέση να καταγράψετε έγκυρα ονόματα χρήστη, BF τους κωδικούς πρόσβασης ή ακόμα και να εγγράψετε έναν νέο χρήστη απλά γνωρίζοντας το App client ID (το οποίο συνήθως βρίσκεται στον πηγαίο κώδικα). Δείτε πώς εδώ.
Privesc
Unauthenticated Access
AWS - Cognito Unauthenticated Enum
Persistence
Tip
Μάθετε & εξασκηθείτε στο AWS Hacking:
HackTricks Training AWS Red Team Expert (ARTE)
Μάθετε & εξασκηθείτε στο GCP Hacking:HackTricks Training GCP Red Team Expert (GRTE)
Μάθετε & εξασκηθείτε στο Az Hacking:HackTricks Training Azure Red Team Expert (AzRTE)
Υποστηρίξτε το HackTricks
- Δείτε τα subscription plans!
- Εγγραφείτε στο 💬 Discord group ή την telegram group ή ακολουθήστε μας στο Twitter 🐦 @hacktricks_live.
- Μοιραστείτε τα hacking tricks υποβάλλοντας PRs στα HackTricks και HackTricks Cloud github repos.
HackTricks Cloud

