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

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