id: wordpress-malcare-security

info:
  name: MalCare WordPress Security Plugin – Malware Scanner, Cleaner, Security Firewall Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/malcare-security/
  metadata:
    plugin_namespace: malcare-security
    wpscan: https://wpscan.com/plugin/malcare-security
  tags: tech,wordpress,wp-plugin,top-200,discovery

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

    payloads:
      last_version: helpers/wordpress/plugins/malcare-security.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: 4a0a0047304502201bc54439e815870808b1345154f9d887fda463c3c1e165602d82167a04338804022100c08b83f50a0189aa24876ca728a73515bdd7de4c6f228524428c80a01b91245d:922c64590222798bb761d5b6d8e72950