id: cheatsh-detect

info:
  name: cheat.sh Instance - Detection
  author: ritikchaddha
  severity: info
  description: |
    Detects exposed cheat.sh instances. cheat.sh is a community-driven cheat sheet service that provides quick command-line reference for programming languages and Unix commands. While designed to be public, self-hosted instances may expose internal documentation.
  reference:
    - https://github.com/chubin/cheat.sh
    - https://cheat.sh/
  metadata:
    verified: true
    max-request: 1
    product: cheat.sh
    vendor: chubin
    fofa-query: title="cheat.sh"
    shodan-query: title:"cheat.sh"
  tags: tech,cheatsh,detection,devtools

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

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "cheat.sh"
          - "curl cheat.sh"
        condition: or

      - type: word
        part: body
        words:
          - ":firstpage"
          - "cht.sh"
          - "/files/style.css"
        condition: or

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