id: arcgis-api-service

info:
  name: ArcGIS REST Services Directory - Detect
  author: HeeresS
  severity: info
  description: Check for the existence of the "/arcgis/rest/services" path on an ArcGIS server.
  reference:
    - https://enterprise.arcgis.com/en/
  classification:
    cpe: cpe:2.3:a:esri:arcgis_server:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: esri
    product: arcgis_server
    shodan-query:
      - title:"ArcGIS"
      - http.title:"arcgis"
    fofa-query: title="arcgis"
    google-query: intitle:"arcgis"
  tags: panel,arcgis,rest,api,detect,esri

http:
  - method: GET
    path:
      - '{{BaseURL}}/arcgis/rest/services'

    matchers-condition: and
    matchers:
      - type: word
        words:
          - 'REST Services Directory'
          - 'ArcGIS'
        condition: and

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - 'Current Version:\s*<\/b>\s*([0-9.]+)'
# digest: 490a0046304402204e58ba037d698a89bbe20e2ab98f57e86ef9961abe2ad964b418fb70e47b16680220066e6e31f2193019272200ac74bb0b2c1cdc5eb9b0562d010fd4507c213f4639:922c64590222798bb761d5b6d8e72950