id: nacos-version

info:
  name: Nacos - Detect
  author: Arm!tage
  severity: info
  description: |
    Nacos was detected.
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cwe-id: CWE-200
    cpe: cpe:2.3:a:alibaba:nacos:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    shodan-query: title:"Nacos"
    product: nacos
    vendor: alibaba
  tags: tech,detect,nacos,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/v1/console/server/state?accessToken=&username="
      - "{{BaseURL}}/nacos/v1/console/server/state?accessToken=&username="

    stop-at-first-match: true
    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - '"version":"(\d+\.\d+\.\d+)"'

      - type: regex
        part: content_type
        regex:
          - 'application/json'

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        regex:
          - '"version":"(\d+\.\d+\.\d+)"'
# digest: 4a0a00473045022100fc786446f0853e35c92204e8fbd4d13fe86c35ba529dfcde6d0b37bc270ed0d202202d7a52f5e0c0e5932b69a55740845f570693163b976120f983c0902c68dea61c:922c64590222798bb761d5b6d8e72950