Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create sitecore_xp_cve_2025_27218.rb #19947

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

machang-r7
Copy link

Module exploits CVE-2025-27217, a .NET deserialization vulnerability for Sitecore.

Couldn't figure out any checks.

All it does is generate a serialized .NET object with the payload in it, then sends it in a HTTP header.

The exploit works when browsing to Sitecore pages, so any HTTP status code other than 200 in the response most likely means the request failed.

])
end

def exploit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a def check method, we could have:

  • A sleep command, then checking if the response from the server comes back after the sleep time. This would only work if the server execution is synchronous.
  • If we can make sure the website is Sitecore and perform a version check from the response/page body, we could have a returns CheckCode::Detected as a check result.



# Build HTTP request with malicious header
res = send_request_cgi({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation here is a little off.
Seeing how the linting workflow is also currently failing, we can run rubocop on the module in the metasploit-framework directory (might need to prefix the rubocop command with bundle exec):

1 file inspected, 41 offenses detected, 40 offenses autocorrectable
modules/exploits/windows/http/sitecore_xp_cve_2025_27218.rb - [ERROR] Rubocop failed. Please run rubocop -a modules/exploits/windows/http/sitecore_xp_cve_2025_27218.rb and verify all issues are resolved

{
'Arch' => ARCH_CMD,
'Type' => :windows_command,
'Space' => 3000,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'Space' => 3000,

'Platform' => 'win',
'Arch' => [ARCH_X86, ARCH_X64],
#I don't know why these are the only payloads that worked.
'Targets' => [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would a Windows Fetch payload work here, with the default curl option?

'DisclosureDate' => '2025-01-06',
'DefaultTarget' => 0,
'Platform' => 'win',
'Arch' => [ARCH_X86, ARCH_X64],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use ARCH_CMD as a Windows Command target, so we can add it here:

Suggested change
'Arch' => [ARCH_X86, ARCH_X64],
'Arch' => [ARCH_X86, ARCH_X64, ARCH_CMD],



'DefaultOptions' => {
'RPORT' => 443,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'RPORT' => 443,

@bwatters-r7 bwatters-r7 added module rn-modules release notes for new or majorly enhanced modules needs-docs labels Mar 10, 2025
Copy link

Thanks for your pull request! Before this can be merged, we need the following documentation for your module:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module needs-docs rn-modules release notes for new or majorly enhanced modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants