id: config-properties

info:
  name: Config Properties Exposure
  author: j4vaovo,DhiyaneshDK
  severity: high
  description: Config Properties were exposed.
  reference:
    - https://twitter.com/win3zz/status/1657624974851702784/photo/1
  metadata:
    verified: true
    max-request: 3
  tags: exposure,config,properties

http:
  - method: GET
    path:
      - "{{BaseURL}}/config.properties"
      - "{{BaseURL}}/config.properties.bak"
      - "{{BaseURL}}/ui_config.properties"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - 'jdbc:[a-z:]+://[A-Za-z0-9\.\-_:;=/@?,&]+'
          - '((?i)password|pwd|pass|secretkey)='
        condition: or

      - type: word
        part: header
        words:
          - "text/plain"
          - "bytes"
        condition: or

      - type: word
        part: header
        words:
          - "text/html"
        negative: true

      - type: status
        status:
          - 200
# digest: 4a0a00473045022002d752443fd76b8c3d674cbfb38d6efd67553432af28660ca6ace2dd663ec2cf022100b60e56e0daa365feee936cdff077009b21a8b7edfe1f7b24ec5fc7d972d546cd:922c64590222798bb761d5b6d8e72950