windows-privesc-check
windows-privesc-check copied to clipboard
KeyError: USERDOMAIN
What steps will reproduce the problem?
Running either version with any switch
What is the expected output? What do you see instead?
Traceback (most recent call last):
File "<string>", line 2990, in <module>
File "wpc\build\pyi.win32\wpc\outPYZ1.pyz/os", line 423, in __getitem__
KeyError: 'USERDOMAIN'
What version of the product are you using? On what operating system?
Windows 2003
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 7 Jan 2014 at 8:11
Having the same problem running windows-privesc-check2.exe --audit -a -o test --services
windows-privesc-check v2.0svn198 (http://pentestmonkey.net/windows-privesc-check)
[i] TSUserEnabled registry value is 0. Excluding TERMINAL SERVER USER
Considering these users to be trusted:
- BUILTIN\Power Users
- BUILTIN\Administrators
- NT AUTHORITY\SYSTEM
[i] Running as current user. No logon creds supplied (-u, -D, -p).
Traceback (most recent call last):
File "
Additional info c:\tony>whoami whoami nt authority\network service
OS Name: Microsoft(R) Windows(R) Server 2003, Standard Edition OS Version: 5.2.3790 Service Pack 1 Build 3790
I worked around the issue by manually setting the USERDOMAIN and USERNAME variables via set USERDOMAIN= and set USERNAME= once those were in place the executable worked. Both of those variables seem to be required by the script but not all OSes will have them set.
did u parse the options while executing command e.g
windows-privesc-check2.exe --audit -a -o test --services USERDOMAIN=WORKGROUP
Same error here - maybe you can compute USERDOMAIN and USERNAME via whoami
when those are missing?