RhinoSecurityLabs / cloudgoat

CloudGoat is Rhino Security Labs' "Vulnerable by Design" AWS deployment tool
BSD 3-Clause "New" or "Revised" License
2.89k stars 598 forks source link

vulnerable_cognito setup issue #187

Closed Anomia2 closed 1 year ago

Anomia2 commented 1 year ago

I get the error below when running ./cloudgoat.py create vulnerable_cognito. AdministratorAccess is granted to the "cloudgoat" user as instructed for the setup; and I've tried giving the user "AmazonS3FullAccess" (https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonS3FullAccess.html) permissions as well with no success.

│ Error: Error putting S3 policy: AccessDenied: Access Denied │ status code: 403, request id: [ID], host id: [host id] │ │ with aws_s3_bucket_policy.allow_access_from_another_account, │ on s3.tf line 13, in resource "aws_s3_bucket_policy" "allow_access_from_another_account": │ 13: resource "aws_s3_bucket_policy" "allow_access_from_another_account" { │

[cloudgoat] Error while running terraform apply. exit code: 1 stdout: None stderr: None

cipa5 commented 1 year ago

In order to solve this issue, first you can watch my video and follow exactly the same steps, then you need to delete cognito and re-create scenario, please let me know if i can help somehow, feel free to PM me.

chryzsh commented 1 year ago

I encountered the same issue, so thank you for the video, which fixed it. To recap:

Screenshots image image image

cipa5 commented 1 year ago

No problem, I am glad it helped! Perfect recap!

Anomia2 commented 1 year ago

This worked but I also had to delete the User Pool within Amazon Cognito prior to re-running [./cloudgoat.py create vulnerable_cognito].

cipa5 commented 1 year ago

This worked but I also had to delete the User Pool within Amazon Cognito prior to re-running [./cloudgoat.py create vulnerable_cognito].

Yes, that is needed as well, I forget to mention it. Good point!

chryzsh commented 1 year ago

I had to do that too. Here is a screenshot for clarity image