windows-privesc-check icon indicating copy to clipboard operation
windows-privesc-check copied to clipboard

KeyError: USERDOMAIN

Open GoogleCodeExporter opened this issue 9 years ago • 4 comments

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

GoogleCodeExporter avatar Mar 22 '15 13:03 GoogleCodeExporter

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 "", line 22, in File "windows_privesc_check\build\pyi.win32\windows_privesc_check\outPYZ1.pyz/wpc.utils", line 614, in populate_scaninfo File "windows_privesc_check\build\pyi.win32\windows_privesc_check\outPYZ1.pyz/os", line 425, in getitem KeyError: 'USERDOMAIN'

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

sertkeskus avatar Mar 11 '16 12:03 sertkeskus

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.

fchyla avatar Apr 04 '16 13:04 fchyla

did u parse the options while executing command e.g

windows-privesc-check2.exe --audit -a -o test --services USERDOMAIN=WORKGROUP

iamtutu avatar Apr 21 '16 06:04 iamtutu

Same error here - maybe you can compute USERDOMAIN and USERNAME via whoami when those are missing?

epinna avatar Dec 27 '16 12:12 epinna