id: couchdb-detect
info:
  name: CouchDB - Detect
  author: pussycat0x
  severity: info
  description: |
    Detects instances of Apache CouchDB server.
  metadata:
    verified: true
    max-request: 1
    shodan-query: html:""couchdb":"
  tags: couchdb,tech,detect,db

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

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"couchdb":'
          - '"vendor":'
        condition: and

      - type: word
        part: content_type
        words:
          - 'application/json'

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        name: version
        group: 1
        regex:
          - '"version":"([0-9]+\.[0-9]+\.[0-9]+)"'
# digest: 490a0046304402203573b4033493abe3754b5aae0ceb59467cbd3e5e8ee56a049456aabf273a9ad6022013a5ff95ac532f368d116f14456bb9b14b1a3ceafac29bc9b11acd2b7676f11e:922c64590222798bb761d5b6d8e72950