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

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