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

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