id: wordpress-wordfence

info:
  name: Wordfence Security – Firewall, Malware Scan, and Login Security Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/wordfence/
  metadata:
    plugin_namespace: wordfence
    wpscan: https://wpscan.com/plugin/wordfence
  tags: tech,wordpress,wp-plugin,top-100,top-200

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

    payloads:
      last_version: helpers/wordpress/plugins/wordfence.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: 490a004630440220687d748d4e3d6f3589ceed1c0d1f4c0199908b3cf34b39df805be3779ebafbfa02207f6cb73f69e50364f6227a8e00d9d14e3a3523824f857cf60d3b0ef1bcd11a9e:922c64590222798bb761d5b6d8e72950