Skip to content
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

[FALSE-POSITIVE] ... #11241

Open
j4schur opened this issue Nov 22, 2024 · 0 comments
Open

[FALSE-POSITIVE] ... #11241

j4schur opened this issue Nov 22, 2024 · 0 comments
Assignees
Labels
false-positive Nuclei template reporting invalid/unexpected result

Comments

@j4schur
Copy link

j4schur commented Nov 22, 2024

Template IDs or paths

- cloud/aws/s3/s3-bucket-policy-public-access.yaml

Environment

- OS: AWS
- Nuclei: Any version
- Go: Any version

Steps To Reproduce

  1. Run nuclei -t code/aws/s3/s3-bucket-policy-public-access.yaml -code -debug
  2. If you have a bucket policy that looks like this:
    { "Version": "2012-10-17", "Statement": [ { "Effect": "Deny", "Principal": { "AWS": "*" }, "Action": "s3:*", "Resource": [ "arn:aws:s3:::BUCKET_NAME", "arn:aws:s3:::BUCKET_NAME/*" ], "Condition": { "Bool": { "aws:SecureTransport": "false" } } }, { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::000000000000:role/ROLE_NAME" }, "Action": [ "s3:DeleteObject*", "s3:GetBucket*", "s3:List*", "s3:PutBucketPolicy" ], "Resource": [ "arn:aws:s3:::BUCKET_NAME", "arn:aws:s3:::BUCKET_NAME/*" ] } ] }
  3. You get a false positive result because the template looking for "" and "Effect:: "Allow". But looking at the policy above the "" is on the "Effect": "Deny".

Relevant dumped responses

{"Version":"2012-10-17","Statement":[{"Effect":"Deny","Principal":{"AWS":"*"},"Action":"s3:*","Resource":["arn:aws:s3:::BUCKET_NAME","arn:aws:s3:::BUCKET_NAME/*"],"Condition":{"Bool":{"aws:SecureTransport":"false"}}},{"Effect":"Allow","Principal":{"AWS":"arn:aws:iam::0000000000:role/ROLE_NAME"},"Action":["s3:DeleteObject*","s3:GetBucket*","s3:List*","s3:PutBucketPolicy"],"Resource":["arn:aws:s3:::BUCKET_NAME","arn:aws:s3:::BUCKET_NAME/*"]}]}

[s3-bucket-policy-public-access:word-1] [code] [critical]  ["The S3 bucket BUCKET_NAME is publicly accessible via Policy"]
[s3-bucket-policy-public-access:word-2] [code] [critical]  ["The S3 bucket BUCKET_NAME is publicly accessible via Policy"]

Anything else?

No response

@j4schur j4schur added the false-positive Nuclei template reporting invalid/unexpected result label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
false-positive Nuclei template reporting invalid/unexpected result
Projects
None yet
Development

No branches or pull requests

2 participants