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,discovery

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: 4b0a00483046022100d96c574ffcc81b4efb6b556c555423d4d99fb2aca2e4de75dd7e56eeeceb4092022100eed38ed9c490eedf0bc5134b902bd59d7329da29c1a4c7ff90bb3e6120aef638:922c64590222798bb761d5b6d8e72950