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

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