id: wordpress-wps-hide-login

info:
  name: WPS Hide Login Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/wps-hide-login/
  metadata:
    max-request: 1
    plugin_namespace: wps-hide-login
    wpscan: https://wpscan.com/plugin/wps-hide-login
  tags: tech,wordpress,wp-plugin,top-100,top-200

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

    payloads:
      last_version: helpers/wordpress/plugins/wps-hide-login.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: 4a0a00473045022100924c5e8afcef2d579a4da8c1d182dd28761976b0004b714957d8f7ac1437d83502201c30e2cffc530c0a53c577beba0d3efbc822d9ee9df46c99a96af2f3c8251432:922c64590222798bb761d5b6d8e72950