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

file proto missing vars in flow & multi-protocol #5480

Merged
merged 5 commits into from
Aug 4, 2024
Merged

Conversation

tarunKoyalwar
Copy link
Member

@tarunKoyalwar tarunKoyalwar commented Aug 1, 2024

Proposed Changes

id: aws-bucket-takeover-example

info:
  name: AWS Bucket Takeover example
  author: princechaddha
  severity: high
  description: Automatically Detects and takeover misconfigured BUkcets
  reference:
    - https://docs.spring.io/spring-security/site/docs/current/apidocs/overview-tree.html
  tags: file,aws

flow: file(1) && log(template)

file:
  - extensions:
      - all

    extractors:
      - type: regex
        internal: true
        name: bucket
        group: 1
        regex:
          - 'https://([a-z0-9-]+)\.s3\.amazonaws\.com'
          - 'https://s3\.amazonaws\.com/([a-z0-9-]+?)(?:/|$)'

Example file

 cat ./bbdata/test.md                                                    
s3://my-s3-bucket


https://my-s3-bucket.s3.amazonaws.com/my-file.txt

https://s3.amazonaws.com/my-s3-bucket/my-file.txt%     

Example Run

$ echo "./bbdata/test.md" | ./nuclei -t a.yaml -v                                

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.3.0

		projectdiscovery.io

[VER] Started metrics server at localhost:9092
[INF] Current nuclei version: v3.3.0 (latest)
[INF] Current nuclei-templates version: v9.9.2 (latest)
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 67
[INF] Templates loaded for current scan: 1
[WRN] Loading 1 unsigned templates for scan. Use with caution.
[INF] Targets loaded for current scan: 1
[VER] [aws-bucket-takeover-example] Processing file ./bbdata/test.md chunk 17B/120B
[VER] [aws-bucket-takeover-example] Processing file ./bbdata/test.md chunk 17B/120B
[VER] [aws-bucket-takeover-example] Processing file ./bbdata/test.md chunk 17B/120B
[VER] [aws-bucket-takeover-example] Processing file ./bbdata/test.md chunk 66B/120B
[VER] [aws-bucket-takeover-example] Processing file ./bbdata/test.md chunk 66B/120B
[VER] [aws-bucket-takeover-example] Processing file ./bbdata/test.md chunk 115B/120B
[JS] 	1. bucket => my-s3-bucket
	2. file_matched => ./bbdata/test.md
	3. file_path => ./bbdata/test.md
	4. file_raw => https://s3.amazonaws.com/my-s3-bucket/my-file.txt
	5. file_type => file

@tarunKoyalwar tarunKoyalwar self-assigned this Aug 1, 2024
@tarunKoyalwar tarunKoyalwar changed the title issue fix file proto file proto missing vars in flow & multi-protocol Aug 1, 2024
@tarunKoyalwar tarunKoyalwar marked this pull request as ready for review August 1, 2024 15:26
@tarunKoyalwar tarunKoyalwar requested a review from ehsandeep August 1, 2024 15:28
@ehsandeep ehsandeep merged commit 2df1b2e into dev Aug 4, 2024
12 checks passed
@ehsandeep ehsandeep deleted the issue-fix-file-proto branch August 4, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing File Protocol Variables in flow and multiprotocol
2 participants