-
Notifications
You must be signed in to change notification settings - Fork 50
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
Bucket modifications not removed #4
Comments
Hi, Jacob! Thanks for pointing this out. However, this is a very tricky issue to fix. First, let's get a few things cleared up:
That being said, undoing these modifications would not be possible in most cases. So we are left with these options:
I'm not sure what is the best course of action here, but I think the current behavior (1st option) can easily be reversed by the bucket owner once tests are finished. And we can try to implement the 3rd option alongside the 1st one to mitigate this problem. Further notes:
Do you have any better ideas in mind? |
Hey Sobky, Thanks for the response. The destroy verbiage came specifically from https://github.com/VirtueSecurity/aws-extender/blob/master/aws_extender.py#L561 which will overwrite the setting, breaking any websites hosted through AWS. But I agree, none of the checks disrupt data stored in the bucket. Those are some hard challenges to overcome, since writing does not entail read access. I think the easiest solution is adding a notice to the user detailing in what way it will be changing the buckets and using unique identifiers for these changed values so the user can easily identify changed values. Also a visible notice specifying this should only be used in non-production environments. My worry is without that a tester will use this on production instances without knowing and potentially cause some serious issues for customer-facing buckets. -Jake |
For some write checks you can use the checksum to determine if you have access or not. The exact process and script is in this blog post from Detectify. I have confirmed personally that their approach works while using Boto3. Note that you probably can't add the checksum to all checks but you can check for some writes 'passively'. |
Thanks @nwalsh1995, but which "WRITE" checks exactly are you referring to? If you mean tests similar to the following: Line 650 in 1451512
Then this is intentionally not passive, and it's a non-destructive test. The object uploaded is simply meant to act as evidence that you were able to write content to the bucket. If not, what proves the flaw ever existed? The point here is not to be completely passive but only to mitigate potentially disruptive tests. |
@0xSobky yes its the bucket write test that I am referring to. I haven't researched if you can use checksum on all of your checks but if any of them accept a checksum then you could potentially use the same method. Also by using the checksum method you can actually do bucket write completely passive. |
All of the write permission checks modify the bucket and do not unmodify it. This results in many bucket configurations being changed and overwritten. This makes this extension unusable as it will destroy any buckets scanned that have public write permissions.
aws-extender/aws_extender.py
Line 471 in 1451512
The text was updated successfully, but these errors were encountered: