id: sftp-credentials-exposure

info:
  name: SFTP Configuration File - Credentials Exposure
  author: geeknik,sheikhrishad
  severity: high
  description: SFTP configuration file was detected.
  reference:
    - https://blog.sucuri.net/2012/11/psa-sftpftp-password-exposure-via-sftp-config-json.html
    - https://www.acunetix.com/vulnerabilities/web/sftp-ftp-credentials-exposure/
    - https://codexns.io/products/sftp_for_sublime/settings
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cwe-id: CWE-200
    cpe: cpe:2.3:a:southrivertech:titan_sftp_server:*:*:*:*:windows:*:*:*
  metadata:
    verified: true
    max-request: 2
    github-query: filename:sftp-config.json
    product: titan_sftp_server
    vendor: southrivertech
  tags: sftp,config,exposure,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/sftp-config.json"
      - "{{BaseURL}}/ftpsync.settings"

    matchers:
      - type: word
        part: body
        words:
          - '"host":'
          - '"user":'
          - '"password":'
          - '"remote_path":'
        condition: and

      - type: word
        part: body
        words:
          - "file_permissions"
          - "extra_list_connections"
        condition: and
# digest: 490a004630440220665e1173f4fe48fa39a96037b109d6b308bf076c3e6ca604d82991c204c98d9c02207b21c0c86d4d4b25b55e94270f855bdddfc3665dab443984fd0d43da303efd32:922c64590222798bb761d5b6d8e72950