id: viminfo-disclosure

info:
  name: Viminfo - File Disclosure
  author: DhiyaneshDK
  severity: low
  description: |
    Viminfo file was detected.
  reference:
    - https://renenyffenegger.ch/notes/development/vim/editing/viminfo/index
  classification:
    cpe: cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: vim
    product: vim
    shodan-query: html:"Viminfo"
  tags: devops,exposure,viminfo,config,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/.viminfo"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'Viminfo version'
          - 'Command Line History'
        condition: and

      - type: word
        part: header
        words:
          - 'application/octet-stream'

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