id: default-spx-key

info:
  name: SPX PHP Profiler - Default Key
  author: vagnerd
  severity: high
  description: |
    SPX PHP profiler default spx key were discovered.
  remediation: |
    - https://github.com/NoiseByNorthwest/php-spx#security-concern
  reference:
    - https://github.com/NoiseByNorthwest/php-spx
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
    cvss-score: 8.3
    cwe-id: CWE-522
  metadata:
    verified: true
    max-request: 11
  tags: spx-php,debug,misconfig,spx

http:
  - method: GET
    path:
      - "{{BaseURL}}/?SPX_KEY={{api_key}}&SPX_UI_URI=/"

    attack: batteringram
    payloads:
      api_key:
        - dev
        - devel
        - stg
        - stag
        - staging
        - prd
        - prod
        - production
        - test
        - testing
        - spx
    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<title>SPX Control Panel</title>'
          - 'SPX_ENABLED'
          - "Configuration"
        condition: and

      - type: word
        part: header
        words:
          - "text/html"

      - type: status
        status:
          - 200
# digest: 4a0a00473045022100f4dd0d25aac1b282cdfe2452797e53d518adefeb31d031a5e25490e6c352e43e02204a458ffa61a82703da684d6a22fa2ac3d88f7b4c15bf5c94a08b8bb54efb7d23:922c64590222798bb761d5b6d8e72950