id: wp-debug-log

info:
  name: WordPress Debug Log - Exposure
  author: geraldino2,dwisiswant0,philippedelteil,FLX
  severity: low
  description: Exposed Wordpress debug log.
  metadata:
    max-request: 4
  tags: wp,wordpress,log,exposure

http:
  - method: GET
    path:
      - "{{BaseURL}}/{{paths}}/debug.log"

    payloads:
      paths:
        - 'wp-content'
        - 'wordpress'
        - 'wp'
        - 'blog'

    stop-at-first-match: true
    host-redirects: true
    max-redirects: 3
    max-size: 5000
    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - 'regex("[[0-9]{2}-[a-zA-Z]{3}-[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2} [A-Z]{3}] PHP", body)'
          - 'contains_any(body, "PHP Warning:", "PHP Notice:", "Undefined array", "Undefined variable")'
          - 'status_code == 200'
        condition: and

    extractors:
      - type: dsl
        dsl:
          - to_string(content_length)+ " bytes"
# digest: 490a00463044022021ec7827a42ff27e8a7fc994497ca6ab5534143f2793d0130d1fe35d739694180220057d84f54cd498c9673af7360fc84d2c49002ebf004042ea662e9f32e11debe0:922c64590222798bb761d5b6d8e72950