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
  metadata:
    verified: true
    max-request: 1
    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: 490a004630440220778d9bfb13df46593453e6e11bbae8931112f2d6b97b5e4a5825d0eeae42af8202202f27116c557a1ee76a284cc98400bdb792a88f95295f2b710cc4fb110a936278:922c64590222798bb761d5b6d8e72950
