id: wordpress-wps-hide-login

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

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