id: lesshst-history

info:
  name: Less History - File Disclosure
  author: kazet
  severity: low
  description: |
    LESSHST file is a Less History File. LESSHST file is a Less History File. Less is a terminal pager program on Unix, Windows, and Unix-like systems used to view (but not change) the contents of a text file one screen at a time.
  metadata:
    verified: true
    max-request: 1
    shodan-query: html:"lesshst"
  tags: misconfig,disclosure,config,files

http:
  - method: GET
    max-redirects: 1
    path:
      - "{{BaseURL}}/.lesshst"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - ".less-history-file:"

      - type: word
        part: response
        words:
          - "<?xml"
          - "<env"
          - "application/javascript"
          - "application/json"
          - "application/xml"
          - "html>"
          - "text/html"
          - "image/"
        negative: true

      - type: status
        status:
          - 200
# digest: 490a004630440220689b3a7443312042f172e6f1d0c11707c465c600ad4a0badd4016ac87e75cfe1022021ede28223dcbe98c8d6a9aee809f583fc0e61c1fad2f7d6420aed8c61964a94:922c64590222798bb761d5b6d8e72950