id: wordpress-iwp-client

info:
  name: InfiniteWP Client Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/iwp-client/
  metadata:
    plugin_namespace: iwp-client
    wpscan: https://wpscan.com/plugin/iwp-client
  tags: tech,wordpress,wp-plugin,top-200,discovery

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

    payloads:
      last_version: helpers/wordpress/plugins/iwp-client.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: 4b0a00483046022100c43b082e25d9e9c320778f041e4622ba85e18fb06982938eac886ea873bba7ba022100e93d810cd9add1fe687663732755d0b890bcc4ed64f5aa62f962274a5b341fab:922c64590222798bb761d5b6d8e72950