id: arcgis-detect

info:
  name: ArcGIS - Detect
  author: righettod
  severity: info
  description: |
    ArcGIS products was detected.
  reference:
    - https://enterprise.arcgis.com/en/
  metadata:
    verified: true
    max-request: 5
    shodan-query: http.title:"ArcGIS"
  tags: tech,arcgis,detect

http:
  - method: GET
    path:
      - "{{BaseURL}}/portal/sharing/rest"
      - "{{BaseURL}}/portal/portalhelp/en/rest/"
      - "{{BaseURL}}/arcgis/rest/services"
      - "{{BaseURL}}/server/rest/services"
      - "{{BaseURL}}/arcgis/"

    stop-at-first-match: true
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains_any(to_lower(body), "<title>arcgis portal directory", "search arcgis enterprise help", "<title>arcgis</title>", "arcgis rest services directory", "<title>arcgis hub</title>")'
        condition: and

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '(?i)&copy;\s+([0-9]+)\s+Esri\.'
          - '<b>Current\s+Version:\s+<\/b>([0-9.]+)'
# digest: 490a0046304402203aba33bd7309c354a64650110a1ce1e29540234bc9cd3ed1ab33e245790f3ad50220262e6ae6f66559c1ded7625dc310efd5b6e9ff55eb04e3b817f752e4cfdbddb0:922c64590222798bb761d5b6d8e72950