-
Notifications
You must be signed in to change notification settings - Fork 696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/update cognito attack #406
Feature/update cognito attack #406
Conversation
Thanks for the PR, Eduard! It is indeed clear that some change outside the Cognito main.py, whether in Pacu itself, Pacu dependencies, Cloudgoat, AWS code, or boto3, has resulted in duplicative "email" attributes when attempting to specify a username after beginning with "email" instead. I will work on fixing that now. As far as your PR, I am running into the following error when beginning with "username" for vulnerable_cognito. The error does not occur in the Rhino master branch, where everything works fine. Here's the error. Could you take a look? in the meantime I will fix the "email" duplication/username issue. Error: My input: run cognito__attack --username [email protected] --identity_pools us-east-1:REDACTED --user_pool_clients REDACTED@us-east-1_REDACTED Your PR tree's response: eu-south-2 |
@davidkutz-marks I've updated the code. The duplication of the email attribute is also fixed with this. I've encountered another issue when you don't specify a username in the run command, but later in the input. I will create an issue for this sometime later in a PR. EDIT: |
Summary
I've encountered an issue in the
cognito__attack
module of the Pacu framework — when attempting to exploit thevulnerable_cognito
user pool, the script requests thefamilyName
andgivenName
attributes repeatedly without progressing.Upon running the
cognito__attack
, the module falls into a loop, asking for thename.familyName
andname.givenName
even after supplying the correct values. Additionally, it gives an error saying "Username should be an email," suggesting a deeper issue with how user attributes are handled.It turns out the expected attribute keys should be
family_name
andgiven_name
, notfamilyName
andgivenName
.Example code:
Changes
Additional Notes
I have not seen any test that I could provide so I didn't. All of my manual testing was OK, but this needs to be tested by somebody else as well.