id: prestashop-admin-panel

info:
  name: Prestashop Admin Login Panel - Detect
  author: mastercho
  severity: info
  description: |
    Prestashop admin login panel was detected.
  reference:
    - https://www.prestasoo.com/blog/prestashop-admin-login-url
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cwe-id: CWE-200
    cpe: cpe:2.3:a:prestashop:prestashop:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    vendor: prestashop
    product: prestashop
    shodan-query:
      - http.component:"Prestashop"
      - cpe:"cpe:2.3:a:prestashop:prestashop"
  tags: prestashop,panel,login,discovery

http:
  - method: GET
    path:
      - '{{BaseURL}}/{{paths}}/'

    payloads:
      paths:
        - 'backoffice'
        - 'back-office'
        - 'Backoffice'
        - 'back-office'
        - 'admin-dev'
        - 'backend'
        - 'admin_'
        - 'mikromanage'
        - 'manage'
        - 'manager'
        - 'adminshop'
        - 'administrator'
        - 'administracja'
        - 'adm'
        - 'webadmin'
        - 'admin-web'
        - 'kontrollpanel'
        - 'amministra'
        - 'adminas'
        - 'admin123'
        - 'admin0'
        - 'adminxx'
        - 'admin'
        - 'ps-admin'
        - 'admins'
        - 'p-office'
        - 'admin333'
        - 'admin4444'
        - 'admin66'
        - 'backadmin'
        - 'admin1'
        - 'BackofficeNEW'
        - '4dm1n'
        - 'administrazione'
        - 'accesadministrateur'
        - '_admin123'
        - 'iadmin'
        - 'panel'

    host-redirects: true
    max-redirects: 3
    stop-at-first-match: true

    extractors:
      - type: regex
        name: version
        part: body
        group: 1
        regex:
          - '<script type="text\/javascript" src="..\/js\/admin\/login.js\?v=([\d.]+)"><\/script>'

    matchers-condition: or
    matchers:
      - type: word
        part: body
        words:
          - 'PrestaShop' # For normal presta admin panel
          - 'class="show-forgot-password'
        condition: and

      - type: word
        part: body
        words:
          - 'themes/default/css/admin-theme.css' # For modified admin panels
          - 'class="show-forgot-password'
        condition: and
# digest: 4b0a00483046022100eeb54fb27d3b655ee415ec9084201486fc9cb6ad63c7591fcaeb6220985045aa022100ea545814d5aa3194e1dbf30d23ce6adf88fd99b65869e280284e2831bba08ffd:922c64590222798bb761d5b6d8e72950