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