2022-12-10 13:40:08 +00:00
|
|
|
id: database-credentials
|
|
|
|
|
|
|
|
info:
|
|
|
|
name: Database Credentials File Exposure
|
2023-12-03 22:44:57 +00:00
|
|
|
author: Hardik-Solanki,geeknik
|
2022-12-12 17:47:18 +00:00
|
|
|
severity: low
|
2024-01-02 16:16:15 +00:00
|
|
|
description: Internal file exposed containing database credentials.
|
2022-12-12 17:47:18 +00:00
|
|
|
reference:
|
|
|
|
- https://github.com/maurosoria/dirsearch/blob/master/db/dicc.txt
|
2022-12-10 13:40:08 +00:00
|
|
|
metadata:
|
|
|
|
verified: true
|
2023-10-14 11:27:55 +00:00
|
|
|
max-request: 1
|
2022-12-10 13:40:08 +00:00
|
|
|
github-query: filename:database_credentials.inc
|
|
|
|
tags: exposure,database,config,files
|
|
|
|
|
2023-04-27 04:28:59 +00:00
|
|
|
http:
|
2022-12-10 13:40:08 +00:00
|
|
|
- method: GET
|
|
|
|
path:
|
|
|
|
- "{{BaseURL}}/database_credentials.inc"
|
|
|
|
|
|
|
|
matchers-condition: and
|
|
|
|
matchers:
|
|
|
|
- type: word
|
|
|
|
part: body
|
|
|
|
words:
|
2023-12-03 22:44:57 +00:00
|
|
|
- 'DATABASE_USER'
|
|
|
|
- 'DB_USER'
|
|
|
|
- 'USERNAME'
|
|
|
|
- 'USER'
|
|
|
|
condition: or
|
|
|
|
|
|
|
|
- type: word
|
|
|
|
part: body
|
|
|
|
words:
|
|
|
|
- 'DATABASE_PASS'
|
|
|
|
- 'DB_PASS'
|
|
|
|
- 'PASSWORD'
|
|
|
|
- 'PASS'
|
|
|
|
condition: or
|
2022-12-10 13:40:08 +00:00
|
|
|
|
|
|
|
- type: status
|
|
|
|
status:
|
|
|
|
- 200
|
2023-12-03 22:44:57 +00:00
|
|
|
- 401
|
|
|
|
- 403
|
|
|
|
condition: or
|
|
|
|
|
|
|
|
- type: word
|
|
|
|
part: body
|
|
|
|
words:
|
|
|
|
- 'Access denied'
|
|
|
|
- 'Unauthorized'
|
|
|
|
condition: or
|
|
|
|
negative: true
|
|
|
|
|
|
|
|
- type: word
|
|
|
|
part: header
|
|
|
|
words:
|
|
|
|
- 'Content-Type: text/plain'
|
|
|
|
- 'Content-Type: application/json'
|
|
|
|
condition: or
|
2024-01-15 11:49:24 +00:00
|
|
|
# digest: 4a0a00473045022100dd61e72108c7a630e7d3c08da90d30790bf19a9b060596e9dd093b2a1724f80a02206c8843a6ec2a160adda4180b3515f16a6009ba71cdbc8f941ea3483a6955c6d6:922c64590222798bb761d5b6d8e72950
|