id: wordpress-nextend-facebook-connect

info:
  name: Nextend Social Login and Register Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/nextend-facebook-connect/
  metadata:
    plugin_namespace: nextend-facebook-connect
    wpscan: https://wpscan.com/plugin/nextend-facebook-connect
  tags: tech,wordpress,wp-plugin,top-200,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/nextend-facebook-connect/readme.txt"

    payloads:
      last_version: helpers/wordpress/plugins/nextend-facebook-connect.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: 4a0a00473045022079c69e852919e5bb8aee205b217bd58ae897c5a1e559deab33ce7610119d0980022100a6641875a1ba3eb61093920cc35cdce8d25a63c2e93776ab7106e6d7b04a187b:922c64590222798bb761d5b6d8e72950