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

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: 490a004630440220674f4faf39bf1e50c0ba692e65fb9a4189d461e22ea64fdd6e03ca0868db573c0220330b90d8be42d96ce19765eba2e7f664965e81e59c5647b391713ab690293630:922c64590222798bb761d5b6d8e72950