id: wordpress-disable-gutenberg

info:
  name: Disable Gutenberg Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/disable-gutenberg/
  metadata:
    plugin_namespace: disable-gutenberg
    wpscan: https://wpscan.com/plugin/disable-gutenberg
  tags: tech,wordpress,wp-plugin,top-200

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/disable-gutenberg/readme.txt"

    payloads:
      last_version: helpers/wordpress/plugins/disable-gutenberg.txt

    extractors:
      - type: regex
        part: body
        internal: true
        name: internal_detected_version
        group: 1
        regex:
          - '(?i)Stable.tag:\s?([\w.]+)'

      - type: regex
        part: body
        name: detected_version
        group: 1
        regex:
          - '(?i)Stable.tag:\s?([\w.]+)'

    matchers-condition: or
    matchers:
      - type: dsl
        name: "outdated_version"
        dsl:
          - compare_versions(internal_detected_version, concat("< ", last_version))

      - type: regex
        part: body
        regex:
          - '(?i)Stable.tag:\s?([\w.]+)'
# digest: 490a0046304402202438b5921d3adc1c088f0b37345f6594add7ed25c439dc5b7d2faa8156f36e8a022036e85ec54052a11fa3a4d00f64996f0e36ae22a98a07c65a42b6738c329cfb35:922c64590222798bb761d5b6d8e72950