id: atom-sync-remote

info:
  name: Atom Synchronization Exposure
  author: geeknik
  severity: high
  description: |
    It discloses username and password created by remote-sync for Atom, contains FTP and/or SCP/SFTP/SSH server details and credentials
  metadata:
    verified: true
    max-request: 1
  tags: atom,exposure,config,files

http:
  - method: GET
    path:
      - "{{BaseURL}}/.remote-sync.json"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"hostname":'
          - '"username":'
        condition: and

      - type: word
        part: body
        words:
          - "passphrase"
          - "password"
        condition: or

      - type: word
        part: header
        words:
          - "application/json"

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