id: wordpress-header-footer-elementor

info:
  name: Ultimate Addons for Elementor (Formerly Elementor Header & Footer Builder) Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/header-footer-elementor/
  metadata:
    plugin_namespace: header-footer-elementor
    wpscan: https://wpscan.com/plugin/header-footer-elementor
  tags: tech,wordpress,wp-plugin,top-100,top-200,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/header-footer-elementor/readme.txt"

    payloads:
      last_version: helpers/wordpress/plugins/header-footer-elementor.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: 4a0a00473045022100fad7367022b270666a82d3a90146d3fefa3338cd4eed8bc9acd0b12868570e1a0220050f56313cefceb016509c9a47488fd7c3efd2c76343860ef4f9707c7b30b2cf:922c64590222798bb761d5b6d8e72950