id: privatebin-detect

info:
  name: PrivateBin - Detect
  author: righettod
  severity: info
  description: |
    PrivateBin was detected.
  reference:
    - https://privatebin.info/
  classification:
    cpe: cpe:2.3:a:privatebin:privatebin:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: privatebin
    product: privatebin
    shodan-query: title:"PrivateBin"
  tags: tech,privatebin,detect

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

    redirects: true
    max-redirects: 2
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains_any(to_lower(body), "privatebin.js", "privatebin</title>", "content=\"privatebin")'
        condition: and

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - 'privatebin\.[a-z]{2,3}\?([0-9.]+)'
# digest: 4b0a0048304602210082863a36cde87413ef6e62a5960d7b757e79d739e6734340fbaca1b6de75f782022100b9d4dbf27a705647cf6704781ae8a22acf9bb686980292d73bfead839de3e9d6:922c64590222798bb761d5b6d8e72950