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

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