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

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: 490a0046304402200084eb1e68a4983b435a0570b587a8b4ad2616868cb54700fe78e8afc8eb6c57022067d8ab201b865c434d36f5a016308eaeea0ed90a8d48d807b8fe6de3563d2aa2:922c64590222798bb761d5b6d8e72950