id: wordpress-siteorigin-panels

info:
  name: Page Builder by SiteOrigin Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/siteorigin-panels/
  metadata:
    plugin_namespace: siteorigin-panels
    wpscan: https://wpscan.com/plugin/siteorigin-panels
  tags: tech,wordpress,wp-plugin,top-200,discovery

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

    payloads:
      last_version: helpers/wordpress/plugins/siteorigin-panels.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: 4a0a00473045022100dfea29d6a0ad15f58a9b26d5f8692e47ad81fed7bad0ca2902fac74f10140b71022018dcb8f6b83f9b523fcf69a181d9154578175d1b4beefb6aa2b7fdef32b4cf21:922c64590222798bb761d5b6d8e72950