id: gradle-cache-node-detect

info:
  name: Gradle Enterprise Build Cache Node Login Panel - Detect
  author: Adam Crosser,righettod
  severity: info
  description: Gradle Enterprise Build Cache Node login panel was detected.
  reference:
    - https://gradle.com/gradle-enterprise-solutions/build-cache/
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cwe-id: CWE-200
  metadata:
    max-request: 1
    verified: true
    shodan-query: http.html:"Gradle Enterprise Build Cache Node"
  tags: panel,gradle,detect

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200 || status_code == 401'
          - 'contains_any(to_lower(body), "gradle enterprise build cache node", "com.gradle.error.fallback")'
        condition: and

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '(?i)"applicationVersion":"([0-9.]+)"'
          - '(?i)Gradle\s+Enterprise\s+Build\s+Cache\s+Node\s+([0-9.]+)'
# digest: 490a0046304402202f065588fff908b9d1b72d4e25caf1892990b37a378a11c1118ce5d9232a413102200b9483326c26d5b13a60a9049913f87df96dac85da9f388c41cb0762346c295b:922c64590222798bb761d5b6d8e72950